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
u325149030
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:len(T)-1] = S:\n print("Yes")\n\nelse:\n print("No")\n', 'S = input()\nT = input()\nif T[0:len(T)-1)] = S:\n print("Yes")\n\nelse:\n print("No")\n', 'S = input()\nT = input()\nif T[0:len(T)-1] == S:\n print("Yes")\n\nelse:\n print("No")\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s062340855', 's215468188', 's064319707']
[9004.0, 9004.0, 8844.0]
[20.0, 22.0, 20.0]
[86, 87, 87]
p02681
u326775883
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["s = input()\nt = input()\n\nif s = t[:-1]:\n print('Yes')\nelse:\n print('No')", "s = input()\nt = input()\n\nif s + t[-1] == t:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s922954842', 's505233465']
[9012.0, 8984.0]
[21.0, 21.0]
[74, 78]
p02681
u326943507
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['N,K=map(int,input().split())\nL=list(map(int,input().split()))\ncnt=0\ni=0\nSET=set()\nS=[]\nwhile not(L[i] in SET):\n S.append(i+1)\n SET.add(i+1)\n i=L[i]-1\n\n \nS.append(i+1)\nSS=S\n\n\nS=S[S.index(L[i]):]\n\ncnt=len(S)\n\n\n\nprint(SS[K%(cnt)])', 'N,K=map(int,input().split())\nL=list(map(int,input().split()))\ncnt=0\ni=0\nSET=set()\nS=[]\nwhile not(L[i] in SET):\n S.append(i+1)\n SET=set(S)\n i=L[i]-1\n\n \nS.append(i+1)\nSS=S\n\n\nS=S[S.index(L[i]):]\n\ncnt=len(S)\n\n\n\nprint(SS[K%(cnt)])', 'N=input()\nNN=input()\n\nif len(NN)==len(N)+1:\n if NN[:len(N)]==N:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s014129450', 's611538247', 's942532896']
[9208.0, 9204.0, 9104.0]
[23.0, 21.0, 22.0]
[239, 237, 139]
p02681
u328179275
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 numpy as np\nn,m,x = map(int,input().split())\nl = []\nfor i in range(n):\n l.append(np.array(input().split(),dtype=int)) \nimport itertools\nnum = [i for i in range(n)]\nmin = 100000000000001\nk = 1\nwhile k <n+1:\n a = list(itertools.combinations(num, k))\n for i in range(len(a)):\n total =np.zeros(m+1,dtype=int)\n for j in range(len(a[i])):\n total +=l[a[i][j]]\n if np.sum(np.where(total < x)[0]) <=0:\n if min > total[0]:\n min = total[0]\n k = n+2\n k +=1\nif min == 100000000000001:\n print(-1)\nelse:\n print(min)', "s = input()\nt = input()\nif t.find(s) == 0 and len(t)-len(s) == 1:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s706376674', 's823225608']
[27112.0, 9032.0]
[107.0, 23.0]
[594, 104]
p02681
u329962837
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()\nif S == "ABC":\n print ("ARC")\nelse:\n print("ABC")', "S = input()\nT = input()\n\nif S == T[0:-1]:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s026505586', 's426428902']
[9004.0, 8976.0]
[25.0, 36.0]
[63, 76]
p02681
u331226975
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)+1 == len(T):\n print(\'Yes\')\nelse"\n print(\'No\')', "S = input()\nT = input()\n\nif ((len(S)+1) == len(T)) and S == T[:-1]:\n print('Yes')\nelse:\n print('No')\n"]
['Runtime Error', 'Accepted']
['s934638779', 's509566271']
[8948.0, 9092.0]
[22.0, 23.0]
[82, 103]
p02681
u331606500
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(('No','Yes')[input()in input()::2])", "s=input();print('NYoe s'[s==input()[:len(s)]::2])"]
['Wrong Answer', 'Accepted']
['s499887226', 's760441130']
[8968.0, 8708.0]
[27.0, 30.0]
[41, 49]
p02681
u331956460
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("a")\nelse:\n print("No")', 'S=input()\nT=input()\n\nif S==T[:-1]:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s737340003', 's029932590']
[9040.0, 8936.0]
[23.0, 22.0]
[67, 69]
p02681
u332543053
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\nc = sorted(a)\nd = sorted(b)\n\nfreq=0\nans=False\nfor i in range(min(len(c),len(d))):\n if c[i]!=d[i]:\n freq+=1\n if freq==2:\n ans=True \n break\nif ans:\n print("NO")\nelse:\n print("YES")', "S = input()\nT = input()\n\nans = True\nfor i in range(len(S)):\n if S[i] != T[i]:\n ans = False\n\nif ans:\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s552409453', 's534785724']
[9056.0, 8976.0]
[23.0, 21.0]
[251, 149]
p02681
u334370828
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 print("Yes")\nelse:\n print("No")\n', 'S = input()\nT = input()\n\n\nif (S == T[:len(S)]) and (len(T) == (len(S)+1)):\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s018354693', 's179207784']
[9096.0, 9100.0]
[21.0, 22.0]
[84, 114]
p02681
u334533374
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:len(S)] == S and len(S) + 1 == len(T):\n print('Yes')\n\nprint('No')", "S = input()\nT = input()\nif T[0:len(S)] == S and len(S) + 1 == len(T):\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s569634223', 's722547488']
[9100.0, 9044.0]
[20.0, 22.0]
[99, 108]
p02681
u335950809
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 in s:\n print('Yes')\nelse:\n print('No')", "ans = True\ns = list(input())\nt = list(input())\n\nfor i in range(len(s)):\n if(s[i]!=t[i]):\n ans = False\nif ans:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s152670048', 's936699719']
[9040.0, 9036.0]
[20.0, 19.0]
[74, 158]
p02681
u341267151
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 s==t[:len(s)]:\n print("YES")\nelse:\n print("No")', 's=input()\nt=input()\nif len(t)-len(s)==1 and s==t[:len(s)]:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s455109761', 's346595540']
[9100.0, 9028.0]
[21.0, 23.0]
[97, 97]
p02681
u342062419
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())\ns = 0\nif a + b >= k:\n s = a\nelse:\n s = a - (c - b) \nprint(s)\n', 's = input()\nt = input()\nif t.startswith(s) == 1:\n print("Yes")\nelse:\n print("No")\n ']
['Runtime Error', 'Accepted']
['s905029854', 's901493198']
[9156.0, 9076.0]
[22.0, 27.0]
[107, 92]
p02681
u342563578
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['n,k = map(int,input().split())\na = list(map(int,input().split()))\np = a[0]\ns = a[0]\ng = []\nq = []\nfor i in range(n+1):\n g.append(p)\n p = a[p-1]\ng.reverse()\nfor i in range(n):\n if g[0] == g[i+1]:\n mod = i+1\n break\ng.reverse()\nfor i in range(len(g)):\n if g[i] == g[i + mod]:\n d = i\n break\nif k <= mod:\n for i in range(k%mod):\n q.append(s)\n s = a[s-1]\n q.reverse()\n q.append(1)\n print(q[0])\nelse:\n print(g[d+(k-d)%mod+2])', "S = input()\nT = input()\ns = list(S)\nt = list(T)\np = 1\nfor i in range(len(s)):\n if s[i] == t[i]:\n continue\n else:\n p = 0\nif p == 1:\n print('Yes')\nif p == 0:\n print('No')"]
['Runtime Error', 'Accepted']
['s874451044', 's762452029']
[9164.0, 9052.0]
[25.0, 24.0]
[487, 194]
p02681
u346219701
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[0:len(s)]:\n print('yes')\nelse:\n print('No')\n\n", "s = input()\nt = input()\n\nif t[0:len(s)] == s[0:len(s)]:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s304699719', 's267582023']
[9092.0, 8968.0]
[24.0, 23.0]
[96, 94]
p02681
u346308892
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.
['\nimport numpy as np\nfrom functools import *\nimport sys\nsys.setrecursionlimit(100000)\ninput = sys.stdin.readline\n\n\n\ndef acinput():\n return list(map(int, input().split(" ")))\n\n\nS=input()\nT=input()\n\nif S in T:\n print("Yes")\nelse:\n print("No")\n\n\n', '\nimport numpy as np\nfrom functools import *\nimport sys\nsys.setrecursionlimit(100000)\ninput = sys.stdin.readline\n\n\n\ndef acinput():\n return list(map(int, input().split(" ")))\n\n\nS=list(input())\nT=list(input())\n\nN=len(S)-1\n#print(S,N)\nif S[:N]==T[:N]:\n print("Yes")\nelse:\n print("No")\n\n\n']
['Wrong Answer', 'Accepted']
['s191219591', 's411380471']
[26940.0, 27084.0]
[107.0, 111.0]
[251, 292]
p02681
u346371758
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 k_pa, k_pb, k_pc = k , 0, 0 \nelif k >= a and k-a <= b:\n k_pa, k_pb, k_pc = a, k-a, 0\nelif k >= a and k-a >= b:\n k_pa, k_pb, k_pc = a, k-a, k-a-b\npoint = k_pa - (k - k_pa - k_pb)\nprint(point)', 'a, b, c, k = map(int, input().split())\nif k <= a:\n k_pa, k_pb, k_pc = k , 0, 0 \nelif k >= a and k-a <= b:\n k_pa, k_pb, k_pc = a, k-a, 0\nelif k >= a and k-a >= b:\n k_pa, k_pb, k_pc = a, k-a, k-a-b\npoint = k_pa - (k-k_pa-k_pb)\nprint(point)', "s = list(input())\nt = list(input())\nt.pop(-1)\nprint('Yes' if s == t else 'No')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s549632889', 's696708858', 's916989346']
[9136.0, 8960.0, 9096.0]
[23.0, 23.0, 23.0]
[250, 246, 78]
p02681
u349863397
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 stdin, stdout\nimport math,sys\nfrom itertools import permutations, combinations\nfrom collections import defaultdict,deque,OrderedDict\nimport bisect as bi\nimport heapq \n\n'''\n#------------------PYPY FAst I/o--------------------------------#\n \ndef I():return (int(stdin.readline()))\ndef In():return(map(int,stdin.readline().split()))\n'''\n#------------------Sublime--------------------------------------#\n \nsys.stdin=open('input.txt','r');sys.stdout=open('output.txt','w');\ndef I():return (int(input()))\ndef In():return(map(int,input().split()))\n\n\n\ndef main():\n try:\n a=list(input())\n b=list(input())\n temp=b.pop()\n if a==b:\n print('Yes')\n else:\n print('No')\n except:\n pass\n \nM = 998244353\nP = 1000000007\n \nif __name__ == '__main__':\n for _ in range(1):\n main()", "from sys import stdin, stdout\nimport math,sys\nfrom itertools import permutations, combinations\nfrom collections import defaultdict,deque,OrderedDict\nimport bisect as bi\nimport heapq \n\n'''\n#------------------PYPY FAst I/o--------------------------------#\n \ndef I():return (int(stdin.readline()))\ndef In():return(map(int,stdin.readline().split()))\n'''\n#------------------Sublime--------------------------------------#\n \n#sys.stdin=open('input.txt','r');sys.stdout=open('output.txt','w');\ndef I():return (int(input()))\ndef In():return(map(int,input().split()))\n\n\n\ndef main():\n try:\n a=list(input())\n b=list(input())\n temp=b.pop()\n if a==b:\n print('Yes')\n else:\n print('No')\n except:\n pass\n \nM = 998244353\nP = 1000000007\n \nif __name__ == '__main__':\n for _ in range(1):\n main()"]
['Runtime Error', 'Accepted']
['s851557097', 's646216238']
[9384.0, 9424.0]
[25.0, 25.0]
[859, 860]
p02681
u350667455
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 len(S)+1 == len(T) and S[-1]==T[-1]==T[-2] else "No")', 'S = input()\nT = input()\nprint("Yes" if len(S)+1 == len(T) and S[-1]==T[-1] else "No")', 'S = input()\nT = input()\nprint("Yes" if len(S)+1==len(T) and S+T[-1]== T and S[-1]==T[-1]==T[-2] else "No")', 'S = input()\nT = input()\nprint("Yes" if S+T[-1]== T else "No")']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s054914098', 's199003532', 's527273364', 's009184257']
[9100.0, 9032.0, 9104.0, 9088.0]
[22.0, 22.0, 20.0, 20.0]
[92, 85, 106, 61]
p02681
u354623416
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["S,T = map(str,input().split())\nif T[:-1] == S :\n print ('Yes')\nelse :\n print ('No')\n#st = st[:-1]\n\n", 'a =input()\nb =input()\nc = 0\nfor i in range(len(a)):\n\tif a[i] != b[i]:\n\t\tc = 1\n \nif c ==0:\n\tprint("Yes")\nelse:\n\tprint("No")\n']
['Runtime Error', 'Accepted']
['s674786408', 's251421280']
[9092.0, 9096.0]
[21.0, 24.0]
[106, 129]
p02681
u357403505
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 == D[:len(S)]) and ((len(S)+1)==len(D)):\n print('Yes')\nelse:\n print('No')", "S = input()\nT = input()\n\nif (S == D[:len(S)]) and (len(S)==len(D)+1):\n print('Yes')\nelse:\n print('No')", "S = input()\nT = input()\nif S == D[:len(S)]:\n print('Yes')\nelse:\n print('No')", "S = input()\nT = input()\nif (S == D[:len(S)]) and (len(S)+1==len(D)):\n print('Yes')\nelse:\n print('No')", "S = input()\nT = input()\nif (S == T[:len(S)]) and ((len(S)+1)==len(T)):\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s371248475', 's376878412', 's483501591', 's531846650', 's273733233']
[8960.0, 9104.0, 9032.0, 9108.0, 9072.0]
[22.0, 20.0, 23.0, 23.0, 20.0]
[109, 108, 82, 107, 109]
p02681
u357751375
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()\nr = t.len()\nif s in t[0,r]:\n print('Yes')\nelse:\n print('No')", "s = input()\nt = input()\nif s == t[:-1]:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s976455286', 's359143898']
[8936.0, 8992.0]
[23.0, 22.0]
[90, 78]
p02681
u358093272
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['s,t = input().split(" ")\nif(t[0:len(t)-1] == s):\n print("true")\nelse:\n print("false")\n', 's,t = input().split(" ")\nif(t[0:len(t)-1] == s):\n print("Yes")\nelse:\n print("No")\n\n', 's = input()\nt = input()\nif(t[0:len(t)-1] == s):\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s152304689', 's559255621', 's744803820']
[8992.0, 9032.0, 9032.0]
[21.0, 23.0, 22.0]
[90, 87, 85]
p02681
u363080243
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['a = input()\nb = input()\nif a = \'chokudai\' and b = \'chokudaiz\' or a = \'a\' and b = \'aa\':\n print("Yes")\nelif a = \'snuke\' and b = \'snukee\':\n print("No")', 'a = str(input())\nb = str(input())\nif a = \'chokudai\' and b = \'chokudaiz\' or a = \'a\' and b = \'aa\':\n print("Yes")\nelif a = \'snuke\' and b = \'snukee\':\n print("No")', 'a = input()\nb = input()\nif a = \'chokudai\' and b = \'chokudaiz\' or a = \'a\' and b = \'aa\':\n print("Yes")\nelif a = \'snuke\' and b = \'snukee\':\n print("No")', 's = input()\nt = input()\ncheck = t[:-1]\na = len(s)\nb = len(t) - 1\nif a == b:\n if s == check:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s179804417', 's418161880', 's552773530', 's847288273']
[8864.0, 8976.0, 8956.0, 9052.0]
[20.0, 23.0, 22.0, 20.0]
[154, 164, 154, 167]
p02681
u363599046
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 if s[i] != t[i]:\n print("No")\n exit()\nprint("yes")', 's = input()\nt = input()\n\nfor i in range(len(s)):\n if s[i] != t[i]:\n print("No")\n exit()\nprint("Yes")\n']
['Wrong Answer', 'Accepted']
['s498486841', 's076416882']
[8952.0, 9048.0]
[32.0, 24.0]
[107, 108]
p02681
u364099990
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()\nA, B, C, K = s.split(" ")\n \nif K <= A:\n print(K)\nelif K <= A + B:\n print(A)\nelif K <= A + B + C:\n print(A - (K - A - B))', 'N, K = [int(v) for v in input().split(" ")]\nAi = [int(v) for v in input().split(" ")]\nassert len(Ai) == N\n\n\npath = [0]\nwhile True:\n next_city = Ai[path[len(path) - 1]] - 1\n if next_city in path:\n break\n path.append(next_city)\n\nfor i, city in enumerate(path):\n if city == next_city:\n start = path[:i]\n circle = path[i:]\n\nif K <= len(start):\n print(start[K] + 1)\nelse:\n K -= len(start)\n print(circle[K % len(circle)] + 1)\n', 's = input()\nA, B, C, K = [int(v) for v in s.split(" ")]\n\nif K <= A:\n print(K)\nelif K <= A + B:\n print(A)\nelif K <= A + B + C:\n print(A - (K - A - B))', 'S = input()\nT = input()\nreturn T.startswith(S)', 'S = input()\nT = input()\n\nif len(T) != len(S) + 1:\n print("Yes")\nelse:\n if T.startswith(S):\n print("Yes")\n else:\n print("No")']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s196667444', 's756636942', 's808436312', 's879669008', 's488009856']
[8980.0, 9212.0, 9048.0, 9028.0, 9040.0]
[23.0, 22.0, 22.0, 22.0, 20.0]
[135, 436, 152, 46, 133]
p02681
u364541509
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()\nT1 = T[:-1]\nif S == T:\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\nT1 = T[:-1]\nif S == T1:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s167435226', 's538897814']
[9036.0, 9004.0]
[20.0, 21.0]
[81, 82]
p02681
u364693468
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\ninput = sys.stdin.readline\n\ndef main():\n N, K = map(int, input().split())\n A = list(map(int, input().split()))\n B = [1]\n a = 1\n check = [0] * len(A)\n while True:\n a = A[a - 1]\n if check[a - 1] == 1:\n x = B.index(a)\n roop = B[x:]\n print(roop[(K - x) % len(roop)])\n exit()\n B.append(a)\n check[a - 1] += 1\n if len(B) >= K + 1:\n print(B[K])\nif __name__ == '__main__':\n main()", "S = input()\nT = input()\nU = T[0:len(S)]\nif U == S:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s505453940', 's070821977']
[9048.0, 9040.0]
[27.0, 27.0]
[485, 89]
p02681
u366974168
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()\nfor i in range(len(t)-1):\n T=""+t[i]\nif T==s:\n print("Yes")\nelse:\n print("No")', 's=input()\nt=input()\nT=""\nfor i in range(len(t)-1):\n T=T+t[i]\nif T==s:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s421600899', 's412707903']
[8980.0, 9108.0]
[26.0, 20.0]
[101, 105]
p02681
u367548378
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[:len(T)-1]:\n print("Yes")\n else:\n print("No")', 'S=input()\nT=input()\nif S == T[:len(T)-1]:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s855628029', 's854563371']
[9016.0, 9100.0]
[21.0, 26.0]
[77, 84]
p02681
u369630760
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()\nA = len(a)\nb = input()\nB = len(b)\nif A + 1 == B:\n print(b[0:A])\n if a == b[0:A]:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")', 'a = input()\nA = len(a)\nb = input()\nB = len(b)\nif A + 1 == B:\n if a == b[0:A]:\n if a + b[A:A + 1] == b:\n print("Yes")\n else:\n print("No")\n else:\n print("No")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s827359602', 's653624706']
[8984.0, 9116.0]
[22.0, 20.0]
[171, 227]
p02681
u369796672
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\n', 's = str(input())\nt = str(input())\n\nt = t[:-1]\n\nif s == t:\n\tprint("Yes")\nelse:\n \tprint("No")', 's = str(input())\nt = str(input())\n\nT = t[:-1]\n\nif s == T:\n\tprint("Yes")\nelse:\n \tprint("No")', 's = str(input())\nt = str(input())\n\nt = t[:-1]\n\nif s = t:\n\tprint("Yes")\nelse:\n \tprint("No")', 's = str(input())\nt = str(input())\n\nif s == t[:-1]:\n\tprint("Yes")\nelse:\n \tprint("No")', 's = str(input())\nt = str(input())\n\nT = t[:-1]', 's = str(input())\nt = str(input())\n\nif s == t[:-1]:\n\tprint("Yes")\nelse:\n \tprint("No")']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s006941297', 's085742039', 's671597304', 's703812780', 's793909294', 's818647376', 's966402723']
[9080.0, 8892.0, 8888.0, 9016.0, 9020.0, 8896.0, 8872.0]
[23.0, 23.0, 23.0, 23.0, 21.0, 23.0, 23.0]
[35, 94, 94, 93, 87, 47, 85]
p02681
u373047809
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['#!/usr/bin/env python3\nimport sys\nsys.setrecursionlimit(10**6)\nn, k, *a = map(int, open(0).read().split())\nF = [0 for _ in range(n)] \nT = [None for _ in range(n)] \ndef main(now, time, K):\n time += 1\n if F[now-1]:\n P = T[now-1]\n print(T.index(P + (K - time + 1) % (time - P)) + 1)\n exit()\n F[now-1] = 1\n T[now-1] = time\n main(a[now-1], time, K)\n if time == K:\n print(now)\n exit()\n\nmain(1, 0, k)', '#!/usr/bin/env python3\nprint("YNeos"[input()!=input()[:-1]::2])']
['Runtime Error', 'Accepted']
['s393512209', 's383656818']
[9232.0, 9048.0]
[23.0, 19.0]
[476, 63]
p02681
u373422978
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) and str.isalpha(T):\n if len(T) == (len(S) + 1):\n print('YES')\nelse:\n print('No')", 'A, B, C, K = map(int, input().split())\nresult = 0\n\nif A > K:\n print(K)\n exit\n\nfor i in range(K):\n if A > (i + 1):\n result += 1\n continue\n elif A == (i + 1):\n result += 1\n continue\n\n if B > (i + 1 - A):\n result += 0\n continue\n elif B == (i + 1 - A):\n result += 0\n continue\n\n if C > (i + 1 - A - B):\n result -= 1\n continue\n elif C == (i + 1 - A - B):\n result -= 1\n break\n else:\n break\n\nprint(result)\n', 'A, B, C, K = map(int, input().split())\nresult = 0\n\nif A >= K:\n print(K)\nelif (A + B) >= K:\n print(K)\nelse:\n for i in range(K):\n if A > (i + 1):\n result += 1\n continue\n elif A == (i + 1):\n result += 1\n continue\n\n if B > (i + 1 - A):\n result += 0\n continue\n elif B == (i + 1 - A):\n result += 0\n continue\n\n if C > (i + 1 - A - B):\n result -= 1\n continue\n elif C == (i + 1 - A - B):\n result -= 1\n break\n else:\n break\n print(result)\n', "S = input()\nT = input()\n\nif T.startswith(S):\n if len(T) == (len(S) + 1):\n print('YES')\nelse:\n print('No')1\n", "S = input()\nT = input()\n\nif T.startswith(S):\n if len(T) == (len(S) + 1):\n print('YES')\nelse:\n print('No')", 'A, B, C, K = map(int, input().split())\nresult = 0\n\nif A >= K:\n print(A)\nelif (A + B) >= K:\n print(A)\nelif (A + B + C) > K:\n print(A - (K - (A + B)))\nelse:\n print(A - C)', "S = input()\nT = input()\n\nif T.startswith(S):\n if len(T) == (len(S) + 1):\n print('YES')\nelse:\n print('No')", 'A, B, C, K = map(int, input().split())\nresult = 0\n\nif A >= K:\n print(K)\nelse:\n for i in range(K):\n if A > (i + 1):\n result += 1\n continue\n elif A == (i + 1):\n result += 1\n continue\n\n if B > (i + 1 - A):\n result += 0\n continue\n elif B == (i + 1 - A):\n result += 0\n continue\n\n if C > (i + 1 - A - B):\n result -= 1\n continue\n elif C == (i + 1 - A - B):\n result -= 1\n break\n else:\n break\n print(result)', "s = input()\nt = input()\n\nif t.startswith(s) and str.isalpha(t):\n if len(t) == (len(s) + 1):\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s030801501', 's139477778', 's149238201', 's268900360', 's580100376', 's654318746', 's675995032', 's982566077', 's457528446']
[8932.0, 9148.0, 9064.0, 9028.0, 9000.0, 9196.0, 8980.0, 9200.0, 9088.0]
[21.0, 22.0, 24.0, 25.0, 22.0, 22.0, 20.0, 26.0, 21.0]
[137, 516, 632, 120, 118, 180, 118, 599, 137]
p02681
u373858851
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.
['abck=list(map(int,input().split()))\na=abck[0]\nb=abck[1]\nc=abck[2]\nk=abck[3]\n\nif a>=k:\n print(a)\nelif a<k:\n if a+b>k:\n print(a)\n else:\n print(a-(k-a-b))', "S=input()\nT=input()\n\nif S==T[0:len(T)-1]:\n print('Yes')\nelse:\n print('No')\n "]
['Runtime Error', 'Accepted']
['s897268102', 's448551178']
[9120.0, 9028.0]
[21.0, 24.0]
[174, 85]
p02681
u377834804
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] and len(S)==len(T)+1:\n print('Yes')\nelse:\n print('No')\n", "S = input()\nT = input()\nif S == T[:-1] and len(len(S)==len(T)+1):\n print('Yes')\nelse:\n print('No')", "S = input()\nT = input()\nif S == T[:-1] and (len(S)+1)==len(T):\n print('Yes')\nelse:\n print('No')\n"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s665143345', 's756850663', 's800761033']
[9032.0, 8968.0, 9032.0]
[22.0, 23.0, 24.0]
[96, 100, 98]
p02681
u378349138
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['n,m,x = map(int,input().split())\ncm = []\nllm = []\nlf = []\nfor i in range(n):\n lm = [int(k) for k in input().split()]\n c = lm.pop(0)\n llm.append(lm)\n cm.append(c)\n lf.append(False)\nmc = 10000000\nfc = False\nwhile True:\n #calc\n c = 0\n lx = [0 for j in range(m)]\n for i in range(n):\n if lf[i]:\n for j in range(m):\n lx[j] += llm[i][j]\n c += cm[i]\n fx = True\n for j in range(m):\n if lx[j] < x:\n fx = False\n break\n if fx:\n if mc > c:\n mc = c\n fc = True\n #next\n f = False\n for i in range(n):\n if f:\n break\n lf[i] = not lf[i]\n f = lf[i]\n if not f:\n break\nif fc:\n print(mc)\nelse:\n print(-1)\n \n\n\n\n\n', 's = input()\ns2 = input()\nif s == s2[0:len(s)] and len(s2) == len(s) + 1:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s564412356', 's301607014']
[9248.0, 8972.0]
[25.0, 22.0]
[785, 111]
p02681
u379136995
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['a=input()\nb=input()\nif a==b[:1]:\n print("Yes")\nelse:\n print("No")\n', 'a=input()\nb=input()\nif a==b[:len(a)]:\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s341502704', 's788778082']
[9024.0, 8992.0]
[21.0, 20.0]
[72, 77]
p02681
u382169668
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[0:len(b)-1].replace(a, '', 1)\nif len(c)==1:\n print('Yes')\nelse:\n print('No')", "a = input()\nb = input()\nif b[0:len(b)-1] == a and len(b)-1 == len(a):\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s963509075', 's883858557']
[9040.0, 9108.0]
[21.0, 22.0]
[108, 104]
p02681
u382905693
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 numpy as np\n\ndef main():\n n, k = map(int, input().split())\n a = list(map(lambda x: int(x)-1, input().split()))\n count = 0\n foot = [0]\n is_loop = False\n\n for i in range(1,k):\n foot.append(a[foot[-1]])\n if foot.count(foot[-1]) == 2:\n st_i = foot.index(foot[-1])\n lo_size = len(foot)-1 - st_i\n\n k -= st_i\n k %= lo_size\n \n print(foot[st_i+k]+1)\n is_loop = True\n break\n \n if not is_loop:\n print(a[foot[-1]]+1)\n\n\nif __name__ == '__main__':\n main()\n", "s = input()\nt = input()\nprint('Yes' if s == t[:-1] else 'No')"]
['Runtime Error', 'Accepted']
['s654591028', 's373431295']
[27192.0, 9092.0]
[106.0, 23.0]
[585, 61]
p02681
u384379887
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()\npareil = True\nfor i in range(0,len(S)):\n\tif S[i] != T[i]:\n \tpareil = False\nif pareil:\n\tprint('Yes')\nelse:\n\tprint('No')", "S = input()\nT = input()\n\npareil = True\nfor i in range(0, len(S)):\n if S[i] != T[i]:\n pareil = False\nif pareil:\n print('Yes')\nelse:\n print('No')\n"]
['Runtime Error', 'Accepted']
['s397167546', 's704180385']
[9016.0, 9096.0]
[24.0, 23.0]
[145, 160]
p02681
u384744829
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[:-1]:\n\tprint("yes")\nelse:\n\tprint("No")', 'a=input()\nb=input()\n\nif a==b[:-1]:\n\tprint("Yes")\nelse:\n\tprint("No")']
['Wrong Answer', 'Accepted']
['s782863031', 's092491850']
[9032.0, 9016.0]
[23.0, 27.0]
[67, 67]
p02681
u384793271
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\nsys.stdin = open('input.txt', 'r', encoding='utf-8')\n\ns = input()\nt = input()\n\nif t == s + t[-1]:\n print('Yes')\nelse:\n print('No')", "s = input()\nt = input()\n\nif t == s + t[-1]:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s880015864', 's689732809']
[9096.0, 9032.0]
[23.0, 20.0]
[147, 82]
p02681
u385733796
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) = True:\n print("Yes")\n \nelse:\n primt("No")\n', 'S,T = str(open(0))\nSnum = len(S)\n\nif S = T[:Snum]:\n print("Yes")\n \nelse:\n primt("No")\n', 'S,T = open(0)\n\nif T.startswith(S):\n print("Yes")\n \nelse:\n primt("No")\n', 'S,T = map(str, input().sprit())\nif T.startswith(S):\n print("Yes")\nelse:\n print("No")\n', 'S,T = open(0).sprit()\n\nif T.startswith(S):\n print("Yes")\nelse:\n print("No")\n', 'S,T = str(open(0))\nSnum = len(S)\n\nif S == T[:-1]:\n print("Yes")\n \nelse:\n primt("No")\n', 'S,T = open(0)\n\nif T.startswith(S) = True:\n print("Yes")\n \nelse:\n primt("No")\n', 'S,T = open(0)\n\nif T.startswith(S):\n print("Yes")\nelse:\n print("No")\n', 'S,T = open(0)\nSnum = len(S)\n\nif S = T[:Snum]:\n print("Yes")\n \nelse:\n primt("No")', 'S = str(input())\nT = str(input())\n\nif T.startswith(S):\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s013373154', 's095657039', 's171433252', 's175052579', 's320492918', 's418107056', 's591384453', 's946282158', 's980348893', 's588220042']
[8920.0, 8944.0, 9100.0, 8924.0, 8952.0, 8976.0, 8944.0, 9084.0, 9008.0, 9040.0]
[22.0, 27.0, 22.0, 25.0, 20.0, 24.0, 23.0, 24.0, 21.0, 22.0]
[90, 89, 73, 87, 78, 88, 80, 70, 83, 90]
p02681
u391442102
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["S = input()\nT = input()\n\nif S == T[0:len(S)]:\n print('YES')\nelse:\n print('NO')", "S = input()\nT = input()\n\nif S == T[0:len(S)]:\n print('YES')\nelse:\n pritn('NOa')", "S = input()\nT = input()\n\nif S == T[0:len(S)]:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s548843378', 's718358480', 's318232007']
[9040.0, 8992.0, 8952.0]
[21.0, 20.0, 20.0]
[80, 81, 80]
p02681
u392361133
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" s == t[:-1] else \'No\')', 's = input()\nt = input()\nprint("Yes" if s == t[:-1] else "No")\n']
['Runtime Error', 'Accepted']
['s069119645', 's849298470']
[8956.0, 8920.0]
[25.0, 29.0]
[54, 62]
p02681
u396184710
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_line = input().split()\na = int(input_line[0])\nb = int(input_line[1])\nc = int(input_line[2])\nk = int(input_line[3])\n\ndef return_answer(a,b,c,k):\n answer = 0\n if a < k:\n answer += a\n count = k - a\n\n if b < k:\n count -= b\n answer -= count\n\n elif a >= k:\n answer = k\n\n return answer\n\nprint(return_answer(a,b,c,k))\n', 's = input()\nt = input()\nif s == t[:-1] :\n print("Yes")\n\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s908712508', 's579635187']
[9200.0, 9084.0]
[21.0, 21.0]
[378, 81]
p02681
u396707099
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['a = input()\nb = input()\nif(a==b[:-1]):\n print("Yes")\nelse:\n print("No)', 'a = input()\nb = input()\nif(a==b[:-1]):\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s753528081', 's387641184']
[9024.0, 9096.0]
[23.0, 22.0]
[72, 74]
p02681
u398626244
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()\nc=0\nfor i in range(len(s)):\n if s[i]!=t[i]:\n c=1\n break\nif c==1:\n print("NO")\nelse:\n print("YES")\n ', 'S=input()\nT=input()\nif(S==T):\n print("No")\nc=0\nfor i in range(0,len(S)):\n if(S[i]!=T[i]):\n print("No")\n c=1\n break\nif(c!=1):\n print("Yes")\n ']
['Wrong Answer', 'Accepted']
['s670360581', 's640049089']
[9104.0, 9120.0]
[20.0, 21.0]
[131, 155]
p02681
u400982556
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\nS = input()\nT = input()\n\nif S in T :\n text = T.replace(S,"",1)\n if text == T[len(T)-1]:\n if len(T) == 1:\n print("Yes")\n sys.exit()\n else:\n print("No")\n sys.exit()\n\nprint("No")', 'import sys\nS = input()\nT = input()\n\n#print(T[len(T)-1])\n\nif S in T :\n text = T.replace(S,"",1)\n if text == T[len(T)-1]:\n if len(text) == 1:\n print("Yes")\n sys.exit()\n else:\n print("No")\n sys.exit()\n\nprint("No")']
['Wrong Answer', 'Accepted']
['s327872303', 's805720217']
[9052.0, 9024.0]
[21.0, 21.0]
[208, 232]
p02681
u402342597
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().split()\nb = b[:-1]\n\nif a ==b:\n print('Yes')\nelse:\n print('No')", "a=input()\nb=input()\nb = b[:-1]\n\nif a ==b:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s944789386', 's027327896']
[9036.0, 9096.0]
[22.0, 21.0]
[80, 80]
p02681
u404676457
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["import sys\n\ns = input()\nt = input()\n\nfor i in range(len(s)):\n if s[i] != t[i]:\n print('false')\n sys.exit()\nelse:\n print('true')", "import sys\n \ns = input()\nt = input()\n \nfor i in range(len(s)):\n if s[i] != t[i]:\n print('No')\n sys.exit()\nelse:\n print('Yes')"]
['Wrong Answer', 'Accepted']
['s797528968', 's670482004']
[9104.0, 9028.0]
[23.0, 21.0]
[135, 133]
p02681
u409254176
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.
['z=0\na,b,c,k = map(int,input().split())\nz=k-a\nif z>=0:\n z=z-b\nprint(a+b*0+z*-1)\n\n', 's=input()\nt=input()\nif s==t[:-1]:\n print("YES")\nelse:\n print("NO")\n ', 's = input()\nt = input()\nif s == t[:-1]:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s340190312', 's781436925', 's514499726']
[9124.0, 9020.0, 9108.0]
[21.0, 23.0, 23.0]
[83, 77, 79]
p02681
u409974118
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 :\n print(a)\nelif a > k :\n print(k)\nelse :\n\n print(2*a - k + b)\n', 's = input()\nt = input()\n\nL = int(len(s))\nl = int(len(t))\nt1 = (t[0:l-1])\n\nif t1 == s and l == L + 1:\n print("Yes")\nelse :\n print("No")']
['Runtime Error', 'Accepted']
['s224082138', 's251225917']
[9164.0, 8908.0]
[23.0, 22.0]
[124, 140]
p02681
u411478442
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 = (int(x) for x in input().split())\na = [int(x) for x in input().split()]\n \nl = [1]\nnow = 1\nnext = a[0]\nnotloop = 0\ndupl = -1\n \nfor i in range(n):\n now = next\n next = a[now-1]\n \n if now in l:\n dupl = now\n break\n else:\n l.append(now)\n \nif(dupl == -1):\n print(now)\n \nelse:\n notloop = l.index(dupl)\n length = len(l)-notloop\n print(l[(k-notloop)%length+notloop])', 's = input()\nt = input()\n\nif(len(s)+1 == len(t)) and (s == t[0:len(t)-1]):\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s422707540', 's549000273']
[9072.0, 9048.0]
[24.0, 21.0]
[384, 108]
p02681
u413165887
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', 's = input()\nt = input()\nif s == t[:-1]:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s963814239', 's630140472']
[9064.0, 9096.0]
[22.0, 24.0]
[1, 78]
p02681
u414050834
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.remove(t[len(t)-1]):\n print('Yes')\nelse:\n print('No')\n", "s=input()\nt=input()\nif s==t-s[len(s)]:\n print('Yes')\nelse:\n print('No')", "s=input()\nt=input()\nif s==t-t[len(t)-1]:\n print('Yes')\nelse:\n print('No')\n", "s=input()\nt=input()\nif s==t[:len(t)-1]:\n print('Yes')\nelse:\n print('No')\n"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s049487607', 's051479734', 's653631764', 's281997512']
[9024.0, 8996.0, 9040.0, 8984.0]
[20.0, 21.0, 20.0, 19.0]
[84, 73, 76, 75]
p02681
u416447099
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 chokudai == chokudai:\n print('no')\nelif:\n print('yes')\n ", "a = input()\nb = input()\n\nif b[0:-1] == a\n\tprint('Yes')\nelse:\n\tprint('No')\n", "S = input()\nT = input()\nif T[0:-1] == S:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s542904675', 's733849643', 's167593876']
[8948.0, 8884.0, 9016.0]
[21.0, 20.0, 19.0]
[62, 74, 75]
p02681
u418149936
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 = 'ARC' if 'ABC' == input() else 'ABC'\nprint(s)", "s = input()\nt = input()[0:-1]\nif s == t:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s017987083', 's786689002']
[8960.0, 9104.0]
[30.0, 28.0]
[49, 79]
p02681
u419246138
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\ntext1 = sys.stdin.readline()\ntext2 = sys.stdin.readline()\nif text1 == text2[0:len(text2) -1]:\n print("Yes")\nelse:\n print("No")', 'text1 = input()\ntext2 = input()\nif text1 == text2[0:len(text2) -1]:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s103851014', 's417682098']
[9020.0, 9100.0]
[21.0, 23.0]
[139, 102]
p02681
u419658700
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 K>A and B>=K-A:\n print (A)\nelse:\n print (2*A-K+B)', 'import re\n\ns=input()\nt=input()\n\nif len (t)>=len(s)+1 and re.match(s,t):\n print ("Yes")\nelse:\n print ("No")']
['Runtime Error', 'Accepted']
['s585427550', 's905648261']
[9148.0, 9812.0]
[20.0, 26.0]
[111, 108]
p02681
u419963262
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['n, m, x = map(int, input().split())\nkeep = []\nans = 10**10\nfor i in range(n):\n c = list(map(int, input().split()))\n keep.append(c)\n\nfor j in range(2**n):\n bag = [0] * n\n total = 0\n check = 1\n for k in range(n):\n if ((j >> k) & 1):\n for l in range(m):\n bag[l] += keep[k][l + 1]\n total += keep[k][0]\n for a in range(m):\n if bag[a] < x:\n check *= 0\n if ans * check > total:\n ans = total\nif ans == 10**10:\n print(-1)\nelse:\n print(ans)\n', 's=input()\nt=input()\nif t[:-1]==s:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s217734105', 's668828152']
[9172.0, 9036.0]
[23.0, 22.0]
[530, 68]
p02681
u420615815
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.startsadwith(S)) and len(T) == (len(S) + 1):\n print('Yes')\nelse:\n print('No')", "S = input()\nT = input()\nif (T.startswith(S)) and len(T) == (len(S) + 1):\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s831087302', 's931540036']
[9004.0, 8944.0]
[24.0, 21.0]
[113, 111]
p02681
u422104747
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 numpy as np\nn,m,x=map(int,input().split())\nc=[None for i in range(n)]\na=[None for i in range(n)]\nfor i in range(n):\n l=[int(i) for i in input().split()]\n c[i]=l[0]\n a[i]=np.array(l[1:])\nmincos=1000000000000\nfor mask in range(2**n):\n rikai=np.zeros(m,dtype="int32")\n cos=0\n mm=mask\n for i in range(n):\n if mm%2:\n rikai+=a[i]\n cos+=c[i]\n mm//=2\n if np.all(rikai>=x):\n mincos=min(cos,mincos)\n\nif mincos==1000000000000:\n print(-1)\nelse:\n print(mincos)\n', 'import sys\ns=input()\nt=input()\nfor c in ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]:\n if s+c==t:\n print("Yes")\n sys.exit(0)\nprint("No")\n']
['Runtime Error', 'Accepted']
['s466577648', 's602420777']
[27132.0, 9124.0]
[110.0, 23.0]
[528, 215]
p02681
u425762225
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\ndef solve(a,b,c,k):\n s = 0\n while k > 0:\n if a > 0:\n a -= 1\n s += 1\n k -= 1\n elif b > 0:\n b -= 1\n k -= 1\n else:\n c -= 1\n s -= 1\n k -= 1\n\n return s\n \nprint(solve(A,B,C,K))', 's = input()\nt = input()\n\nif t[:-1] == s:\n print("Yes")\nelse:\n print("No")\n\n']
['Runtime Error', 'Accepted']
['s890877613', 's095366534']
[9144.0, 9084.0]
[24.0, 21.0]
[261, 77]
p02681
u429029348
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 ans=k\nelif a+b>=k:\n ans=a\nelse:\n ans=a-(k-(a+b))\nprint(ans)', 's=input()\nt=input()\nif s==t[0:len(t)-1]:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s267116534', 's481958348']
[9156.0, 9100.0]
[20.0, 21.0]
[105, 75]
p02681
u430394202
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()\nyes=True\nl=len(S)\nfor i in range l:\n if S[i]!=T[i]:\n yes=False\n break\nif yes:\n print("Yes")\nelse:\n print("No")', 'S=input()\nT=input()\nyes=True\nl=len(S)\nfor i in range(0,l):\n if S[i]!=T[i]:\n yes=False\n break\nif yes:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s181589564', 's182200931']
[9004.0, 9036.0]
[29.0, 29.0]
[139, 143]
p02681
u432356156
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 = ipnut()\nT = input()\n \nif(S==T[:len(S)-1]):\n print("Yes")\nelse:\n print("No")', 'S = ipnut()\nT = input()\n \nif(S==T[:len(S)]):\n print("Yes")\nelse:\n print("No")', 'S = ipnut()\nT = input()\n\nif(S==T[:-1]):\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\n \nif(S==T[:len(S)]):\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s088022367', 's442961151', 's787990860', 's094810041']
[9020.0, 8956.0, 9012.0, 8968.0]
[21.0, 28.0, 24.0, 25.0]
[81, 79, 74, 79]
p02681
u432754124
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*l, = map(int,input().split())\nseenl = [1]\nseen = {1}\ntemp=1\nfor i in range(k):\n temp=l[temp-1]\n if temp in seen:\n lenloop = len(seenl)-seenl.index(temp)\n r = (k-i-1)%lenloop\n temp = seenl[seenl.index(temp):][r]\n break\n seenl.append(temp)\n seen.add(temp)\nprint(temp)', 'a, b, c, k = list(map(int, input().split()))\nif a > k:\n\tprint(sum(([1] * a)[:k]))\nelse:\n\tprint(sum([1] * a))', "s,t = [str(input()) for _ in range(2)]\nif s.islower() and t.islower() and len(s) == len(t) + 1 and 1 <= len(s)<= 10:\n\tprint('Yes')\nelse:\n\tprint('No')", "s,t = [str(input()) for _ in range(2)]\nif s[:-1] == t and len(s) + 1 == len(t):\n\tprint('Yes')\nelse:\n\tprint('No')", "s,t = [input() for _ in range(2)]\nif s[:-1] == t and len(s) + 1 == len(t):\n\tprint('Yes')\nelse:\n\tprint('No')", 'n, k = map(int, input().split())\nl = list(map(int, input().split()))\nstart = 1\nseenl = []\nseen = set()\nfor i in range(k):\n\tstart = l[start-1]\n\tif start in seen:\n\t\tloop_len = len(seenl) - seenl.index(start)\n\t\tr = (k-i-1)%loop_len\n\t\tgoal = seenl[seenl.index(start):][r]\n\t\tbreak\n\tseenl.append(start)\n\tseen.add(start)\nprint(goal)', "s,t = [str(input()) for _ in range(2)]\nif s[:-1] == t:\n\tprint('Yes')\nelse:\n\tprint('No')", "t,s = [str(input()) for _ in range(2)]\nif s[:-1] == t:\n\tprint('Yes')\nelse:\n\tprint('No')"]
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s026025877', 's188023000', 's191616613', 's300900296', 's336535792', 's611630034', 's654398865', 's517864180']
[9084.0, 9068.0, 8936.0, 9100.0, 8924.0, 9108.0, 9072.0, 8976.0]
[19.0, 24.0, 23.0, 24.0, 25.0, 26.0, 24.0, 20.0]
[313, 108, 149, 112, 107, 325, 87, 87]
p02681
u434846982
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], [*a] = [[*map(int, t.split())] for t in open(0)]\ncount = 0\nvisited = dict()\ntmp = 1\nwhile count <= k and tmp not in visited:\n visited[tmp] = count\n tmp = a[tmp - 1]\n count += 1\nif count <= k:\n k = (k - count) % (count - visited[tmp])\n for _ in range(k):\n tmp = a[tmp - 1]\nprint(tmp)', "s = str(input())\nt = str(input())\nans = 'No'\nif s == t[:-1]:\n ans = 'Yes'\nprint(ans)\n"]
['Runtime Error', 'Accepted']
['s864874689', 's008271113']
[9168.0, 8880.0]
[25.0, 20.0]
[312, 88]
p02681
u437273756
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['s = input()\nt = input()\n\nif s==t[:-1]:\n print("Yes")\nelse"\n print("No")', 's = input()\nt = input()\n\nif s==t[:-1]:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s376263384', 's558147133']
[8608.0, 9004.0]
[22.0, 20.0]
[77, 78]
p02681
u437351386
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())\nif s==t[:len(s)]:\n print("Yse")\nelse:\n print("No")\n\n', 's=list(input())\nt=list(input())\nif s==t[:len(s)]:\n print("Yes")\nelse:\n print("No")\n ']
['Wrong Answer', 'Accepted']
['s272838646', 's387638915']
[8956.0, 9032.0]
[23.0, 20.0]
[90, 90]
p02681
u439025531
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["N,M,X=map(int,input().split())\nca=[list(map(int,input().split())) for i in range(N)]\nans=float('inf')\nfor i in range(1,2**N):\n money=0\n rikaido=[0]*M\n for j in range(M):\n if i>>j&1:\n money+=ca[j][0]\n for k in range(1,M+1):\n rikaido[k-1]+=ca[j][k]\n for l in range(M):\n if all(rikaido[l]>=X for l in range(M)):\n ans=min(ans,money)\n\nif ans==float('inf'):\n print(-1)\nelse:\n print(money)", "N,M,X=map(int,input().split())\nca=[list(map(int,input().split())) for i in range(N)]\nans=float('inf')\nfor i in range(1,2**N):\n money=0\n rikaido=[0]*M\n for j in range(M):\n if i>>j&1:\n money+=ca[j][0]\n for k in range(1,M+1):\n rikaido[k-1]+=ca[j][k]\n for l in range(M):\n if all(rikaido[l]>=X for l in range(M)):\n ans=min(ans,money)\n\nif ans==float('inf'):\n print(-1)\nelse:\n print(ans)", "S=input()\nT=input()\ncount=1\nfor i in range(len(S)):\n if S[i]==T[i]:\n count=1\n else:\n count=0\n break\n \nif count==1:\n if (len(S)+1)==len(T):\n print('Yes')\n else:\n print('No')\nelse:\n print('No')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s074290173', 's666832293', 's649154962']
[9236.0, 9228.0, 9120.0]
[24.0, 23.0, 20.0]
[422, 420, 214]
p02681
u439063038
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)>=1 and len(S)<=10:\n if T == S[:-1] and len(T) == len(S)+1:\n print('Yes')\n exit()\nprint('No')", "S = input()\nT = input()\n\nif len(S)>=1 and len(S)<=10:\n if T[:-1] == S and len(T) == len(S)+1:\n print('Yes')\n exit()\nprint('No')"]
['Wrong Answer', 'Accepted']
['s571747562', 's010704145']
[9104.0, 9032.0]
[25.0, 28.0]
[144, 144]
p02681
u439538024
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.
["#ABC168\n\nn = int(input())\n\nunit = {0:'pon', 1:'pon', 2:'hon', 3:'bon', 4:'hon', 5:'hon', 6:'pon', 7:'hon', 8:'pon', 9:'hon'}\n\nx = n % 10\nprint(unit[x])\n", "#ABC167-A\n\nid_1 = input()\nid_2 = input()\n\nlength_1 = len(id_1)\nlength_2 = len(id_2)\n\nif length_2 == length_1 + 1 and id_2.startswith(id_1):\n print('Yes')\nelse:\n print('No')\n"]
['Runtime Error', 'Accepted']
['s450802418', 's355313531']
[9100.0, 9020.0]
[21.0, 22.0]
[152, 179]
p02681
u439706453
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().split()\nS=A[0]\nT=A[1]\ns=[]\nt=[]\nfor c in S:\n s.append(c)\nfor c in T:\n t.append(c)\n\nv=1\nfor i in range(len(s)):\n if not s[i]==t[i]:\n v=0\nif v==1:\n print("Yes")\nelse:\n print("No")', 'OK=[]\nS,T=input().split()\ns=[]\nt=[]\nfor c in S:\n s.append(c)\nfor c in T:\n t.append(c)\n\nv=1\nfor i in range(len(s)):\n if s[i]!=t[i]:\n v=0\nif v==1:\n print("Yes")\nelse:\n print("No")', 'A=[input() for i in range(2)]\nS=A[0]\nT=A[1]\ns=[]\nt=[]\nfor c in S:\n s.append(c)\nfor c in T:\n t.append(c)\n\nv=1\nfor i in range(len(s)):\n if not s[i]==t[i]:\n v=0\nif v==1:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s431346602', 's480804804', 's762460885']
[8996.0, 9076.0, 9108.0]
[20.0, 23.0, 21.0]
[209, 199, 221]
p02681
u441902623
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] & len(s) + 1 == len(t):\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\n\nif (s == t[:-1]) & (len(s) + 1 == len(t)):\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Accepted']
['s519108034', 's203594620']
[8988.0, 9020.0]
[25.0, 29.0]
[103, 107]
p02681
u444481227
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["n,m,x = map(int,input().split())\n\nca=[list(map(int,input().split())) for _ in range(n)]\n\nres=float('inf')\n\nfor i in range(2**n):\n sc=0\n a=[0]*m\n for j in range(n):\n if ((i >> j) & 1) :\n sc=+ca[j][0]\n a+=ca[j][1:]\n if min(a)>=x:\n res=min (sc,res)\n\nif res == INF:\n print(-1)\nelse:\n print(res)\n", "lS=list(input())\nT=input()\n\nlT=list(T)\nif lS==lT[0:len(lT)-1]:\n print('Yes')\n\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s027063162', 's999215274']
[9180.0, 9104.0]
[23.0, 21.0]
[317, 98]
p02681
u445807804
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\nA_num = A\nB_num = 0\nC_num = 0\nif K>A:\n B_num = K-A\nelif K-A>0:\n C_num = K-A-B\n\nprint(A_num*1+B_num*0+C_num*(-1))\n\n', 'n = input()\na = input()\nlen_n = len(n)\n\nif a[0:len_n]==n:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s729810212', 's623249295']
[8792.0, 9040.0]
[24.0, 29.0]
[159, 92]
p02681
u446601167
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['S = input()\nT = input()\nflag = 0\n\nprint(T [:len(S)])\nif len(T) == len(S) +1:\n if S == T [:len(S)]:\n print("Yes")\n flag = 1\nif flag == 0:\n print("No")\n', 'S = input()\nT = input()\nflag = 0\n\n#print(T [:len(S)])\nif len(T) == len(S) +1:\n if S == T [:len(S)]:\n print("Yes")\n flag = 1\nif flag == 0:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s974631991', 's785135507']
[9052.0, 9116.0]
[23.0, 22.0]
[170, 171]
p02681
u446808186
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 if s==t[:len(t)-1]:\n print("yes")\n else:\n print("No")\nelse:\n print("No")', 's=input()\nt=input()\nif len(s)+1==len(t):\n if s==t[:len(t)-1]:\n print("Yes")\n else:\n print("No")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s229877965', 's036200115']
[9020.0, 9084.0]
[21.0, 20.0]
[137, 137]
p02681
u449580152
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
["n, k = map(int, input().split())\nA = list(map(int, input().split()))\nc = 1\nP = [1]\nfor i in range(1,k+1):\n c = A[c-1]\n if c in P:\n roop_start = P.index(c)\n roop_num = i- roop_start\n break\n P.append(c)\n if i == k:\n roop_start = '8'\n roop_num = 'b'\nif roop_start == '8':\n a = k\n roop_start = 0\nelse:\n a = (k - roop_start) % roop_num\nb = P[a + roop_start]\nprint(b)", "s = input()\nt = input()\nif s == t[:-1]:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s143962294', 's703881606']
[9104.0, 9092.0]
[21.0, 21.0]
[418, 78]
p02681
u455133066
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['S=input()\nT=input()\nif(S[:-1]==T):\n print("Yes")\nelse:\n print("No")', 'S=input()\n\nT=input()\nif(S==T[:-1]):\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s234023544', 's674927951']
[9100.0, 9092.0]
[22.0, 24.0]
[73, 74]
p02681
u455642216
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#include <string>\n\nusing namespace std;\n\nint main () {\n string S,T;\n cin >> S >> T;\n char X=T[T.length()-1];\n if (S+X==T){\n cout<<"Yes";\n }\n else\n cout<<"No";\n // enter your code here\n\n return 0;\n}\n', 'S=input()\nT=input()\nif T==S+T[-1]:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s545624414', 's410516657']
[8896.0, 9096.0]
[21.0, 19.0]
[284, 73]
p02681
u456394640
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())\nt = int(len(T)) - 2\n\nif S == T[:t]\n print(Yes)\nelse:\n No\n', "S = str(input())\nT = str(input())\nt = int(len(T)) - 2\n\nif S == T[:t]\n print('Yes')\nelse:\n print('No')", 'S = str(input())\nT = str(input())\n\nif .S == T:\n print(Yes)\nelse:\n No\n', 'S = str(input())\nT = str(input())\n\nif S == T[0:len(T)-2]:\n print(Yes)\nelse:\n No\n', 'S = str(input())\nT = str(input())\n\nif S + . == T:\n print(Yes)\nelse:\n No\n', "S = str(input())\nT = str(input())\nt = int(len(T)) - 1\nU = T[:t]\n\nif S == U:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s015439305', 's301348363', 's386215260', 's691702476', 's931056509', 's857511186']
[8860.0, 8920.0, 8988.0, 8972.0, 8940.0, 8972.0]
[25.0, 20.0, 23.0, 26.0, 22.0, 22.0]
[93, 103, 71, 82, 75, 110]
p02681
u459215900
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\ninput = sys.stdin.readline\nimport numpy as np\n\na = [input() for i in range(2)]\n\nif a[0][:-1] == a[1][:-1]:\n print('Yes')\nelse:\n print('No')", "import sys\ninput = sys.stdin.readline\nimport numpy as np\n\na = [input() for i in range(3)]\n# print(a)\n# print(T[:-1])\n\ns_len = len(a[0])\na[0] = a[0].rstrip('\\n')\n\n\nif a[0] == a[1][:-1]:\n print('Yes')\nelse:\n print('No')", "import sys\ninput = sys.stdin.readline\nimport numpy as np\n\na = [input() for i in range(2)]\n# print(T[:-1])\n\nif a[0][:-1] == a[1][:-1]:\n print('Yes')\nelse:\n print('No')", 'a = [input() for i in range(3)]\n# print(a)\n# print(T[:-1])\n\n\n# a[0] = a[0].rstrip(\'\\n\')\n\n\nif a[0] == a[1][:-1]:\n print("Yes")\nelse:\n print("No")', "import sys\ninput = sys.stdin.readline\nimport numpy as np\n\na = [input() for i in range(2)]\n# print(T[:-1])\n\ns_len = len(a[0])\na[0] = a[0].rstrip('\\n')\n\nif a[0] == a[1][:-1]:\n print('Yes')\nelse:\n print('No')", 'a = [input() for i in range(2)]\n# print(a)\n# print(T[:-1])\n\n\n# a[0] = a[0].rstrip(\'\\n\')\n\n\nif a[0] == a[1][:-1]:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s011481038', 's044412243', 's477793893', 's539906237', 's928640728', 's418665643']
[27116.0, 27132.0, 27116.0, 9100.0, 27120.0, 9020.0]
[110.0, 111.0, 104.0, 22.0, 101.0, 23.0]
[156, 223, 172, 169, 211, 169]
p02681
u460980455
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[:-1]\nprint(u)\nif s==u:\n print('Yes')\nif s!=u:\n print('No')", "s=input()\nt=input()\nu=t[:-1]\nif s==u:\n print('Yes')\nif s!=u:\n print('No')"]
['Wrong Answer', 'Accepted']
['s843646425', 's891480434']
[9044.0, 9080.0]
[25.0, 25.0]
[88, 79]
p02681
u464912173
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:\n print(min(a,k))\nelse:\n print(2*a+b-k)', "s= input()\nt=input()\n\nif t[:-1]==s:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s601008182', 's097854583']
[9188.0, 9096.0]
[22.0, 21.0]
[86, 70]
p02681
u465652095
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['S = input()\nT = input()\ns = len(S)\n\nif T[:s+1] == S:\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\n\nif T[:-1] == S:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s023247515', 's629263808']
[9096.0, 9028.0]
[21.0, 22.0]
[91, 79]
p02681
u467881696
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.
['abcd = list(map(int,input().split()))\nx = []\ny = []\nz = []\nx = [1] * abcd[0]\ny = [0] * abcd[1]\nz = [-1] * abcd[2]\nx.extend(y)\nx.extend(z)\nnum = 0\nfor i in range(abcd[3]):\n num += x[i]\nprint(num)', 'n = input()\na = input()\nif n in a:\n if len(n)+1 == len(a):\n if n[0] == a[0]:\n print("Yes")\n else:\n print("No")\n else:\n print("No")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s643544613', 's106729136']
[9204.0, 9048.0]
[23.0, 21.0]
[197, 201]
p02681
u468972478
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 s == t[:-1] "No")', 's = input()\nt = input()\nprint("Yes" if s == t[:len(t) - 1] else "No")']
['Runtime Error', 'Accepted']
['s600658421', 's249838791']
[8952.0, 9096.0]
[31.0, 30.0]
[56, 69]
p02681
u479719434
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['S = input()\nT = input()\n\nif S == [T:-1]:\n print("Yes")\nelse:\n print("No")\n', 'S = input()\nT = input()\n\nif S == [T:-1]:\n print("Yes")\nelse:\n print("No")\n', 'S = input()\nT = input()\n\nif S == T[:-1]:\n print("Yes")\nelse:\n print("No")\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s351928890', 's917344608', 's975089744']
[8860.0, 9016.0, 9088.0]
[25.0, 22.0, 22.0]
[80, 80, 80]
p02681
u480300350
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\n\nimport sys\n# import math\n# from string import ascii_lowercase, ascii_upper_case, ascii_letters, digits, hexdigits\n# import re # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)\n# from operator import itemgetter # itemgetter(1), itemgetter(\'key\')\n\n# from collections import defaultdict # subclass of dict. defaultdict(facroty)\n# from collections import Counter # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)\n# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).\n# from heapq import nlargest, nsmallest # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).\n# from itertools import count, cycle, repeat # count(start[,step]), cycle(iter), repeat(elm[,n])\n# from itertools import groupby # [(k, list(g)) for k, g in groupby(\'000112\')] returns [(\'0\',[\'0\',\'0\',\'0\']), (\'1\',[\'1\',\'1\']), (\'2\',[\'2\'])]\n# from itertools import starmap # starmap(pow, [[2,5], [3,2]]) returns [32, 9]\n# from itertools import product, permutations # product(iter, repeat=n), permutations(iter[,r])\n# from itertools import combinations, combinations_with_replacement\n# from itertools import accumulate # accumulate(iter[, f])\n# from functools import reduce # reduce(f, iter[, init])\n# from functools import lru_cache # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)\n# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).\n# from copy import deepcopy # to copy multi-dimentional matrix without reference\n# from fractions import gcd # for Python 3.4 (previous contest @AtCoder)\n\n\ndef main():\n mod = 1000000007 # 10^9+7\n inf = float(\'inf\') # sys.float_info.max = 1.79...e+308\n # inf = 2 ** 64 - 1 # (for fast JIT compile in PyPy) 1.84...e+19\n sys.setrecursionlimit(10**6) # 1000 -> 1000000\n def input(): return sys.stdin.readline().rstrip()\n def ii(): return int(input())\n def mi(): return map(int, input().split())\n def mi_0(): return map(lambda x: int(x)-1, input().split())\n def lmi(): return list(map(int, input().split()))\n def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))\n def li(): return list(input())\n \n \n a, b, c, k = mi()\n if k <= a + b:\n print(min(a, k))\n else:\n print(a - (k - (a + b)))\n\n\nif __name__ == "__main__":\n main()\n', '#!/usr/bin/env python3\n\nimport sys\n# import math\n# from string import ascii_lowercase, ascii_upper_case, ascii_letters, digits, hexdigits\n# import re # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)\n# from operator import itemgetter # itemgetter(1), itemgetter(\'key\')\n\n# from collections import defaultdict # subclass of dict. defaultdict(facroty)\n# from collections import Counter # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)\n# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).\n# from heapq import nlargest, nsmallest # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).\n# from itertools import count, cycle, repeat # count(start[,step]), cycle(iter), repeat(elm[,n])\n# from itertools import groupby # [(k, list(g)) for k, g in groupby(\'000112\')] returns [(\'0\',[\'0\',\'0\',\'0\']), (\'1\',[\'1\',\'1\']), (\'2\',[\'2\'])]\n# from itertools import starmap # starmap(pow, [[2,5], [3,2]]) returns [32, 9]\n# from itertools import product, permutations # product(iter, repeat=n), permutations(iter[,r])\n# from itertools import combinations, combinations_with_replacement\n# from itertools import accumulate # accumulate(iter[, f])\n# from functools import reduce # reduce(f, iter[, init])\n# from functools import lru_cache # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)\n# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).\n# from copy import deepcopy # to copy multi-dimentional matrix without reference\n# from fractions import gcd # for Python 3.4 (previous contest @AtCoder)\n\n\ndef main():\n mod = 1000000007 # 10^9+7\n inf = float(\'inf\') # sys.float_info.max = 1.79...e+308\n # inf = 2 ** 64 - 1 # (for fast JIT compile in PyPy) 1.84...e+19\n sys.setrecursionlimit(10**6) # 1000 -> 1000000\n def input(): return sys.stdin.readline().rstrip()\n def ii(): return int(input())\n def mi(): return map(int, input().split())\n def mi_0(): return map(lambda x: int(x)-1, input().split())\n def lmi(): return list(map(int, input().split()))\n def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))\n def li(): return list(input())\n \n \n s = input()\n t = input()\n print(\'Yes\') if len(s) + 1 == len(t) and s == t[:-1] else print(\'No\')\n\n\nif __name__ == "__main__":\n main()\n']
['Runtime Error', 'Accepted']
['s746828489', 's116064473']
[9228.0, 9096.0]
[20.0, 21.0]
[2970, 2967]
p02681
u483748949
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['a, b, c, k = list(map(int, input().split()))\ns = 0\n\nif k >= a:\n s = a\nif (k - a - b) >= 0:\n s -= k - a - b\n\nprint(s)\n', "s = input()\nt = input()\n\nif len(t) - len(s) != 1:\n print('No')\nelse:\n if s == t[0:-1] and t[-1].isalpha() and t[-1].islower():\n print('Yes')\n else:\n print('No')"]
['Runtime Error', 'Accepted']
['s722761475', 's096388943']
[9160.0, 8968.0]
[23.0, 22.0]
[123, 183]
p02681
u485465601
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.
['#include <stdio.h>\nint main (void){\n int i;\n char S[20], T[20];\n scanf("%s%s", S, T);\n for(i=0;S[i]!=\'\\0\';i++){\n if(S[i]==T[i]){\n printf("Yes\\n");\n \n }else printf("No\\n");\n return 0;\n }', "S = input()\nT = input()\n \nif T[:-1] == S:\n print('Yes')\nelse:\n print('No')"]
['Runtime Error', 'Accepted']
['s847080094', 's186836165']
[8972.0, 9092.0]
[24.0, 21.0]
[239, 80]
p02681
u485664232
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()\nT = T[:-1]\nif S == T :\n print('yes')\nelse :\n print('no')\n", "S = input()\nT = input()\nT = T[:-1]\nif S == T :\n print('Yes')\nelse :\n print('No')\n"]
['Wrong Answer', 'Accepted']
['s876433664', 's120157297']
[8820.0, 8956.0]
[24.0, 20.0]
[83, 83]
p02681
u486773779
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\n\nif( a+b >= k ):\n max = k\n\nelif( a+b <= k ):\n max = a - ( k - a - b )\n\nelse:\n sys.exit(1)\n\n\nprint(max)', '\na, b, c, k = map(int, input().split())\n\n\nif( a+b >= k ):\n max = k\n\nelif( a+b <= k ):\n max = a - ( k - a - b )\n\n\nprint(max)', "s = input()\n\nt = input()\n\nstr = s + t[-1]\n\nif str == t:\n print('Yes')\n \nelse :\n print('No')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s004962687', 's124016959', 's615524913']
[9160.0, 9172.0, 9032.0]
[23.0, 23.0, 23.0]
[273, 250, 94]
p02681
u486957057
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 print("YES")\nelse:\n print("NO")', 'S = input()\nT = input()\n\nif S == T[:-1]:\n\tprint("YES")\nelif S == T and S != T[:-1]:\n\tprint("NO")', 'S = input()\nT = input()\n\nif S == T[:-1]:\n print("Yes")\nelse:\n print("No")\n']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s139137215', 's499936583', 's616218464', 's336532315']
[9036.0, 9100.0, 8956.0, 9020.0]
[19.0, 22.0, 21.0, 22.0]
[73, 75, 96, 76]
p02681
u487288850
2,000
1,048,576
Takahashi wants to be a member of some web service. He tried to register himself with the ID S, which turned out to be already used by another user. Thus, he decides to register using a string obtained by appending one character at the end of S as his ID. He is now trying to register with the ID T. Determine whether this string satisfies the property above.
['x = input()\ny = input()\ny[0:-1]==x', "x = input()\ny = input()\nif y[0:-1]==x:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s455231887', 's883500493']
[8980.0, 8996.0]
[31.0, 26.0]
[34, 73]