求助为什么这样匹配是对的?
查看原帖
求助为什么这样匹配是对的?
534425
IhpEcVns楼主2022/10/21 15:56
#include<bits/stdc++.h>
using namespace std;
main(){
  int n,i=1,o=1;string s;cin>>n>>s;
  for(;i<n;++i)for(;s[i]^s[i%o];++o);
  cout<<o;
}
2022/10/21 15:56
加载中...