problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p03293
u096326554
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S = input()\nT = input()\nS_l = len(S)\nwhile S_l != 0:\n if S == T:\n print("Yes")\n break\n S = S[-1]+S[0:-1]\n print(S)\n S_l -= 1\nif S_l == 0:\n print("No")', 'S = input()\nT = input()\nS_l = len(S)\nwhile S_l != 0:\n if S == T:\n print("Yes")\n break\n S = S[-1]+S[0:-1]\n S_l -= 1\nif S_l == 0:\n print("No")']
['Wrong Answer', 'Accepted']
['s340497884', 's762127491']
[3060.0, 3060.0]
[17.0, 17.0]
[179, 166]
p03293
u102223485
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["# coding: utf-8\nS = input()\nT = input()\nfor i in range(len(T)):\n if S == T:\n print('Yes')\n exit()\n else:\n S = S[-1] + S[:-1]\n print(S)\nprint('No')", "# coding: utf-8\nS = input()\nT = input()\nfor i in range(len(T)):\n if S == T:\n print('Yes')\n exit()\n else:\n S = S[-1] + S[:-1]\nprint('No')"]
['Wrong Answer', 'Accepted']
['s273631265', 's032801894']
[3060.0, 3064.0]
[17.0, 17.0]
[180, 163]
p03293
u106297876
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s=list(input())\nt=list(input())\nans="No"\nfor i in range(n):\n s=list(s[n])+s[0:n]\n if s==t:\n ans="Yes"\n break\nprint(ans)', 's=list(input())\nt=list(input())\nn=len(s)-1\nans="No"\nfor i in range(n+1):\n s=list(s[n])+s[0:n]\n if s==t:\n ans="Yes"\n break\nprint(ans)']
['Runtime Error', 'Accepted']
['s077381459', 's227003340']
[3060.0, 2940.0]
[17.0, 18.0]
[139, 152]
p03293
u110580875
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['import sys\n\ns=input()\nt=input()\nr=""\n\nfor i in range(len(t)):\n if s==t:\n print("Yes")\n sys.exit()\n \n r=s[-1]\n s=s.strip(s[-1])\n s=r+s\n print(s,r)\n \nif s==t:\n print("Yes")\n \nelse:\n print("No")', 's=input()\nt=input()\nst=s\nans="No"\n\nfor i in range(len(s)):\n st=st[-1]+st[:-1]\n if st==t:\n ans="Yes"\n \nprint(ans)']
['Wrong Answer', 'Accepted']
['s488829785', 's660614753']
[3060.0, 9048.0]
[19.0, 28.0]
[209, 120]
p03293
u118605645
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s = input()\nt = input()\n\nfor i in range(len(s)):\n s = s[-1] + s[:-1]\n if s == t:\n print('Yes')\nprint('No')", "import sys\n\ns = input()\nt = input()\n\nfor i in range(len(s)):\n s = s[-1] + s[:-1]\n print(s)\n if s == t:\n print('Yes')\n sys.exit()\nprint('No')\n", "import sys\n\ns = input()\nt = input()\n\nfor i in range(len(s)):\n s = s[-1] + s[:-1]\n if s == t:\n print('Yes')\n sys.exit()\nprint('No')\n"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s061312494', 's817107955', 's281711750']
[3060.0, 3060.0, 2940.0]
[18.0, 17.0, 19.0]
[119, 164, 151]
p03293
u121161758
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S = list(input())\nT = input()\n\nprint(S)\nprint(T)\nfor i in range(len(S)):\n check_str = "".join(S[i:len(S)] + S[0:i])\n #print(check_str)\n if check_str == T:\n print("Yes")\n exit()\n\nprint("No")\n', 'S = list(input())\nT = input()\n\n#print(S)\n#print(T)\nfor i in range(len(S)):\n check_str = "".join(S[i:len(S)] + S[0:i])\n #print(check_str)\n if check_str == T:\n print("Yes")\n exit()\n\nprint("No")\n']
['Wrong Answer', 'Accepted']
['s362661758', 's361905847']
[2940.0, 2940.0]
[18.0, 17.0]
[213, 215]
p03293
u122195031
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['a = list(map(int,input().split()))\na.sort()\nprint(abs(a[0]-a[1])+abs(a[1]-a[2]))', 's = list(input())\nt = list(input())\n\nfor i in range(len(s)):\n a = s[-1]\n s.pop(-1)\n s.insert(0,a)\n a = []\n if s == t:\n print("Yes")\n exit()\nprint("No")']
['Runtime Error', 'Accepted']
['s819560362', 's229750849']
[3060.0, 3060.0]
[19.0, 17.0]
[80, 180]
p03293
u123135189
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = list(input())\na = input()\n\nsuccess = False\nfor _l in range(len(s)):\n print(s)\n if \'\'.join(s) == a:\n success = True\n break\n s.insert(0, s.pop())\n\nprint("Yes" if success else "No")\n', 's = list(input())\na = input()\n\nsuccess = False\nfor _l in range(len(s)):\n if \'\'.join(s) == a:\n success = True\n break\n s.insert(0, s.pop())\n\nprint("Yes" if success else "No")\n']
['Wrong Answer', 'Accepted']
['s234554175', 's832970672']
[3060.0, 2940.0]
[20.0, 17.0]
[206, 193]
p03293
u124498235
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = input()\nans = ""\nfor i in list(s):\n\tif i == "0" or i == "1":\n\t\tans += i\n\telse:\n\t\tans = ans[:-1]\nprint (ans)', 's = input()\nt = input()\nfor i in range(len(s)):\n\ts = s[-1] + s[:-1]\n\tif s == t:\n\t\tprint ("Yes")\n\t\texit()\nprint ("No")']
['Wrong Answer', 'Accepted']
['s156050280', 's897268121']
[2940.0, 2940.0]
[17.0, 20.0]
[111, 117]
p03293
u129978636
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s=str(input())\nt=str(input())\nprint(s in t+t)', "s=str(input())\nt=str(input())\nif(s in t+t):\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s982171704', 's970506572']
[2940.0, 2940.0]
[18.0, 18.0]
[45, 82]
p03293
u140697185
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["x = input()\ny = input()\n\nfor i in range(len(x)):\n if x[i:] + x[:i] == y:\n print('Yes')\n else:\n print('No')", "x = input()\ny = input()\nb = 0\nfor i in range(len(x)):\n if x[i:] + x[:i] == y:\n b=1\n break\n\n\nif b == 1:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s134651870', 's556395630']
[2940.0, 3060.0]
[18.0, 17.0]
[114, 144]
p03293
u143509139
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s=input()\nt=input()\nfor i in range(n):\n if s == t[i:] + t[:i]:\n print('Yes')\n exit(0)\nprint('No')", "s=input()\nt=input()\nfor i in range(len(s)):\n if s == t[i:] + t[:i]:\n print('Yes')\n exit(0)\nprint('No')\n"]
['Runtime Error', 'Accepted']
['s018703857', 's718617010']
[2940.0, 2940.0]
[17.0, 17.0]
[104, 110]
p03293
u146382803
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['import numpy as np\n\ns = list(input())\nt = list(input())\n\ni = 0\nif len(s) != len(t):\n print("No")\nelse:\n while True:\n s = np.roll(s,-1)\n i += 1\n if s == t:\n print("Yes")\n break\n elif i >= len(s):\n print("No")\n break\n', 'import numpy as np\n\ns = list(input())\nt = list(input())\n\ni = 0\nwhile True:\n s = list(np.roll(s,-1))\n i += 1\n if s == t:\n print("Yes")\n break\n elif i >= len(s):\n print("No")\n break\n']
['Runtime Error', 'Accepted']
['s902419307', 's166202720']
[13448.0, 13312.0]
[165.0, 168.0]
[293, 220]
p03293
u150641538
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = input()\nt = input()\n\nflag = 0\n\nfor i in range(len(s)):\n s1 = s[0:-1]\n s2 = s[-1]\n s = s2 + s1\n print(s)\n if(s == t):\n flag = 1\n break\n\nif(flag == 1):\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\n\nflag = 0\n\nfor i in range(len(s)):\n s1 = s[0:-1]\n s2 = s[-1]\n s = s2 + s1\n if(s == t):\n flag = 1\n break\n\nif(flag == 1):\n print("yes")\nelse:\n print("No")', 's = input()\nt = input()\n\nflag = 0\n\nfor i in range(len(s)):\n s1 = s[0:-1]\n s2 = s[-1]\n s = s2 + s1\n if(s == t):\n flag = 1\n break\n\nif(flag == 1):\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s396041223', 's506171838', 's132715200']
[3060.0, 3060.0, 3060.0]
[17.0, 19.0, 18.0]
[221, 208, 208]
p03293
u151366507
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S = input()\nT = input()\n\nflag = False\ns_tmp = S\nfor cnt in range(len(s)):\n s_tmp = s_tmp[-1] + s_tmp[:-1]\n if s_tmp == T:\n flag = True\n break\n\nif flag:\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\n\nflag = False\ns_tmp = S\nfor cnt in range(len(S)):\n s_tmp = s_tmp[-1] + s_tmp[:-1]\n if s_tmp == T:\n flag = True\n break\n\nif flag:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s523146706', 's808677423']
[2940.0, 3060.0]
[17.0, 18.0]
[210, 210]
p03293
u160861278
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["import collections\n\nS = list(input())\nT = list(input())\n\nfor i in range(len(S)):\n\ttmp = S[i:] + [:i]\n\tif T == tmp:\n\t\tprint('Yes')\n\t\tbreak\nprint('No') ", "S = list(input())\nT = list(input())\n\nfor i in range(len(S)):\n\ttmp = S[i:] + [:i]\n\tif T == tmp:\n\t\tprint('Yes')\n\t\tbreak\nprint('No') ", "S = list(input())\nT = list(input())\n\nfor i in range(len(S)):\n\ttmp = S[i:] + S[:i]\n\tif T == tmp:\n\t\tprint('Yes')\n\t\texit()\nprint('No') "]
['Runtime Error', 'Runtime Error', 'Accepted']
['s481067489', 's535747611', 's155847691']
[2940.0, 3064.0, 2940.0]
[17.0, 18.0, 17.0]
[150, 130, 132]
p03293
u161537170
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["S = input()\nT = input()\nflg = True\nfor i in range(0,len(S)):\n if S == T:\n print('Yes')\n break\n else:\n T = T[len(T)]+T[1:]\nelse:\n print('No')\n", "S = input()\nT = input()\n\nfor i in range(0,len(S)):\n\tif S[i] == T[-i]:\n\t\tcontinue\n\telse:\n\t\tprint('No')\n\t\treturn\n\nprint('Yes')\n", "S = input()\nT = input()\nflg = True\nfor i in range(0,len(S)):\n if S[i] == T[-i]:\n continue\n else:\n print('No')\n flg = False\n\nif flg:\n print('Yes')\n", "S = input()\nT = input()\n\nfor i in range(0,len(S)):\n\tif S[i] == T[-i]:\n\t\tcontinue\n\telse:\n\t\tprint('No')\n\t\tbreak\nelse:\n\tprint('Yes')", "S = input()\nT = input()\n\nfor i in range(0,len(S)):\n if S == T:\n print('Yes')\n break\n else:\n T = T[len(T)-1]+T[1:]\nelse:\n print('No')\n", "S = input()\nT = input()\nflg = True\nfor i in range(0,len(S)):\n if S[i] == T[-i]:\n continue\n else:\n print('No')\n flg = False\n break\n\nif flg:\n print('Yes')\n", "S = input()\nT = input()\n\nfor i in range(0,len(S)):\n if S == T:\n print('Yes')\n break\n else:\n T = T[len(T)-1]+T[0:len(T)-1]\nelse:\n print('No')\n"]
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s551157837', 's586571005', 's594582867', 's751942042', 's822363860', 's977834792', 's644598088']
[2940.0, 2940.0, 3060.0, 2940.0, 2940.0, 2940.0, 2940.0]
[19.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0]
[171, 125, 176, 129, 163, 190, 171]
p03293
u178192749
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s = input()\nt = input()\n\nfor _ in range(len(s)):\n if s[-1] + s[0:-1] == t:\n print('Yes')\n exit()\nprint('No')", "s = input()\nt = input()\n\nfor _ in range(len(s)):\n s = s[-1] + s[0:-1] \n if s == t:\n print('Yes')\n exit()\nprint('No')\n"]
['Wrong Answer', 'Accepted']
['s190576795', 's515324625']
[2940.0, 2940.0]
[17.0, 17.0]
[115, 125]
p03293
u182509543
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = input()\nt = input()\nans_flag = False\nfor i in range(len(s)):\n if s == t:\n print("Yes")\n ans_flag = True\n break\n else:\n s = s[1:] + s[0]\n print(s)\nif ans_flag == False:\n print("No")', 's = input()\nt = input()\nans_flag = False\nfor i in range(len(s)):\n if s == t:\n print("Yes")\n ans_flag = True\n break\n else:\n s = s[1:] + s[0]\nif ans_flag == False:\n print("No")']
['Wrong Answer', 'Accepted']
['s574928392', 's966891241']
[3060.0, 2940.0]
[17.0, 18.0]
[228, 211]
p03293
u185037583
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s,t=input().split()\nfor i in range(1,len(s)+1):\n if t==s[-i:]+s[:-i]:\n print('Yes')\n exit()\nprint('No')", "s=input()\nt=input()\nfor i in range(1,len(s)+1):\n if t==s[-i:]+s[:-i]:\n print('Yes')\n exit()\nprint('No')"]
['Runtime Error', 'Accepted']
['s631991348', 's582224660']
[2940.0, 2940.0]
[17.0, 17.0]
[110, 110]
p03293
u209619667
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["A = input()\nB = input()\nA=sorted(A)\nB=sorted(B)\nif A == B:\n print('Yse')\nelse:\n print('No')", "A = input()\nB = input()\nt = False\nfor a in range(len(A)):\n k=A[a:len(A)]+A[:a]\n if k == B:\n t = True\n break;\n \nif t:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s337584294', 's734893605']
[2940.0, 3060.0]
[17.0, 17.0]
[93, 162]
p03293
u220345792
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s = input()\nt = input()\n\nfor _ in range(len(s)):\n if s = t:\n print('Yes')\n exit()\n s = s[-1]+s[:-1]\nprint('No')", "s = input()\nt = input()\n\nfor _ in range(len(s)):\n if s == t:\n print('Yes')\n exit()\n s = s[-1]+s[:-1]\nprint('No')\n"]
['Runtime Error', 'Accepted']
['s044802631', 's684013285']
[2940.0, 2940.0]
[17.0, 17.0]
[131, 133]
p03293
u224983328
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S = list(input())\nT = list(input())\n\nchange = []\nflag = 0\nget = 0\n\nfor i in range(len(S)):\n if S[0] == T[i]:\n get = 1\n for j in range(len(S) - i):\n change.append(T[j+i])\n for k in range(i):\n change.append(T[k])\n \nif get == 1:\n\tfor check in range(len(S)):\n \t\tif S[check] != change[check]:\n \t\tflag = 1\n\nif flag == 1:\n print("No")\nelse:\n print("Yes")', 'Spr = input()\nT = list(input())\nS = list(Spr)\n\nchange = ""\nok = 0\n\nfor i in range(len(S)):\n if S[0] == T[i]:\n for j in range(len(S) - i):\n change += T[j+i]\n for k in range(i):\n change += T[k]\n if Spr == change:\n if ok == 0:\n \tprint("Yes")\n \tok = 1\n change = ""\n\nif i == len(S) - 1 and ok == 0:\n print("No") ']
['Runtime Error', 'Accepted']
['s349480195', 's279459810']
[3064.0, 3064.0]
[18.0, 19.0]
[378, 349]
p03293
u227082700
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s=input()\nt=input()\nfor i in range(200):\n s=s[-1]+s[:-1]\n if s==t:print("Yes")\nprint("No")', 's=input()\nt=input()\nfor i in range(200):\n s=s[-1]+s[:-1]\n if s==t:print("Yes");exit()\nprint("No")']
['Wrong Answer', 'Accepted']
['s637384078', 's202753771']
[3060.0, 2940.0]
[17.0, 18.0]
[92, 99]
p03293
u227085629
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s = input()\nt = input()\nc = 0\na_list =[]\nwhile c < len(t):\n a_list.append(t)\n a = t.pop(0)\n t.append(a)\n c += 1\nif s in a_list:\n print('Yes')\nelse:\n print('No')", "s = input()\nt = input()\nc = 0\na_list =[]\nwhile c < len(t):\n a_list.append(t)\n a = t[1:]+t[0:1]\n t = a\n c += 1\nif s in a_list:\n print('Yes')\nelse:\n print('No')\n"]
['Runtime Error', 'Accepted']
['s999067962', 's029899093']
[2940.0, 2940.0]
[17.0, 18.0]
[166, 165]
p03293
u240630407
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S = input()\nT = input()\nS = sorted(S)\nprint(S)\nT = sorted(T)\nprint(T)\nif S == T:\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\ntext = "No"\nimport array\nfor c in S:\n if S == T:\n text = "Yes"\n break\n S = S[-1] + S[:-1]\nprint(text)']
['Wrong Answer', 'Accepted']
['s789077674', 's335803067']
[3060.0, 2940.0]
[17.0, 18.0]
[119, 145]
p03293
u243699903
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s = input()\nt = input()\nif s == t:\n print('Yes')\n exit()\n \ns_num=len(s)\nfor i in range(s_num):\n s = s[-1] + s[: s_num - 1]\n if s == t:\n print('Yes')\nprint('No')\n", "s = input()\nt = input()\nif s == t:\n print('Yes')\n exit()\n\ns_num=len(s)\nfor i in range(s_num):\n s = s[-1] + s[: s_num - 1]\n if s == t:\n print('Yes')\n exit()\nprint('No')\n"]
['Wrong Answer', 'Accepted']
['s174132023', 's842163760']
[2940.0, 2940.0]
[17.0, 17.0]
[183, 194]
p03293
u252964975
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["import sys\nS1=str(input())\nS2=str(input())\nNG = False\nfor i in range(len(S1)):\n S1.append(S1[0])\n del S1[0]\n if S1 == S2:\n print('Yes')\n NG = True\n break\nif NG:\n print('No')", "import sys\nS1=str(input())\nS2=str(input())\nfor i in range(len(S1)):\n S1.append(S1[0])\n del S1[0]\n if S1 == S2:\n print('Yes')\n sys.exit()\nprint('No')", "S1=str(input())\nS2=str(input())\nfor i in range(len(S1)):\n S1.append(S1[0])\n del S1[0]\n if S1 == S2:\n print('Yes')\n return\nprint('No')\n", "S1=str(input())\nS2=str(input())\nNG = True\nfor i in range(len(S1)):\n if S1 == S2[i:len(S1)]+S2[0:i]:\n print('Yes')\n NG = False\n break\nif NG:\n print('No')\n"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s016493542', 's094594408', 's882340167', 's264923189']
[2940.0, 3064.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0, 19.0]
[186, 157, 143, 164]
p03293
u256464928
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = input()\nt = input()\nx = ""\nif s==t:\n print(\'Yes\')\nelse:\n for i in range(len(s)):\n if s[i]==t[0]:\n for j in range(i,len(s)):\n x += s[j]\n for k in range(i):\n x += s[k]\n break\n print(\'Yes\' if x==t else \'No\')', 's = input()\nt = input()\nx = ""\nif s==t:\n print(\'Yes\')\nelse:\n for i in range(len(s)):\n if s[i]==t[0] and i!=len(s)-1 and s[i+1]==t[1]:\n for j in range(i,len(s)):\n x += s[j]\n for k in range(i):\n x += s[k]\n print(x,end=\'\\n\')\n break\n print(\'Yes\' if x==t else \'No\')', "print('Yes' if input() in input()*2 else 'No')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s805558521', 's865813088', 's593747477']
[3060.0, 3064.0, 2940.0]
[17.0, 18.0, 20.0]
[245, 300, 46]
p03293
u265118937
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S = input()\nT = input()\nif s in T*2:\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\nif S in T*2:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s721927398', 's078689376']
[8912.0, 9036.0]
[30.0, 30.0]
[75, 75]
p03293
u266569040
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S = input()\nT = input()\nprint("Yes") if S[::-1] == T else print("No")', 'S = list(input())\nT = list(input())\ncount = 0\nfor i in range(len(S)):\n if S == T:\n count += 1\n S.append(S[0])\n del S[0]\nif count > 0:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s167924527', 's625039643']
[2940.0, 2940.0]
[17.0, 18.0]
[69, 188]
p03293
u271176141
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['英小文字からなる文字列S,Tが与えられます。Sを回転させてTに一致させられるか判定してください。\nすなわち、以下の操作を任意の回数繰り返してSをTに一致させられるか判定してください。\n操作:S=S1S2...S|S|のとき、SをS|S|S1S2...S|S|−1に変更する\nここで、|X|は文字列Xの長さを表します。\n"""\n\ns = input()\nt = input()\n\ns = list(s)\nt = list(t)\n\n\ncount = 0\njudgment = 0\n\n\nwhile count <= len(s)+1:\n item = s.pop()\n s.insert(0,item)\n if s == t:\n \n judgment += 1\n \n count +=1\n\n\nif judgment == 0:\n print("No")\nelse:\n print("Yes")', 's = input()\nt = input()\n\ns = list(s)\nt = list(t)\n\n\ncount = 0\njudgment = 0\n\n\nwhile count <= len(s):\n item = s.pop()\n s.insert(0,item)\n if s == t:\n \n judgment += 1\n \n count +=1\n\n\nif judgment == 0:\n print("No")\nelse:\n print("Yes")']
['Runtime Error', 'Accepted']
['s272256854', 's305469844']
[8812.0, 9128.0]
[20.0, 25.0]
[893, 501]
p03293
u277802731
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["#103b\ns=list(input())\nt=list(input())\n\nif s==t:\n print('Yes')\n exit()\nfor i in range(len(s)):\n s.insert(0,s[-1])\n del s[-1]\n if s==t:\n print('Yes')\n break\n exit()\nprint('No')\n \n ", "#103b\ns=list(input())\nt=list(input())\n\nif s==t:\n print('Yes')\n exit()\n\nfor _ in range(len(s)):\n s.insert(0,s[-1])\n del s[-1]\n if s==t:\n print('Yes')\n exit()\nprint('No')\n \n "]
['Wrong Answer', 'Accepted']
['s806661780', 's387567515']
[2940.0, 2940.0]
[17.0, 17.0]
[224, 211]
p03293
u290187182
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['import sys\nimport copy\nimport math\nimport bisect\nimport pprint\nimport bisect\nfrom functools import reduce\nfrom copy import deepcopy\nfrom collections import deque\nfrom decimal import *\n\n\ndef lcm(x, y):\n return (x * y) // math.gcd(x, y)\n\n\nif __name__ == \'__main__\':\n s = input()\n t = input()\n\n if s == t or s[::-1] ==t:\n print("Yes")\n else:\n print("No")', 'import sys\nimport copy\nimport math\nimport bisect\nimport pprint\nimport bisect\nfrom functools import reduce\nfrom copy import deepcopy\nfrom collections import deque\nfrom decimal import *\n\n\ndef lcm(x, y):\n return (x * y) // math.gcd(x, y)\n\n\nif __name__ == \'__main__\':\n s = input()\n t = input()\n\n for i in range(len(s)):\n if s[i:]+s[:i] == t:\n print("Yes")\n break\n if i == len(s)-1:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s933199617', 's764001236']
[5144.0, 5656.0]
[35.0, 53.0]
[380, 450]
p03293
u290211456
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = input()\nt = input()\nif s == t:\n print("Yes")\n quit()\nfor i in range(1,len(s)):\n s_remain = s[:len(s)-i]\n s_tofront = s[len(s)-i:]\n print(s_tofront + s_remain)\n if s_tofront + s_remain == t:\n print("Yes")\n quit()\nprint("No")', 's = input()\nt = input()\nfor i in range(len(s)):\n s_remain = s[:len(s)-i]\n s_tofront = s[len(s)-i:]\n if s_tofront + s_remain == t:\n print("Yes")\n quit()\nprint("No")']
['Wrong Answer', 'Accepted']
['s317376339', 's696090421']
[3060.0, 2940.0]
[17.0, 17.0]
[259, 186]
p03293
u295294832
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['A = input()\nB = input()\nfor i in range(len(A)):\n\u3000\u3000if(A == B):\n\u3000\u3000\u3000\u3000print("Yes")\n\u3000\u3000\u3000\u3000exit()\n\u3000\u3000A = (A+A[0])[1:]\nprint("No")\n', 'A = input()\nB = input()\nfor i in range(len(A)):\nif(A == B):\n\u3000\u3000print("Yes")\n\u3000\u3000exit()\n\u3000\u3000A = (A+A[0])[1:]\nprint("No")\n', 'A = input()\nB = input()\nfor i in range(len(A)):\n\u3000\u3000if A == B:\n\u3000\u3000\u3000\u3000print("Yes")\n\u3000\u3000\u3000\u3000exit()\n\u3000\u3000A = (A+A[0])[1:]\nprint("No")\n', 'A = input()\nB = input()\nfor i in range(len(A)):\n if A == B:\n print("Yes")\n exit()\n A = (A+A[0])[1:]\nprint("No")']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s066846118', 's397722062', 's521719681', 's350986722']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[145, 127, 144, 131]
p03293
u302292660
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = input()\nt = input()\nans = "No"\nfor i in range(len(s)):\n if s == t:\n ans = "Yes"\n break\n else:\n s = s[1]+s\n s = s[:-1]\nprint(ans)\n ', 's = input()\nt = input()\nans = "No"\nfor i in range(len(s)):\n if s == t:\n ans = "Yes"\n break\n else:\n s = s[-1]+s\n s = s[:-1]\nprint(ans)']
['Wrong Answer', 'Accepted']
['s436137502', 's965357219']
[2940.0, 3060.0]
[20.0, 18.0]
[151, 147]
p03293
u303197574
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = input()\nt = input()\nans = False\n#tests = s\nfor i in range(len(s)):\n print(s)\n if s == t:\n ans = True\n break\n s = s[-1] + s[0 : len(s) - 1]\n\nif ans:\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\nans = False\n#tests = s\nfor i in range(len(s)):\n #print(s)\n if s == t:\n ans = True\n break\n s = s[-1] + s[0 : len(s) - 1]\n\nif ans:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s328044020', 's221156505']
[3060.0, 2940.0]
[17.0, 17.0]
[213, 214]
p03293
u308684517
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = list(input())\nt = list(input())\nf = False\nl = len(s)\np = ["" for _ in range(l)]\nfor i in range(l):\n\tif s == p: \n\t\tprint("as")\n\t\tf = True\n\t\tbreak\n\tfor j in range(l):\n\t\tp[(j+i)%l] = t[j]\nif f: print("Yes")\nelse: print("No")', 's = list(input())\nt = list(input())\nf = False\nl = len(s)\np = ["" for _ in range(l)]\nif s == t: f = True\nfor i in range(l):\n\tfor j in range(l):\n\t\tp[(j+i)%l] = t[j]\n\tif s == p: \n\t\tf = True\nif f: print("Yes")\nelse: print("No")']
['Wrong Answer', 'Accepted']
['s696486389', 's230246449']
[3064.0, 3064.0]
[19.0, 19.0]
[225, 223]
p03293
u314050667
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = input()\nt = input()\nfor _ in range(len(s)):\n s = s[len(s)-1]+"".join[s[i] for i in range(len(s)-1)]\n if s == t:\n print("Yes")\n exit()\n \nprint("No")', 's = input()\nt = input()\ncnt = 1\nfor _ in range(len(s)):\n a = s[len(s)-1]\n b = [s[i] for i in range(len(s)-1)]\n bb = "".join(b)\n s = a+bb\n if s == t:\n cnt *= 0\n\nprint("No") if cnt else print("Yes")']
['Runtime Error', 'Accepted']
['s065022148', 's370115099']
[2940.0, 3060.0]
[17.0, 18.0]
[178, 218]
p03293
u326208069
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["for i in S:\n s = ''\n x = i\n s += S[1::1]\n s += x\n S = S[1::1] + S[0]\n \n if s == T:\n print('Yes')\n break\nelse:\n print('No')", "\n\ndef match_rotation(s,t):\n for i in s:\n s = s[1::] + s[0]\n if s == t:\n return 'Yes'\n else:\n return 'No'\n\n\nS = str(input())\nT = str(input())\n\n\nprint(match_rotation(S, T))"]
['Runtime Error', 'Accepted']
['s545982532', 's608098057']
[2940.0, 3060.0]
[17.0, 17.0]
[160, 425]
p03293
u327465093
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['from collections import deque\nS = input()\nT = input()\n\ns = deque(list(S))\nt = deque(list(T))\n\nn = len(s)\nfor i in range(n):\n if t == s:\n print("yes")\n break\n a = t.popleft()\n t.append(a)\nelse:\n print("no")\n', 'from collections import deque\nS = input()\nT = input()\n\ns = deque(list(S))\nt = deque(list(T))\n\nn = len(s)\nfor i in range(n):\n if t == s:\n print("Yes")\n break\n a = t.popleft()\n t.append(a)\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s851271450', 's800749933']
[3316.0, 3316.0]
[20.0, 21.0]
[232, 232]
p03293
u335295553
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["S = input()\nT = input()\n\nflag = False\nfor i in range(len(S)):\n T = T[1:] + T[:1]\n print(T)\n if S == T:\n flag = True\n break\n\nprint('Yes' if flag else 'No')\n\n", "S = input()\nT = input()\n\nflag = False\nfor i in range(len(S)):\n T = T[1:] + T[:1]\n if S == T:\n flag = True\n break\n\nprint('Yes' if flag else 'No')\n\n"]
['Wrong Answer', 'Accepted']
['s684894214', 's573686725']
[3060.0, 2940.0]
[17.0, 17.0]
[179, 166]
p03293
u340947941
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['\n\nimport numpy as np\n\nS=np.asarray(list(input()))\nT=np.asarray(list(input()))\nOKflag=False \n\nfor i in range(len(S)):\n Sr=np.roll(S,i) \n \n if Sr==T: \n OKflag=True\n break\n\nif OKflag==True: \n print("Yes")\nelse: \n print("No")', '\n\nimport numpy as np\n\nS=np.asarray(list(input()))\nT=np.asarray(list(input()))\nOKflag=False \n\nfor i in range(len(S)):\n Sr=np.roll(S,i) \n \n if (Sr==T).all(): \n OKflag=True\n break\n\nif OKflag==True: \n print("Yes")\nelse: \n print("No")']
['Runtime Error', 'Accepted']
['s574258745', 's717946696']
[12484.0, 12504.0]
[150.0, 150.0]
[443, 451]
p03293
u342051078
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['import sys\nS = list(input())\nT = list(input())\nfor i in range(len(S)):\n if S == T:\n print("Yes")\n sys.exit(0)\n l = S[1:] + list(l[0])\nprint("No")', 'import sys\nS = list(input())\nT = list(input())\n\nfor i in range(len(S)):\n if S == T:\n print("Yes")\n sys.exit(0)\n S = S[1:] + list(S[0])\nprint("No")']
['Runtime Error', 'Accepted']
['s142465040', 's923330980']
[2940.0, 2940.0]
[17.0, 17.0]
[165, 166]
p03293
u345794450
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['a = input()\nb = input()\n\nif (len(a) != len(b)):\n print("NO")\n exit(0)\nfor i in range(len(a)):\n if a[i:] + a[:i] == b:\n print("YES")\n exit(0)\nprint("NO")', 'a = input()\nb = input()\n \nif (len(a) != len(b)):\n print("No")\n exit(0)\nfor i in range(len(a)):\n if a[i:] + a[:i] == b:\n print("Yes")\n exit(0)\nprint("No")']
['Wrong Answer', 'Accepted']
['s897103997', 's462175733']
[2940.0, 2940.0]
[19.0, 17.0]
[161, 162]
p03293
u346308892
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['def spaceinput():\n return list(map(int,input().split(" ")))\n\ndef rotate(s):\n return s[-1]+s[:-1]\n\ns=input()\ns2=input()\n\ndef chk(s,s2):\n for i in range(len(s)):\n print(s2)\n if s==s2:\n return True\n s2=rotate(s2)\n print(s2)\n return False\n\nif chk(s,s2):\n print("Yes")\nelse:\n print("No")\n', 'def spaceinput():\n return list(map(int,input().split(" ")))\n\ndef rotate(s):\n return s[-1]+s[:-1]\n\ns=input()\ns2=input()\n\ndef chk(s,s2):\n for i in range(len(s)):\n #print(s2)\n if s==s2:\n return True\n s2=rotate(s2)\n\n return False\n\nif chk(s,s2):\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s147635752', 's478912449']
[3060.0, 2940.0]
[22.0, 18.0]
[340, 324]
p03293
u350049649
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["S=list(input())\nT=list(input())\nS=S+S\nans='No'\nfot i in range(len(T)):\n if S[i:len(T)]==T:\n ans='Yes'\n break\nprint(ans)", "S=list(input())\nT=list(input())\nS=S+S\nans='No'\nfor i in range(len(T)):\n if S[i:len(T)+i]==T:\n ans='Yes'\n break\nprint(ans)"]
['Runtime Error', 'Accepted']
['s994440396', 's920455941']
[2940.0, 2940.0]
[17.0, 17.0]
[126, 128]
p03293
u350093546
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s=input()\nt=input()\nresult=='No'\nfor i in range(len(s)-1):\n s=s[-1]+s[:len(s)-1]\n if s==t:\n result='Yes'\nprint(result)", "s=input()\nt=input()\nresult='No'\nfor i in range(len(s)):\n s=s[-1]+s[:len(s)-1]\n if s==t:\n result='Yes'\nprint(result)\n"]
['Runtime Error', 'Accepted']
['s336170433', 's405966945']
[3060.0, 2940.0]
[17.0, 17.0]
[123, 121]
p03293
u357751375
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s = list(input())\nt = list(input())\nfor i in range(len(s)):\n if s == t:\n print('Yes')\n exit(0)\n a = s[-1]\n s.pop(0)\n s.append(a)\nprint('No')", "s = list(input())\nt = list(input())\nfor i in range(len(s)):\n if s == t:\n print('Yes')\n exit(0)\n a = s[0]\n s.pop(0)\n s.append(a)\nprint('No')"]
['Wrong Answer', 'Accepted']
['s933913052', 's402166550']
[9084.0, 9104.0]
[27.0, 29.0]
[166, 165]
p03293
u363768711
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s, t = (input() for _ in range(2))\ntmp = t\nif s == tmp:\n print('Yes')\n exit()\nif set(s) == set(t):\n for i in range(len(s)):\n tmp = tmp[-1] + tmp[:-1]\n print(tmp)\n if tmp == t:\n print('Yes')\n exit()\nprint('No')", 'print("Yes" if input() in input()*2 else "No")']
['Wrong Answer', 'Accepted']
['s686306865', 's287841910']
[3060.0, 2940.0]
[17.0, 17.0]
[231, 46]
p03293
u368796742
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = list(input())\nt = list(input())\nfor i in range(len(s)):\n check = True:\n for j in range(len(s)):\n if t[j] != s[(i+j)%len(s)]:\n check = False\n if check:\n print("Yes")\n exit()\n \nprint("No")', 's = list(input())\nt = list(input())\nfor i in range(len(s)):\n check = True\n for j in range(len(s)):\n if t[j] != s[(i+j)%len(s)]:\n check = False\n if check:\n print("Yes")\n exit()\n \nprint("No")\n']
['Runtime Error', 'Accepted']
['s921074904', 's384984592']
[2940.0, 2940.0]
[17.0, 20.0]
[224, 212]
p03293
u371467115
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s=str(input())\nt=str(input())\nans='No'\nif s==t:\n ans='Yes'\nfor i in range(len(s)):\n s.append(s[0])\n if s==t:\n ans='Yes'\nprint(ans)\n", 's=list(input())\nt=str(input())\nans=\'No\'\nfor i in range(len(s)):\n s.append(s[0])\n if "".join(s)==t:\n ans=\'Yes\'\nprint(ans)\n', 's=list(input())\nt=str(input())\nfor i in range(len(s)):\n s.append(s[0])\n if "".join(s)==t:\n print(\'Yes\')\n break\nelse:\n print(\'No\')', "s=list(input())\nt=str(input())\nans='No'\nif ''.join(s)==t:\n ans='Yes'\nfor i in range(len(s)):\n s.append(s.pop(0))\n if ''.join(s)==t:\n ans='Yes'\nprint(ans)"]
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s404534884', 's528553346', 's892699595', 's635446162']
[2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 18.0, 18.0, 18.0]
[137, 126, 138, 159]
p03293
u371763408
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s = input()\nt = input()\n\nfor i in range(len(s)):\n s = s[-1]+s[0:len(s)-1]\n print(s)\n if s == t:\n print('Yes')\n exit()\n\nprint('No')", "s = input()\nt = input()\n\nfor i in range(len(s)):\n s = s[-1]+s[0:len(s)-1]\n if s == t:\n print('Yes')\n exit()\n\nprint('No')\n"]
['Wrong Answer', 'Accepted']
['s625438892', 's672417754']
[3060.0, 2940.0]
[17.0, 17.0]
[139, 129]
p03293
u374802266
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s=input()\nt=input()\nfor i in range(len(s)):\n if s[-i-1:0]+s[0:-i-1]==t:\n print('Yes')\n exit()\nprint('No')", "s=input()\nt=input()\nfor i in range(len(s)):\n if s[-i-1:-1]+s[-1]+s[0:-i-1]==t:\n print('Yes')\n exit()\nprint('No')\n"]
['Wrong Answer', 'Accepted']
['s072678749', 's511780564']
[3060.0, 2940.0]
[19.0, 17.0]
[122, 130]
p03293
u375006224
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['a=input()\nb=input()\ncom=a\nfor i in range(len(a)):\n com=com[1:]+com[0]\n if com==b:\n print("yes")\n break\nif com!=b:\n print("no")', 'a=input()\nb=input()\ncom=a\nfor i in range(len(a)):\n com=com[1:]+com[0]\n if com==b:\n print("Yes")\n break\nif com!=b:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s331870741', 's069248823']
[2940.0, 2940.0]
[17.0, 19.0]
[135, 136]
p03293
u377158682
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["\ndef B():\n s1 = input()\n s2 = input()\n \n YES = 'Yes'\n NO = 'No'\n \n s1list = [a for a in s1]\n s2list = [a for a in s2]\n s1list.sort()\n s2list.sort()\n \n result = YES\n for(a1,a2) in zip(s1list,s2list):\n print(a1 is a2)\n #result = NO\n print(result)\n\nif __name__ =='__main__':\n B()", "\ndef B():\n s1 = input()\n s2 = input()\n \n YES = 'Yes'\n NO = 'No'\n \n s1list = [a for a in s1]\n s2list = [a for a in s2]\n s1list.sort()\n s2list.sort()\n \n result = YES\n for(a1,a2) in zip(s1list,s2list):\n print(a1 is a2)\n #result = NO\n print(result)\n\nif __name__ =='__main__':\n B()", "def B():\n s1 = input()\n s2 = input()\n \n YES = 'Yes'\n NO = 'No'\n \n result = NO\n for i in range(len(s1)):\n p = s1[i:] + s1[:i]\n if(p in s2):\n result = YES\n \n print(result)\n \nif __name__ =='__main__':\n B()"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s252501180', 's285732019', 's334703222']
[3060.0, 3060.0, 2940.0]
[17.0, 18.0, 17.0]
[339, 339, 267]
p03293
u381680991
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['import sys\n\nS = list(input())\nT = list(input())\ns = S\n\nif S == T:\n print("Yes")\n sys.exit()\n\nS.insert(0, S[-1])\nS.pop(-1)\n\nwhile True:\n if S == T:\n print("Yes")\n break\n elif S == s:\n print("No")\n break\n else:\n S.insert(0, S[-1])\n S.pop(-1)', 'import sys\n\nS = list(input())\nT = list(input())\n\nfor _ in range(len(S)):\n if S == T:\n print("Yes")\n sys.exit()\n else:\n S.insert(0, S[-1])\n S.pop(-1)\n\nprint("No")']
['Wrong Answer', 'Accepted']
['s901601290', 's938427417']
[3064.0, 3064.0]
[17.0, 17.0]
[296, 195]
p03293
u382423941
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["import sys\n\ns = input()\nt = input()\nfor i in range(len(s)):\n s = s[-1] + s[:-1]\n print(s)\n if t == s:\n print('Yes')\n sys.exit(1)\nprint('No')\n", "import sys\n\ns = input()\nt = input()\nn = len(s)\nfor i in range(n):\n for j in range(n):\n if s[j] == t[(i + j) % n]:\n continue\n else:\n break\n else:\n print('Yes')\n sys.exit(0)\n continue\nprint('No')\n"]
['Runtime Error', 'Accepted']
['s174013143', 's114498895']
[3060.0, 2940.0]
[17.0, 17.0]
[164, 253]
p03293
u382431597
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['import sys\ns = input()\nt = input()\n\nfor i in range(len(s)):\n if s == t:\n print("Yes")\n sys.exit()\n else:\n tmp = s[0]\n del s[0]\n s = s + tmp\nprint("No")', 'import sys\ns = input()\nt = input()\n\nif all(s.count(t[i]) ==1 for i in range(len(t))):\n print("Yes")\nelse:\n print("No")', 'import sys\ns = set(input())\nt = set(input())\n\nif len(s) != len(t):\n print("No")\n sys.exit()\n\nif all(s.count(t[i]) ==1 for i in range(len(t))):\n print("Yes")\nelse:\n print("No")', 'import sys\ns = input()\nt = input()\n\nfor i in range(len(s)):\n if s == t:\n print("Yes")\n sys.exit()\n else:\n tmp = s[0]\n s = s[1:] + tmp\nprint("No")']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s158655051', 's316362357', 's512853855', 's234734811']
[2940.0, 2940.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[192, 124, 187, 179]
p03293
u382639013
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S = input()\nT = input()\n\nans =""\nfor i in reversed(S):\n ans += i\n\nif ans == T:\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\ni = 0\nwhile True:\n S = S[-1:]+S[:-1]\n if S == T:\n print("Yes")\n break\n else:\n i += 1\n if i == len(S):\n print("No")\n break']
['Wrong Answer', 'Accepted']
['s671423301', 's152425217']
[9004.0, 9124.0]
[28.0, 27.0]
[120, 192]
p03293
u390793752
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['\ndef count_diff(a,b):\n \n cnt = 0\n for c in a:\n if not(c in b):\n return False\n for c in b:\n if not(c in a):\n return False\n return True\n\ndef main():\n S = str(input())\n T = str(input())\n\n if(S==T):\n print(\'Yes\')\n return\n if(count_diff(S,T)):\n print(\'No\')\n return\n \n \n length_S = len(S)\n ch_S = S\n for i in range(length_S):\n ch_S = ch_S[length_S-1] + ch_S[0:length_S-1]\n if(ch_S == T):\n print(\'Yes\')\n return\n print(\'No\')\n\n\n\nif __name__ == "__main__":\n main()', '\ndef count_diff(a,b):\n \n cnt = 0\n for c in a:\n if not(c in b):\n cnt += 1\n return cnt\n\ndef main():\n S = str(input())\n T = str(input())\n\n if(S==T):\n print(\'Yes\')\n return\n count = count_diff(S,T)\n if(count > 0):\n print(\'No\')\n \n \n length_S = len(S)\n ch_S = S\n for i in range(length_S):\n ch_S = ch_S[length_S-1] + ch_S[0:length_S-1]\n print(ch_S)\n if(ch_S == T):\n print(\'Yes\')\n return\n print(\'No\')\n\n\n\nif __name__ == "__main__":\n main()', '\ndef count_diff(a,b):\n \n cnt = 0\n for c in a:\n if not(c in b):\n return True\n for c in b:\n if not(c in a):\n return True\n return False\n\ndef main():\n S = str(input())\n T = str(input())\n\n if(S==T):\n print(\'Yes\')\n return\n if(count_diff(S,T)):\n print(\'No\')\n return\n \n \n length_S = len(S)\n ch_S = S\n for i in range(length_S):\n ch_S = ch_S[length_S-1] + ch_S[0:length_S-1]\n if(ch_S == T):\n print(\'Yes\')\n return\n print(\'No\')\n\n\n\nif __name__ == "__main__":\n main()']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s285241971', 's602532361', 's235127671']
[3064.0, 3064.0, 3064.0]
[21.0, 17.0, 17.0]
[655, 612, 654]
p03293
u391875425
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s=input()\nt=input()\nfor i in range(0,len(s)):\n if s[i:i]+s[i:] == t:\n print('Yes')\n exit()\nprint('No')", "s=input()\nt=input()\nfor i in range(0,len(s)):\n if s[i:]+s[0:i] == t:\n print('Yes')\n exit()\nprint('No')"]
['Wrong Answer', 'Accepted']
['s744410095', 's736214646']
[2940.0, 3060.0]
[18.0, 19.0]
[109, 109]
p03293
u395620499
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["from collections import deque\ns = input()\nt = input()\n\nu = deque(s)\nok = False\nfor i in range(len(s)):\n u.rotate()\n if str(u) == t:\n ok = True\n \nprint('Yes' if ok else 'No')", "from collections import deque\ns = input()\nt = input()\n\nu = deque(s)\nok = False\nfor i in range(len(s)):\n u.rotate(1)\n if ''.join(u) == t:\n ok = True\n \nprint('Yes' if ok else 'No')"]
['Wrong Answer', 'Accepted']
['s812456860', 's461225903']
[9260.0, 9400.0]
[30.0, 32.0]
[181, 186]
p03293
u410118019
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s = input()\nt = input()\nc = 1\nfor i in range(len(s)):\n s = s[-1] + s[:-1]\n if s = t:\n c = 0\nprint('YNeos'[c::2])", "s = input()\nt = input()\nc = 1\nfor i in range(len(s)):\n s = s[-1] + s[:-1]\n if s == t:\n c = 0\nprint('YNeos'[c::2])"]
['Runtime Error', 'Accepted']
['s175862144', 's996573206']
[2940.0, 2940.0]
[18.0, 17.0]
[117, 118]
p03293
u413165887
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["import sys\ns = str(input())\nt = str(input())\nfor i in range(len(s)):\n s = s[-1] + s[:len(s)-1]\n print(s)\n if s == t:\n sys.exit()\nprint('No')", "import sys\ns = str(input())\nt = str(input())\nfor i in range(len(s)):\n s = s[-1] + s[:len(s)-1]\n print(s)\n if s == t:\n print('Yes')\n sys.exit()\nprint('No')", "import sys\ns = str(input())\nt = str(input())\nfor i in range(len(s)):\n s = s[-1] + s[:len(s)-1]\n if s == t:\n print('Yes')\n sys.exit()\nprint('No')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s280429297', 's756411915', 's241949895']
[3060.0, 3060.0, 3060.0]
[20.0, 17.0, 17.0]
[156, 177, 164]
p03293
u426108351
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S = input()\nT = input()\nans = "NO" \nfor i in range(len(S)):\n s = S[i:] + S[:i]\n if s == T:\n ans = "YES"\nprint(ans)', 'S = input()\nT = input()\nans = "No" \nfor i in range(len(S)):\n s = S[i:] + S[:i]\n if s == T:\n ans = "Yes"\nprint(ans)']
['Wrong Answer', 'Accepted']
['s394953185', 's099541141']
[2940.0, 2940.0]
[19.0, 17.0]
[119, 119]
p03293
u428618452
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["a=input()\nb=input()\nprintf('Yes' if a in (b*2) else 'No')", "a=input()\nb=input()\nprint('Yes' if a in (b*2) else 'No')"]
['Runtime Error', 'Accepted']
['s000183115', 's823768665']
[2940.0, 2940.0]
[17.0, 17.0]
[57, 56]
p03293
u430223993
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s, t = map(str, input().split())\nx = len(s)\nn = 0\nif s == t:\n n = 1\nelse:\n for i in range(x):\n s = s[-1] + s[:-1]\n if s == t:\n n = 1\n\nif n == 0:\n print('No')\nelse:\n print('Yes')", "s = input()\nt = input()\nx = len(s)\nn = 0\nif s == t:\n n = 1\nelse:\n for i in range(x):\n s = s[-1] + s[:-1]\n if s == t:\n n = 1\n \nif n == 0:\n print('No')\nelse:\n print('Yes')"]
['Runtime Error', 'Accepted']
['s213311070', 's037034296']
[3060.0, 3060.0]
[17.0, 19.0]
[214, 206]
p03293
u433175605
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['import sys\n\ns = input()\nt = input()\n\nsLen = len(s)\n\nfor i in range(sLen):\n sRote = s[1:sLen] + s[0]\n s = sRote\n print(s)\n if s == t :\n #print("Yes")\n sys.exit()\n\nprint("No")', 'import sys\n\ns = input()\nt = input()\n\nsLen = len(s)\n\nfor i in range(sLen):\n sRote = s[1:sLen] + s[0]\n s = sRote\n #print(s)\n if s == t :\n print("Yes")\n sys.exit()\n\nprint("No")']
['Wrong Answer', 'Accepted']
['s197462766', 's162592165']
[3060.0, 2940.0]
[18.0, 17.0]
[199, 199]
p03293
u434282696
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["S,T = map(str,input().split())\nans = False\nfor i in range(len(S)):\n if list(S) == [list(T)[(i+j)%(len(T))] for j in range(len(T))]:\n ans = True\nif ans:\n print('Yes')\nif not ans:\n print('No')", "S = input()\nT = input()\nans = False\nfor i in range(len(S)):\n if list(S) == [list(T)[(i+j)%(len(T))] for j in range(len(T))]:\n ans = True\nif ans:\n print('Yes')\nif not ans:\n print('No')"]
['Runtime Error', 'Accepted']
['s023869196', 's765947713']
[3060.0, 3060.0]
[18.0, 30.0]
[206, 199]
p03293
u439338533
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["import itertools as it\nimport collections as col\n\nimport sys\nsys.setrecursionlimit(10000)\n\ndef main():\n s = input()\n t = input()\n \n print(s in 2*t)\n\nif __name__ == '__main__':\n main()", "import itertools as it\nimport collections as col\n\nimport sys\nsys.setrecursionlimit(10000)\n\ndef main():\n s = input()\n t = input()\n \n print('Yes' if s in 2*t else 'No')\n\nif __name__ == '__main__':\n main()"]
['Wrong Answer', 'Accepted']
['s997143526', 's863117691']
[3316.0, 3444.0]
[20.0, 106.0]
[198, 217]
p03293
u440129511
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s=list(input())\nt=list(input())\nk=0\nfor i in range(len(t)):\n if s[i]==t[i]: \n print('Yes')\n exit()\n elif k=len(t):print('No')\n else:\n s.insert(0,s.pop(-1))\n k+=1", "s=input()\nt=input()\nfor i in range(len(s)):\n if s[i:len(s)]+s[:i]==t:\n print('Yes')\n exit()\nprint('No')"]
['Runtime Error', 'Accepted']
['s760344597', 's675283207']
[2940.0, 2940.0]
[17.0, 17.0]
[201, 120]
p03293
u440161695
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['import collections deque\nS=deque(input())\nT=deque(input())\nfor i in range(len(T)):\n if S==T:\n print("Yes")\n exit()\n t=T.popleft()\n T.appendleft(t)\nprint("No")', 'print("Yes" if input() in input()*2 else "No")']
['Runtime Error', 'Accepted']
['s404859096', 's736045632']
[2940.0, 2940.0]
[17.0, 17.0]
[167, 46]
p03293
u445619807
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['def main():\n run()\n\ndef run():\n word = input()\n word = list(word)\n target = input()\n isSame = False\n for _ in range(len(word)):\n word_string = "".join(word)\n print(word_string)\n if word_string == target:\n isSame = True\n break\n rotate_char = word.pop(0)\n word.append(rotate_char)\n if isSame:\n print("Yes")\n else:\n print("No")\n\nif __name__ == "__main__":\n main()', 'def main():\n run()\n\ndef run():\n word = input()\n word = list(word)\n target = input()\n isSame = False\n for _ in range(len(word)):\n word_string = "".join(word)\n if word_string == target:\n isSame = True\n break\n rotate_char = word.pop(0)\n word.append(rotate_char)\n if isSame:\n print("Yes")\n else:\n print("No")\n\nif __name__ == "__main__":\n main()']
['Wrong Answer', 'Accepted']
['s273390612', 's483755289']
[3064.0, 3064.0]
[18.0, 18.0]
[574, 539]
p03293
u445628522
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S=input()\nT=input()\nfor i in range(len(S)):\n if S[i]==T[0]:\n new_s=S[i:]+S[:i]\n if new_s==T:\n print("Yes")\n exit()\n\nprint("No")', 'S=input()\nT=input()\nfor i in range(len(S)):\n if S[i]==T[0]:\n new_s=S[i:]+S[:i]\n if new_s==T:\n print("Yes")\n exit()\n\nprint("No")', 'S = input()\nT = input()\nfor i in range(len(S)):\n if S[i] == T[0]:\n new_s = S[i:] + S[:i]\n if new_s == T:\n print("Yes")\n exit()\nprint("No")\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s174615597', 's342819425', 's530948363']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[169, 169, 178]
p03293
u447342168
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S = input()\nT = input()\nN = ""\nflg = False\nfor i in range(len(S)):\n N = S[i:]+S[:i]\n print(N)\n if N == T:\n flg = True\nif flg:\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\nN = ""\nflg = False\nfor i in range(len(S)):\n N = S[i:]+S[:i]\n if N == T:\n flg = True\nif flg:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s656290421', 's345073146']
[3060.0, 2940.0]
[17.0, 18.0]
[176, 163]
p03293
u455317716
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = input()\nt = input()\ndef_list = list()\nfor i in range(len(s)):\n if s[i] == t[i]:\n def_list.append(s[i])\nif len(def_list)%2 == 0:\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\nif t in s*2:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s056912416', 's503806098']
[2940.0, 2940.0]
[17.0, 17.0]
[180, 75]
p03293
u465152652
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s=input()\nt=input()\na=0\nwhile(s!=t):\n\ts =s[-1]+s[:-1]\n\ta+=1\n if a==len(s):\n \tprint("NO")\n break\nif s==t:\n\tprint("YES")\n ', 's=input()\nt=input()\na=0\nwhile(s!=t):\n\ts =s[-1]+s[:-1]\n\ta+=1\n\tif a==len(s):\n\t\tprint("NO")\n\t\tbreak\nif s==t:\n\tprint("YES")', 's=input()\nt=input()\na=0\nwhile(s!=t):\n\ts =s[-1]+s[:-1]\n\ta+=1\n\tif a==len(s):\n\t\tprint("NO")\n\t\tbreak\nif s==t:\n\tprint("YES")', "s = input(); t = input()\nc = 0 \n \nwhile (s != t):\n\ts = s[-1] + s[:-1]\n\tc += 1\n\tif c == len(s):\n\t\tprint('No')\n\t\tbreak\n \nif s == t:\n\tprint('Yes')"]
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s365130180', 's810772940', 's902891273', 's413341188']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[140, 119, 119, 212]
p03293
u468972478
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s, t = [input() for i in range(2)]\nfor _ in range(len(s)):\n s = s[1:] + s[0]\n if s = t:\n print("Yes") \n break\nelse:\n print("No")', 's, t = [input() for i in range(2)]\nfor _ in range(len(s)):\n s = s[-1] + s[:-1]\n if s == t:\n print("Yes") \n break\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s307235561', 's605234178']
[8896.0, 9028.0]
[24.0, 30.0]
[137, 140]
p03293
u469239325
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = input()\nt = input()\nss = s+s+s\nf=0\nfor i in range(len(s)):\n if ss[i:len(s)+i] == t:\n f = 1\nif f:\n print("Yes")\nelse:\n print("No")\n', 's = input()\nt = input()\nss = s+s\nf=0\nfor i in range(len(s)):\n if ss[i:len(s)+i] == t:\n f = 1\nif f:\n print("Yes")\nelse:\n print("No")\n', 's = input()\nt = input()\nss = s+s\nf=0\nfor i in range(len(s)):\n if ss[i:len(s)+i] == t:\n f = 1\nif f:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s197492861', 's811709545', 's985708739']
[2940.0, 2940.0, 2940.0]
[19.0, 17.0, 17.0]
[146, 144, 147]
p03293
u470735879
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = input()\nt = input()\ns *= 2\nif t in s:\n print("No")\nelse:\n print("Yes")', 's = input()\nt = input()\ns *= 2\nif t in s:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s627299884', 's859898915']
[2940.0, 2940.0]
[17.0, 17.0]
[80, 80]
p03293
u472400577
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S = input()\nT = input()\nl = len(S)\nok = 1\nfor i in range(l):\n T = T[l-1]+T[0:l-1]\n print(T)\n if S==T:\n print("Yes")\n break\n elif l-1==i:\n print("No")\n break', 'S = input()\nT = input()\nl = len(S)\nok = 1\nfor i in range(l):\n T = T[l-1]+T[0:l-1]\n if S==T:\n print("Yes")\n break\n elif l-1==i:\n print("No")\n break']
['Wrong Answer', 'Accepted']
['s653261789', 's555181021']
[3060.0, 2940.0]
[19.0, 19.0]
[184, 172]
p03293
u490553751
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['import sys\ninput = sys.stdin.readline\nS = list(input())\nT = list(input())\ndel S[-1]\ndel T[-1]\nl = len(S)\nans = "No"\nfor i in range(l) :\n a = S[-1]\n del (S[-1])\n S.insert(0,a)\n print(S)\n if S == T :\n ans = "Yes"\n break\nprint(ans)\n', '#template\ndef inputlist(): return [int(k) for k in input().split()]\n#template\nS = list(input())\nT = list(input())\nfor i in range(len(S)):\n Sa = S[:]\n S = [Sa[-1]] + Sa[:-1]\n if S == T:\n print("Yes")\n exit()\nprint("No")']
['Wrong Answer', 'Accepted']
['s105159829', 's586464569']
[3060.0, 3060.0]
[18.0, 17.0]
[258, 241]
p03293
u492447501
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['import sys\n\nS = input()\nT = input()\n\n\nfor i in range(len(S)):\n if S==T:\n print(S)\n print(T)\n print("Yes")\n sys.exit()\n S = S[len(S)-1]+S[0:len(S)-1]\n\n\nprint("No")', 'import sys\n\nS = input()\nT = input()\n\n\nfor i in range(len(S)):\n if S==T:\n print("Yes")\n sys.exit()\n S = S[len(S)-1]+S[0:len(S)-1]\n\n\nprint("No")']
['Wrong Answer', 'Accepted']
['s182142445', 's440848456']
[3060.0, 2940.0]
[17.0, 17.0]
[196, 162]
p03293
u516291518
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = input()\nt = input()\n\ndef match(a, b):\n for i in range(len(a)):\n if a[i:] + a[:i] == b:\n return True\n\n return False\n\nif match(s, t):\n print("yes")\nelse:\n print("no")\n\n', 's = input()\nt = input()\n\ndef match(a, b):\n for i in range(len(a)):\n if a[i:] + a[:i] == b:\n return True\n\n return False\n\nif match(s, t):\n print("Yes")\nelse:\n print("No")\n\n']
['Wrong Answer', 'Accepted']
['s478584308', 's423879835']
[2940.0, 2940.0]
[17.0, 17.0]
[200, 200]
p03293
u516554284
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s=list(input())\nt=list(input())\n\nx=len(s)\n\nch1=0\nch=0\n\nfor i in range(x):\n if s[i]==t[x-1-i]:\n ch+=1\n\nfor j in range(x):\n if s[j]==t[j]:\n ch1+=1\n \nprint('Yes') if ch==x or ch1==x else print('No') \n\n", "s=list(input())\nt=list(input())\n\nx=len(s)\n\nch1=0\nch=0\n\nfor i in range(x):\n if s[i]=t[x-1-i]:\n ch+=1\n\nfor j in range(x):\n if s[j]=t[j]:\n ch1+=1\n \nprint('Yes' if ch==x or ch1==x else:'No')\n ", "s=list(input())\nt=list(input())\n\nx=len(s)\n\nch1=0\nch=0\n\nfor i in range(x):\n if s[i]=t[x-1-i]:\n ch+=1\n\nfor j in range(x):\n if s[j]=t[j]:\n ch1+=1\n \nprint('Yes') if ch==x or ch1==x else print('No') \n", "s=list(input())\nt=list(input())\n\nx=len(s)\n\nch1=0\nch=0\n\nfor i in range(x):\n if s[i]=t[x-1-i]:\n ch+=1\n\nfor j in range(x):\n if s[j]=t[j]:\n ch1+=1\n \nprint('Yes' if ch==x or ch1==x :'No' else)\n \n", "s=list(input())\nt=list(input())\n\nx=len(s)\n\nch1=0\nch=0\n\nfor i in range(x):\n if s[i]=t[x-1-i]:\n ch+=1\n\nfor j in range(x):\n if s[j]=t[j]:\n ch1+=1\n \nprint('Yes' if ch==x or ch1==x else 'No' )\n \n", "s=list(input())\nt=list(input())\n\nS=s+s\nc=0\n\nfor i in range(len(s)):\n ch=0\n for j in range(len(s)):\n if S[i+j]==t[j]:\n ch+=1\n if ch==len(s):\n c+=1\n\nif c>0:\n print('Yes')\n \nelse:\n print('No')\n\n"]
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s140003305', 's838864170', 's894290270', 's912105487', 's998614119', 's863618771']
[9120.0, 8984.0, 9016.0, 9028.0, 8764.0, 9096.0]
[29.0, 21.0, 23.0, 22.0, 36.0, 29.0]
[209, 200, 206, 202, 202, 208]
p03293
u518042385
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['a=list(input())\ns=list(input())\nb=False\nfor i in range(len(s)):\n d=a[0]\n del a[0]\n a.append(d)\n if a==s:\n print("Yes")\n break\nif b==False:\n print("No")', 'a=list(input())\ns=list(input())\nb=False\nfor i in range(len(s)):\n d=a[-1]\n del a[-1]\n a1=a[::-1]\n a1.append(s)\n a2=a1[::-1]\n if a2==s:\n b=True\n print("Yes")\n break\n else:\n pass\nif b==False:\n print("No")\n \n \n ', 'a=list(input())\ns=list(input())\nb=False\nfor i in range(len(s)):\n d=a[0]\n del a[0]\n a.append(d)\n if a==s:\n print("Yes")\n b=True\n break\nif b==False:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s002972629', 's114224379', 's716060589']
[2940.0, 3060.0, 3060.0]
[18.0, 17.0, 17.0]
[162, 230, 173]
p03293
u518556834
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['a = list(input()).sorted()\nb = list(input()).sorted()\nif a == b:\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\nfor i in range(len(s)):\n if s == t:\n print("Yes")\n break\n else:\n t = t[-1] + t[:-1]\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s352024492', 's744083753']
[2940.0, 2940.0]
[18.0, 20.0]
[99, 139]
p03293
u525595811
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['aaaaaaaaaaaaaaab\naaaaaaaaaaaaaaab', 'import sys\n\ns = list(input())\nt = list(input())\n\nfor i in range(len(s)): \n if s == t:\n break\n\n tmp = s.pop(len(s)-1)\n s.insert(0, tmp)\n\nif s == t:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s813357809', 's341531098']
[2940.0, 2940.0]
[17.0, 17.0]
[33, 205]
p03293
u527420996
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['a = input()\nb = input()\n\ncounter = {}\nfor c in a:\n if not c in counter:\n counter[c] = 1\n else:\n counter[c] += 1\ncounter_2 = {}\nfor c in a:\n if not c in counter_2:\n counter_2[c] = 1\n else:\n counter_2[c] += 1\nif conter == counter_2:\n print(True)\nelse:\n print(False)', 'a = input()\nb = input()\nfor i in range(len(list(a))):\n if a[i] not in b:\n print("Yes")\n else:\n print("No")', 's = input()\nt = input()\nc = list(s)\nd = list(t)\nfor i in range(len(c)):\n c.insert(0, c[-1])\n del c[-1]\n if c == d:\n print("Yes")\n break\n if i == len(c) -1:\n print("No")']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s354577901', 's579213114', 's923290014']
[3060.0, 3060.0, 3064.0]
[17.0, 17.0, 17.0]
[309, 126, 201]
p03293
u527993431
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S=input()\nT=input()\n\nif S.sort()==T.sort():\n\tprint("Yes")\nelse:\n\tprint("No")', 'S=input()\nT=input()\nfor i in range(len(S)):\n\tS=S[-1]+S[0:-1]\n\tif S==T:\n\t\tprint("Yes")\n\t\texit()\nprint("No")']
['Runtime Error', 'Accepted']
['s168663474', 's843952851']
[2940.0, 2940.0]
[17.0, 18.0]
[76, 106]
p03293
u529722835
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["S = str(inpiut())\nT = str(input())\n\nS = S+S\nif T in S:\n print('Yes')\nelse:\n print('No')", "S = str(input())\nT = str(input())\n \nS = S+S\nif T in S:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s798409305', 's436788717']
[2940.0, 2940.0]
[18.0, 18.0]
[89, 89]
p03293
u533679935
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s = input()\nt = input()\nls = ls2 = 0\n\n\ns = list(s)\nfor i in s:\n ls += t.count(i)\n ls2 += s.count(i)\n\n\nprint(ls)\nprint(ls2)\nif ls == ls2:\n print('Yes')\nelse:\n print('No')", 's = input()\nt = input()\nprint("Yes") if t in s*2 else print("No") ']
['Wrong Answer', 'Accepted']
['s054052760', 's120419384']
[3060.0, 2940.0]
[18.0, 19.0]
[181, 66]
p03293
u535659144
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s=list(input())\nt=list(input())\nflag=0\nfor a in range(len(s)+3):\n t.append(t.pop(0))\n if s==t:\n print("Yes")\n flag=1\nif flag==0:\n print("No")', 's=list(input())\n t=list(input())\n flag=0\n for a in range(len(s)):\n t.append(t.pop(0))\n if s==t:\n print("Yes")\n flag=1\n if flag==0:\n print("No")', 's=list(input())\nt=list(input())\nflag=0\nfor a in range(len(s)+2):\n if s==t:\n print("Yes")\n flag=1\n break\n t.append(t.pop(0))\nif flag==0:\n print("No")']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s027567861', 's696168031', 's638154364']
[3060.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0]
[164, 198, 178]
p03293
u548545174
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["S = input()\nT = input()\n\nif S[::-1] == T:\n print('Yes')\nelse:\n print('No')\n\n", "S = input()\nT = input()\n\nfor i in range(len(S)):\n last = S[-1]\n S = last + S[:-1]\n if S == T:\n print('Yes')\n break\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s049344606', 's820987071']
[2940.0, 3060.0]
[17.0, 17.0]
[82, 159]
p03293
u550146922
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = input()\nt = input()\nimport sys\nif s==t:\n print("Yes")\n sys.exit()\nfor i in range(1,len(s)):\n print(s[-i:]+s[:-i])\n if s[-i:]+s[:-i]==t:\n print("Yes")\n #sys.exit()\nelse:\n print("No")', 's = input()\nt = input()\nimport sys\nif s==t:\n print("Yes")\n sys.exit()\nfor i in range(1,len(s)):\n if s[-i:]+s[:-i]==t:\n print("Yes")\n sys.exit()\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s783191980', 's142905082']
[9052.0, 9112.0]
[25.0, 27.0]
[214, 188]
p03293
u551692187
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["S = input()\nT = input()\norg = T\nfor i in T:\n T = T[1:] + T[0]\n if T == S:\n print('Yes')\n elif T == org:\n print('No')", 'S = list(input())\nT = list(input())\nans = S\nif S == T:\n print(\'Yes\')\n exit()\nfor i in range(len(S)):\n Stmp1 = ans[-1]\n Stmp2 = "".join(ans[:-1])\n ans = Stmp1+Stmp2\n if ans == T:\n print(\'Yes\')\n exit()\n\nprint(\'No\')', 'S = list(input())\nT = list(input())\nans = S\nfor i in range(len(S)):\n Stmp1 = ans[-1]\n Stmp2 = "".join(ans[:-1])\n ans = Stmp1+Stmp2\n if ans == T:\n print(\'Yes\')\n exit()\n\nprint(\'No\')', "S = input()\nT = input()\norg = T\nif S == T:\n print('Yes')\n exit()\n \nfor i in T:\n T = T[1:] + T[0]\n if T == S:\n print('Yes')\n exit()\n elif T == org:\n print('No')\n exit()\n"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s091808687', 's627140199', 's871395743', 's409715098']
[3060.0, 3060.0, 3060.0, 2940.0]
[18.0, 18.0, 17.0, 17.0]
[139, 244, 205, 214]
p03293
u553055160
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['import numpy as np\n\nS_line = input()\nT_line = input()\n\nlength = len(S_line)\n\nindex_list = []\ndef index_maker(start_n, length):\n for loc in range(length):\n if loc > start_n:\n index_list.append(loc)\n \n for loc in range(start_n + 1):\n #print(str(start_n) +":"+ str(loc))\n index_list.append(loc)\n if start_n + 1 == length:\n return range(length)\n\n return(index_list)\n\nac_flag = 0\nindex_list = []\ny_flag = 0\n\nfor i in range(length):\n index_list = index_maker(i, length)\n for i, index in enumerate(index_list):\n if T_line[i] != S_line[index]:\n ac_flag += 1\n if ac_flag == 0:\n y_flag += 1\n ac_flag = 0\n index_list = []\n\nif y_flag != 0:\n print("yes")\nelse:\n print("No")\n\n', 'import numpy as np\n\nS_line = input()\nT_line = input()\n\nlength = len(S_line)\n\nindex_list = []\ndef index_maker(start_n, length):\n for loc in range(length):\n if loc > start_n:\n index_list.append(loc)\n \n for loc in range(start_n + 1):\n #print(str(start_n) +":"+ str(loc))\n index_list.append(loc)\n if start_n + 1 == length:\n return list(range(length))\n\n return(index_list)\n\nac_flag = 0\nindex_list = []\ny_flag = 0\n\nfor i in range(length):\n index_list = index_maker(length-1 - i, length)\n #print(index_list)\n for i, index in enumerate(index_list):\n #print("i: " + str(i) +" index: "+ str(index))\n if T_line[i] != S_line[index]:\n ac_flag += 1\n if ac_flag == 0:\n y_flag += 1\n ac_flag = 0\n index_list = []\n\nif y_flag != 0:\n print("yes")\nelse:\n print("No")\n\n', 'import numpy as np\n\nS_line = input()\nT_line = input()\n\nlength = len(S_line)\n\nindex_list = []\ndef index_maker(start_n, length):\n for loc in range(length):\n if loc > start_n:\n index_list.append(loc)\n \n for loc in range(start_n + 1):\n #print(str(start_n) +":"+ str(loc))\n index_list.append(loc)\n if start_n + 1 == length:\n return list(range(length))\n\n return(index_list)\n\nac_flag = 0\nindex_list = []\ny_flag = 0\n\nfor i in range(length):\n index_list = index_maker(i, length)\n #print(index_list)\n for i, index in enumerate(index_list):\n #print("i: " + str(i) +" index: "+ str(index))\n if T_line[index] != S_line[i]:\n ac_flag += 1\n if ac_flag == 0:\n y_flag += 1\n ac_flag = 0\n index_list = []\n\nif y_flag != 0:\n print("yes")\nelse:\n print("No")\n\n', 'import numpy as np\n\nS_line = input()\nT_line = input()\n\nlength = len(S_line)\n\nindex_list = []\ndef index_maker(start_n, length):\n for loc in range(length):\n if loc > start_n:\n index_list.append(loc)\n \n for loc in range(start_n + 1):\n #print(str(start_n) +":"+ str(loc))\n index_list.append(loc)\n if start_n + 1 == length:\n return list(range(length))\n\n return(index_list)\n\nac_flag = 0\nindex_list = []\ny_flag = 0\n\nfor i in range(length):\n index_list = index_maker(length-1 - i, length)\n #print(index_list)\n for i, index in enumerate(index_list):\n #print("i: " + str(i) +" index: "+ str(index))\n if T_line[i] != S_line[index]:\n ac_flag += 1\n if ac_flag == 0:\n y_flag += 1\n ac_flag = 0\n index_list = []\n\nif y_flag != 0:\n print("Yes")\nelse:\n print("No")\n\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s087447578', 's187039700', 's440514543', 's760413618']
[12516.0, 12516.0, 12516.0, 12516.0]
[153.0, 154.0, 155.0, 152.0]
[766, 861, 850, 861]
p03293
u556225812
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["S = input()\nT = input()\nfor i in range(S):\n S = S[-1] + S[:-1]\n if S == T:\n print('Yes')\n exit()\nprint('No')", "S = input()\nT = input()\nfor i in range(len(S)):\n S = S[-1] + S[:-1]\n if S == T:\n print('Yes')\n exit()\nprint('No')"]
['Runtime Error', 'Accepted']
['s774478063', 's078221724']
[2940.0, 2940.0]
[17.0, 18.0]
[128, 133]