游云吞鲸
游云吞鲸
全部文章
分类
归档
标签
去牛客网
登录
/
注册
游云吞鲸的博客
全部文章
(共22篇)
题解 | 收集金币
#include<bits/stdc++.h> using namespace std; int inn[1005][1005]; #define int long long //这题没想到要开长整型弄半天 void solve() { int n,m;cin>>n...
2026-01-23
0
5
题解 | Boredom
#include<bits/stdc++.h> using namespace std; #define int long long vector<int>cnt(100001),dp(100001); void solve() { int n;cin>...
2026-01-22
0
6
题解 | 小红蹦跳蹦跳
//(a+b)modP=[(amodP)+(bmodP)]modP //(a×b)modP=[(amodP)×(bmodP)]modP #include<bits/stdc++.h> using namespace std; #define int long long const int...
2026-01-22
0
7
题解 | 小红的双排列删除得分
//思路很简单:前缀和+线性dp //本题一个细节需要注意dp[i]的传递性,即if里的dp[i]=dp[i-1];,这里一开始没写一直没过。。。。。。 #include <bits/stdc++.h> using namespace std; #define int long long...
2026-01-22
0
7
题解 | 约瑟夫环
//刚学了双端队列,想着用这个方法做一下 #include <bits/stdc++.h> using namespace std; int main() { int n,k,m;cin>>n>>k>>m; deque<int&...
2026-01-20
0
11
题解 | 括号的匹配
#include <bits/stdc++.h> using namespace std; bool isvalid(const string & );//引用传递,无需拷贝 int main() { int T;cin>>T; while(T--&...
2026-01-20
0
8
题解 | 冰冻青蛙
//首先找出质因子很重要啊,而且有个3就非常好啊,这使得我们其实只需要讨论两段就够了 #include <bits/stdc++.h> using namespace std; #define int long long signed main() { int n;cin>...
2026-01-19
0
6
题解 | 小红的数字分裂
//朱波做了半天做完了才发现这题其实是找最大公约数,下面是朱波的方法(不建议学习所以不解释了) #include <bits/stdc++.h> #include <numeric> using namespace std; #define int long long si...
2026-01-19
0
8
题解 | 一道GCD问题
//设g为结果,那么ai mod g =k,aj mod g=k-->(aj-ai)mod g=0; //则只需找相邻差值的最大公约数即可 #include <bits/stdc++.h> using namespace std; #define int long long si...
2026-01-19
0
8
题解 | 【模板】分数四则运算
//这道题做了很久啊,后来发现是判断除数是否为0时逻辑出问题了 #include <bits/stdc++.h> using namespace std; #define int long long void minus_(int x, int y) { bool m = (x...
2026-01-19
0
10
首页
上一页
1
2
3
下一页
末页