Str

两个串 s 和 t 相似当且仅当它们所有的字符的数量都相同。 比较s的两个子串是否相似是 O(26) 的。 暴力枚举 n 的因子 k 。比较 n/k 个串是否相似。 #include<bits/stdc++.h> using namespace std; string hh; int len; int c[30][100001]; inline int lb (int n) { retur
相关文章
相关标签/搜索