F 定理:两个字符串s,t,其循环节各自为p,q,如果p+q-gcd(p,q)相等,则之后就一直相等 #include <bits/stdc++.h> #define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0) #define debug freopen("in.txt","r",stdin),freopen("out.txt","w",stdout); using namespace std; typedef long long ll...