https://pan.baidu.com/s/1AxKIn3elEogibxA3J8FXuw wy62
1 rd1();k=rd(); 2 //cerr<<flag; 3 if(flag) printf("%d",n-k+1); 4 else 5 { 6 if(k==1) 7 { 8 ans=max(cc[0],max(cc[1],max(cc[2],cc[3]))); 9 printf("%d",ans); 10 } 11 else 12 { 13 int mx=n-k+1; 14 FOR(i,1,mx) 15 { 16 int pp=0; 17 FOR(j,0,k-1) pp=pp*4+a[i+j]; 18 //cerr<<i<<" "<<pp<<endl; 19 ++cnt[pp]; 20 } 21 mx=1;FOR(i,1,k) mx*=4;--mx; 22 FOR(i,0,mx) gmax(ans,cnt[i]); 23 printf("%d",ans); 24 } 25 }