hdu 2203

来源:互联网 发布:新手学淘宝开店视频 编辑:程序博客网 时间:2024/06/06 03:49

只贴最短代码~偷笑( ⊙ 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;}