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
|
---|---|---|---|---|---|---|---|---|---|---|
p02681 | u766646838 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['N,K = map(int,input().split())\na = list(map(int,input().split()))\nlist_a = []\nlist_b =[]\nlist_a.append(1)\ncount_a = 1\ncount_b = 0\nfor i in range(1,K+1):\n if i == 1:\n k = i\n if a[k-1] in list_b:\n break\n elif a[k-1] in list_a:\n list_b.append(a[k-1])\n count_b+=1\n if a[k-1] not in list_a:\n list_a.append(a[k-1])\n count_a+=1\n k = a[k-1]\n#print(list_a,list_b,count_a,count_b)\nif count_b != 0:\n num_k = K-(count_a-count_b)\n num_k = num_k%count_b\n if 1 in list_b and list_b[0]!=1:\n #list_b.remove(1)\n list_b.insert(0,1)\n print(list_b[num_k])\nelif count_b ==0:\n print(list_a[count_a-1])', "a = list(input())\nb = list(input())\nflag = True\nfor i,j in enumerate(a):\n if j !=b[i]:\n print('No')\n flag = False\n break\nif flag == True:\n print('Yes')"] | ['Runtime Error', 'Accepted'] | ['s762414825', 's037353370'] | [9052.0, 8864.0] | [20.0, 28.0] | [612, 162] |
p02681 | u768219634 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["s,t = input().split()\no = t[:-1]\nif ( o == s ):\n print('Yes')\nelse:\n print('No')", "s = input()\nt = input()\nif ( t[:-1] == s ):\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s761537661', 's859170200'] | [9044.0, 9016.0] | [28.0, 29.0] | [86, 82] |
p02681 | u769569814 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["s,t = input().split()\nif t[:len(t)-1] == s:\n print('Yes')\nelse:\n print('No')", "s = input()\nt = input()\nif t[:len(t)-1] == s:\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Accepted'] | ['s124249041', 's586729030'] | [9028.0, 9028.0] | [21.0, 21.0] | [82, 85] |
p02681 | u770661341 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s=list(input())\ns1=list(input())\ns1.pop(-1)\nprint("YES" if s==s1 else "NO")', 's=list(input())\ns1=list(input())\ns1.pop(-1)\nprint("Yes" if s==s1 else "No")'] | ['Wrong Answer', 'Accepted'] | ['s563825657', 's956185200'] | [9100.0, 9068.0] | [20.0, 25.0] | [76, 76] |
p02681 | u770944306 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['S = input()\nT = input()\n\nif s + T[-1] == T: \n\tprint("Yes")\nelse:\n\tprint("No")', 'S = input(); T = input()\n\nif S + T[-1] == T:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s022753491', 's715498584'] | [8956.0, 8992.0] | [24.0, 29.0] | [77, 79] |
p02681 | u772969943 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s=input()\nt=input()\nl=len(s)\nif len(s)+1 == len(t):\n si=s+t[l]\nelse:\n si=""\nif si == t and len(si) == len(t):\n print("yes")\nelse:\n print("no") ', 'n,k=map(int,input().split())\na=list(map(int,input().split())) \n\nx=[0]*(n)\nbefore = 0\nnow = 0\nwhile x[now] == 0:\n x[now]=1+x[before]\n before=now\n now = a[now]-1\n \ny=x[now]-x[0]\nz=x[before]-y\nl=(k-y)%z+1\nfor i in range(n):\n if x[i] == l+y:\n print(1+i)\n break', 's=input()\nt=input()\nl=len(s)\nif len(s)+1 == len(t):\n si=s+t[l]\nelse:\n si=""\nif si == t and len(si) == len(t):\n print("Yes")\nelse:\n print("No") '] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s562317425', 's732404603', 's208536227'] | [9052.0, 9244.0, 9112.0] | [22.0, 23.0, 22.0] | [155, 285, 155] |
p02681 | u775673382 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["s = input()\nt = input()\nu = t.rstip(t[len(t) - 1])\nout = ('No', 'Yes')[s == u]\nprint(out)", "s = input()\nt = input()\nu = t[-1]\nout = ('No', 'Yes')[s == u]\nprint(out)", "s = input()\nt = input()\nu = t[:-1]\nout = ('No', 'Yes')[s == u]\nprint(out)"] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s254023102', 's494917319', 's386122540'] | [8972.0, 9032.0, 9112.0] | [24.0, 21.0, 23.0] | [89, 72, 73] |
p02681 | u776134564 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["s=input()\nt=input()\nif s==t[::-1]:\n print('Yes')\nelse:\n print('No')", "s=input()\nt=input()\nif s==t[:-1]:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s593351038', 's410379302'] | [9040.0, 9108.0] | [24.0, 23.0] | [69, 70] |
p02681 | u777028980 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['n=input()\nm=input()\nm=m[:len(m)-1]\nif(n==m):\n print("yes")\nelse:\n print("No")', 'n=input()\nm=input()\nm=m[:len(m)-1]\nif(n==m):\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s345530417', 's784238235'] | [9040.0, 9076.0] | [22.0, 24.0] | [79, 80] |
p02681 | u779599374 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['A, B, C, K = map(int, input().split())\n\nif A>K:\n print(K)\nelif (A+B)>=K:\n print(A)\nelse:\n print(A-(K-A-B))\n', 'A, B, C, K = map(int, input().split())\n\nif A>K:\n print(K)\nelif (A+B)>=K:\n print(A)\nelse:\n print(A-(K-A-B))\n', 'A, B, C, K = map(float, input().split())\n\nif A>K:\n print(K)\nelif (A+B)>=K:\n print(A)\nelse:\n print(A-(K-A-B))\n', 'S = input()\nT = input()\n\nif S == T[:len(T)-1]:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s103199898', 's202891642', 's848044729', 's814839738'] | [9012.0, 9020.0, 9032.0, 8964.0] | [22.0, 22.0, 24.0, 20.0] | [116, 116, 118, 86] |
p02681 | u782747058 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['w1 = input()\nw2 = input()\n\nif w2 in w1:\n print("Yes")\nelse:\n print("No")', 'import re\n\nw1 = input()\nw2 = input()\nrc = re.escape(w1) + r".{1}"\n\nif re.match(rc, w2):\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s521763886', 's537222564'] | [8856.0, 9896.0] | [23.0, 25.0] | [74, 122] |
p02681 | u789199225 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['a=input()\nprint(a[1])', 'a,b=open(0)\nprint("YNeos"[a[1]!=\'a\'::2])', 'print("No")', 'print("YNeos"[input()[0]==\'s\'||\'k\'::2])', 'a,b=open(0);print("YNeos"[a[:-2]!=b[:-2]::2])', 'a,b=open(0);print("YNeos"[a[:-2]!=b[:-2]::2])', 'a,b=open(0);print("YNeos"[a[:-1]!=b[:-2]::2])'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s045565598', 's094257975', 's146243409', 's337640899', 's384112483', 's918894780', 's147038914'] | [9048.0, 8964.0, 8988.0, 8892.0, 9044.0, 8972.0, 9056.0] | [18.0, 20.0, 19.0, 22.0, 22.0, 23.0, 22.0] | [21, 40, 11, 39, 45, 45, 45] |
p02681 | u789854092 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["s = input()\nt = input()\nlen_s = len(s)\nif len_s > 0 and s.find(t) == 0 and (len_s +1) == len(t):\n print('Yes')\nelse:\n print('No')", "s = input()\nt = input()\nlen_s = len(s)\nif len_s > 0 and t.find(s) == 0 and (len_s +1) == len(t):\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s013760958', 's883465510'] | [9104.0, 8976.0] | [20.0, 24.0] | [131, 131] |
p02681 | u790476785 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s = input()\nt = input()\n\nt_2 = []\nfor i in range(len(t) - 1):\n t_2.append(t[i])\n \nline = "".join(t_2)\nif line == s:\n print("Yes")\nelse:\n print("No")\n \nprint (line)', 's = input()\nt = input()\n\nt_2 = []\nfor i in range(len(t) - 1):\n t_2.append(t[i])\n \nline = "".join(t_2)\nif line == s:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s686395404', 's068428674'] | [9104.0, 9044.0] | [32.0, 27.0] | [168, 152] |
p02681 | u791070772 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["s = input()\nt = input()\n\nt_last = t[:-1]\nif s == t_last:\n print(t)\n if s != t:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "s = input()\nt = input()\n\nt_last = t[:-1]\nif s == t_last:\n if s != t:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s899381282', 's250259880'] | [9040.0, 9100.0] | [21.0, 22.0] | [157, 144] |
p02681 | u791375270 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["S = str(input())\nT = str(input())\n\nT2 = T.rstrip()\n\nif S == T2:\n print('Yes')\nelse:\n print('No')", "S = input()\nT = input()\n\nT2 = T[:-1]\n\nif S == T2:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s872415834', 's196316302'] | [9100.0, 8908.0] | [19.0, 24.0] | [98, 84] |
p02681 | u792243917 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['import sys\n\nprint("Enter ID")\nstr_1 = input()\nstr_2 = input()\n\nif not str_2.startswith(str_1,0):\n print("No")\n sys.exit()\n\nif len(str_1) + 1 != len(str_2):\n print("No")\n sys.exit()\n\nprint("Yes")\n', 'import sys\n\nprint("Enter ID")\nstr_1 = input()\nstr_2 = input()\n\nif not str_2.startswith(str_1,0):\n print("No")\n sys.exit()\n\nprint("Yes")\n', 'str_1 = input()\nstr_2 = input()\n\nif str_2.startswith(str_1,0):\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s253977101', 's340504778', 's151306633'] | [9040.0, 9032.0, 8880.0] | [23.0, 20.0, 19.0] | [207, 142, 103] |
p02681 | u792671636 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["#!/usr/bin/env python3\nimport sys\n\n\ndef solve(A: int, B: int, C: int, K: int):\n if (K <= A):\n print(K)\n else:\n if (K <= (A+B)):\n print(A)\n else:\n print(A-(K-A-B))\n return\n\n\n# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n A = int(next(tokens)) # type: int\n B = int(next(tokens)) # type: int\n C = int(next(tokens)) # type: int\n K = int(next(tokens)) # type: int\n solve(A, B, C, K)\n\nif __name__ == '__main__':\n main()\n", '#!/usr/bin/env python3\nimport sys\n\nYES = "Yes" # type: str\nNO = "No" # type: str\n\n\ndef solve(S: str, T: str):\n if (S == T[:-1]):\n print("YES")\n return 0\n print("NO")\n return 1\n\n# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n S = next(tokens) # type: str\n T = next(tokens) # type: str\n solve(S, T)\n\nif __name__ == \'__main__\':\n main()\n', '#!/usr/bin/python3\n\nN, K = list(map(int, input().split()))\nA = list(map(int, input().split()))\ncur = 0\ni = 0\nloop = 0\nlist = []\n\nwhile (i <= K):\n i = i+1\n cur = A[cur-1]\n if(loop == 0):\n if (cur in list):\n loop = len(list) - list.index(cur)\n if (K > 100):\n K= K - ((K // loop) - 1)*loop\n list.append(cur)\n\nprint(cur)\n', "import sys\n \n \ndef solve(A: int, B: int, C: int, K: int):\n if (K <= A):\n print(K)\n else:\n if (K <= (A+B)):\n print(A)\n else:\n print(A-(K-A-B))\n return\n \n \n# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n A = int(next(tokens)) # type: int\n B = int(next(tokens)) # type: int\n C = int(next(tokens)) # type: int\n K = int(next(tokens)) # type: int\n solve(A, B, C, K)\n \nif __name__ == '__main__':\n main()", '#!/usr/bin/env python3\nimport sys\n\nYES = "Yes" # type: str\nNO = "No" # type: str\n\n\ndef solve(S: str, T: str):\n if (S == T[:-1]):\n print(YES)\n return 0\n print(NO)\n return 1\n\n# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n S = next(tokens) # type: str\n T = next(tokens) # type: str\n solve(S, T)\n\nif __name__ == \'__main__\':\n main()\n'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s077781355', 's236625225', 's282234034', 's324885180', 's960077174'] | [9204.0, 9064.0, 9204.0, 9080.0, 9064.0] | [24.0, 25.0, 19.0, 23.0, 23.0] | [772, 655, 343, 753, 651] |
p02681 | u793666115 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s = input()\nt = input()\nk = abcdefghijklmnopqrstuvwxwz\n\n\nif s == t[:-1]:\n if t[-1] in k:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 's, t = input().split()\n\nk = abcdefghijklmnopqrstuvwxwz\n\n\nif s == t[:-1]:\n if t[-1] in k:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 's = input()\nt = input()\nk = "abcdefghijklmnopqrstuvwxwz"\n\n\nif s == t[:-1]:\n if t[-1] in k:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s066648382', 's345538610', 's979854387'] | [9040.0, 9100.0, 9100.0] | [24.0, 24.0, 23.0] | [164, 164, 166] |
p02681 | u795928154 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["#A\nS = input()\nT = input()\nSlist = list(S)\nTlist = list(T)\ncount = 0\nfor k in range len(Slist):\n if Slist[k] == Tlist[k]:\n count += 1\nif count == len(Slist):\n print('Yes')\nelse:\n print('No')", "#A\nS = input()\nT = input()\nSlist = list(S)\nTlist = list(T)\ncount = 0\nfor k in range (len(Slist)):\n if Slist[k] == Tlist[k]:\n count += 1\nif count == len(Slist):\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s707349132', 's092549640'] | [8892.0, 9120.0] | [19.0, 20.0] | [206, 208] |
p02681 | u803503672 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['a = input()\nb = input()\nc = b.rstrip()\nif a == c:\n print("Yes")\nelse:\n print("No")', 'a = input()\nb = input()\nif a == b[0:-1]:\n print("Yes")\n \nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s852449164', 's265767896'] | [8996.0, 8992.0] | [29.0, 26.0] | [84, 78] |
p02681 | u803684095 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s=input()\nt=input()\nu=t[0:len(s)]\nif s==u:\n print("OK")\nelse:\n print("NO")\n', 's=input()\nt=input()\nu=t[0:len(s)]\nif s==u:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s995397278', 's757038528'] | [9064.0, 9024.0] | [28.0, 26.0] | [81, 82] |
p02681 | u804065755 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['moji = [input() for i in range(2)]\nif len(moji[0]) >= 1 and len(moji[0]) <= 10 and len(moji[0])+1 = len(moji[1]):\n print("Yes")\nelse:\n print("No")', 'moji = [input() for i in range(2)]\nif len(moji(0)) >= 1 and len(moji(0)) <= 10 and len(moji(0))+1 = len(moji(1)):\n print("Yes")\nelse:\n print("No")', 'moji = [input() for i in range(2)]\nif moji[0] == moji[1][:len(moji[0])]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s343015300', 's495625678', 's026168382'] | [8968.0, 8908.0, 9112.0] | [23.0, 24.0, 24.0] | [148, 148, 107] |
p02681 | u806392288 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['S = input()\nT = input()\n\nif S[:-len(S)-1] == T:\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\n\nif S == T[:len(T)-1]:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s921977264', 's795450362'] | [8940.0, 8940.0] | [20.0, 21.0] | [82, 81] |
p02681 | u809043290 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s=input()\nt=input()\nif(s[-1]==t[-1]):\n return "No"\nreturn "Yes"', 'import math\nimport os\nimport random\nimport re\nimport sys\n\ndef solution(s,t):\n if(s[-1]==t[-1]):\n return "No"\n return "Yes"\nif __name__ == \'__main__\':\n fptr = sys.stdout\n\n s=input()\n t=input()\n\n result = solution(s,t)\n\n fptr.write(str(result) + \'\\n\')\n\n fptr.close()\n', 'import sys \ns=input()\nt=input()\nl=list()\nfor i in "abcdefghijklmnopqrstuvwxyz":\n l.append(s+""+i)\nif(t in l):\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s173069740', 's343156464', 's983122654'] | [9032.0, 9024.0, 8908.0] | [24.0, 22.0, 24.0] | [66, 312, 152] |
p02681 | u809371093 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['A,B,C,K = map(int,input().split())\nresult = 0\nif K > 0 :\n result = result + A\n K = K - A\nfor i in range (K):\n if B > 0 :\n B = B-1\n else:\n result = result-1\nprint(result)', 'A,B,C,K = map(int,input().split())\ni = 0\nresult = 0\nK = K - A\nresult = result + A\nwhile K > i :\n if B > 0 :\n K = K- B\n B = B -B\n elif C > 0 :\n result = result - 1\n K = K - 1\nprint(result)', 'S = str(input())\nT = str(input())\nif T[:-1] == S :\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s307421339', 's887839154', 's331534866'] | [9176.0, 9188.0, 8932.0] | [21.0, 24.0, 21.0] | [195, 221, 89] |
p02681 | u813405587 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["s = list(input())\nt = list(input())\nn = int(len(t))\nm = int(len(s))\nif s == t[0:n-2] and n-1 == m:\n print('Yes')\nelse:\n print('No')\n", "s = input())\nt = input())\nn = 1\nm = len(t)\nif s == t[0:m-1]:\n print('Yes')\nelse:\n print('No')", "s = list(input())\nt = list(input())\nn = int(len(t))\nif s = t[0:n-1]:\n print('Yes')\nelse:\n print('No')\n", 'print("YNeos"[input()!=input()[:-1]])\n', "s = list(input())\nt = list(input())\nn = int(len(t))\nif s = t[0:n-2]:\n print('Yes')\nelse:\n print('No')\n", "s = list(input())\nt = list(input())\nn = len(t)\nif s = t[0:n-1]:\n print('Yes')\nelse:\n print('No')", "s = list(input())\nt = list(input())\nn = int(len(t))\nm = int(len(s))\nif s == t[0:n-1] and n-1 == m:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s009786295', 's285329480', 's461963571', 's521912818', 's522317626', 's922758237', 's288197098'] | [9036.0, 8944.0, 8928.0, 8952.0, 8888.0, 9020.0, 8868.0] | [20.0, 25.0, 22.0, 21.0, 20.0, 19.0, 23.0] | [134, 95, 105, 38, 105, 99, 134] |
p02681 | u815468655 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['S, T = input().split()\nif S in T:\n print("Yes")\nelse:\n print("No")', 'S , T = input().split(\' \')\nif S in T:\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\nif T[:-1] == S:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s322418692', 's589132438', 's490780907'] | [9028.0, 9092.0, 9092.0] | [23.0, 20.0, 21.0] | [72, 76, 78] |
p02681 | u815763296 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["S=input()\nT=input()\n\nnewT=T[len(T)-1]\n\nS=S+newT\n\nif S==T:\n print('yes')\nelse:\n print('no')\n ", "S=input()\nT=input()\n\nnewT=T[len(T)-1]\n\nS=S+newT\n\nif S==T:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s226458890', 's747001709'] | [9104.0, 9028.0] | [29.0, 26.0] | [101, 97] |
p02681 | u816462023 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['S = input()\nT = input()\nflag = 1\nfor i in S:\n if not 96<ord(s) and ord(s)<122:\n flag=0\n\n if T[len(t)-1]:\n flag=0\n if not len(T)-len(S)==1:\n flag=0\n if not T[:-1]==S:\n flag=0\nprint(Yes if flag==1 else No)\n', 'S = input()\nT = input()\nflag = 1\nfor i in range(0,len(T)):\n if not 96<ord(T[i]) and ord(T[i])<122:\n flag=0\n\nif not len(T)-len(S)==1:\n flag=0\n\nif not T[:-1]==S:\n flag=0\nprint("Yes" if flag==1 else "No")\n'] | ['Runtime Error', 'Accepted'] | ['s945419296', 's529219395'] | [9052.0, 9048.0] | [20.0, 24.0] | [244, 218] |
p02681 | u817692975 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['S = input()\nT = input()\nns = len(S)\nU = str[:ns]\nif T == U:\n print("Yes")\nelse:\n print("No")\n', 'S = input()\nT = input()\nns = len(S)\nU = str[:S]\nif T == U:\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\nns = len(S)\nU = T[:ns]\nif T == U:\n print("Yes")\nelse:\n print("No")\n', 'S = input()\nT = input()\nns = len(S)\nU = T[:ns]\nif S == U:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s576117341', 's708319431', 's941125873', 's330876432'] | [9028.0, 8884.0, 9116.0, 9092.0] | [21.0, 22.0, 21.0, 23.0] | [95, 93, 93, 93] |
p02681 | u818318325 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["n=input()\n\nif int(n[-1]) in [2,4,5,7,9]:\n print('hon')\nelif int(n[-1]) in [0,1,6,8]:\n print('pon')\nelse:\n print('bon')", "s = input()\nt = input()\n\nif s == t[:-1]:\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Accepted'] | ['s079583639', 's807328206'] | [9208.0, 9088.0] | [21.0, 23.0] | [127, 80] |
p02681 | u821441703 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['import sys\n\nS = sys.stdin.readline().rstrip()\nT = sys.stdin.readline().rstrip()\n\nif S[:-1] == T:\n print(\'Yes\')\nelse:\n print("No")\n', 'import sys\n\nS = sys.stdin.readline().rstrip()\nT = sys.stdin.readline().rstrip()\n\nif S == T[:-1]:\n print(\'Yes\')\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s056973636', 's745770024'] | [9088.0, 9088.0] | [20.0, 22.0] | [136, 136] |
p02681 | u823885866 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["import sys\nn = sys.stdin.readline().rstrip()\ns = sys.stdin.readline().rstrip()\nif n = s[:len(n)]:\n print('Yes')\nelse:\nprint('No')\n", "import sys\nn = sys.stdin.readline().rstrip()\ns = sys.stdin.readline().rstrip()\nif n == s[:len(n)]:\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Accepted'] | ['s850366132', 's456176647'] | [9012.0, 9088.0] | [23.0, 22.0] | [131, 134] |
p02681 | u825176191 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['S = input()\nT = input()\nU = T-T[-1]\nif S == U:\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\nU = T[:-1]\nif S == U:\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\nU = T[:-1]\nif S == U:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s606071367', 's874195603', 's482496969'] | [9012.0, 8932.0, 9104.0] | [22.0, 22.0, 22.0] | [81, 82, 80] |
p02681 | u826416832 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['a = input()\nb = input()\nif a == b[:-1]:\n\tprint("YES")\nelse:\n\tprint("NO")', 'a = input()\nb = input()\nif a == b[:-1]:\n\tprint("Yes")\nelse:\n\tprint("No")'] | ['Wrong Answer', 'Accepted'] | ['s512552295', 's207365394'] | [9096.0, 9028.0] | [26.0, 19.0] | [72, 72] |
p02681 | u827553608 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s=input()\nt=input()\nif s in t:\n\tprint("YES")\nelse:\n\tprint("NO")', 's=input()\nt=input()\nc=0\nif len(t)==(len(s)+1):\n\tfor i in range(len(t)-1):\n\t\tif t[i]==s[i]:\n\t\t\tc+=1\nif c==len(s):\n\tprint("Yes")\nelse:\n\tprint("No")\n\n'] | ['Wrong Answer', 'Accepted'] | ['s538594568', 's881402422'] | [8948.0, 9104.0] | [20.0, 21.0] | [63, 147] |
p02681 | u830881690 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["s = list(input().split())\nt = list(input().split())\n\nn_s = len(s)\nans = 0\n\nfor i in range(n_s):\n if t[i] == s[i]:\n ans += 1\nif ans == n_s:\n print('Yes')\nelse:\n print('No')", "s = list(input())\nt = list(input())\n\nn_s = len(s)\nans = 0\n\nfor i in range(n_s):\n if t[i] == s[i]:\n ans += 1\nif ans == n_s and len(t) == n_s +1:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s028106882', 's458349052'] | [9112.0, 9120.0] | [23.0, 24.0] | [187, 192] |
p02681 | u831053714 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['A=input()\nB=input()\nif(len(B)==len(B)-1):\n if A in B:\n print("Yes")\n else:\n print("NO")\nelse:\n print(\'No\')', 's = input()\nt = input()\nif len(s)+1 == len(t) and s == t[:-1]:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s665103694', 's957178832'] | [9088.0, 9100.0] | [25.0, 20.0] | [127, 101] |
p02681 | u834279451 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['#!/usr/bin/python3\n# -*- coding: utf-8 -*-\n\n# import numpy as np\n# from itertools import *\n# from collections import *\n\n# S = input()\n# N = int(input())\n# K, N = [int(x) for x in input().split()]\n\nN = int(input())\n\nS = []\nscore = [(0,0)] * N\n\nfor n in range(N):\n S.append(input())\n while "()" in S[n]:\n S[n] = S[n].replace("()", "")\n\n if len(S[n]) >= 1:\n beg = S[n].count("(")\n end = S[n].count(")")\n\n if S[n][0] == "(":\n score[n] = (0, beg)\n else:\n score[n] = (-end, beg)\n else:\n score[n] = (0, 0)\n\nscore.sort(reverse=True)\n\ncr = 0\nfor n in range(N):\n if score[n][0] == 0:\n cr += score[n][1]\n\nfor n in range(N):\n if score[n][0] > 0:\n if cr - score[n][0] < 0:\n print("No")\n exit(0)\n cr += sum(score[n])\n\nfor n in range(N):\n if score[n][0] < 0:\n cr += sum(score[n])\n if cr < 0:\n print("No")\n exit(0)\n\nif cr == 0:\n print("Yes")\nelse:\n print("No")\n', '#!/usr/bin/python3\n# -*- coding: utf-8 -*-\n\n# import numpy as np\n# from itertools import *\n# from collections import *\n\n# S = input()\n# N = int(input())\n# K, N = [int(x) for x in input().split()]\n\nS = input()\n\nT = input()\n\nif T[0:len(S)] == S and len(S) + 1 == len(T):\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s174589713', 's788439288'] | [9280.0, 9020.0] | [21.0, 24.0] | [1015, 308] |
p02681 | u834471595 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['n,k=map(int,input().split())\nl=list(map(int,input().split()))\nd={}\nfor i in range(0,len(l)):\n d[i+1]=l[i]\nans=1\ns=set()\nseq=[]\ne=0\nfor i in range(0,k):\n ans=d[ans]\n if ans in s:\n seq.append(ans)\n break\n else:\n s.add(ans)\n seq.append(ans)\nelse:\n print(ans)\n e=1\nif e==0:\n b = seq.index(seq[-1])\n rep = seq[b:-1]\n sl = len(seq) - seq.index(seq[-1]) - 1\n k = k - b - 1\n ans = seq[b]\n x = k % sl\n # print(x,sl)\n print(rep[x])\n\n\n\n\n\n\n\n\n', "s=input()\nt=input()\nif len(t)-len(s)!=1:\n print('No')\nelse:\n for i in range(0,len(s)):\n if s[i]!=t[i]:\n print('No')\n break\n else:\n print('Yes')"] | ['Runtime Error', 'Accepted'] | ['s989183533', 's075765989'] | [9084.0, 9044.0] | [23.0, 22.0] | [496, 188] |
p02681 | u836284844 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["s = input()\nt = input()\ndef check(s, t):\n if len(t) - len(s) != 1 or len(s) ==0:\n return False\n for i in range(len(s)):\n if s[i]!= t[i]:\n return False\n return True\nif check(s, t):\n print('YES')\nelse:\n print('NO')\n ", "s = input()\nt = input()\ndef check(s, t):\n if len(t) - len(s) != 1 or len(s) ==0:\n return False\n for i in range(len(s)):\n if s[i]!= t[i]:\n return False\n return True\nif check(s, t):\n print('Yes')\nelse:\n print('No')\n "] | ['Wrong Answer', 'Accepted'] | ['s891037753', 's105471171'] | [9132.0, 9108.0] | [21.0, 22.0] | [257, 257] |
p02681 | u841021102 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s = input().split()\nt = input().split()\nb = list(s)\nc = list(t)\na = 0\nfor i in range(len(b)):\n if b[i] == c[i]:\n \ta == 1\nif a == 1:\n print("yes")\nelse:\n print("No")', 's = input()\nt = input()\nif s == t[:-1]:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s654047722', 's119078871'] | [9116.0, 9060.0] | [26.0, 27.0] | [168, 74] |
p02681 | u847535452 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s=raw_input()\nt=raw_input()\n\nls=len(s)\nlt=len(t)\n\nif lt==ls+1 and t.startswith(s):\n print (\'Yes\')\nelse:\n print("No")\n\n\n', 's=input()\nt=input()\n\nls=len(s)\nlt=len(t)\n\nif lt==ls+1 and t.startswith(s):\n print (\'Yes\')\nelse:\n print("No")\n\n\n'] | ['Runtime Error', 'Accepted'] | ['s134221767', 's099646623'] | [8964.0, 8948.0] | [22.0, 21.0] | [125, 117] |
p02681 | u851082576 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["s = input()\nt = input()\n\nif s == t[:-1]:\n print('YES')\nelse:\n print('NO')", "s = input()\nt = input()\n\nif s == t[:-1]:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s979659634', 's351387466'] | [9120.0, 9092.0] | [27.0, 20.0] | [75, 75] |
p02681 | u851125702 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['S=input()\nT=input()\nS=S+S[len(S)-1]\nif(S==T):\n print("Yes")\nelse:\n print("No")', 'S=input()\nT=input()\nT=T[0:len(T)-1]\nif(S==T):\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s334069477', 's291557815'] | [9096.0, 9100.0] | [23.0, 22.0] | [84, 84] |
p02681 | u854117336 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s = [input() for i in range(2)]\n\ns_length = len(s[0])\ns2_length = len(s[1])\n\nif s2_length==s_length+1 and s[0]==s[1][:s_length]:\n print("Yes")\nelse:\n print("NO")_l', 's = [input() for i in range(2)]\n\ns_length = len(s[0])\ns2_length = len(s[1])\n\nif s2_length==s_length+1 and s[0]==s[1][:s_length]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s987666648', 's108002980'] | [9048.0, 9052.0] | [23.0, 26.0] | [169, 167] |
p02681 | u855831834 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['#D\nN, K = map(int,input().split())\nA = list(map(int,input().split()))\n\nnow = 0\nvisited = [0]\nvisited_set = set([0])\n\nfor i in range(K):\n now = A[now] - 1\n if now in visited_set:\n roop_start = now\n break\n visited.append(now)\n visited_set.add(now)\n \nind = visited.index(roop_start)\nroop = visited[ind:]\n\nif len(roop) != 0:\n print(roop[(K-ind)%len(roop)]+1)\nelse:\n print(visited[K-1]+1)', "S = input()\nT = input()\nif S == T[:len(S)]:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s438473053', 's793100975'] | [9244.0, 9036.0] | [24.0, 23.0] | [418, 82] |
p02681 | u855967722 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['S = int(input())\nT = int(input())\n\nt = word.rstrip(T)\n\nif S == T:\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\n \nt = T[:-1]\n \nif S == t:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s761563060', 's129198775'] | [9164.0, 9004.0] | [22.0, 22.0] | [100, 84] |
p02681 | u857377354 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['LenS = len(input())\nLenT = len(input())\nif(LenS+1==LenT):\n\tprint("Yes")\nelse():\n\tprint("No")', 'S = input()\nT = input()\nif(len(S)+1==len(T)):\n print("Yes")\nelse():\n print("No")', 'S = input()\nT = input()\nif(len(S)+1==len(T)):\n\tprint("Yes")\nelse():\n\tprint("No")', 'S = input()\nT = input()\nif(S==T[:-1]):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s146672868', 's844256785', 's955194916', 's398495043'] | [9016.0, 8952.0, 9024.0, 8936.0] | [21.0, 22.0, 24.0, 24.0] | [92, 82, 80, 73] |
p02681 | u857555436 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["S = str(input())\nT = str(input())\n\nif S == T[0:-1]:\n print('Yes')\nelse\n print('No')", "S = str(input())\nT = str(input())\n\nif S == T[0:-1]:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s263409144', 's816461871'] | [8880.0, 9032.0] | [24.0, 23.0] | [89, 90] |
p02681 | u857605629 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s = input()\nt = input()\n\nif t.find(s) == 0:\n\tprint("yes")\nelse:\n\tprint("no")', 's = input()\nt = input()\n\nif t.find(s) == 0:\n\tprint("Yes")\nelse:\n\tprint("No")'] | ['Wrong Answer', 'Accepted'] | ['s484916265', 's010392972'] | [9124.0, 9096.0] | [24.0, 25.0] | [76, 76] |
p02681 | u858929490 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s=input()\nt=input()\npr=t[:len(t)-1]\nprint(pr)\nif pr==s:\n print("YES")\nelse:\n print("NO")', 's=input()\nt=input()\npr=t[:len(t)-1]\nif pr==s:\n print("YES")\nelse:\n print("NO")', 's=input()\nt=input()\npr=t[:len(t)-1]\nif pr==s:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s328552617', 's922299125', 's161181294'] | [8896.0, 9100.0, 9104.0] | [21.0, 23.0, 23.0] | [94, 84, 84] |
p02681 | u859072377 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['#python 3.7.1\n\na=str(input())\n\nb=str(input())\n\nif a==b[:-1]:\n\n print("YES")\n\n \n\nelse:\n\n print("NO")\n\n', '#python 3.7.1\n\na=str(input())\n\nb=str(input())\n\nif a==b[:-1]:\n\n print("Yes")\n\n \n\nelse:\n\n print("No")\n\n'] | ['Wrong Answer', 'Accepted'] | ['s000202471', 's545346261'] | [9076.0, 9072.0] | [21.0, 20.0] | [108, 108] |
p02681 | u862910769 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s = input()\nt = input()\nif t[:-2] == s and len(t) - 1 == len(s):\n print("Yes")\nelse:\n print("No")\n', 's = input()\nt = input()\nif t[:-2] == s:\n print("Yes")\nelse:\n print("No")', "s = input()\nt = input()\nif t[:-1] == s and len(t) - 1 == len(s):\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s109194386', 's888923610', 's101167023'] | [9028.0, 9092.0, 9024.0] | [20.0, 21.0, 22.0] | [100, 74, 104] |
p02681 | u863371419 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["a = [input() for i in range(2)]\n\ns = a[0]\nt = s[1]\n\nif s == t[:-1]:\n print('Yes')\nelse:\n print('No')", "a = [input() for i in range(2)]\n\ns = a[0]\nt = a[1]\n\nif s == t[:-1]:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s597978398', 's463833815'] | [9012.0, 9044.0] | [33.0, 29.0] | [106, 106] |
p02681 | u863433366 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['from itertools import combinations\nn, m, x = map(int, input().split())\nca = [list(map(int, input().split())) for _ in range(n)]\n\nans = 10**10\nfor i in range(1,n+1):\n for j in combinations(ca,i):\n check = [0]*(m+1)\n for k in j:\n for a in range(m+1):\n check[a] += k[a]\n if min(check[1:]) >= x:\n ans = min(ans, check[0])\n\nif ans == 10**6:\n print(-1)\nelse:\n print(ans)', 's = input()\nt = input()\nprint("Yes" if s == t[:-1] else "No")'] | ['Runtime Error', 'Accepted'] | ['s721085104', 's758178148'] | [9192.0, 8904.0] | [23.0, 21.0] | [393, 61] |
p02681 | u864085306 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['X = list(map(int,input().split()))\nA = X[0]\nB = X[1]\nC = X[2]\nK = X[3]\nscore=[1,0,-1]\nmax_score = 0\nnums = []\n\nif (K>=A):\n max_score += 1*A\nif (K-A>=B):\n max_score += 2*B\nif (K-A-B>0):\n max_score += (-1)*(K-A-B)\nprint(max_score)\n ', 'a = [input() for i in range(2)]\nflag = 0\nfor i in range(len(a[0])):\n if(a[0][i]==a[1][i]):\n flag = flag+1\nif(flag==len(a[0])):\n print("Yes")\nelse:\n print("No")\n\n'] | ['Runtime Error', 'Accepted'] | ['s132007471', 's910858455'] | [9140.0, 9108.0] | [20.0, 21.0] | [234, 167] |
p02681 | u868082223 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["import sys\nimport heapq\n\ndef end(flag):\n if flag:\n print('Yes')\n else:\n print('No')\n exit(0) \n\nn = int(input())\nplus = []\nminus = []\nzero = []\ntotal = 0\nfor i in range(n):\n s = input()[:-1] \n cnt = 0\n M = 0\n m = 0\n for t in s:\n if t == ')': \n cnt += 1\n M = max(M,cnt) \n else:\n cnt -= 1\n cnt = 0\n for t in s[::-1]: \n if t == ')':\n cnt += 1\n else:\n cnt -= 1\n m = min(m,cnt) \n if cnt > 0:\n minus.append((-m,cnt))\n elif cnt == 0:\n zero.append((-m,M))\n else:\n plus.append((M,-cnt))\n S = (M,-cnt)\n total += cnt\nif total != 0:\n end(0)\nplus.sort()\nminus.sort()\ncnt = 0\nfor need,increase in plus:\n if cnt < need:\n end(0)\n else:\n cnt += increase\ncnt = 0\nfor need,increase in minus:\n if cnt < need:\n end(0)\n else:\n cnt += increase\nfor m,M in zero:\n if m > cnt or M > cnt:\n end(0)\nend(1)", "S = input()\nT = input()\nlength = len(S)\nT2 = T[0:length]\n\nif S == T2:\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Accepted'] | ['s826240213', 's239435472'] | [9292.0, 9092.0] | [20.0, 21.0] | [1251, 109] |
p02681 | u870566426 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['A=1\nB=2\nC=3\nK=4\nmaxi=2*A-K+B\nprint(maxi)', 'a, b, c, k = map(int, input().split())\nmaxi=2*A-K+B\nprint(maxi)', 'A=int(input())\nB=int(input())\nC=int(input())\nK=int(input())\nmaxi=2*A-K+B\nprint(maxi)', 'def is_ID(a, b):\n if a==b[:-1]:\n print("Yes")\n else:\n print("No")', 'A=int(input())\nB=int(input())\nC=int(input())\nK=int(input())\nmaxi=2*A-K+B\nprint(maxi)', 'def is_ID(a, b):\n if 1<=len(a)<=10:\n if a.islower() and b.islower():\n if a==b[:-1]:\n return(print("Yes"))\n\n return(print("No"))', 'S=input()\nT=input()\nif 1<=len(S)<=10 and (S.islower() and S.islower()) and S==T[:-1]:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s114721466', 's120601728', 's416977895', 's750562639', 's799198768', 's958227152', 's301326823'] | [9016.0, 9160.0, 9196.0, 9084.0, 9108.0, 9096.0, 9036.0] | [22.0, 20.0, 23.0, 23.0, 23.0, 22.0, 20.0] | [40, 63, 84, 85, 84, 166, 124] |
p02681 | u874644783 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['A, B, C, K = list(map(int,input().split()))\n\nout = []\nfor i in [A,B,C]:\n if(i <= K):\n out.append(i)\n K = (K - i) if (K - i) >= 0 else K\n else:\n out.append(((K - i) if (K - i) > 0 else K))\n\n# if len(out) < 3:\n\n# out.append(0)\n\nprint(1*out[0] + 0*out[1] + (-1)*out[2])', 'import sys, os, time, math\nimport numpy as np\nfrom collections import deque\nfrom functools import reduce\nimport itertools, math\n\n# print("Start")\nS, T = list(map(str, input().split()))\n# N = int(input())\n\nif (abs(len(T) - len(S)) == 1) and (T[:-1] == S):\n print("Yes")\nelse:\n print("No")', 'S, T = list(map(str, input().split()))\n\nif (abs(len(T) - len(S)) == 1) and (T[:-1] == S):\n print("Yes")\nelse:\n print("No")\n', 'S = list(map(str, input().split()))[0]\nT = list(map(str, input().split()))[0]\n\nif (abs(len(T) - len(S)) == 1) and (T[:-1] == S):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s294046066', 's296896281', 's417304047', 's629107176'] | [9140.0, 26892.0, 9040.0, 9112.0] | [19.0, 107.0, 21.0, 21.0] | [336, 293, 129, 167] |
p02681 | u877321933 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['#x,y = map(int,input().split())\n\nfrom collections import Counter\nimport math\nmod = 10**9+7\n\n\ns = input()\nt = input()\nflag = 0\nfor i in range(len(s)):\n if t[i] != s[i]:\n flag = 1\n print("NO")\n break\nif flag == 0:\n\tprint(\'YES\')', '#x,y = map(int,input().split())\n\nfrom collections import Counter\nimport math\nmod = 10**9+7\n\n\ns1 = input()\ns2 = input()\nflag = 0\ns1 += s2[len(s2)-1]\nif s1 == s2:\n\tprint("YES")\nelse:\n\tprint("NO")', '#x,y = map(int,input().split())\n\nfrom collections import Counter\nimport math\nmod = 10**9+7\n\n\ns = input()\nt = input()\nflag = 0\ns += t[len(t)-1]\nif s == t:\n\tprint("YES")\nelse:\n\tprint("NO")', 's = input()\nt = input()\nflag = 0\nfor i in range(len(s)):\n if t[i] != s[i]:\n flag = 1\n print("No")\n break\nif flag == 0:\n\tprint(\'Yes\')\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s350530470', 's392276789', 's984925220', 's040986643'] | [9396.0, 9268.0, 9268.0, 9096.0] | [25.0, 28.0, 25.0, 21.0] | [275, 233, 226, 143] |
p02681 | u878230612 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s=list(input())\nt=list(input())\nc=t[-1]\nd=s.append(c)\nif(d==t):\n print("yes")\nelse:\n print("no")\n \n \n', 's=input()\nt=input()[:-1]\nif(s==t):\n print("yes")\nelse:\n print("no")\n \n \n', "s = input()\nt = input()[:-1]\n \nif s == t:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s371321812', 's861387775', 's647067166'] | [9044.0, 8944.0, 8956.0] | [23.0, 20.0, 20.0] | [104, 75, 80] |
p02681 | u880850253 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["s = input()\nt = input()\n\nif s == t[0:len(s)]:\n print('yes')\nelse:\n print('no')", "s = input()\nt = input()\n\nif s == t[0:len(s)]:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s401250740', 's279737916'] | [9060.0, 9032.0] | [22.0, 21.0] | [84, 84] |
p02681 | u882389182 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["s = input()\nt = input()\nslist = list(s)\ntlist = list(t)\npass = 'Yes'\nfor i in range(len(slist)):\n if slist[i] != tlist[i]:\n pass = 'No'\n else:\n continue\nprint(pass)", "s = input()\nt = input()\n\nans = 'No'\nif s == t[:-1] and len(t) - len(s) == 1:\n ans = 'Yes'\n \nprint(ans)\n"] | ['Runtime Error', 'Accepted'] | ['s726860794', 's169079557'] | [8944.0, 8996.0] | [20.0, 24.0] | [172, 105] |
p02681 | u882514852 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['S=input()\nT=input()\nif T.find(S)==0:\n print("yes")\nelse:\n print("no")\n ', 'S=input()\nT=input()\nif T.find(S)==0:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s497134617', 's003388162'] | [9020.0, 9000.0] | [31.0, 27.0] | [74, 71] |
p02681 | u883040023 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['n,m,x = map(int,input().split())\nans = 12*(10**5)+1\nC = []\nA = []\n\nfor _ in range(n):\n AC = list(map(int,input().split()))\n C.append(AC[0])\n A.append(AC[1:])\n\nfor i in range(2**n):\n understood = [0]*m\n cost = 0\n \n for j in range(n):\n if (i>>j)&1:\n cost += C[j]\n \n for k in range(m):\n understood[k] += A[j][k]\n \n if min(understood) >= x:\n ans = min(ans,cost)\n\nif ans == 12*(10**5)+1:\n ans = -1\n \nprint(ans)', 's = input()\nt = input()\nans = "No"\n\nif s == t[:-1]:\n if len(s)+1 == len(t):\n ans = "Yes"\n \nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s558148689', 's036553359'] | [9180.0, 9100.0] | [24.0, 23.0] | [512, 118] |
p02681 | u883307604 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["def can_reach_the_goal(u, x):\n return min(u) >= x\n\nn, m, x = map(int, input().split())\n\nc = []\na = []\nfor i in range(n):\n ca = [int(row) for row in input().split()]\n c.append(ca[0])\n a.append(ca[1:])\n\nINF = 10**7\nmin_cost = INF\nfor k in range(2**n):\n purchase = [True if c == '1' else False for c in list(format(k, '0{}b'.format(n)))]\n cost = 0\n u = [0]*m\n for i in range(n):\n cost += c[i] if purchase[i] else 0\n for j in range(m):\n u[j] += a[i][j] if purchase[i] else 0\n\n if can_reach_the_goal(u, x) and cost < min_cost:\n min_cost = cost\n\nif min_cost == INF:\n print(-1)\nelse:\n print(min_cost)", "s = input()\nt = input()\n\nif (s == t[0:len(t)-1]):\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s954886838', 's540169284'] | [9196.0, 9096.0] | [19.0, 24.0] | [658, 88] |
p02681 | u883574098 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['import io, sys, atexit, os\nimport math as ma\nfrom sys import exit\nfrom decimal import Decimal as dec\nfrom itertools import permutations\nfrom itertools import combinations\n\n\ndef li():\n return list(map(int, sys.stdin.readline().split()))\n\n\ndef num():\n return map(int, sys.stdin.readline().split())\n\n\ndef nu():\n return int(input())\n\n\ndef find_gcd(x, y):\n while (y):\n x, y = y, x % y\n return x\n\n\ndef lcm(x, y):\n gg = find_gcd(x, y)\n return (x * y // gg)\n\n\nmm = 1000000007\n\ndef solve():\n t = 1\n for tt in range(t):\n a=input()\n b=input()\n if(a+b[len(b)-1]==b):\n print("YES")\n else:\n print("NO")\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\nif __name__ == "__main__":\n solve()\n', 'import io, sys, atexit, os\nimport math as ma\nfrom sys import exit\nfrom decimal import Decimal as dec\nfrom itertools import permutations\nfrom itertools import combinations\n\n\ndef li():\n return list(map(int, sys.stdin.readline().split()))\n\n\ndef num():\n return map(int, sys.stdin.readline().split())\n\n\ndef nu():\n return int(input())\n\n\ndef find_gcd(x, y):\n while (y):\n x, y = y, x % y\n return x\n\n\ndef lcm(x, y):\n gg = find_gcd(x, y)\n return (x * y // gg)\n\n\nmm = 1000000007\n\ndef solve():\n t = 1\n for tt in range(t):\n a=input()\n b=input()\n if(a+b[len(b)-1]==b):\n print("Yes")\n else:\n print("No")\n\n \n\n\nif __name__ == "__main__":\n solve()\n'] | ['Wrong Answer', 'Accepted'] | ['s978119157', 's454561078'] | [9752.0, 9936.0] | [27.0, 24.0] | [745, 733] |
p02681 | u883866798 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["s = input()\nv = input()[:-1]\nprint(v)\nprint('Yes' if s == v else 'No')", "s = input()\nv = input()[::-1]\n\nprint('Yes' if s == v else 'No')", "s = input()\nv = input()[:-1]\nprint('Yes' if s == v else 'No')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s219295474', 's360093494', 's786336127'] | [9096.0, 9076.0, 8972.0] | [23.0, 23.0, 20.0] | [70, 63, 61] |
p02681 | u885627844 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["S = input()\nT = input()\nif T[0:-1] == S:\n print(T[0:-2])\n print('Yes')\nelse:\n print('No')", "S = input()\nT = input()\nif T[0:-2] == S:\n print('Yes')\nelse:\n print('No')", "S = input()\nT = input()\nif T[0:-1] == S:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s019458473', 's891006732', 's057608279'] | [9012.0, 9040.0, 9092.0] | [20.0, 21.0, 24.0] | [98, 75, 80] |
p02681 | u885717263 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s1 = input()\ns2 = input()[1:]\nif s1 == s2:\n print("Yes")\nelse:\n print("No")', 's1 = input()\ns2 = input()[:-1]\nif s1 == s2:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s904586543', 's036419441'] | [9028.0, 9096.0] | [24.0, 24.0] | [77, 78] |
p02681 | u886297662 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['S = input()\nT = input()\n\nif len(T)-len(S) == 1:\n print(Yes)\nelse:\n print(No)', "S = input()\nT = input()\nT.rstrip()\n \nif T[:-1] == S:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s461800052', 's488779313'] | [9100.0, 9100.0] | [22.0, 22.0] | [78, 87] |
p02681 | u886362575 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['N, K = map(int, input().split())\nA = list(map(int, input().split()))\nv = []\nnow = 0\nfor i in range(K):\n p = A[now]\n now = p-1\n if p in v:\n j = v.index(p)\n df = i-j\n Kn = (K-i-1) % df\n p = v[j+Kn]\n break\n else:\n v.append(p)\nprint(p)', 's = input()\nt = input()\n\nif len(s)+1 == len(t) and s == t[:len(s)]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s476276277', 's381887169'] | [9148.0, 9036.0] | [20.0, 24.0] | [253, 102] |
p02681 | u886718563 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["S,T = map(input().split())\n\nif S == T[:len(S)]:\n print('Yes')\nelse:\n print('No')", "S, T = map(input())\n\nif S == T[:len(S)]:\n print('Yes')\nelse:\n print('No')", "S = input()\nT = input()\n\nif S == T[:len(S)]:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s268067745', 's993683134', 's054859130'] | [9100.0, 9116.0, 8812.0] | [23.0, 25.0, 29.0] | [82, 75, 79] |
p02681 | u888437858 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s=input()\nt=input()\nn,m=len(s),len(t)\nif n+1==m and s[0:n]==t[0:n]:\n print("YES")\nelse:\n print("NO")\n \n\n \n', 's=input()\nt=input()\nn,m=len(s),len(t)\nif n+1==m and s[0:n]==t[0:n]:\n print("YES")\nelse:\n print("NO")\n ', 's=input()\nt=input()\nif len(t)>len(s)+1:\n print("NO")\nelif s[0:len(t)]==t[0:len(t)-1]:\n print("YES")\nelse:\n print("NO")\n \n', 's=input()\nt=input()\n#print(len(s),len(t))\nif len(t)>len(s)+1:\n print("NO")\nelif s[0:len(s)]==t[0:len(t)-1]:\n print("YES")\nelse:\n print("NO")\n \n', 's=input()\nt=input()\nn,m=len(s),len(t)\nif s+t[-1]==t:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s174283281', 's214958784', 's378887728', 's485879669', 's162489803'] | [9096.0, 9028.0, 9032.0, 9040.0, 9020.0] | [22.0, 24.0, 21.0, 21.0, 21.0] | [118, 111, 133, 155, 92] |
p02681 | u891202624 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['S,T=map(str,input().split())\nS_list=list(S)\nT_list=list(T)\ncount=0\nfor i in range(len(S)):\n if S[i]==T[i]:\n count+=1\nif count==len(S_list):\n print("Yes")\nelse:\n print("No")', 'S=str(input())\nT=str(input())\nS_list=list(S)\nT_list=list(T)\ncount=0\nfor i in range(len(S)):\n if S[i]==T[i]:\n count+=1\nif count==len(S_list):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s021178238', 's121180094'] | [9056.0, 9060.0] | [23.0, 22.0] | [188, 189] |
p02681 | u891516200 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['import sys\n\nN, K = map(int, input().split())\ntown_list = list(map(int, input().split()))\n\nroop = 0\nqueue = [1]\n\nstart = -1\n\nfor now_town in queue:\n if town_list[now_town - 1] in queue:\n start = town_list[now_town - 1]\n break\n queue.append(town_list[now_town - 1])\n\nif start == -1:\n print(queue[K])\n sys.exit()\n\nbefore_len = queue.index(start)\nroop = len(queue) - before_len\n\nprint(queue[before_len + (K - before_len) % roop])\n', "S = input()\nT = input()\n\nif S == T[0:-1]:\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Accepted'] | ['s135786455', 's311225311'] | [8972.0, 9016.0] | [26.0, 28.0] | [452, 81] |
p02681 | u892348209 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['if S.isalpha()=True and 1<=len(S)<=10 and T.isalpha()=True:\n print("Yes")\n else:\n print("No")', 'if S==T[:-1]:\n print("yes")\n else:\n print("No")', 'if S==T[:-1]:\n print("Yes")\nelse:\n print("No")', 'if s==t[:-1]:\n print("Yes")\n else:\n print("No")', 'S=input()\nT=input()\nif S==T[:-1]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s143257340', 's322326522', 's603879503', 's948579653', 's051864838'] | [8948.0, 9024.0, 8828.0, 8772.0, 8936.0] | [23.0, 20.0, 22.0, 23.0, 19.0] | [98, 52, 48, 52, 68] |
p02681 | u893962649 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['A,B,C,K = map(int, input().split())\n\n\nans=0\n\nif K <= A:\n ans=K\n\nelif K <= A + B :\n ans=A\nelse:\n ans= A - (K - A - B)\n \nprint(ans)', 'S = input()\nT = input()\n\nprint("Yes" if S == T[:len(S)] else "No")'] | ['Runtime Error', 'Accepted'] | ['s654178211', 's154911959'] | [9136.0, 9028.0] | [23.0, 31.0] | [133, 66] |
p02681 | u896741788 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['n,m,k=map(int,input().split())\nmod=998244353\nif m==1:print(0 if k!=n-1 else 1);exit()\nfact=[1]*(n-1+1)\ninv=[1]*(n-1+1)\nfor i in range(2,n-1+1):\n fact[i]=i*fact[i-1]%mod\ninv[-1]=pow(fact[-1],mod-2,mod)\nfor i in range(n-1,1,-1):\n inv[i-1]=inv[i]*i%mod\nans=0\npo=pow(m-1,n-1,mod)*m%mod\nue=fact[n-1]\niii=pow(m-1,mod-2,mod)%mod\nfor i in range(k+1):\n ans+=ue*inv[n-1-i]%mod*inv[i]%mod*po%mod\n po*=iii\nprint(ans%mod)\n', "print('Yes' if input()==input()[:-1]else'No')"] | ['Runtime Error', 'Accepted'] | ['s666360894', 's590848687'] | [9256.0, 9032.0] | [20.0, 26.0] | [421, 45] |
p02681 | u898634672 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["s = input()\nt = input()\n\nif s == (t[:-1]):\n print('yes')\nelse:\n print('no')\n", "s = input()\nt = input()\n\nif s == t[:-1]:\n print('yes')\nelse:\n print('no')\n", 'x = input()\ny = input()\n\nif x == y[:-1]:\n print("yes")\nelse:\n print("no")', 's = input()\nt = input()\n\nif s == t[:-1]:\n print("yes")\nelse:\n print("no")\n', 'x = input()\ny = input()\n\nif x == y[:-1]:\n print("yes")\nelse:\n print("no")', 'x = input()\ny = input()\n\nif x == y[:-1]:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s439066983', 's635410240', 's701936330', 's882518734', 's956330000', 's877639188'] | [9004.0, 8928.0, 8924.0, 9076.0, 9032.0, 9020.0] | [21.0, 20.0, 27.0, 21.0, 28.0, 27.0] | [82, 80, 75, 80, 79, 79] |
p02681 | u906769651 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['S=list(input())\nT=list(input())\nT=T.pop(len(T)-1)\nif S == T:\n\tprint("Yes")\nelse:\n\tprint("No")', 'S=list(input())\nT=list(input())\nT.pop(len(T)-1)\nprint(S,T)\nif S == T:\n\tprint("Yes")\nelse:\n\tprint("No")', 'S=list(input())\nT=list(input())\nT.pop(len(T)-1)\nif S == T:\n\tprint("Yes")\nelse:\n\tprint("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s224429007', 's396258057', 's151916814'] | [8876.0, 8960.0, 8912.0] | [30.0, 27.0, 30.0] | [93, 102, 91] |
p02681 | u911276694 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['N,K=map(int,input().split())\nA=list(map(int,input().split()))\ntown=1\ntownhairetu=[1]\nn=0\nfor i in range(K):\n\ttown=A[town-1]\n\tif(town in townhairetu):\n\t\tn=i+1-townhairetu.index(town)\n\t\tbreak\n\telse:\n\t\ttownhairetu.append(town)\nprint(townhairetu[(K-townhairetu.index(town))%n+townhairetu.index(town)])', "S=input()\nT=input()\nT=T[:-1]\nif(S==T):\n\tprint('Yes')\nelse:\n\tprint('No')"] | ['Runtime Error', 'Accepted'] | ['s605734980', 's837593989'] | [9012.0, 9116.0] | [25.0, 20.0] | [297, 71] |
p02681 | u911537358 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['# @author \n\nimport sys\n\nclass ARegistration:\n def solve(self, tc=0):\n s = input()\n t = input()\n print("Yes" if t.startswith(s) and len(t) == len(s) + 1 else "No")\n\n\nsolver = ARegistration()\ninput = sys.stdin.readline\n\nsolver.solve()\n', '# @author \n\nimport sys\n\nclass ARegistration:\n def solve(self, tc=0):\n s = input()\n t = input()\n print("Yes" if t[:-1] == s else "No")\n\n\nsolver = ARegistration()\ninput = sys.stdin.readline\n\nsolver.solve()\n', '# @author \n\nimport sys\n\nclass ARegistration:\n def solve(self, tc=0):\n s = input().strip()\n t = input().strip()\n print("Yes" if t[:-1] == s else "No")\n\n\nsolver = ARegistration()\ninput = sys.stdin.readline\n\nsolver.solve()\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s229762175', 's759684590', 's086290170'] | [9036.0, 9088.0, 9028.0] | [24.0, 25.0, 24.0] | [257, 228, 244] |
p02681 | u916069341 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["S = input()\nT = input()\n\nif S==T[-1]:\n print('ok')\nelse:\n print('no')", "S = input()\nT = input()\n \nif S==T[:-1]:\n print('Ok')\nelse:\n print('No')", "S = input()\nT = input()\n \nif S == T[:-1]:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s203746993', 's581990957', 's533241233'] | [9088.0, 8968.0, 9068.0] | [23.0, 23.0, 22.0] | [71, 73, 76] |
p02681 | u916662650 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['import re\n\ns = input()\nt = input()\n\nmatch_result = re.match(s+".,t)\n\nif match_result:\n print("Yes")\nelse:\n print("No")', 'import re\n\ns = input()\nt = input()\n\nmatch_result = re.match(s+".",t)\n\nif match_result:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s791214551', 's449615974'] | [8928.0, 9872.0] | [22.0, 27.0] | [124, 125] |
p02681 | u917444023 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['chokudai\nchokudaiz\n', "s=str(input())\nt=str(input())\nif s==t[:len(s)]:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s016813971', 's912162523'] | [9072.0, 9032.0] | [22.0, 22.0] | [19, 86] |
p02681 | u917451868 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['N,K=map(int, input().split())\nlist=list(map(int, input().split()))\n\ntele=[0]*N\nfor i in range(N):\n tele[i]=list[i]-1\n\ntemp=[0]*N\ntown=0\nfor i in range(N):\n temp[i]=tele[town]\n town=tele[town]\n\nfor i in range(N):\n for j in range(N):\n if temp[i]-temp[j]==0:\n m=abs(i-j)\n break\nK_temp=K%m\n\ncity=0\nfor i in range(K_temp):\n city=tele[city]\n\nprint(city+1)', "S=input()\nT=input()\n\nif T.startswith(S) and len(S) + 1 == len(T):\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s243523905', 's345520752'] | [9224.0, 9032.0] | [24.0, 22.0] | [393, 104] |
p02681 | u921156673 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["S = input()\nT = input()\nresult = False\nif all([s >= 'a' and s <= 'z' for s in S]):\n if all([t >= 'a' and t <= 'z' for t in T]):\n if len(S) >= 1 and len(S) <= 10:\n if len(T) == len(S) + 1:\n result = S.startswith(T)\nif result:\n print('Yes')\nelse:\n print('No')", "S = input()\nT = input()\nresult = False\nif all([s >= 'a' and s <= 'z' for s in S]):\n if all([t >= 'a' and t <= 'z' for t in T]):\n if len(S) >= 1 and len(S) <= 10:\n if len(T) == len(S) + 1:\n result = T.startswith(S)\nif result:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s355106644', 's590474329'] | [8912.0, 8928.0] | [27.0, 27.0] | [280, 280] |
p02681 | u921352252 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['a,b,c,k= map(int,input().split())\nif k>a:\n if k>a+b:\n print(a-k+a+b)\n else:\n print(a)\nelse:\n print(k)\n', "s=input()\nt=input()\nif s==t[:-1]:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s807880424', 's543962921'] | [9148.0, 9100.0] | [19.0, 25.0] | [125, 70] |
p02681 | u923662841 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["import re\n\ns = input()\nt = input()\na = t.replace(s, '')\nprint(a)\n\nif a.isalpha() and t != a:\n print('Yes')\nelse:\n print('No')", "s = input()\nt = input()\n\nt_ = t[0:-1]\ntt = t[-1]\nif s == t_ and tt.isalpha() == True:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s353929041', 's126077006'] | [9804.0, 9040.0] | [27.0, 22.0] | [131, 124] |
p02681 | u924828749 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s = input()\nt = input()\nn = len(s)\nif s = t[:n-1]:\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\nn = len(s)\nif s = t[:n]:\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\nn = len(s)\nif s == t[:n]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s241344780', 's946374606', 's184558496'] | [8840.0, 8956.0, 8916.0] | [22.0, 26.0, 29.0] | [85, 83, 84] |
p02681 | u926080943 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['i=input()\ns=i()\nt=i()\nprint(["No","Yes"][t[:-1]==s])', 's=input()\nt=input()\nprint(["No","Yes"][t[:-1]==s])'] | ['Runtime Error', 'Accepted'] | ['s354062993', 's264307501'] | [9000.0, 8992.0] | [25.0, 24.0] | [52, 50] |
p02681 | u931011688 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["c1 = input()\nc2 = input()\n\nif c1 == c2[:-1]:\n print('YES')\nelse:\n print('NO')\n", "c1 = input()\nc2 = input()\n\nif c1 == c2[:-1]:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s169263803', 's025678991'] | [9084.0, 9084.0] | [21.0, 26.0] | [84, 84] |
p02681 | u933717615 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ["T=input()\n\nif S==T[:len(T)-1]:\n print('Yes')\nelse:\n print('No')", "S=input()\nT=input()\n\nif S==T[:len(T)-1]:\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Accepted'] | ['s393594890', 's863995859'] | [9028.0, 9088.0] | [27.0, 21.0] | [65, 76] |
p02681 | u935016954 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['from copy import copy, deepcopy\nfrom collections import Counter\nfrom math import sqrt, floor, factorial\nfrom itertools import permutations, combinations, combinations_with_replacement\nfrom operator import mul\nfrom functools import reduce\nimport bisect\n\nMOD = 10**9 + 7\nINF = float(\'inf\')\n\nS = input()\nT = input()\nprint(S)\nif T[:-1] == S:\n print("Yes")\nelse:\n print("No")\n', 'from copy import copy, deepcopy\nfrom collections import Counter\nfrom math import sqrt, floor, factorial\nfrom itertools import permutations, combinations, combinations_with_replacement\nfrom operator import mul\nfrom functools import reduce\nimport bisect\n\nMOD = 10**9 + 7\nINF = float(\'inf\')\n\nS = input()\nT = input()\nprint(S)\nprint("YNeos"[(T[:-1] != S)::2])\n', 'from copy import copy, deepcopy\nfrom collections import Counter\nfrom math import sqrt, floor, factorial\nfrom itertools import permutations, combinations, combinations_with_replacement\nfrom operator import mul\nfrom functools import reduce\nimport bisect\n\nMOD = 10**9 + 7\nINF = float(\'inf\')\n\nS = input()\nT = input()\nif T[:-1] == S:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s185418304', 's651852513', 's859344056'] | [9672.0, 9672.0, 9672.0] | [28.0, 28.0, 25.0] | [377, 355, 368] |
p02681 | u937782958 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['a,b,c,k = map(int,input().split())\nif a+b >= k:\n print(a)\nelse: \n print(a-abs(k-a-b))\n', 'a,b,c,k = map(int,input().split())\nif k <= a+b:print(a)\nelse: print(a-(k-a-b))', "S = input()\nT = input()\nif T[:len(T)-1] == S:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s483344062', 's670303488', 's219291317'] | [9156.0, 9160.0, 9100.0] | [21.0, 23.0, 18.0] | [92, 78, 84] |
p02681 | u938718404 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['if T[:-1]==S: \n print("Yes")\nelse:\n print("No")', 'if T[:-1]==S: \n print("Yes")\nelse:\n print("No")', 'import random, string\na=random.randint(1,10)\nS="".join([random.choice(string.ascii_lowercase)for i in range(a)])\nT="".join([random.choice(string.ascii_lowercase)for i in range(a+1)])\nif T[:-1]==S: \n print("Yes")\nelse:\n print("No")', 's=input()\nt=input()\nif s[-1]==t:\n print("Yes")\nelse:\n print("No")', 'S="".join([random.choice(string.ascii_lowercase)for i in range(a)])\nprint(S)', 'import random, string\na=random.randint(1,10)\nS="".join([random.choice(string.ascii_lowercase)for i in range(a)])\nT="".join([random.choice(string.ascii_lowercase)for i in range(a+1)])\nif T==S+"a" or T==S+"b"or T==S+"c"or T==S+"d" or T==S+"e" or T==S+"f" or T==S+"g" or T==S+"h" or T==S+"i" or T==S+"j" or T==S+"k" or T==S+"l" or T==S+"m" or T==S+"n" or T==S+"o" or T==S+"p" or T==S+"q" or T==S+"r" or T==S+"s" or T==S+"t" or T==S+"u" or T==S+"v" or T==S+"w" or T==S+"y" or T==S+"x" or T==S+"z": \n print("Yes")\nelse:\n print("No")', 's=input()\nt=input()\nif t[:-1]==s:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s172652700', 's225654497', 's237413551', 's292166707', 's304922350', 's900857037', 's225746083'] | [9028.0, 8860.0, 10364.0, 8880.0, 9024.0, 10372.0, 9096.0] | [25.0, 24.0, 29.0, 21.0, 24.0, 30.0, 20.0] | [56, 56, 239, 71, 76, 536, 72] |
p02681 | u940332739 | 2,000 | 1,048,576 | Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above. | ['s = input()\nt = input()\nttt = t[-1]\n\ntt = t.rstrip(ttt)\nss = int(len(s))\ntttt = t[ss]\n\n\nif len(ttt) == 1 and tttt == s:\n print("Yes")\nelse:\n print("No")\n\n ', 's = input()\nt = input()\nttt = t[-1]\n\ntt = t.rstrip(ttt)\nss = int(len(s))\ntttt = t[:ss]\nprint(tttt)\n\nif len(ttt) == 1 and tttt == s:\n print("Yes")\nelse:\n print("No")\n', 's = input()\nt = input()\nttt = t[-1]\n\nss = t.rstrip(ttt)\n\nprint(ttt)\nprint(ss)\nif len(ttt) == 1 and ss == s:\n print("Yes")\nelse:\n print("No")\n', 's = input()\nt = input()\nttt = t[-1]\n\ntt = t.rstrip(ttt)\nss = int(len(s))\ntttt = t[:ss]\n\n\nif len(ttt) == 1 and tttt == s:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s261712022', 's846689652', 's865126785', 's573511320'] | [8928.0, 9132.0, 9100.0, 8964.0] | [19.0, 24.0, 21.0, 21.0] | [164, 171, 147, 160] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.