摘要:
1 #include 2 #include 3 #include 4 using namespace std; 5 typedef long long ll; 6 const int N=1e6+10,M=26; 7 char s[N],s2[N]; 8 int n,f,k; 9 struct SAM { 10 int go[N][M],pre[N],mxl[N],c[... 阅读全文
摘要:
题目链接 题意:统计树上每个结点中恰好出现了k次的颜色数。 dsu on tree/线段树合并裸题。 启发式合并1:(748ms) 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int 阅读全文