OJ-Problems-Source/HDOJ/2203_autoAC.cpp
2016-08-22 00:09:53 +08:00

13 lines
238 B
C++

#include<stdio.h>
#include<string.h>
int main()
{
char s1[200001],s2[110000];
while(~scanf("%s %s",s1,s2))
{
sprintf(s1,"%s%s",s1,s1);
if(strstr(s1,s2))puts("yes");
else puts("no");
}
}