标签:
#include <iostream> #include <cstring> #include <cstdio> using namespace std; char s1[250000],s2[100000]; int main() { while(cin>>s1>>s2) { int str=strlen(s1); for(int i=str;i<2*str-1;i++) s1[i]=s1[i-str]; char *ch=strstr(s1,s2); if(ch==NULL) cout<<"no"<<endl; else cout<<"yes"<<endl; } return 0; }
标签:
原文地址:http://www.cnblogs.com/nefu929831238/p/5297913.html