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;

}


 

 

你可能感兴趣的:(HDU)