随笔分类 -  模板

蛤?乖乖站好!
摘要:#include using namespace std; struct node { int w, lc, rc, h; }t[M]; int merge(int A, int B) { if(!A) return B; if(!B) return A; if(t[A].w < t[B].w) swap(A, B); t[A... 阅读全文
posted @ 2017-10-31 16:33 探险家Mr.H 阅读(140) 评论(0) 推荐(0)
摘要:“Tarjan有三种算法 你们知道吗”——Tar乙己 void tarjan(int x) { low[x]=dfn[x]=++ind; q[++top]=x;mark[x]=1; for(int i=last[x];i;i=e[i].next) if(!dfn[e[i].to]) { tarjan 阅读全文
posted @ 2017-10-31 15:09 探险家Mr.H 阅读(362) 评论(0) 推荐(0)
摘要:#include #include #include #include #include #include #include #define P pair #define mp(a,b) make_pair(a,b) using namespace std; const int maxn=500100; int first[maxn],to[maxn],next[maxn],cnt,val[ma... 阅读全文
posted @ 2017-10-30 20:26 探险家Mr.H 阅读(150) 评论(0) 推荐(0)
摘要:#include #include #include #include #include #include #include using namespace std; const int maxn=50010; int first[maxn],to[maxn],next[maxn],cnt; inline int read() { int x=0,f=1; char ch=get... 阅读全文
posted @ 2017-10-30 20:10 探险家Mr.H 阅读(153) 评论(0) 推荐(0)
摘要:dinic 码着 #include<stdio.h> #include<string.h> #include<iostream> using namespace std; const int inf=0x7fffffff; const int N=100000; int head[N]; int l 阅读全文
posted @ 2017-10-23 20:56 探险家Mr.H 阅读(151) 评论(0) 推荐(0)
摘要:#include #include #include #include #include #include using namespace std;int match[maxn],link[maxn][maxn],used[maxn],ans; bool find(int u) { memset(used,0,sizeof(used)); /*for(int i=first[u]... 阅读全文
posted @ 2017-10-20 20:25 探险家Mr.H 阅读(199) 评论(0) 推荐(0)
摘要:#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> using namespace std; int t[250010][26]; in 阅读全文
posted @ 2017-10-20 20:15 探险家Mr.H 阅读(155) 评论(0) 推荐(0)
摘要:卡特兰数 打表 滑稽 #include<iostream> #include<cstdio> #include<algorithm> #include<cstdlib> #include<cmath> #include<cstring> using namespace std; string cat 阅读全文
posted @ 2017-10-20 17:50 探险家Mr.H 阅读(208) 评论(0) 推荐(0)
摘要:#include<iostream> #include<cstdio> #include<cstdlib> #include<algorithm> #include<cmath> #include<cstring> #define ll long long using namespace std; 阅读全文
posted @ 2017-09-19 17:23 探险家Mr.H 阅读(178) 评论(0) 推荐(0)