
模板
超越大哥哥
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
洛谷P2341受欢迎的牛(强连通分量模版)
强连通分量可以看作一组点 这组点中任意两个都是可到达的 然后把这一组点抽象成一个点即可#include<iostream>#include<cstdio>#include<algorithm>#include<string.h>using namespace std;const int maxn = 1e5+100;const ...原创 2019-11-05 14:41:07 · 169 阅读 · 0 评论 -
hdu4280(网络流模版)
验证了一下网络流的板子题发现有一个板子和kuangbin聚聚的板子效率相差不多可能还更高效kuangbin聚聚写的是非递归的 这个可能更容易敲一点题目大意就是输入n,m找到s t直接连图求最大流https://blog.youkuaiyun.com/Code92007/article/details/88581495(附链接)#include<iostream>#...原创 2019-11-04 21:30:51 · 200 阅读 · 0 评论 -
hdu1255(扫描线)
扫描线板子题 没啥好说的输入矩形两点 然后求覆盖两次的面积(sum为覆盖面积,sums为覆盖两次的面积)#include<iostream>#include<cstdio>#include<algorithm>#include<map>#include<string>#include<string.h>...原创 2019-10-24 17:26:49 · 222 阅读 · 0 评论 -
poj1797最短路变形
#include<iostream>#include<cstdio>#include<queue>#include<string.h>using namespace std;int t,n,m;const int maxn = 1e3+10;int mp[maxn][maxn];const int inf = 0x3f3f3f3...原创 2019-08-03 14:15:10 · 177 阅读 · 0 评论 -
luogu k层图
k层图典型例题就是可以任意选取k条边使得他们权值变化然后问最短路//// Created by xingchaoyue on 2019/7/27.//#include<iostream>#include<cstdio>#include<queue>#include<string.h>using namespace std;...原创 2019-07-27 18:51:27 · 202 阅读 · 0 评论 -
扩展kmp
扩展kmp本质还是kmp有点类似马拉车就是改变next数组含义为与记录与自身最长的公共前缀的长度(这个也用扩展kmp求)#include<iostream>#include<cstdio>#include<cmath>#include<string.h>#include<cstring>using namespac...原创 2019-08-05 18:20:55 · 171 阅读 · 0 评论 -
高斯消元(模板)
高斯消元就是求解多元一次方程组的模版具体的步骤就是每次从未知主元中选取一个作为主元找到系数最大的一个方程将方程的主元项系数化1带入其他方程使得其他方程的该主元系数变成0#include<iostream>#include<cstdio>#include<cmath>using namespace std;#define eps...原创 2019-08-02 14:08:20 · 240 阅读 · 0 评论 -
后缀自动机遍历所有子串
裸板子到现在我复杂度还是不会算#include<iostream>#include<cstdio>#include<string.h>#include<cstring>typedef long long ll;using namespace std;int tot = 1;int las = 1;struct node{ ...原创 2019-09-04 23:42:20 · 263 阅读 · 0 评论 -
主席树模版(区间第K大)
//// Created by xingchaoyue on 2019/9/10.//#include<iostream>#include<cstdio>#include<algorithm>using namespace std;const int maxn = 2e5+1000;const int M = maxn*30;int t[m...原创 2019-09-11 13:57:34 · 169 阅读 · 0 评论 -
树状数组
想了想还是继续更新博客吧(虽然咕了这么久树状数组我感觉就是前缀和和差分数组的进阶形式具体的讲解就原创 2019-07-24 20:40:06 · 208 阅读 · 1 评论 -
hdu2222(AC自动机板子题)
终于搞懂了AC自动机#include<cstdio>#include<cstring>#include<algorithm>#include<queue>#include<iostream>#include<string.h>using namespace std;const int maxn = 5000...原创 2019-05-07 19:19:43 · 219 阅读 · 0 评论 -
主席树模板
https://blog.youkuaiyun.com/acmore_xiong/article/details/52870338转载 2018-07-19 18:04:10 · 124 阅读 · 0 评论 -
poj1330 LCA(tarjan模板)
//tarjan牛逼#include<cstdio>#include<iostream>#include<string.h>using namespace std;const int maxn = 500000+100;const int maxq = 500010;int F[maxn];int find(int x){//找到祖先 ...原创 2019-04-10 19:53:41 · 161 阅读 · 0 评论 -
The Accomodation of Students (判断是否二分图+二分图匹配)
There are a group of students. Some of them may know each other, while others don't. For example, A and B know each other, B and C know each other. But this may not imply that A and C know each other....原创 2019-04-12 21:42:04 · 172 阅读 · 0 评论 -
hdu1711裸kmp(更新一下板子)
//// Created by xingchaoyue on 2019/4/21.////kmp//输入一个母串和子串 问你子串第一次在母串中出现的位置 若未曾出现输出-1#include<iostream>#include<cstdio>using namespace std;int x[10000+100];int y[1000000+100];i...原创 2019-04-21 19:09:29 · 152 阅读 · 0 评论 -
hdu3746(kmp求最短循环节 包含几个易错点)
先po一份定理KMP最小循环节、循环周期:定理:假设S的长度为len,则S存在最小循环节,循环节的长度L为len-next[len],子串为S[0…len-next[len]-1]。(1)如果len可以被len - next[len]整除,则表明字符串S可以完全由循环节循环组成,循环周期T=len/L。(2)如果不能,说明还需要再添加几个字母才能补全。需要补的个数是循环个数L-le...原创 2019-04-21 21:17:32 · 273 阅读 · 0 评论 -
Boke and Tsukkomi (一般图匹配+暴力)
https://blog.youkuaiyun.com/weyuli/article/details/10141881根据这篇博客作为模板转载 2019-04-18 15:44:45 · 189 阅读 · 0 评论 -
一个AC自动机模版
先输入一堆子串,再输入一个母串询问有多少个子串在母串中出现过(模仿的洛谷大佬的板子//// Created by xingchaoyue on 2019/4/19.//#include<cstdio>#include<cstring>#include<algorithm>#include<queue>const int ...原创 2019-04-19 14:35:56 · 114 阅读 · 0 评论 -
hdu1251字典树经典题
统计难题Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 131070/65535 K (Java/Others)Total Submission(s): 63448Accepted Submission(s): 21903Problem DescriptionIgnatius最近遇到一个难题,老师交给他很多单...原创 2019-04-19 14:47:25 · 124 阅读 · 0 评论 -
高精度模板
https://blog.youkuaiyun.com/u013615904/article/details/43373601转载 2018-07-19 18:03:24 · 115 阅读 · 0 评论