摘要: 题目:P3375 【模板】KMP字符串匹配 #include<cstdio> #include<cmath> #include<iostream> #include<algorithm> #include<cstring> using namespace std; int next[1000000] 阅读全文
posted @ 2020-11-06 21:07 Li_yxxx 阅读(52) 评论(0) 推荐(0)
摘要: 题目:P4779 【模板】单源最短路径 #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #include<cstring> #include<queue> const int MaxN=100010; i 阅读全文
posted @ 2020-11-05 17:55 Li_yxxx 阅读(57) 评论(0) 推荐(0)
摘要: 题目:P3371【模板】单源最短路径 #include<iostream> #include<cstdio> #include<cmath> using namespace std; const int N=1000005,M=1000005; const long long inf=2147483 阅读全文
posted @ 2020-11-04 19:31 Li_yxxx 阅读(39) 评论(0) 推荐(0)
摘要: 题目链接:洛谷P3374 【模板】轻重链剖分 #include<iostream> #include<algorithm> #include<cstdio> #include<cmath> #include<cstring> using namespace std; struct node{ int 阅读全文
posted @ 2020-10-29 21:43 Li_yxxx 阅读(75) 评论(0) 推荐(0)
摘要: 题目链接:洛谷_P3740贴海报 题目描述 Bytetown城市要进行市长竞选,所有的选民可以畅所欲言地对竞选市长的候选人发表言论。为了统一管理,城市委员会为选民准备了一个张贴海报的electoral墙。 张贴规则如下: electoral墙是一个长度为N个单位的长方形,每个单位记为一个格子; 所有 阅读全文
posted @ 2020-10-29 21:33 Li_yxxx 阅读(72) 评论(0) 推荐(0)
摘要: Visualgo:算法可视化 公式编辑器 算法合集 模板合集 阅读全文
posted @ 2020-10-22 17:56 Li_yxxx 阅读(53) 评论(0) 推荐(0)
摘要: 题目链接:洛谷P1600 天天爱跑步 推荐一个写的很好很好很好*n的题解 思路见代码注释 #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #include<cstring> using namespace 阅读全文
posted @ 2020-08-21 19:36 Li_yxxx 阅读(70) 评论(0) 推荐(0)
摘要: 题目:洛谷P3374 【模板】树状数组 1 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #include<cmath> using namespace std; int n,m; int a[10 阅读全文
posted @ 2020-08-20 19:51 Li_yxxx 阅读(70) 评论(0) 推荐(0)
摘要: 题目:洛谷P3372 【模板】线段树 1 #include<iostream> #include<cmath> #include<algorithm> #include<cstdio> using namespace std; int n,m; long long a[100005]; long l 阅读全文
posted @ 2020-08-20 19:46 Li_yxxx 阅读(68) 评论(0) 推荐(0)
摘要: 题目链接:洛谷_P3648 [APIO2014]序列分割 题目描述 你正在玩一个关于长度为 nn 的非负整数序列的游戏。这个游戏中你需要把序列分成 k + 1k+1 个非空的块。为了得到 k + 1k+1 块,你需要重复下面的操作 kk 次: 选择一个有超过一个元素的块(初始时你只有一块,即整个序列 阅读全文
posted @ 2020-08-20 18:47 Li_yxxx 阅读(89) 评论(0) 推荐(1)