[数学]
#include #include #include #include using namespace std;int len;int n = 1000;int next[10000];int f[50000];char s[50000];int Pow(int a, int b){ int res=1; while(b) { if(b&1) res=res*a%7; a=a*a%7; b>>=1; } return res;}void getnext(){ int j=0,k=-1; next[0]=-1; while(j 1) //周期大于1才是循环串 { cout<<"ans = "< <
#include #include #include #include