随笔分类 - B-笔记
各种奇奇怪怪的学习笔记
摘要:发现自己菜的一匹,于是发奋图强开始填坑( 可以参考老姚博客 这里 1. tarjan板子 void tarjan(int u){ ipt[u]=low[u]=++cnt; s.push(u),instk[u]=true; for(int i=head[u];i;i=edge[i].pre){ int
阅读全文
摘要:例题:Riddle 对于本题而言,每个点有两种状态:选或不选。 同时题目又给出限制条件:点集内只能选一个点,一条边上至少选一个点 这也太明显了吧 所以就是在点集内,若选择某个点则另外的点不能选;一条边上,若不选某个点,则另一个点必选。此时已经很显然了,2-SAT建边跑强连通分量判断是否矛盾,完事 但
阅读全文
摘要:#include<cstdio> #include<cstring> #include<string> #include<stack> #include<iostream> #define int long long #define WR WinterRain using namespace std
阅读全文
摘要:简易版树链剖分 #include<cstdio> #include<cstring> #include<string> #include<iostream> #define WR WinterRain using namespace std; const int WR=1001000,INF=214
阅读全文
摘要://非旋Treap(FHQ Treap) #include<cstdio> #include<cstring> #include<string> #include<ctime> #define WR WinterRain using namespace std; const int WR=10010
阅读全文
摘要:#include<cstdio> #include<cstring> #include<string> #define int long long #define WR WinterRain #define Combo void//RIP using namespace std; const int
阅读全文
摘要://Treap版本平衡树 #include<cstdio> #include<cstring> #include<string> #define WR WinterRain using namespace std; const int WR=1001000,INF=1e9+7; struct Bal
阅读全文