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;
}


 

 

posted @ 2013-08-10 00:05  坚固66  阅读(137)  评论(0编辑  收藏  举报