hdu 2203

只贴最短代码~偷笑( ⊙ o ⊙ )


#include<iostream>
using namespace std;
char s[200005],p[200005],t[200005];
int main()
{
    while(scanf("%s %s",&s,&p)!=EOF)
    {
        strcpy(t,s);strcat(s,t);
        if(strlen(t)>strlen(p)&&strstr(s,p)!=NULL) cout<<"yes"<<endl;
        else cout<<"no"<<endl;
    }
    return 0;
}


原文地址:https://www.cnblogs.com/jiangu66/p/3249408.html