上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: E. Lomsat gelral 注意答案会爆int 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N=1e5+10; #define LL long long LL w[N];//w int n,q; vector<in 阅读全文
posted @ 2023-11-02 15:47 不o凡 阅读(11) 评论(0) 推荐(0)
摘要: U41492 树上数颜色 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N=1e5+10; int w[N];//w vector<int> g[N]; vector<int>qr[N]; int ans[N]; int 阅读全文
posted @ 2023-11-02 14:59 不o凡 阅读(79) 评论(0) 推荐(0)
摘要: 小蓝的疑问【算法赛】 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N=1e5+10; int w[N];//w vector<int> g[N]; vector<pair<int,int> >qr[N]; int ans 阅读全文
posted @ 2023-11-02 14:36 不o凡 阅读(19) 评论(0) 推荐(0)
摘要: F - Robot Rotation 一句话不开LL,见祖宗 感谢大佬,和洛谷上的题解 上面已经将的很清楚了,但是如果你跟我一样一开始看不懂他们的代码,那么这篇可能为你解惑 点击查看代码 #include <bits/stdc++.h> using namespace std; #define LL 阅读全文
posted @ 2023-10-31 23:49 不o凡 阅读(30) 评论(0) 推荐(0)
摘要: P4999 烦人的数学作业 注意取模可能会产生负数 点击查看代码 #include <bits/stdc++.h> using namespace std; #define LL long long const int N=250,mod=1e9+7; LL f[106][200];//长度为i时, 阅读全文
posted @ 2023-10-31 16:37 不o凡 阅读(29) 评论(0) 推荐(0)
摘要: P8764 [蓝桥杯 2021 国 BC] 二进制问题 点击查看代码 #include <bits/stdc++.h> using namespace std; #define LL long long const int N=250,mod=998244353; LL f[106][106];// 阅读全文
posted @ 2023-10-31 16:15 不o凡 阅读(68) 评论(0) 推荐(0)
摘要: P2602 [ZJOI2010] 数字计数 没想到这么大,记得开LL 调试了许久,只能说灵茶太牛了 点击查看代码 #include <bits/stdc++.h> using namespace std; #define LL long long const int N=250,mod=998244 阅读全文
posted @ 2023-10-30 21:57 不o凡 阅读(17) 评论(0) 推荐(0)
摘要: 神奇数 点击查看代码 #include <bits/stdc++.h> using namespace std; const int N=250,mod=998244353; int f[N][2000];//长度为i时,前pos-1项的和为j的合法数 string s; //pos位置,sum== 阅读全文
posted @ 2023-10-29 20:16 不o凡 阅读(18) 评论(0) 推荐(0)
摘要: bfs 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N=1e5+10; #define LL long long int cnt,h[N],to[N*2],w[N*2],ne[N*2]; void add(int a,i 阅读全文
posted @ 2023-10-25 20:09 不o凡 阅读(13) 评论(0) 推荐(0)
摘要: E. Look Back 因为每次都是2,可以推出x<=y2^(n),转化成 x/y<=2^(n),求n直接取对数即可 注意: 1.答案很大要开LL 2.不要直接乘,会爆LL,直接利用原式即可,如果后面的大,就减去大多少的对数 3.记得向上取整 点击查看代码 #include<bits/stdc++ 阅读全文
posted @ 2023-10-23 17:20 不o凡 阅读(156) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 9 下一页