自由的风0450
自由的风0450
全部文章
分类
归档
标签
去牛客网
登录
/
注册
自由的风0450的博客
全部文章
(共105篇)
题解 | 撞车
#include <iostream> #include<vector> #include<algorithm> using namespace std; struct car{ int x,v; }; bool compare(const car&am...
2025-12-12
0
0
题解 | 小红的地砖
#include <iostream> #include<vector> #include<algorithm> using namespace std; int main() { ios::sync_with_stdio(false); cin...
2025-12-12
0
6
题解 | 小红的密码修改
统计每种字符类型的数量,大于1可替换为其他所有字符,反之只能替换为同类型字符 #include <iostream> #include<string> using namespace std; int gettype(char c){ if(c>='A'&am...
2025-12-12
0
6
题解 | 斐波那契字符串
#include <iostream> #include<vector> using namespace std; using ll=long long; const int MOD=1e9+7; const int MAX_N=1e5+5; //对数,1的数量,0的数量 ...
2025-12-11
0
10
题解 | 染色
使用三个前缀和数组统计 #include <iostream> #include<vector> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr);...
2025-12-11
0
10
题解 | 空间跃迁
#include <iostream> #include<vector> #include<algorithm> using namespace std; int main() { ios::sync_with_stdio(false); cin...
2025-12-11
0
8
题解 | 【模板】静态区间和(前缀和)
#include <iostream> #include<vector> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n,q...
2025-12-10
0
9
题解 | 小红走网格
能移动到目标位置,就相当于两个线性丢番图方程有解 #include <iostream> using namespace std; long long gcd(long long a,long long b){ while(b>0){ long long ...
2025-12-10
0
8
题解 | 大撒币
只要先手能在中间放置,一定能赢 #include <iostream> using namespace std; int main() { long long a,b,r; cin>>a>>b>>r; if((a>=2*...
2025-12-10
0
8
题解 | 矩形游戏
寻找最大真因数,累加即可 #include <iostream> using namespace std; long long min_prime(long long x){ if(x%2==0)return 2; for(long long i=3;i*i<=x...
2025-12-09
0
7
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页