上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 64 下一页
摘要: const int POW = 18; void dfs(int u,int fa){ d[u]=d[fa]+1; p[u][0]=fa; for(int i=1;i d[b] ) a ^= b, b ^= a, a ^= b; if( d[a] = 0; i-- ) if( p[a][i] != p[b][i] ) a = p[a][i] , b = p[b][i]; a... 阅读全文
posted @ 2019-01-17 16:58 DWVictor 阅读(192) 评论(0) 推荐(0)
摘要: #include #include #include using namespace std; struct node{ int v[26],p; void init(){memset(v,0,sizeof(v));p=0;} }t[1001000]; char str[15],mm[15]; int cnt; void update(int &rt,int k,int c){... 阅读全文
posted @ 2019-01-17 16:57 DWVictor 阅读(280) 评论(0) 推荐(0)
摘要: 参与考古挖掘的小明得到了一份藏宝图,藏宝图上标出了 nn 个深埋在地下的宝藏屋, 也给出了这 nn 个宝藏屋之间可供开发的mm 条道路和它们的长度。 小明决心亲自前往挖掘所有宝藏屋中的宝藏。但是,每个宝藏屋距离地面都很远, 也就是说,从地面打通一条到某个宝藏屋的道路是很困难的,而开发宝藏屋之间的道路 阅读全文
posted @ 2019-01-17 16:56 DWVictor 阅读(727) 评论(0) 推荐(0)
摘要: #include #include #include #include #include using namespace std; const int maxn = 1e6+7; char str[maxn]; int sa[maxn],tp[maxn],rak[maxn],tax[maxn],a[maxn],M,N; // sa代表着 排名第i小的下标是什么 // rak 代表 下标为i... 阅读全文
posted @ 2019-01-17 16:56 DWVictor 阅读(211) 评论(0) 推荐(0)
摘要: //splay模版 #include #include #include #include #include #include using namespace std; #define MAX 500100 int root=0,N,tot=0; inline int read() { register int x=0,t=1; register char ch=... 阅读全文
posted @ 2019-01-17 16:56 DWVictor 阅读(214) 评论(0) 推荐(0)
上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 64 下一页