摘要: #include<bits/stdc++.h> #define maxn 200005 #define int long long using namespace std; int x[maxn];//x[i]表示从左往右第i条竖边 int tsum[maxn<<3],tlen[maxn<<3]; 阅读全文
posted @ 2023-09-10 16:38 非常蛋黄yl 阅读(32) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h> #define maxn 3000005 using namespace std; int n,q,id; int trie[maxn][65],cnt[maxn]; char str[maxn]; int getnum(char x){ if(x>= 阅读全文
posted @ 2023-09-10 16:37 非常蛋黄yl 阅读(25) 评论(0) 推荐(0)
摘要: int scc[N],sc;//结点i所在scc的编号 int sz[N]; //强连通i的大小 //dfn(u)为搜到结点u时的次序编号 //low(u)为u或u的子树能够追溯到的最早的栈中节点的次序号 //当dfn(u)=low(u)时,以u为根的搜索子树上的所有节点是一个强连通分量 void 阅读全文
posted @ 2023-09-10 16:36 非常蛋黄yl 阅读(34) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h> #define maxn 500005 using namespace std; int n,m; int a[maxn]; struct node{ int l,r,sum; }; node tr[4*maxn]; void build(int l, 阅读全文
posted @ 2023-09-10 16:28 非常蛋黄yl 阅读(37) 评论(0) 推荐(0)