上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页
摘要: bitset CF113C Double Happiness 把线性筛的mindiv替换为bitset #include <bitset> #include <cstdio> #include <cstring> #include <iostream> using namespace std; co 阅读全文
posted @ 2020-10-25 15:02 ke_xin 阅读(26) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2020-10-24 09:09 ke_xin 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2020-10-22 18:01 ke_xin 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 线段树 数学计算 这道题难在建模 线段树维护每次乘的数,然后除法就把当时乘的数变成$1$ 复杂度 \(O(QlogQ)\) #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using name 阅读全文
posted @ 2020-10-20 09:59 ke_xin 阅读(39) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2020-10-19 21:53 ke_xin 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 博弈论 sg函数 void getSG(int n) { memset(SG,0,sizeof(SG)); for(int i=1;i<=n;i++) { memset(vis,0,sizeof(vis));//后继状态是否出现过数字 for(int j=0;f[j]<=i&&j<=N;j++) v 阅读全文
posted @ 2020-10-18 16:01 ke_xin 阅读(24) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2020-10-15 10:40 ke_xin 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 并查集重构树 [PA2014]Fiolki bzoj3712 我们将每瓶药看成一个节点,对于一个操作合并x,y两瓶药就再新建一个节点代表这个操作,左右子节点分别是x,y两瓶药所在子树的根节点。 这样像kruskal重构树一样建出一棵二叉树,也叫并查集重构树。 可以发现对于每一对反应的两瓶药x,y,都 阅读全文
posted @ 2020-10-13 10:50 ke_xin 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 最短路 单源最短路 dijkstra堆优化 O(nlogn) 不能处理负边权 每次从队里拽出来打标记 #include <queue> #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> usin 阅读全文
posted @ 2020-10-10 17:27 ke_xin 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 最小环 信息传递 dfs #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; typedef long long ll; const int N=2000 阅读全文
posted @ 2020-10-09 17:35 ke_xin 阅读(23) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页