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 | u180172332 | 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. | ['first_str = input()\nsecond_str = input()\n\nif first_str == secofirst_str = input()\nsecond_str = input()\n\n\nif first_str == second_str[:len(first_str)] and len(first_str)+1 == len(second_str) and second_str[-1].islower():\n print("Yes")\nelse:\n print("No")', 'first_str = input()\nsecond_str = input()\n\n\nif first_str == second_str[:len(first_str)] and len(first_str)+1 == len(second_str) and second_str[-1].islower():\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s604563654', 's916910425'] | [8732.0, 8832.0] | [23.0, 26.0] | [257, 195] |
p02681 | u180528413 | 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()\nprint('Yes' if t[:len(t)-2] == s else 'No')", "s = input()\nt = input()\nprint('Yes' if t[:len(t)-1] == s else 'No')"] | ['Wrong Answer', 'Accepted'] | ['s088990226', 's857405408'] | [9028.0, 8940.0] | [22.0, 23.0] | [67, 67] |
p02681 | u181785042 | 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<k:\n print(k)\nelif a+b>k:\n print(a)\nelif a+b+c>k:\n print(a-(k-a-b))', 'import sys\na,b,c,k=map(int,input().split())\nif a+b>c:\n print(a+b)\nelse:\n print(a-(k-a-b))', 's=str(input())\nt=str(input())\nif s[:-1]==t or t[:-1]==s:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s156901571', 's787743334', 's439425819'] | [9184.0, 9116.0, 9040.0] | [22.0, 20.0, 20.0] | [113, 95, 95] |
p02681 | u182905212 | 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()\n b = input()\n if len(b)> len(a) and a==b[:len(a)]:\n print('Yes')\n else:\n print('No')", " a = input()\n b = input()\n if (len(b)>len(a)) and (a==b[:len(a)]):\n \tprint('Yes')\n else:\n \tprint('No')", "a = input()\nb = input()\nif a==b[:len(a)-1]:\n print('Yes')\nelse:\n print('No')", "a = input()\nb = input()\nif (len(b)>len(a)) and (a==b[:len(a)]):\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s087433336', 's204815556', 's949431769', 's804425876'] | [8944.0, 8972.0, 8964.0, 9104.0] | [22.0, 22.0, 20.0, 23.0] | [119, 108, 78, 98] |
p02681 | u183945517 | 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 b.startswith(a) and len(a) == (len(b) -1):\n print("YES")\nelse:\n print("NO")', 'a = input()\nb = input()\nif b.startswith(a) and len(a) == (len(b) -1):\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s771733273', 's565372979'] | [9096.0, 9020.0] | [23.0, 20.0] | [108, 109] |
p02681 | u184117766 | 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 print(K)\nelif K <= A + B:\n print(A)\nelse:\n print(2*A + B - K)', "s = input()\nt = input()\na = t[-1]\n\nS = s + a\nif t == S:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s230422355', 's793470145'] | [9168.0, 9036.0] | [22.0, 24.0] | [120, 94] |
p02681 | u185297444 | 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\nprint(t[:len(s)])\n\nif t[:len(s)] == s:\n print('Yes')\nelse:\n print('No')\n", "#ABC167a\ns = input()\nt = input()\n\n# print(t[:len(s)])\n\nif t[:len(s)] == s:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s598330431', 's061143566'] | [8884.0, 8984.0] | [23.0, 23.0] | [103, 113] |
p02681 | u185405877 | 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,d = list(map(int, input().split()))\nif a+b>=d:\n print(a)\nelse:\n print(a-(d-a-b)', 'n=input()\ns=input()\nl=len(n)\nif n+s[l]==s:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s798946816', 's953326577'] | [8892.0, 9016.0] | [21.0, 23.0] | [91, 81] |
p02681 | u186051700 | 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()\n \nif (a==b[:len(a)-1]):\n print("Yes")\nelse:\n print("No")', 'n,k = list(map(int, input().split()))\na = list(map(int, input().split()))\n\nd = 1\nb = [d]\n\nfor i in range(k):\n d = a[d-1]\n if b[0]==dn:\n break\n else:\n b.append(d)\n \nprint(b[k%len(b)])\n', 'a = input()\nb = inout()\n \nif (a==b[:len(a)-1]):\n print("Yes")\nelse:\n print("No")', 'a = input()\nb = inout()\n\nif (a==b[:len(a)-1]):\n print(`Yes`)\nelse:\n print(`No`)', 'a = input()\nb = input()\n \nif (a==b[:len(a)]):\n print("Yes")\nelse:\n print("No")\n\n#print(b[:len(a)-1])'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s199901688', 's290618893', 's376330920', 's874980115', 's284732555'] | [9096.0, 9052.0, 9092.0, 9012.0, 9104.0] | [20.0, 24.0, 21.0, 24.0, 21.0] | [82, 206, 82, 81, 102] |
p02681 | u187621751 | 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()\n\na = input()\n\nT = S + a\n\nn = len(a)\n\nif T == S + a and n == 1:\n print('YES')\nelse:\n print('NO')\n", "S = input()\nT = input()\n\nx = T - S\n\ny = len(x)\n\nif y == 1:\n print('YES')\nelse:\n print('NO')\n", "S = input()\n\nT = input()\n\nx = T[0:-1]\n\nif S == x and :\n print('YES')\nelse:\n print('NO')\n", "S = input()\n\na = input()\n\nT = S + a\n\nif T - a == S:\n print('YES')\nelse:\n print('NO')\n", "S = input()\n\nT = input()\n\nn = T[:-1]\n\nif S == n:\n print('YES')\nelse:\n print('NO')\n", "S = str(input())\n\na = str(input())\n\nT = S + a\n\nif T == S + a:\n print('YES')\nelse:\n print('NO')", "S = input()\n\na = input()\n\nT = S + a\n\nif T - a = S:\n print('YES')\nelse:\n print('NO')\n", "S = input()\n\nT = input()\n\nn = T[:1]\n\nif S == n:\n print('YES')\nelse:\n print('NO')\n", "S = input()\n\na = input()\n\nT = S + a\n\nif T == S + a:\n print('YES')\nelse:\n print('NO')\n", "S = input()\n\nT = input()\n\nx = T[0:-1]\n\nif S == x:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s136611856', 's151640577', 's197655522', 's245013824', 's345333498', 's723383295', 's865868564', 's958609988', 's973655823', 's579774658'] | [8964.0, 8856.0, 8952.0, 9092.0, 8944.0, 8892.0, 9012.0, 9096.0, 8956.0, 9096.0] | [23.0, 24.0, 23.0, 20.0, 20.0, 22.0, 20.0, 19.0, 23.0, 22.0] | [114, 98, 94, 91, 88, 100, 90, 87, 91, 89] |
p02681 | u190009657 | 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\tprint("YES")\nelse:\n\tprint("NO")', 's=input()\nt=input()\n\nif s==t[:-1]:\n\tprint("Yes")\nelse:\n\tprint("No")'] | ['Wrong Answer', 'Accepted'] | ['s643441414', 's646416834'] | [9092.0, 8912.0] | [24.0, 23.0] | [67, 67] |
p02681 | u190850294 | 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\ndef LI(): return list(map(int, sys.stdin.buffer.readline().split()))\ndef I(): return int(sys.stdin.buffer.readline())\ndef LS(): return sys.stdin.buffer.readline().rstrip().decode(\'utf-8\').split()\ndef S(): return sys.stdin.buffer.readline().rstrip().decode(\'utf-8\')\ndef IR(n): return [I() for i in range(n)]\ndef LIR(n): return [LI() for i in range(n)]\ndef SR(n): return [S() for i in range(n)]\ndef LSR(n): return [LS() for i in range(n)]\ndef SRL(n): return [list(S()) for i in range(n)]\ndef MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]\nmod = 10 ** 9 + 7\n\nS = S()\nT = S()\n\nif len(S + 1) == len(T):\n for i in len(S):\n if S[i] != T[i]:\n print("No")\n sys.exit()\n print("Yes")', 'import sys\ndef LI(): return list(map(int, sys.stdin.buffer.readline().split()))\ndef I(): return int(sys.stdin.buffer.readline())\ndef LS(): return sys.stdin.buffer.readline().rstrip().decode(\'utf-8\').split()\ndef S(): return sys.stdin.buffer.readline().rstrip().decode(\'utf-8\')\ndef IR(n): return [I() for i in range(n)]\ndef LIR(n): return [LI() for i in range(n)]\ndef SR(n): return [S() for i in range(n)]\ndef LSR(n): return [LS() for i in range(n)]\ndef SRL(n): return [list(S()) for i in range(n)]\ndef MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]\nmod = 10 ** 9 + 7\n\ns = S()\nt = S()\n\nif len(s) + 1 == len(t):\n for i in range(len(s)):\n if s[i] != t[i]:\n print("No")\n sys.exit()\n print("Yes")'] | ['Runtime Error', 'Accepted'] | ['s333130242', 's232626766'] | [9216.0, 9112.0] | [22.0, 25.0] | [735, 742] |
p02681 | u192088280 | 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', 'S = input()\nT = input()[:-1]\n\nif S == T:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s481716723', 's914180322'] | [9160.0, 9024.0] | [26.0, 22.0] | [122, 80] |
p02681 | u193582576 | 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 = input(), input()\nif a==b[:-1] and a[-1]==b[-1]:\n print("Yes")\nelse:\n print("NO")\n', 'a, b = input(), input()\nif a==b[:-1]:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Accepted'] | ['s984682560', 's885916079'] | [9088.0, 9084.0] | [20.0, 23.0] | [94, 77] |
p02681 | u193880030 | 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\nS == T[:-1]', 'S = input()\nT = input()\n\nprint(S == T[:-1])', "S = input()\nT = input()\n\nif S == T[:-1]:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s336558552', 's581893515', 's928141806'] | [9096.0, 8936.0, 9120.0] | [18.0, 22.0, 23.0] | [36, 43, 79] |
p02681 | u195396655 | 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())\nsum = 0\n\nif K >= A:\n\tsum = A\n\tK = K - A\nelse:\n\tsum = K\n\tK = 0\nif K >= B and K >= 1:\n\tK = K - B\nelse:\n\tK = 0\nif K >= C and K >= 1:\n\tsum = sum - C\nelse:\n\tsum = sum - K\n\nif sum >= 1:\n\tprint(sum)\nelse:\n\tprint(0)', 'A, B, C, K = map(int, input().split())\nsum = 0\n\nif K >= A:\n\tsum = sum + A\n\tK = K - A\nelse:\n\tsum = K\n\tK = 0\nif K >= B and K >= 1:\n\tK = K - B\nelse:\n\tK = 0\nif K >= 1:\n\tsum = sum - K\n\tK = K - K\n\nif sum >= 1:\n\tprint(sum)\nelse:\n\tprint(0)', 'S = input()\nT = input()\n\nif S == T[:-1]:\n\tprint("Yes")\nelse:\n\tprint("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s293617706', 's966063850', 's497908420'] | [9204.0, 9232.0, 9096.0] | [23.0, 24.0, 22.0] | [246, 231, 73] |
p02681 | u198085535 | 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. | ["\ns = input()\nt = input()\n\nif s in t:\n if len(s)+1 ==len(t):\n print(len(s))\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "s = input()\nt = input()\n\nif s[0:len(s)]== t[0:-1]:\n if len(s)+1 ==len(t):\n print('Yes')\n else:\n print('No')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s053666126', 's281576778'] | [9100.0, 9100.0] | [23.0, 23.0] | [157, 150] |
p02681 | u199962958 | 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[:len(s)]:\n\tif t[-1] in 'abcdefghijklmnopqrstuvwxyz':\n\t\tprint('Yes')\n exit(0) \nprint('No')", "s = input()\nt = input()\n \nif s == t[:len(s)]:\n\tif t[-1] in 'abcdefghijklmnopqrstuvwxyz'\n\t\tprint('Yes')\n exit(0)\nelse: \nprint('No')", "s = input()\nt = input()\n \nif s == t[:len(s)]:\n\tif t[-1] in 'abcdefghijklmnopqrstuvwxyz'\n\t\tprint('Yes')\n exit(0)\n \nprint('No')", "s = input()\nt = input()\n\nif s = t[:len(s)]:\n\tif t[-1] in 'abcdefghijklmnopqrstuvwxyz'\n\t\tprint('Yes')", "s = input()\nt = input()\n \nif s == t[:len(s)]:\n\tif t[-1] in 'abcdefghijklmnopqrstuvwxyz':\n\t\tprint('Yes')\n exit(0)\nelse: \nprint('No')", "s = input()\nt = input()\n \nif s == t[:len(s)]:\n\tif t[-1] in 'abcdefghijklmnopqrstuvwxyz'\n\t\tprint('Yes')\n exit(0)\n \nprint('No')", "s = input()\nt = input()\n \nif s == t[:len(s)]:\n\tif t[-1] in 'abcdefghijklmnopqrstuvwxyz'\n\t\tprint('Yes')", "s = input()\nt = input()\n \nif s == t[:len(s)]:\n\tif t[-1] in 'abcdefghijklmnopqrstuvwxyz':\n\t\tprint('Yes')\n\t\texit(0) \n\nprint('No')"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s256160097', 's489563571', 's504482844', 's542150510', 's749203985', 's781301410', 's872143405', 's193912518'] | [8932.0, 9004.0, 9000.0, 8936.0, 8928.0, 8940.0, 9024.0, 8972.0] | [23.0, 19.0, 19.0, 21.0, 24.0, 23.0, 19.0, 23.0] | [142, 148, 143, 100, 149, 143, 106, 137] |
p02681 | u200228637 | 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\nx = len(s)\nif s[x - 1] == t:\n print('Yes')\nelse:\n print('No')", "s = input()\nt = input()\nx = len(s)\nif t[0:x] == s:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s080079177', 's660457895', 's081073269'] | [8944.0, 9100.0, 9096.0] | [24.0, 23.0, 22.0] | [74, 88, 85] |
p02681 | u200916944 | 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 \na = sys.stdin.readline().rstrip()\nb = sys.stdin.readline().rstrip()\nif a == b[:-1]: \n print "Yes" \nelse: \n print "No" \n ', 'import sys\na = sys.stdin.readline()\nb = sys.stdin.readline()\nif a == b[:-1]:\n print "Yes"\nelse:\n print "No"', 'import sys \na = sys.stdin.readline().rstrip()\nb = sys.stdin.readline().rstrip()\nif a == b[:-1]: \n print("Yes") \nelse: \n print("No") '] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s084668635', 's206567595', 's501508163'] | [9016.0, 8860.0, 9028.0] | [25.0, 22.0, 21.0] | [271, 109, 237] |
p02681 | u203116413 | 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. | ['nums = input()\nS,T = nums.split(" ")\n\nif len(S)+1 != len(T):\n print("No")\n\nelif T[0:len(S)] == S:\n print("Yes")\n\nelse:\n print("No")', 'S = input()\nT = input()\n\nif len(S)+1 != len(T):\n print("No")\n\nelif T[0:len(S)] == S:\n print("Yes")\n\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s821869887', 's134471936'] | [8896.0, 9004.0] | [25.0, 28.0] | [140, 127] |
p02681 | u204358360 | 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 c167(x):\n if x[1][:-1] == x[0]: return "yes"\n else: return "no"\n\n \nif __name__=="__main__":\n input1 = input()\n input2 = input()\n input3 = [input1,input2]\n print(c167(input3))', 'def c167(x):\n if x[1][:-1] == x[0]: return "Yes"\n else: return "No"\n\n \nif __name__=="__main__":\n input1 = input()\n input2 = input()\n input3 = [input1,input2]\n print(c167(input3))\n'] | ['Wrong Answer', 'Accepted'] | ['s583414595', 's820440606'] | [9100.0, 8988.0] | [26.0, 25.0] | [199, 200] |
p02681 | u205762924 | 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 intlist(x):\n y = []\n for i in range(len(x)):\n y.append(int(x[i]))\n return y\n \nN, M, X = map(int, input().split())\nprice = -1\n \nL = []\na = []\n \nsuit =[]\nfor i in range(M+1):\n a.append(0)\n\n \nfor i in range(N):\n text = input().split()\n L.append(intlist(text))\n \ndef buy(x,y):\n \n if x + y <= N:\n \n for i in range(0,M+1):\n \n a[i] += L[x+y-1][i]\n \n \n if x + y == N:\n score = a[1:len(a)]\n \n if min(score) >= X:\n suit.append(a.copy())\n \n elif x + y != N:\n buy(x+1,y)\n for i in range(0,M+1):\n a[i] -= L[x+y][i]\n \n notbuy(x,y+1)\n \n \ndef notbuy(x,y):\n print("notbuy",x,y)\n if x + y <= N:\n \n if x + y == N:\n score = a[1:len(a)]\n if min(score) >= X:\n suit.append(a.copy())\n \n \n elif x + y != N:\n buy(x+1,y)\n for i in range(0,M+1):\n a[i] -= L[x+y][i]\n notbuy(x,y+1) \n \ndef textbook(x,y):\n buy(x+1,y)\n for i in range(0,M+1):\n a[i] -= L[x+y][i]\n notbuy(x,y+1)\n \ntextbook(0,0)\n \nb = []\n \nif suit != []:\n for i in range(len(suit)):\n for j in range(len(suit)-1):\n if suit[j] > suit[j+1]:\n b = suit[j]\n suit[j] = suit[j+1]\n suit[j+1] = b\n price = suit[0][0]\n \n \nprint(price)', 'S = input()\nT = input()\nA = "Yes"\n\nfor i in range(len(S)):\n if S[i] != T[i]:\n A = "No"\n break\n \n \nprint(A) '] | ['Runtime Error', 'Accepted'] | ['s883658710', 's369967003'] | [9252.0, 9104.0] | [21.0, 20.0] | [1513, 137] |
p02681 | u208464243 | 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\nprint(T[:-1])\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'] | ['s561540252', 's682947299'] | [9040.0, 9036.0] | [20.0, 19.0] | [93, 79] |
p02681 | u209367350 | 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.startswith(s):\n print("YES")\nelse:\n print("NO")', 's = input()\nt = input()\n\nif t[0:len(s)]==s:\n print("YES")\nelse:\n print("NO")\n', 's = input()\nt = input()\n\nif t[0:len(s)]==s:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s012944086', 's172804458', 's777631828'] | [9040.0, 8928.0, 9088.0] | [26.0, 24.0, 22.0] | [83, 83, 83] |
p02681 | u216459554 | 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[:len(T)-1]\nprint(U)\nprint("Yes" if(len(S)+1 == len(T) and S==U) else "No")', 'S=input()\nT=input()\nU=T[:len(T)-1]\nprint("Yes" if(len(S)+1 == len(T) and S==U) else "No")'] | ['Wrong Answer', 'Accepted'] | ['s103295993', 's222326742'] | [9096.0, 9100.0] | [20.0, 23.0] | [98, 89] |
p02681 | u217836256 | 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()\ns = len(S)\na = 0\nfor i in range(0,s):\n if S[i] != T[i]:\n a = 1\nif a == 0:\n print('Yes')\nelse:\n print('No')", "S = list(input())\nT = list(input())\na = 0\nfor i in range(0,s):\n if S[i] != T[i]:\n a = 1\nif a == 0:\n print('Yes')\nelse:\n print('No')", "S = list(input())\nT = list(input())\na = 0\ns = len(S)\nfor i in range(0,s):\n if S[i] != T[i]:\n a = 1\nif a == 0:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s084915372', 's648902844', 's288731385'] | [9120.0, 9048.0, 9056.0] | [21.0, 24.0, 23.0] | [162, 147, 158] |
p02681 | u219937318 | 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("Sを入力してください"))\nT=int(input("Tを入力してください"))\n\nv=\'a\' or \'b\' or \'c\' or \'d\' or \'e\' or \'f\' or \'g\' or \'i\' or \'j\' or \'k\' or \'l\' or \'m\' or \'n\' or \'o\' or \'p\' or \'q\' or \'r\' or \'s\' or \'t\' or \'u\' or \'v\' or \'w\' or \'x\' or \'y\' or \'z\'\n\nif S =((v + v + v + v + v + v + v + v + v + v) or (v + v + v + v + v + v + v + v + v) or (v + v + v + v + v + v + v + v ) or (v + v + v + v + v + v + v ) or (v + v + v + v + v + v )or (v + v + v + v + v ) or (v + v + v + v ) or (v + v + v ) or (v + v ) or (v ) \n pass\nif S =( T + v ):\n print("YES")\nelse:\n print("No")', 'S=input()\nT=input()\n\nlenS=len(S)\nT2=T[0:lenS]\n\nif S == T2:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s815275648', 's419958534'] | [8984.0, 8996.0] | [24.0, 20.0] | [595, 94] |
p02681 | u220499476 | 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[:(len(s)-2)]:\n print("Yes")\nelse :\n print("No")', 's = input()\nt = input()\nprint(t[:(len(s))])\n\nif s == t[:(len(s))]:\n print("Yes")\nelse :\n print("No")', 's = input()\nt = input()\n\\\\print(t[:len(s)])\nif s == t[:len(s)]:\n print("Yes")\nelse :\n print("No")\n\n', 's = input()\nt = input()\n\nif s == t[:len(s)]:\n print("Yes")\nelse :\n print("No")\n\n'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s233958075', 's434432322', 's750377265', 's392655079'] | [9028.0, 9048.0, 9008.0, 9120.0] | [20.0, 23.0, 21.0, 26.0] | [84, 102, 101, 82] |
p02681 | u223191054 | 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. | ['st = input()\nst2 = input()\nf = st2[len(st2)-1]\nlst = []\nlst2 = []\nfor i in st:\n lst.append(i)\nfor i in st2:\n lst2.append(i)\nlst2.remove(f)\nyo = "Yes"\nfor i in range(len(st)):\n if lst[i] != lst2[i] or len(lst)+1!=len(lst2):\n yo = "No"\nprint(yo)', 'st = input()\nst2 = input()\na = True\nfor i in range(len(st)):\n if st[i] != st2[i]:\n a = False\nif a:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s398043038', 's329543960'] | [9068.0, 9048.0] | [25.0, 20.0] | [249, 137] |
p02681 | u223555291 | 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()\nimport syss\nfor i in range(len(a)):\n if a[i]==b[i]:\n pass\n else:\n print("No")\n sys.exit()\nprint(\'Yes\')\n', 'a=input()\nb=input()\nimport sys\nfor i in range(len(a)):\n if a[i]==b[i]:\n pass\n else:\n print("No")\n sys.exit()\nprint(\'Yes\')\n'] | ['Runtime Error', 'Accepted'] | ['s052713849', 's291974918'] | [9084.0, 9076.0] | [24.0, 19.0] | [150, 149] |
p02681 | u224416147 | 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)]\nif s[0] = s[1][:-1]:\n print(\'Yes\')\nelse:\n print("No")\n', 's = [input() for i in range(2)]\nif s[0] == s[1][:-1]:\n print(\'Yes\')\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s329841360', 's458423511'] | [9016.0, 9092.0] | [22.0, 24.0] | [88, 88] |
p02681 | u227210643 | 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>=K):\n\tprint(K)\nelse:\n\tK = K-A\n\tif (B>=K):\n\t\tprint(A)\n\telse:\n\t\tK = K-B\n\t\tprint(A-K)', 'A,B,C,K=map(int,input().split())\nif (A>=K):\n print(K)\nelse:\n K = K-A\n if (B>=D):\n print(A)\n else:\n K = K-B\n print(A-K)', 'A,B,C,K=map(int,input().split())\nif (A>=K):\n print(K)\nelse:\n D = K-A\n if (B>=D):\n print(A)\n else:\n D = D-B\n print(A-D)', 'S=input()\nT=input()\nif (S==T[:len(T)-1]):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s649161709', 's674354830', 's862164718', 's752663665'] | [9204.0, 8988.0, 9152.0, 9120.0] | [24.0, 20.0, 26.0, 21.0] | [121, 131, 131, 76] |
p02681 | u227489169 | 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. | ['user_id = input()\nuser_id2 = input()\n\ndef checkIDinID(id1,id2):\n if id1 in id2:\n for i, c in enumerate(id1):\n if c != id2[i]:\n return False\n \n return True\n\nif( 1 <= len(user_id) and len(user_id) <= 10):\n if checkIDinID(user_id,user_id2) == True:\n if(len(user_id) == len(user_id2)-1):\n if(user_id.islower() and user_id2.islower()):\n print("Yse")\n else:\n print("No")\n else:\n print("No")\n else:\n print("No")\nelse:\n print("No")\n', 'user_id = input()\nuser_id2 = input()\n\n\ndef checkIDinID(id1,id2):\n if id1 in id2:\n for i, c in enumerate(id1):\n if c == id2[i]:\n return True\n else:\n return False\n\nif( 1 < len(user_id) and len(user_id) < 10):\n if checkIDinID(user_id,user_id2) == True:\n if(len(user_id) == len(user_id2)-1):\n if(user_id.islower() and user_id2.islower()):\n print("Yse")\n else:\n print("No")\n else:\n print("No")\n else:\n print("No")\nelse:\n print("No")\n', 'user_id = input()\nuser_id2 = input()\n\n\ndef checkIDinID(id1,id2):\n if id1 in id2:\n for i, c in enumerate(id1):\n if c == id2[i]:\n return True\n else:\n return False\n\nif( 1 <= len(user_id) and len(user_id) <= 10):\n if checkIDinID(user_id,user_id2) == True:\n if(len(user_id) == len(user_id2)-1):\n if(user_id.islower() and user_id2.islower()):\n print("Yse")\n else:\n print("No")\n else:\n print("No")\n else:\n print("No")\nelse:\n print("No")\n', 'user_id = input()\nuser_id2 = input()\n\ndef checkIDinID(id1,id2):\n if id1 in id2:\n for i, c in enumerate(id1):\n if c != id2[i]:\n return False\n else:\n return False\n \n return True\n\nif( 1 <= len(user_id) and len(user_id) <= 10):\n if checkIDinID(user_id,user_id2) == True:\n if(len(user_id) == len(user_id2)-1):\n if(user_id.islower() and user_id2.islower()):\n print("Yse")\n else:\n print("No")\n else:\n print("No")\n else:\n print("No")\nelse:\n print("No")\n', 'user_id = input()\nuser_id2 = input()\n\ndef checkIDinID(id1,id2):\n if id1 in id2:\n for i, c in enumerate(id1):\n if c != id2[i]:\n return False\n else:\n return False\n \n return True\n\nif( 1 <= len(user_id) and len(user_id) <= 10):\n if checkIDinID(user_id,user_id2) == True:\n if(len(user_id) == len(user_id2)-1):\n if(user_id.islower() and user_id2.islower()):\n print("Yes")\n else:\n print("No")\n else:\n print("No")\n else:\n print("No")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s301835959', 's377186191', 's773361600', 's983973435', 's162283461'] | [9124.0, 9068.0, 9132.0, 9076.0, 8992.0] | [23.0, 22.0, 22.0, 23.0, 19.0] | [559, 583, 585, 590, 590] |
p02681 | u232733545 | 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. | ["#\nfrom collections import Counter\n\nk = input()\n\n\np = input()\np = p[0:len(p)-1]\nprint(p)\nif k==p:\n print('Yes')\nelse:\n print('No')", "#\nfrom collections import Counter\n\nk = input()\n\n\np = input()\np = p[0:len(p)-1]\n\nif k==p:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s086217629', 's031529616'] | [9344.0, 9324.0] | [23.0, 23.0] | [135, 127] |
p02681 | u233841219 | 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 len(t) == len(s)+1 and t[0:len(s)-1] == s:\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\nif len(t)+1 == len(s) and t[0:len(s)-1] == s:\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\nif len(t)+1 == len(s) and t[0:len(t)-1] == s:\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\nif len(t) == len(s)+1 and t[0:len(s)] == s:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s225438425', 's902210071', 's909243225', 's904947545'] | [9064.0, 9012.0, 9012.0, 9084.0] | [22.0, 21.0, 21.0, 23.0] | [104, 104, 104, 102] |
p02681 | u234454594 | 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(True)\nelse:\n print(False)', 's=input()\nt=input()\nif s == t[:-1]:\n print("Yes")\nelse:\n print(\'No\')'] | ['Wrong Answer', 'Accepted'] | ['s941816201', 's187464120'] | [9088.0, 9028.0] | [22.0, 23.0] | [72, 74] |
p02681 | u235027735 | 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\nprint(s)\nprint(t[0:-1])\n\nif s == t[0:-1]:\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\n\nif s == t[0:-1]:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s545346408', 's294265145'] | [9108.0, 9036.0] | [27.0, 30.0] | [105, 80] |
p02681 | u237601489 | 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] == S:\n print("Yes")\nelse:\n print("No")', 'S=input()\nT=input()\nif T[:-1] == S:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s440100468', 's505906750'] | [9008.0, 9096.0] | [21.0, 23.0] | [73, 74] |
p02681 | u237634011 | 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 = (s + 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"] | ['Runtime Error', 'Accepted'] | ['s188556741', 's078597709'] | [8860.0, 9076.0] | [27.0, 29.0] | [75, 80] |
p02681 | u244466744 | 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[:-2]:\n print("Yes")\n \nelse:\n print("No")\n', 'S = input()\nT = input()\n\nif S == T[:-2]:\n print("Yes")\n \nelse:\n print("No)', 'S = input()\nT = input()\n\nif S == T[:-1]:\n print("Yes")\n \nelse:\n print("No")\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s528064546', 's710360563', 's330208440'] | [8932.0, 8956.0, 8932.0] | [27.0, 27.0, 30.0] | [79, 77, 79] |
p02681 | u244836567 | 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=len(a)\nprint(a+a[len(b-1)]', 'a=input()\nb=input()\nc=0\nif (len(a)+1)!=len(b):\n print("No")\nelse:\n for i in range(len(b)):\n if a[i]==b[i]:\n c=c+1\n if c==len(a):\n print("Yes")\n else:\n print("No")', 'a=input()\nb=input()\nc=0\nif (len(a)+1)!=len(b):\n print("No")\nelse:\n for i in range(len(a)):\n if a[i]==b[i]:\n c=c+1\n if c==len(a):\n print("Yes")\n else:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s234223992', 's545987767', 's700823216'] | [8960.0, 8996.0, 9016.0] | [27.0, 24.0, 30.0] | [38, 180, 180] |
p02681 | u245960901 | 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. | ["\ns = input().split()\nn=s[0]\ns = input().split()\nt=s[0]\nl=t[-1]\nprint(n,t,l)\nif n+l==t:\n print('Yes')\nelse:\n print('No')\n", "\ns = input().split()\nn=s[0]\ns = input().split()\nt=s[0]\nl=t[-1]\nif n+l==t:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s147970577', 's428085691'] | [9104.0, 9092.0] | [23.0, 20.0] | [126, 113] |
p02681 | u247114740 | 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()\nk = input()\nif(s == k[:-2]):\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'] | ['s993426167', 's725517179'] | [8868.0, 9040.0] | [20.0, 20.0] | [75, 78] |
p02681 | u247211039 | 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()\nprint("Yes" if S == T[:-2] else "No")', 'S, T = input().split()\nprint("Yes" if S == T[:-1] else "No")\n', 'S, T = input().split()\nprint("Yes" if "S" == "T[:-2]" else "No")', 'S = input()\nT = input()\nprint("Yes" if S == T[:-1] else "No")\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s328907918', 's557075239', 's792707996', 's098783632'] | [9028.0, 8996.0, 8992.0, 8936.0] | [21.0, 24.0, 23.0, 20.0] | [60, 61, 64, 62] |
p02681 | u248670337 | 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. | ['print("YNeos"[input()==input()[:-1]::2])', "print('YNeos'[input()!=input()[:-1]::2])"] | ['Wrong Answer', 'Accepted'] | ['s062832540', 's982530627'] | [9092.0, 8956.0] | [20.0, 22.0] | [40, 40] |
p02681 | u249372595 | 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())\nres = 0\nif A>=K:\n res= 1*A\nelse:\n for b in range(K-A,B+1):\n c = K-A-b\n ans = 1*A + 0*b + (-1)*c\n res = max(res,ans)\nprint(res)', 'S = input()\nT = input()\nfor i in "abcdefghijklmnopqrstuvwxyz":\n if T==S+i:\n print("YES")\nelse:\n print("NO")', 'S = input()\nT = input()\nflag = False\nfor i in "abcdefghijklmnopqrstuvwxyz":\n if T==S+i:\n print("YES")\n flag = True\n break\nif flag == False:\n print("NO")', 'S = input()\nT = input()\nflag = False\nfor i in "abcdefghijklmnopqrstuvwxyz":\n if T==S+i:\n print("Yes")\n flag = True\n break\nif flag == False:\n print("No")'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s093751061', 's106887811', 's233455241', 's097106665'] | [9132.0, 9096.0, 8968.0, 9040.0] | [23.0, 21.0, 23.0, 23.0] | [172, 112, 163, 163] |
p02681 | u249388402 | 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[:-1] == S) && ( len(S) = len(T) - 1):\n return "Yes"\nelse:\n return "No"\n', 'S = input()\nT = input()\n\nif T[:-1] == S and len(T) - 1 == len(S):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s629669434', 's534903737'] | [9024.0, 9004.0] | [24.0, 22.0] | [104, 100] |
p02681 | u249629612 | 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 = [int(i) for i in input().split()]\nlines = [input().split() for i in range(N)]\nflag = False\nprices = []\nfor num_books in range(1, N + 1):\n for combo in combinations(lines, num_books):\n price = 0\n skills = [0 for i in range(M)]\n for book in combo:\n price += int(book[0])\n for ind, skill in enumerate(book[1:]):\n skills[ind] += int(skill)\n if not [i for i in skills if i < X]:\n flag = True\n prices.append(price)\n break\nif not flag:\n print(-1)\nelse:\n print(min(prices))', "daude = input()\ndaude1 = input()\nif daude == daude[:-1]:\n print('Yes')\nelse:\n print('No')", 'daude = input()\ndaude1 = input()\nreturn daude == daude1[:-1]', "daude1 = input()\ndaude2 = input()\nif daude1 == daude2[:-1]:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s431523119', 's686453082', 's732315839', 's095275223'] | [9208.0, 9100.0, 9096.0, 8948.0] | [21.0, 25.0, 22.0, 24.0] | [617, 91, 60, 98] |
p02681 | u249987458 | 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.startswich(s):\n print('Yes')\nelse:\n print('No')\n ", "S = str(input())\nT = S + 'a'\nprint(T)", "s = str(input())\nt = str(input())\nif s == t[:len(s)]:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s733246342', 's938781160', 's633830847'] | [8916.0, 9052.0, 9052.0] | [23.0, 20.0, 30.0] | [81, 37, 92] |
p02681 | u250554058 | 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())\n\nnum = list(map(int, input().split()))\nt = [-1] * n\ncount = 0\ns = 1\n\nwhile t[s - 1] == -1:\n if count == k:\n break\n\n t[s - 1] = count\n count += 1\n s = num[s - 1]\nelse:\n z = (k - t[s - 1]) % (count - t[s - 1])\n w = t.index(t[s - 1] + z + 1)\nprint(w)\n', "a = input()\nb = input()\n\nif(a[0:len(a)] == b[0:len(a)]):\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Accepted'] | ['s119359580', 's170737748'] | [9080.0, 9036.0] | [23.0, 21.0] | [290, 92] |
p02681 | u250703962 | 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 sys import *\ndef test(s,t):\n\tfor i,j in zip(s,t):\n\n\t\tif i != j:\n\t\t\treturn "No"\n\treturn "Yes"\n\n\ns = stdin.readline()\nt = stdin.readline()\nprint(test(s,t))', 'def test(s,t):\n\tfor i,j in zip(s,t):\n\t\tif i != j:\n\t\t\treturn "No"\n\treturn "Yes"\ns = input()\nt = input()\nprint(test(s,t))'] | ['Wrong Answer', 'Accepted'] | ['s118346945', 's770861999'] | [9060.0, 9032.0] | [23.0, 20.0] | [158, 119] |
p02681 | u250795848 | 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,r = map(int, input().split())\ndn = [[0] * m for _ in range(n)]\n\nfor i in range(n):\n dn[i][:] = map(int, input().split())\n\n dn = np.array(dn)\n cost = []\n sh = 0\n inf = 10e8\n cost = inf\n k = np.zeros(m+1)\n\n def secom(j,k,cost):\n if j == n:\n\n if np.all(k>=r):\n print(k)\n cost = min(cost,k[0])\n return cost\n else:\n return cost\n\n cost1 = secom(j+1,k,cost)\n k += dn[j]\n cost2 = secom(j+1,k,cost)\n k -= dn[j]\n\n return min(cost1,cost2)\n\n\n cost = secom(0,k,cost)\n if cost == inf:\n print(-1)\n else:\n print(int(cost))\n', 'prev = input()\nprev_l = list(prev)\n\nnow = input()\nnow_l = list(now)\nn = len(now_l)\n\nif now_l[:n-1] == prev_l:\n print("Yes")\nelse:\n print("No")\n\n'] | ['Runtime Error', 'Accepted'] | ['s930176842', 's809608003'] | [8940.0, 8968.0] | [21.0, 20.0] | [608, 150] |
p02681 | u253205825 | 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()\na = for i in range(len(s)):\n s[i] == t[i]\nb = len(t) - len(s) == 1\nif a and b:\n print("Yes")\nelse:\n print("No")\n', 's = input()\nt = input()\na = s[i] == t[i]\nb = len(t) - len(s) == 1\nif for i in range(len(s)):\n a and b:\nprint("Yes")\nelse:\n print("No")\n', 's = input()\nt = input()\na = for i in range(len(s)):\n s[i] == t[i]\n\nif len(s) - len(t) == -1 and a:\n print("yes")\nelse:\n print("no")', 's = input()\nt = input()\nif len(t - s) == 1:\n\tprint("Yes")\nelse:\n\tprint("No")', 's = list(input())\nt = list(input())\nif len(t) - len(s) == 1 and for i in range(len(t)):\n s[i] == t[i] \n print("yes")\nelse:\n print("no")', 's = input()\nt = input()\n\nsame = 0\nfor i in range(len(s)):\n\tif s[i] == t[i]:\n\t\tsame += 1\n\nif same == len(s) and len(t) - len(s) == 1:\n\tprint("Yes")\n\nelse:\n\tprint("No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s093123789', 's168137331', 's607982526', 's667171993', 's958413574', 's531306308'] | [8844.0, 8880.0, 8792.0, 8956.0, 9016.0, 9036.0] | [22.0, 20.0, 24.0, 25.0, 22.0, 24.0] | [139, 137, 134, 76, 138, 166] |
p02681 | u253389610 | 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().strip().split()\nif s == t[:-1]:\n print("Yes")\nelse:\n print("No")\n', 's = input().strip()\nt = input().strip()\nif s == t[:-1]:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s546980195', 's111502784'] | [9084.0, 9080.0] | [23.0, 21.0] | [82, 91] |
p02681 | u257632310 | 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 solve(s1, s2):\n for i in range(len(s1)):\n if s1[i] != s2[i]:\n return "No"\n if le(s2) - len(s1) != 1:\n return "No"\n return "Yes"\ns1 = input()\ns2 = input()\n', 'def solve(s1, s2):\n if len(s2) - len(s1) != 1:\n return "No"\n for i in range(len(s1)):\n if s1[i] != s2[i]:\n return "No"\n return "Yes"\ns1 = input()\ns2 = input()\nprint(solve(s1,s2))'] | ['Wrong Answer', 'Accepted'] | ['s503020002', 's422329321'] | [9000.0, 9000.0] | [23.0, 22.0] | [172, 212] |
p02681 | u258410210 | 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()\nlens=len(s)\nif s==t[:3:]:\n print("Yes")\nelse:\n print("No") \n', 's=input()\nt=input()\nlens=len(s)\nif s==t[:lens:]:\n print("Yes")\nelse:\n print("No") \n \n'] | ['Wrong Answer', 'Accepted'] | ['s891988092', 's552425866'] | [9024.0, 9032.0] | [24.0, 25.0] | [89, 97] |
p02681 | u260036763 | 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()\nprint(T[:len(S)])\nif S == T[:len(S)]:\n print('Yes')\nelse:\n print('No')", "S = input()\nT = input()\nif S == T[:len(S)]:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s154949288', 's489922164'] | [9032.0, 9096.0] | [22.0, 23.0] | [100, 82] |
p02681 | u260906801 | 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(S) == len(T) - 1:\n Slis = list(S)\n Tlis = list(T)\n if str,islower(Tlis[ - 1]) == True:\n Tlis.remove(Tlis[ - 1])\n if Slis ==Tlis:\n print('Yes')\n else:\n print('No')\n \n else:\n print('No')\n\n\nelse:\n print('No')", "S = input()\nT = input()\n\nSlis = list(S)\nTlis = list(T)\nTlisremoved = Tlis.remove(Tlis[ - 1])\nif Slis ==Tlisremoved:\n print('Yes')\nelse:\n print('No')", "S, T = input().split()\nif len(S) == len(T) - 1:\n Slis = list(S)\n Tlis = list(T)\n removedTlis = Tlis.remove(Tlis[ - 1])\n if Slis == removedTlis:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", 'S, T = input().split()\n\nif len(S) == len(T) - 1:\n Slis = list(S)\n Tlis = list(T)\n removedTlis = Tlis.remove(T[len(T) - 1])\n if Slis == removedTlis:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', "S, T = input().split()\nif len(S) == len(T) - 1:\n Slis = list(S)\n Tlis = list(T)\n Tlis.remove(Tlis[ - 1])\n if Slis ==Tlis:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", 'S = []\nT = []\nS, T = input().split()\nT.remove(T[len(T) - 1 ])\nif S == T:\n return "Yes"\nelse:\n return "No"', "S = input()\nT = input()\n \nSlis = list(S)\nTlis = list(T)\nTlis.pop(-1)\nif len(S) == 0:\n print('No')\nelif Slis == Tlis:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s073463907', 's359736586', 's814813008', 's817650490', 's896603715', 's998550888', 's070653341'] | [8904.0, 9108.0, 9028.0, 9024.0, 9104.0, 8972.0, 8976.0] | [26.0, 21.0, 22.0, 24.0, 23.0, 21.0, 24.0] | [314, 156, 229, 233, 207, 107, 159] |
p02681 | u262543030 | 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\nadd = len(T)\n#print(add)\nif len(S) > 10 or len(S) < 2:\n print("No")\n exit()\n\nif S != T[:int(len(T)-1)]:\n print("No")\n exit()\nif len(S)+1 != len(T):\n print("No")\n exit()\nfor i in range(len(T)):\n if T[i] not in "abcdefghijklmnopqrstuvwxyz":\n print("No")\n exit()\n else:\n pass\n\nprint("yes")\n', 'S = input()\nT = input()\n\nadd = len(T)\n#print(add)\n\nif S != T[:int(len(T)-1)]:\n print("No")\n exit()\nif len(S)+1 != len(T):\n print("No")\n exit()\nfor i in range(len(T)):\n if T[i] not in "abcdefghijklmnopqrstuvwxyz":\n print("No")\n exit()\n else:\n pass\n\nprint("yes")\n', 'S = input()\nT = input()\n\nadd = len(T)\n#print(add)\n\nif S != T[:int(len(T)-1)]:\n print("No")\n exit()\nif len(S)+1 != len(T):\n print("No")\n exit()\nfor i in range(len(T)-1):\n if T[i] not in "abcdefghijklmnopqrstuvwxyz":\n print("No")\n exit()\n else:\n pass\n\nprint("yes")\n', 'S = input()\nT = input()\n\nadd = len(T)\n#print(add)\nif len(S) > 10 or len(S) < 1:\n print("No")\n exit()\n\nif S != T[:int(len(T)-1)]:\n print("No")\n exit()\nif len(S)+1 != len(T):\n print("No")\n exit()\nfor i in range(len(T)):\n if T[i] not in "abcdefghijklmnopqrstuvwxyz":\n print("No")\n exit()\n else:\n pass\n\nprint("Yes")\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s368929963', 's513519555', 's715489287', 's041898591'] | [9028.0, 9024.0, 9060.0, 9128.0] | [22.0, 22.0, 21.0, 20.0] | [329, 276, 278, 329] |
p02681 | u265213765 | 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 = T.replace(S,"")\nprint(T)\nif len(T) == 1:\n print("YES")\nelse:\n print("NO")', 'S = input()\nT = input()\n\nif len(T) == 2 and T[0] == T[1]:\n print("YES")\nelse:\n T = T.replace(S,"")\n print(T)\n if len(T) == 1:\n print("YES")\n else:\n print("NO")', 'S = input()\nT = input()\n\nif len(T) == 2 and T[0] == T[1]:\n print("YES")\nelse:\n T = T.replace(S,"")\n if len(T)==1 and T.islower()==True:\n print("YES")\n else:\n print("NO")', 'S = input()\nT = input()\n\nif len(T) == 2 and S[0] == T[0]:\n print("Yes")\nelse:\n if S[0] == T[0]:\n T = T.replace(S,"")\n if len(T)==1:\n print("Yes")\n else:\n print("No")\n else:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s298150755', 's485554149', 's619532963', 's503643279'] | [8972.0, 9056.0, 9024.0, 8988.0] | [23.0, 20.0, 21.0, 25.0] | [108, 188, 195, 244] |
p02681 | u266301148 | 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 __name__ == \'__main__\':\n a=input()\n b=input()\n if a==b[0:len(b)-2]:\n print("Yes")\n else:\n print("No")', '\nif __name__ == \'__main__\':\n a=input()\n b=input()\n if len(b)-len(a)==1:\n if a==b[0:len(b)-1]:\n\n print("Yes")\n else:\n print("No")\n else:\n print("No")\n\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s989315966', 's650927746'] | [8964.0, 9100.0] | [22.0, 21.0] | [130, 207] |
p02681 | u266795424 | 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 = list(map(int,input().split()))\nif a[0] >= a[3]:\n print(a[3])\nelse:\n a[3] = a[3] -a[0]\n if a[1] >= a[3]:\n print(a[0])\n else:\n print(a[0]-a[3]+a[1])', 'a = input()\nb = input()\nc = len(a)\na = a + b[c]\nif (a == b):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s451475834', 's943548627'] | [9204.0, 8952.0] | [22.0, 24.0] | [160, 95] |
p02681 | u267219631 | 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 + b >= k or a == k) or (a == 0 and c == 0):\n print(a)\nelse:\n print(a + ((a+b) - k))\n', 's = input()\nt = input()\n\nprint("Yes" if s == t[:-1] else "No")\n'] | ['Runtime Error', 'Accepted'] | ['s218324213', 's641021937'] | [9160.0, 9020.0] | [23.0, 21.0] | [136, 63] |
p02681 | u269778596 | 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()\nb = b[0:len(b)-1]\n#print(b)\nprint(a==b)', "a = input()\nb = input()\nb = b[0:len(b)-1]\n#print(b)\nif(a==b):\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s005099534', 's873941303'] | [9096.0, 9092.0] | [23.0, 22.0] | [63, 100] |
p02681 | u271279914 | 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\na=input()\nb=input()\n\nif len(b)-len(a)==1:\n if re.search(a,b) is None:\n print("No")\n else:\n print("Yes")\nelse\n print("No")\n', 'import re\n\na=input()\nb=input()\n\nif len(b)-len(a)==1:\n if re.search("^"+a,b) is None:\n print("No")\n else:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s184816757', 's247811203'] | [9000.0, 9944.0] | [20.0, 28.0] | [156, 161] |
p02681 | u272457181 | 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 len(s)+1 = len(t):\n print('Yes')\nelse:\n print('No')", "s = input()\nt = input()\nt2 = t[:-1]\nif t2 == s:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s327610117', 's756257659'] | [8860.0, 8876.0] | [23.0, 28.0] | [80, 82] |
p02681 | u275893569 | 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\nprint(if S == T[:-1]'Yes' else 'No')", "S = input()\nT = input()\nif S == T[:-1]:\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Accepted'] | ['s031786218', 's226004195'] | [8904.0, 9012.0] | [26.0, 27.0] | [61, 75] |
p02681 | u276894499 | 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 len(t)-len(s) == 1 and t[0:len(s)] == s:\n a = t[len(s):]\n if a.isdigit(): \n print("No")\n else:\n print("Yse")\nelse:\n print("No")', 's = input()\nt = input()\nif len(t)-len(s) == 1 and t[0:len(s)] == s:\n print("Yse")\nelse:\n print("No")', 's = input()\nt = input()\na = t[len(s):]\nb = t[0:len(s)]\nif b == s and len(a) == 1:\n print("Yes") \nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s513933335', 's961458508', 's589111055'] | [9052.0, 9028.0, 9040.0] | [21.0, 23.0, 24.0] | [180, 106, 124] |
p02681 | u277353449 | 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=0\nfor i in range(0,len(s)):\n\tif(s[i]==t[i]):\n \tn=n+1\nif(n==len(s)):\n print("Yes")\nelse:\n print("No")\n', 's=input()\nt=input()\nif(len(t)==len(s)+1):\n for i in range(0,len(s)):\n if(s[i]==t[i]):\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 's=input()\nt=input()\nn=0\nfor i in range(0,len(s)):\n if(s[i]==t[i]):\n n=n+1\nif(n==len(s)):\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s036079363', 's954845922', 's899578713'] | [8956.0, 8928.0, 9096.0] | [23.0, 21.0, 23.0] | [128, 156, 138] |
p02681 | u277953073 | 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 k <= a:\n print(k)\nelif k <= a + b:\n print(a)\nelif k > a + b:\n print(a - (k - (a + b)))', 's = input()\nt = input()\nflag = 1\nfor i in range(len(s)):\n if s[i] != t[i]:\n flag = 0\n break\n\nif flag and len(t) == len(s) + 1:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s416601417', 's843152266'] | [9172.0, 9044.0] | [21.0, 23.0] | [138, 182] |
p02681 | u279266699 | 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 itertools\nimport numpy as np\nn, m, x = map(int, input().split())\nl = [list(map(int, input().split())) for _ in range(n)]\nl = sorted(l)\nl = np.array(l)\nans = np.sum(l, 0)[0]\nans_s = np.sum(l, 0)\nif np.any(ans_s[1:] < x):\n print(-1)\n exit()\ncount = 0\nfor i in range(1, n + 1):\n for j in itertools.combinations(l, i):\n tot = np.sum(j, 0)\n if np.all(tot[1:] >= x) and tot[0] < ans:\n ans = tot[0]\n print(int(ans))\n exit()\n', "s = input()\nt = input()\nif s == t[:-1]:\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Accepted'] | ['s023499604', 's321077927'] | [27040.0, 9088.0] | [107.0, 20.0] | [480, 79] |
p02681 | u281055657 | 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=(x for x in input().split()) \nt=len(a)\naa=[]\nbb=[]\nfor i in range(t):\n aa.append(a[i])\n bb.append(b[i])\n \nif(aa==bb):\n print("Yes")\nelse:\n\tprint("No")\n', 'a,b=(x for x in input().split()) \nt=len(a)\naa=[]\nbb=[]\nfor i in range(t):\n aa.append(a[i])\n bb.append(b[i])\n \n \nif(aa==bb):\n\tprint("Yes")\nelse:\n\tprint("No")\n \n', 'a,b=(x for x in input().split()) \nt=len(a)\naa=[]\nbb=[]\nfor i in range(t):\n aa.append(a[i])\n bb.append(b[i])\n \nif(aa==bb):\n print("Yes)\nelse:\n\tprint("No")', 'a,b=(x for x in input().split()) \nt=len(a)\naa=[]\nbb=[]\nfor i in range(t):\n aa.append(a[i])\n bb.append(b[i])\n \nif(aa==bb):\n print("Yes")\nelse:\n\tprint("No")\n ', 's = input()\nt = input()\nprint("Yes" if s == t[:-1] else "No")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s024416567', 's721758167', 's791019971', 's980326218', 's336465275'] | [8980.0, 9048.0, 8968.0, 9116.0, 9024.0] | [23.0, 23.0, 24.0, 23.0, 23.0] | [158, 169, 156, 166, 61] |
p02681 | u281334626 | 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_=slice(T[:-1])\n\nif (S==T_):\n print("Yes")\nelif:\n print("No")', 'S=input()\nT=input()\n\nT_=slice(T[:-1])\n\nif (S==T_):\n print("Yes")\nelse:\n print("No")', 'S=input()\nT=input()\n\nT_=T[:-1]\nif (S==T_):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s196134161', 's929951619', 's005220826'] | [8972.0, 8980.0, 8968.0] | [23.0, 20.0, 21.0] | [89, 89, 81] |
p02681 | u284363684 | 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. | ['# input\nS = input()\nT = input()\n\nif T.startswith(S):\n print("Yes")\nelse;\n print("No")', '# input\nS = input()\nT = input()\n\nif T.startswith(S):\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s795883034', 's819066021'] | [8956.0, 9096.0] | [24.0, 22.0] | [91, 91] |
p02681 | u287660527 | 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()\na = len(s)\n\nif len(s) <=10 and len(s) >= 1 and len(t) == len(s) + 1 and t[0:a] == s[0:a]:\n print('yes')\nelse:\n print('no')", "s = input()\nt = input()\na = len(s)\n\nif len(x) <=10 and len(x) >= 1 and len(t) == len(s) + 1 and t[0:a] == s[0:a]:\n print('yes')\nelse:\n print('no')", "s = input()\nt = input()\na = len(s)\n\nif len(s) > 10 or len(s) < 1:\n print('no')\nelse:\n if t[0:a] != s:\n print('no')\n else:\n if len(t) == len(s) + 1:\n print('yes')", "s = input()\nt = input()\na = len(s)\n\nif len(s) > 10 or len(s) < 1:\n print('no')\nelse:\n if t[0:a] != s:\n print('no')\n else:\n if len(t) == len(s) + 1:\n print('yes')\n\n\n", "s = input()\nt = input()\na = len(s)\n\nif len(s) > 10 or len(s) < 1:\n print('no')\nelse:\n if t[0:a] != s:\n print('no')\n else:\n if len(t) == len(s) + 1:\n print('yes')", "s = input()\nt = input()\na = len(s)\n\nif len(s) > 10 or len(s) < 1:\n print('no')\nelse:\n if t[0:a] != s:\n print('no')\n else:\n if len(t) == len(s) + 1:\n print('yes')", "s = input()\nt = input()\na = len(s)\n\nif len(s) <=10 and len(s) >= 1 and len(t) == len(s) + 1 and t[0:a] == s[0:a]:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s193569241', 's243574332', 's696215951', 's729898578', 's747196869', 's886687509', 's214107294'] | [9056.0, 8964.0, 8980.0, 9016.0, 9012.0, 9020.0, 8884.0] | [25.0, 28.0, 29.0, 25.0, 26.0, 31.0, 25.0] | [148, 148, 175, 178, 175, 175, 149] |
p02681 | u289162337 | 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 len(s)+1 == len(t) and s == t[:-2]:\n print("Yes")\nelse:\n print("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) and s == t[:-1]:\n print("Yes")\nelse:\n print("No")\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s197214375', 's803053403', 's368553360'] | [9040.0, 9012.0, 9092.0] | [23.0, 21.0, 24.0] | [97, 80, 98] |
p02681 | u294385082 | 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. | ['\na,b,c,k = map(int,input().split())\n \nif k <= a:\n print(a)\nelif a < k and k <= a+b:\n print(a)\nelif a+b < k and k <= a+b+c:\n print(a-k+a+b)', "s = input()\nt = input()\n\nif t[:-1] == s:\n print('Yes')\nelse:\n print('No')\n \n"] | ['Runtime Error', 'Accepted'] | ['s051223581', 's179713413'] | [9096.0, 9016.0] | [24.0, 22.0] | [141, 79] |
p02681 | u298976461 | 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\nflag = True\nfor i in range(s):\n if s[i] is not t[i]:\n flag = False\nif flag is True:\n print("Yes")\nelse:\n print("No")\n ', 's = input()\nt = input()\n \nflag = True\nfor i in range(len(s)):\n if s[i] != t[i]:\n flag = False\nif flag == True:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s346868780', 's434901709'] | [8904.0, 9032.0] | [23.0, 28.0] | [152, 150] |
p02681 | u299100939 | 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\ns = len(S)\nt = len(T)\n\nif (S == T[:s]) & (t == s+1):\n print("yes")\nelse:\n print("no")', 'S = input()\nT = input()\n\ns = len(S)\nt = len(T)\n\nif (S == T[:s]) & (t == s+1):\n print("yes")\nelse:\n print("no")', 'S = input()\nT = input()\n\ns = len(S)\nt = len(T)\n\nif (S == T[:s]) & (t == s+1):\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s106697596', 's117155680', 's330357954'] | [9040.0, 9008.0, 8980.0] | [21.0, 24.0, 23.0] | [116, 116, 116] |
p02681 | u300457253 | 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[0:len(s)] == s:\n print('yes')\nelse:\n print('no')", "s = input()\nt = input()\n\nif t[0:len(s)] == s and len(t) > len(s):\n print('yes')\nelse:\n print('no')", "s = input()\nt = input()\n\nif t[0:len(s)] == s:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s645862001', 's739250187', 's168898834'] | [9100.0, 8960.0, 9096.0] | [19.0, 23.0, 22.0] | [84, 104, 84] |
p02681 | u302701160 | 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("Enter words: ")\nT = input("Enter another words: ")\n\nif S in T:\n print("Yes")\nelse:\n print("No")\n ', 'S = input()\nT = input()\n\nif S == T[0:len(S)]:\n print("Yes")\nelse:\n print("No")\n '] | ['Wrong Answer', 'Accepted'] | ['s808307972', 's872889086'] | [8952.0, 9028.0] | [20.0, 20.0] | [117, 89] |
p02681 | u302707263 | 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\nadjusted_t = t[:-1]\n\nif s==adjuested_t:\n print("Yes")\nelse:\n print("No")\n ', 's = input()\nt = input()\n\nadjusted_t = t[:-1]\n\nif s==adjusted_t:\n print("Yes")\nelse:\n print("No")\n '] | ['Runtime Error', 'Accepted'] | ['s749795249', 's079584079'] | [9092.0, 8996.0] | [21.0, 20.0] | [102, 101] |
p02681 | u305237878 | 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())\nfor i in range(len(S)):\n if (S[i] != T[i]):\n print("No")\n break\n else:\n continue\n print("Yes")', 'S = list(input())\nT = list(input())\ncount = 0\nfor i in range(len(S)):\n if S[i] != T[i]:\n count += 1\n break\n\nif count == 0:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s139280127', 's083799281'] | [8872.0, 9016.0] | [30.0, 26.0] | [142, 164] |
p02681 | u306497037 | 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 print(K)\nelif A<K and K<=A+B:\n print(A)\nelse:\n print(A-(K-A-B))', 'S = input()\nT = input()\n\nif S[0:-1]==T:\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\nif len(T)==1:\n print("No")\nelif S==T[0:-1]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s132822931', 's584126096', 's733439213'] | [9108.0, 9100.0, 9036.0] | [22.0, 23.0, 24.0] | [117, 78, 109] |
p02681 | u307615746 | 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. | ["in1 = input()\nin2 = input()\nres = True\n\nif len(in1) < 1 or len(in1) > 10 :\n res = False\n\nif in1.islower() and in1.isalpha() :\n pass\nelse :\n res = False\n\n\nif in2.islower() and in2.isalpha():\n if in1 in in2[:len(in2)-2] :\n if len(in2) - len(in1) == 1 :\n pass\n else :\n res = False\n else :\n res = False\nelse :\n res = False\n\nif res :\n print('Yes')\nelse :\n print('No')", "in1 = input()\nin2 = input()\nres = True\n\nif len(in1) < 1 or len(in1) > 10 :\n res = False\n\nif in1.islower() and in1.isalpha() :\n pass\nelse :\n res = False\n\n\nif in2.islower() and in2.isalpha():\n if in1 in in2[:len(in2)-1] :\n if len(in2) - len(in1) == 1 :\n pass\n else :\n res = False\n else :\n res = False\nelse :\n res = False\n\nif res :\n print('Yes')\nelse :\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s145487401', 's470062574'] | [9064.0, 9136.0] | [26.0, 21.0] | [429, 429] |
p02681 | u309629016 | 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[:-1] == T[:-1]:\n \tprint('Yes')\nelse:\n print('No')", "s = input()\nt = input()\n\nif s == t[:-1]:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s968295911', 's185955119'] | [9084.0, 9052.0] | [22.0, 21.0] | [83, 75] |
p02681 | u310381103 | 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()\na="Yes"\nfor i in range(len(s)-1):\n if s[i]!=t[i]:\n a="No"\nif len(s)+1!=len(t):\n a="No"\nif len(s)>10 or len(s)<1:\n a="No"\nif s.lower()!=s or t.lower!=t:\n a="No"\nprint(a)\n', 's=input()\nt=input()\na="Yes"\nfor i in range(len(s)):\n if s[i]!=t[i]:\n a="No"\nif len(s)+1!=len(t):\n a="No"\nif len(s)>10 or len(s)<1:\n a="No"\nprint(a)\n'] | ['Wrong Answer', 'Accepted'] | ['s491106563', 's872879664'] | [9124.0, 9044.0] | [25.0, 21.0] | [206, 164] |
p02681 | u312907447 | 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 main():\n N, K = map(int, input().split())\n A = [int(i)-1 for i in input().split()]\n\n visited_town = []\n current_town = 0\n loop_flg = False\n visited_town.append(current_town)\n set_visted_town = set(visited_town)\n for i in range(K):\n current_town = A[current_town]\n if current_town in set_visted_town:\n visited_town.append(current_town)\n loop_flg = True\n break\n visited_town.append(current_town)\n set_visted_town.add(current_town)\n\n\n if loop_flg:\n loop_start = visited_town.index(current_town)\n loop_end = len(visited_town) - 1\n loop_length = loop_end - loop_start\n last_index = (K-loop_start)%loop_length\n current_town = visited_town[loop_start+last_index]\n\n print(current_town+1)\n\n\nif __name__ == '__main__':\n main()", "S = input()\nT = input()\n\nif S == T[:-1]:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s590637576', 's899654221'] | [9228.0, 9096.0] | [22.0, 24.0] | [858, 79] |
p02681 | u316231243 | 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 collections import defaultdict\nn,k=map(int,input().split())\nl=list(map(int,input().split()))\nd=defaultdict(int)\nfor i in range(n):\n d[i+1]=l[i]\nvisited=set()\nl=[]\ni=1\nwhile True:\n l.append(i)\n if i not in visited:\n visited.add(i)\n else:\n break\n i=d[i]\nfirst=l.index(l[-1])\nif k<first:\n print(l[k])\nelse:\n k=(k-first)%((len(l)-1)-first)\n k+=first\n print(l[k])', 'from collections import defaultdict\nn,k=map(int,input().split())\nl=list(map(int,input().split()))\nd=defaultdict(int)\nfor i in range(n):\n d[i+1]=l[i]\nvisited=set()\nl=[]\ni=1\nwhile True:\n l.append(i)\n if i not in visited:\n visited.add(i)\n else:\n break\n i=d[i]\nfirst=l.index(l[-1])\n\nk=(len(l)-first)%((len(l)-1)-first)\nk+=first\nif k<first:\n print(l[k])\nelse:\n print(l[k-1])', 's=input()\nt=input()\nif len(t)==len(s)+1 and t[0:len(s)]==s:\n print("Yes")\nelse:\n print("No")\n '] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s361487793', 's902488871', 's913178037'] | [9468.0, 9320.0, 9024.0] | [22.0, 23.0, 23.0] | [404, 404, 103] |
p02681 | u316390754 | 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()\na = t[:-1]\nif s == a:\n print('YES')\nelse:\n print('NO')", "s = input()\nt = input()\na = t[:-1]\nif s == a:\n print('Yes')\nelse:\n print('No')\n"] | ['Wrong Answer', 'Accepted'] | ['s851086888', 's908766718'] | [9096.0, 9092.0] | [22.0, 19.0] | [80, 81] |
p02681 | u317485668 | 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. | ["# -*- coding: utf-8 -*-\n\nS = input()\nT = input()\n\nif S in T == True:\n if T[len(S)-1] == S[len(S)-1]:\n print('Yes')\nelse:\n print('No')\n", "# -*- coding: utf-8 -*-\n\nS = input()\nT = input()\nlength = len[S] - 1\n\nfor i in range(length):\n if S[i] == T[i]:\n i = i + 1\n if i == len[T]:\n print('Yes')\n break\n break\n else:\n print('No')\n break\n", "# -*- coding: utf-8 -*-\n\nS = input()\nT = input()\n\nif S in T == True:\n if T[len(T)-1] == S[len(S)-1]\n print('Yes')\nelse:\n print('No')", "# -*- coding: utf-8 -*-\n\nS = input()\nT = input()\n\nif S in T == True:\n if T[0] == S[0]:\n if T[len(S)-1] == S[len(S)-1]:\n print('Yes')\nelse:\n print('No')", "# -*- coding: utf-8 -*-\n\nS = input()\nT = input()\n\nif S in T == True:\n if T[len(T)-1] == S[len(S)-1]:\n print('Yes')\nelse:\n print('No')\n", "# -*- coding: utf-8 -*-\n\nS = input()\nT = input()\nl = len(S)\n\nfor i in range(0,l):\n if S[i] == T[i]:\n i = i + 1\n if i == l:\n print('Yes')\n break\n else:\n print('No')\n break\n"] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s239248357', 's472948597', 's679862146', 's835704363', 's841189363', 's061328115'] | [9096.0, 8928.0, 8960.0, 9108.0, 9032.0, 9040.0] | [23.0, 21.0, 22.0, 23.0, 21.0, 21.0] | [147, 258, 141, 175, 147, 227] |
p02681 | u317533286 | 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[:len(B)-2]\nif A == C:\n D = "Yes"\nelse:\n D = "No"\nprint(D)', 'A = input()\nB = input()\nC = B[:len(B) - 1]\nif A == C:\n D = "Yes"\n else:\n D = "No"\nprint(D)', 'A = input()\nB = input()\nC = B[:len(B)-2]\nif A == C:\n D = "Yes"\n else:\n D = "No"\nprint(D)', 'A = input()\nB = input()\nC = B.rstrip()\nif A == C:\n D = "Yes"\n else:\n D = "No"\nprint(D)', 'A = input()\nB = input()\nC = B[:len(B)]\nif A == C:\n D = "Yes"\n else:\n D = "No"\nprint(D)', 'A = input()\nB = input()\nC = print(B[:len(B)])\nif A == C:\n D = "Yes"\n else:\n D = "No"\nprint(D)', 'A = input()\nB = input()\nC = B[:len(B)-1]\nif A == C:\n D = "Yes"\nelse:\n D = "No"\nprint(D)'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s069751905', 's197617910', 's372940028', 's455768526', 's635663982', 's725978312', 's197264052'] | [9092.0, 9020.0, 9016.0, 8668.0, 8960.0, 9020.0, 8960.0] | [23.0, 24.0, 22.0, 21.0, 22.0, 25.0, 24.0] | [89, 95, 93, 91, 91, 98, 89] |
p02681 | u318909153 | 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 = [int(x) for x in input().split()]\ncount1=0\ncount0=0\ncount2=0\nif a[3]>a[1]:\n count1=a[0]\nif a[3]<=a[1]:\n count1=a[3]\nif a[3]-a[1]-a[0]>0:\n count2=-(a[3]-a[1]-a[0])\nprint(count1+count2)\n', 'X = input()\nY = input()\nif X==Y[:-1]:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s552981863', 's396859412'] | [9192.0, 9084.0] | [19.0, 19.0] | [196, 73] |
p02681 | u319589470 | 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 bisect\nimport heapq\nimport itertools\nimport math\nimport numpy as np\nfrom collections import Counter, defaultdict, deque\nfrom copy import deepcopy\nfrom decimal import Decimal\nfrom math import gcd\nfrom operator import add, itemgetter, mul, xor\ndef cmb(n,r,mod):\n bunshi=1\n bunbo=1\n for i in range(r):\n bunbo = bunbo*(i+1)%mod\n bunshi = bunshi*(n-i)%mod\n return (bunshi*pow(bunbo,mod-2,mod))%mod\nmod = 10**9+7\ndef I(): return int(input())\ndef LI(): return list(map(int,input().split()))\ndef MI(): return map(int,input().split())\ndef LLI(n): return [list(map(int, input().split())) for _ in range(n)]\n\n\n\n\n\ndef now_place(li,n):\n now = 1\n for i in range(n):\n now = li[now-1]\n return now\n\n\n\ndef root(li,p):\n ans = []\n now = 1\n for j in range(p):\n ans.append(now_place(li,j+1))\n return ans\n\n\n\nn,k = MI()\na = LI()\n\ntown\u3000= []\n\nvisit=[0]*n\np = 1\nwhile visit[p-1] == 0:\n town.append(p)\n visit[p-1] = 1\n p = a[p-1]\n\n\nl = town.index(p)\nif k <len(town):\n print(town[k])\nelse:\n print(town[l + (k-l)%(len(town[l:]))])', '#!/usr/bin/env python3\nimport bisect\nimport heapq\nimport itertools\nimport math\nimport numpy as np\nfrom collections import Counter, defaultdict, deque\nfrom copy import deepcopy\nfrom decimal import Decimal\nfrom math import gcd\nfrom operator import add, itemgetter, mul, xor\ndef cmb(n,r,mod):\n bunshi=1\n bunbo=1\n for i in range(r):\n bunbo = bunbo*(i+1)%mod\n bunshi = bunshi*(n-i)%mod\n return (bunshi*pow(bunbo,mod-2,mod))%mod\nmod = 10**9+7\ndef I(): return int(input())\ndef LI(): return list(map(int,input().split()))\ndef MI(): return map(int,input().split())\ndef LLI(n): return [list(map(int, input().split())) for _ in range(n)]\ns = input()\nt = input()\nif t[:-1] == s:\n print("Yes")\nelse:\n print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s734127744', 's358958665'] | [9024.0, 27180.0] | [22.0, 116.0] | [1465, 716] |
p02681 | u320555665 | 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()\np = input()\nif p == s + -:\n print("Yes")\nelse: print("No")', 's = input()\nt = input()\nif len(s)+1 ==len(t)\n\tif all(s[i]==t[i] for i in range(len(s))):\n \tprint("Yes")\nelse: print("No")', 's = input()\nt = input()\nif len(s)+1 ==len(t):\n\tif all(s[i]==t[i] for i in range(len(s))):\n \tprint("Yes")\nelse: print("No")\n', 's = input()\nt = input()\nif len(s)+1 ==len(t) and all(s[i]==t[i] for i in range(len(s))):\n print("Yes")\nelse: print("No")\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s298692015', 's435953279', 's620935645', 's191651335'] | [9016.0, 8952.0, 8964.0, 9096.0] | [24.0, 27.0, 19.0, 21.0] | [73, 124, 126, 124] |
p02681 | u321804710 | 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())\nprint(S)\nprint(T)\nif len(S) + 1 == len(T):\n print('Yes')\nelse:\n print('No')", "S = list(input())\nT = list(input())\ndel T[len(T)-1]\nif S == T:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s064798230', 's077431469'] | [9100.0, 9036.0] | [22.0, 22.0] | [117, 101] |
p02681 | u324090406 | 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 len(S) + 1 == len(T) and S = T[:-1]:\n print("Yes")\nelse:\n print("No")', 'S = str(input())\nT = str(input())\n \nif len(S) + 1 == len(T) and S = T[:-1]:\n\tprint("Yes")\nelse:\n\tprint("No")', 'S = str(input())\nT = str(input())\n \nif len(S) + 1 == len(T) and S == T[:-1]:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s137365007', 's226586521', 's913176003'] | [8796.0, 8792.0, 9000.0] | [24.0, 24.0, 23.0] | [109, 108, 111] |
p02681 | u324197506 | 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\nfor i in range(len(s)): \n print(i)\n if s[i] != t[i]:\n print("No")\n exit()\n\nprint("Yes")', 's = input()\nt = input()\n\nfor i in range(len(s)): \n\n if s[i] != t[i]:\n print("No")\n exit()\n\nprint("Yes")'] | ['Wrong Answer', 'Accepted'] | ['s637612387', 's488247317'] | [9104.0, 9096.0] | [20.0, 22.0] | [132, 120] |
p02681 | u325119213 | 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\ndef actual(a, b, c, k):\n if a >= k:\n return k\n else:\n k -= a\n\n if b >= k:\n return a\n else:\n k -= b\n\n return a - k\n\n \nprint(actual(a, b, c, k)) \n', 'a, b, c, k = map(int, input().split())\n\ndef actual(a, b, c, k):\n if a >= k:\n return k\n else:\n k -= a\n\n if b >= k:\n return a\n else:\n k -= b\n\n return a - k\n\n \nprint(actual(a, b, c, k)) ', 'a, b, c, k = map(int, input().split())\n\n\ndef actual(a, b, c, k):\n if a >= k:\n return k\n else:\n k -= a\n\n if b >= k:\n return a\n else:\n k -= b\n\n return a - k\n\n\nprint(actual(a, b, c, k))\n', "s = input()\nt = input()\n\nif s == t[:-1]:\n\tprint('Yes')\nelse:\n \tprint('No')"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s044768415', 's735980824', 's866461496', 's832901470'] | [9192.0, 9048.0, 9116.0, 9104.0] | [22.0, 24.0, 19.0, 22.0] | [230, 228, 226, 75] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.