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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02775 | u855393458 | 2,000 | 1,048,576 | In the Kingdom of AtCoder, only banknotes are used as currency. There are 10^{100}+1 kinds of banknotes, with the values of 1, 10, 10^2, 10^3, \dots, 10^{(10^{100})}. You have come shopping at a mall and are now buying a takoyaki machine with a value of N. _(Takoyaki is the name of a Japanese snack.)_ To make the payment, you will choose some amount of money which is at least N and give it to the clerk. Then, the clerk gives you back the change, which is the amount of money you give minus N. What will be the minimum possible number of total banknotes used by you and the clerk, when both choose the combination of banknotes to minimize this count? Assume that you have sufficient numbers of banknotes, and so does the clerk. | ["n = input()\nn = n[::-1]\nn += '0'\ncnt = 0\ntmp = 0\nprint(n)\nfor i in range(len(n)):\n a = int(n[i])\n a += tmp\n if a == 5:\n cnt += a\n if int(n[i + 1]) >= 5:\n tmp = 1\n else:\n tmp = 0\n elif a < 5:\n cnt += a\n tmp = 0\n else:\n cnt += 10 - a\n tmp = 1\nprint(cnt)", "n = input()\nn = n[::-1]\nn += '0'\ncnt = 0\ntmp = 0\nfor i in range(len(n)):\n a = int(n[i])\n a += tmp\n if a == 5:\n cnt += a\n if int(n[i + 1]) >= 5:\n tmp = 1\n else:\n tmp = 0\n elif a < 5:\n cnt += a\n tmp = 0\n else:\n cnt += 10 - a\n tmp = 1\nprint(cnt)"] | ['Wrong Answer', 'Accepted'] | ['s207107032', 's802668410'] | [6284.0, 5492.0] | [647.0, 638.0] | [337, 328] |
p02775 | u912115033 | 2,000 | 1,048,576 | In the Kingdom of AtCoder, only banknotes are used as currency. There are 10^{100}+1 kinds of banknotes, with the values of 1, 10, 10^2, 10^3, \dots, 10^{(10^{100})}. You have come shopping at a mall and are now buying a takoyaki machine with a value of N. _(Takoyaki is the name of a Japanese snack.)_ To make the payment, you will choose some amount of money which is at least N and give it to the clerk. Then, the clerk gives you back the change, which is the amount of money you give minus N. What will be the minimum possible number of total banknotes used by you and the clerk, when both choose the combination of banknotes to minimize this count? Assume that you have sufficient numbers of banknotes, and so does the clerk. | ['n = input()[::-1]\nprint(n)\ncnt = 0\nflag = 0\nfor i in range(len(n)-1):\n if int(n[i])+flag < 5:\n cnt += int(n[i])+flag\n flag = 0\n elif int(n[i])+flag > 5:\n cnt += (10-int(n[i])-flag)\n flag = 1\n else:\n if int(n[i+1]) >= 5:\n cnt += (10 - int(n[i])-flag)\n flag = 1\n else:\n cnt += (int(n[i]) + flag)\n flag = 0\nif int(n[-1])+flag > 5:\n cnt += (11 - int(n[-1])-flag)\nelse:\n cnt += int(n[-1])+flag\nprint(cnt)\n', 'n = input()[::-1]\ncnt = 0\nflag = 0\nfor i in range(len(n)-1):\n if int(n[i])+flag < 5:\n cnt += int(n[i])+flag\n flag = 0\n elif int(n[i])+flag > 5:\n cnt += (10-int(n[i])-flag)\n flag = 1\n else:\n if int(n[i+1]) >= 5:\n cnt += (10 - int(n[i])-flag)\n flag = 1\n else:\n cnt += (int(n[i]) + flag)\n flag = 0\nif int(n[-1])+flag > 5:\n cnt += (11 - int(n[-1])-flag)\nelse:\n cnt += int(n[-1])+flag\nprint(cnt)\n'] | ['Wrong Answer', 'Accepted'] | ['s813487948', 's076974383'] | [6284.0, 5492.0] | [1254.0, 995.0] | [501, 492] |
p02775 | u977193988 | 2,000 | 1,048,576 | In the Kingdom of AtCoder, only banknotes are used as currency. There are 10^{100}+1 kinds of banknotes, with the values of 1, 10, 10^2, 10^3, \dots, 10^{(10^{100})}. You have come shopping at a mall and are now buying a takoyaki machine with a value of N. _(Takoyaki is the name of a Japanese snack.)_ To make the payment, you will choose some amount of money which is at least N and give it to the clerk. Then, the clerk gives you back the change, which is the amount of money you give minus N. What will be the minimum possible number of total banknotes used by you and the clerk, when both choose the combination of banknotes to minimize this count? Assume that you have sufficient numbers of banknotes, and so does the clerk. | ['N = [int(x) for x in input()]\n\n\ndef solve(N):\n \n \n dp = 0, 1\n print(dp)\n for n in N:\n \n a = min(dp[0] + n, dp[1] + 10 - n)\n \n b = min(dp[0] + n + 1, dp[1] + 10 - (n + 1))\n dp = a, b\n return dp[0]\n\n\nprint(solve(N))\n', 'n = input()\nl = len(n)\nn = int(n)\nans = 0\n\n\ndef c(l, n, ans):\n print(ans)\n a = n // (10 ** (l - 1))\n if l == 1:\n if a <= 5:\n return ans + a\n else:\n return ans + 1 + (10 - a)\n elif a == 5 and l > 1:\n if (n // (10 ** (l - 2))) % 10 <= 4:\n return c(l - 1, n % (10 ** (l - 1)), ans + a)\n else:\n return c(l, 10 ** l - n, ans + 1)\n elif a <= 4 and l > 1:\n return c(l - 1, n % (10 ** (l - 1)), ans + a)\n else:\n return c(l, 10 ** l - n, ans + 1)\n\n\nprint(c(l, n, ans))\n', 'N = [int(x) for x in input()]\n\n\ndef solve(N):\n \n \n dp = 0, 1\n for n in N:\n \n a = min(dp[0] + n, dp[1] + 10 - n)\n \n b = min(dp[0] + n + 1, dp[1] + 10 - (n + 1))\n dp = a, b\n return dp[0]\n\n\nprint(solve(N))\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s592989294', 's998414796', 's272548225'] | [13636.0, 11508.0, 14700.0] | [888.0, 2104.0, 908.0] | [546, 564, 532] |
p02775 | u982591663 | 2,000 | 1,048,576 | In the Kingdom of AtCoder, only banknotes are used as currency. There are 10^{100}+1 kinds of banknotes, with the values of 1, 10, 10^2, 10^3, \dots, 10^{(10^{100})}. You have come shopping at a mall and are now buying a takoyaki machine with a value of N. _(Takoyaki is the name of a Japanese snack.)_ To make the payment, you will choose some amount of money which is at least N and give it to the clerk. Then, the clerk gives you back the change, which is the amount of money you give minus N. What will be the minimum possible number of total banknotes used by you and the clerk, when both choose the combination of banknotes to minimize this count? Assume that you have sufficient numbers of banknotes, and so does the clerk. | ['#E\nN = list(input())\nans = 0\nupped = False\n\nfor num in reversed(N):\n num = int(num)\n if upped:\n if num + 1 >5:\n ans += ((10-num))\n upped = True\n else:\n ans += num - 1\n upped = False\n else:\n if num >5:\n ans += (1+(10-num))\n upped = True\n else:\n ans += num\n upped = False\n \nprint(ans)', '\nN = [int(x) for x in input()]\ndp = 0,1\nfor item in N:\n a = min(dp[0] + item, dp[1] + 10 - item)\n b = min(dp[0] + item + 1, dp[1] + 10 - (item + 1))\n dp = a, b\n \nprint(dp[0])'] | ['Wrong Answer', 'Accepted'] | ['s247949752', 's307913190'] | [12736.0, 14700.0] | [500.0, 1105.0] | [418, 200] |
p02775 | u987164499 | 2,000 | 1,048,576 | In the Kingdom of AtCoder, only banknotes are used as currency. There are 10^{100}+1 kinds of banknotes, with the values of 1, 10, 10^2, 10^3, \dots, 10^{(10^{100})}. You have come shopping at a mall and are now buying a takoyaki machine with a value of N. _(Takoyaki is the name of a Japanese snack.)_ To make the payment, you will choose some amount of money which is at least N and give it to the clerk. Then, the clerk gives you back the change, which is the amount of money you give minus N. What will be the minimum possible number of total banknotes used by you and the clerk, when both choose the combination of banknotes to minimize this count? Assume that you have sufficient numbers of banknotes, and so does the clerk. | ['from sys import setrecursionlimit\nn = "0"+input()\nN = len(n)\npoint = 0\nfor i in range(1,N):\n if int(n[i]) >= 6:\n point += 10-int(n[i])\n else:\n point += int(n[i])\nprint(point)', 'n = "0" + input() \nN = len(n)\nplus = 1\njust = 0\nfor i in range(1,N):\n \n plus_plus = plus+10-(int(n[i])+1)\n plus_just = plus+10-int(n[i])\n \n just_plus = just+1+int(n[i])\n just_just = just+int(n[i])\n \n plus = min(plus_plus,just_plus)\n just = min(just_just,plus_just)\n\n\nprint(just)'] | ['Wrong Answer', 'Accepted'] | ['s656827976', 's490364632'] | [5492.0, 5492.0] | [632.0, 1902.0] | [194, 619] |
p02777 | u000557170 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['# -*- coding: utf-8 -*-\n\nimport sys\nimport math\n\n\ndebug = False\n\ndef log(text):\n if debug:\n print(text)\n\ndef parse_input(lines_as_string = None):\n\n global debug\n lines = []\n if lines_as_string is None:\n debug = False\n # for line in sys.stdin:\n # lines.append(line)\n lines.append(input())\n lines.append(input())\n lines.append(input())\n else:\n debug = True\n lines = [e for e in lines_as_string.split("\\n")][1:-1]\n\n (s, t) = [e for e in lines[0].split(" ")]\n (a, b) = [int(e) for e in lines[1].split(" ")]\n u = lines[2]\n\n return (s, t, a, b, u)\n\n\ndef solve(s, t, a, b, u):\n \n a2 = a\n b2 = b\n if s == u:\n a2 = a2 - 1\n elif t == u:\n b2 = b2 - 1\n \n result = \' \'.join([a2, b2])\n\n return result\n \n\n\ndef main():\n \n result = solve(*parse_input())\n if isinstance(result, list):\n for r in result:\n print("%s" % r, sep=\'\')\n else:\n print("%s" % result, sep=\'\')\n\nif __name__ == \'__main__\':\n\n main()\n\t', '# -*- coding: utf-8 -*-\n\nimport sys\nimport math\n\n\ndebug = False\n\ndef log(text):\n if debug:\n print(text)\n\ndef parse_input(lines_as_string = None):\n\n global debug\n lines = []\n if lines_as_string is None:\n debug = False\n # for line in sys.stdin:\n # lines.append(line)\n lines.append(input())\n lines.append(input())\n lines.append(input())\n else:\n debug = True\n lines = [e for e in lines_as_string.split("\\n")][1:-1]\n\n (s, t) = [e for e in lines[0].split(" ")]\n (a, b) = [int(e) for e in lines[1].split(" ")]\n u = lines[2]\n\n return (s, t, a, b, u)\n\n\ndef solve(s, t, a, b, u):\n \n a2 = a\n b2 = b\n if s == u:\n a2 = a2 - 1\n elif t == u:\n b2 = b2 - 1\n \n result = \' \'.join([str(a2), str(b2)])\n\n return result\n \n\n\ndef main():\n \n result = solve(*parse_input())\n if isinstance(result, list):\n for r in result:\n print("%s" % r, sep=\'\')\n else:\n print("%s" % result, sep=\'\')\n\nif __name__ == \'__main__\':\n\n main()\n\t'] | ['Runtime Error', 'Accepted'] | ['s112978080', 's187306180'] | [3064.0, 3064.0] | [18.0, 17.0] | [1068, 1078] |
p02777 | u000623733 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['S, T = input().split()\nA, B = input().split()\nU = input()\n\nif S==U:\n print(A-1, B)\nelse:\n print(A, B-1)', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nif S==U:\n print(A-1, B)\nelse:\n print(A, B-1)'] | ['Runtime Error', 'Accepted'] | ['s104441064', 's821249435'] | [8992.0, 9104.0] | [25.0, 25.0] | [109, 119] |
p02777 | u001834182 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['color=input().split()\nx,y=map(int,input().split())\ncolor2=input()\n\nif color2==color[0]:\n print(x-1)\nelse:\n print(y-1)', 'color=input().split()\nx,y=map(int,input().split())\ncolor2=input()\n\nif color2==color[0]:\n print(x-1,y)\nelse:\n print(x,y-1)'] | ['Wrong Answer', 'Accepted'] | ['s879377907', 's926472330'] | [2940.0, 3064.0] | [19.0, 17.0] | [123, 127] |
p02777 | u005977014 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['S,T=map(str,input().split())\nA,B=map(int,input().split())\nU=str(input())\nif U==S:\n A=A-1\nelif U==T:\n B=B-1\nprint({} {}.format(A,B))', 'S,T=map(str,input().split())\nA,B=map(int,input().split())\nU=str(input())\nif U==S:\n A=A-1\nelif U==T:\n B=B-1\nprint("{} {}".format(A,B))\n\n'] | ['Runtime Error', 'Accepted'] | ['s266439846', 's243374839'] | [8988.0, 9172.0] | [21.0, 26.0] | [133, 137] |
p02777 | u007464341 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['S, T = input().split()\ns, t = map(int, input().split())\nU = input()\ndic = {S:s, T:t}\ndic[U] -= 1\nprint([num for num in dic.values()])', 'S, T = input().split()\ns, t = map(int, input().split())\nU = input()\ndic = {S:s, T:t}\ndic[U] -= 1\nprint(dic[S], dic[T])'] | ['Wrong Answer', 'Accepted'] | ['s294482821', 's153404912'] | [2940.0, 2940.0] | [17.0, 17.0] | [133, 118] |
p02777 | u007738720 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t=input().split()\na,b=map(int,input().split())\nu=input()\nif s==u:\n print(a-1)\nelif t==u:\n print(b-1)', 's,t=input().split()\na,b=map(int,input().split())\nu=input()\nif s==u:\n print(a-1,b)\nelif t==u:\n print(a,b-1)'] | ['Wrong Answer', 'Accepted'] | ['s898381250', 's590506609'] | [2940.0, 2940.0] | [17.0, 17.0] | [104, 108] |
p02777 | u012955130 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ["def expect(p):\n return (int(p)+1)/2\n\nN, K = map(int ,input().split(' '))\nP = list(map(expect ,input().split(' ')))\n\nsum_list = [sum(P[0:K])]\nS = [sum(P[0:i]) for i in range(len(P))]\nE = []\n\nfor i in range(N-K):\n E.append(S[i+K]-S[i])\n\nprint('{:.12f}'.format(max(E)))", "S, T = map(str ,input().split(' '))\nA, B = map(int ,input().split(' '))\nU = input()\n\ndct = {S:A, T:B}\ndct[U] = dct[U] - 1\nprint(dct[S], dct[T])"] | ['Runtime Error', 'Accepted'] | ['s528468409', 's811560537'] | [3064.0, 3060.0] | [17.0, 17.0] | [272, 143] |
p02777 | u014139588 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t = input().split()\na,b = map(int,input().split())\nu = input()\nprint(a,b-1 if u == t else a-1,b)', 's,t = input().split()\na,b = map(int,input().split())\nu = input()\nprint(a if u == t else a-1, end = " ")\nprint(b-1 if u == t else b)'] | ['Wrong Answer', 'Accepted'] | ['s518608277', 's346284129'] | [9040.0, 9068.0] | [25.0, 32.0] | [98, 131] |
p02777 | u017415492 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t=map(str,input().split())\na,b=map(int,input().split())\nss=input()\nif ss=="s":\n a-=1\nelse:\n b-=1\nprint(a,b)', 's,t=map(str,input().split())\na,b=map(int,input().split())\nss=input()\nif ss="s":\n a-=1\nelse:\n b-=1\nprint(a,b)\n', 's,t=map(str,input().split())\na,b=map(int,input().split())\nss=input()\nif ss==s:\n a-=1\nelse:\n b-=1\nprint(a,b)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s202719196', 's213920295', 's139001693'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0] | [111, 111, 109] |
p02777 | u017624958 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ["inputted = input().split()\nS = inputted[0]\nT = inputted[1]\ninputted = list(map(int, input().split()))\nA = inputted[0]\nB = inputted[1]\nU = input()\n\nA2 = A - 1 if U == S else A\nB2 = B - 1 if U == T else B\n\noutput = A2 + ' ' + B2\n\nprint(output)\n", 'inputted = input().split()\nS = inputted[0]\nT = inputted[1]\ninputted = list(map(int, input().split()))\nA = inputted[0]\nB = inputted[1]\nU = input()\n\nA2 = A - 1 if U == S else A\nB2 = B - 1 if U == T else B\n\noutput = "{} {}".format(A2, B2)\n\nprint(output)\n'] | ['Runtime Error', 'Accepted'] | ['s842548748', 's308693318'] | [3060.0, 3064.0] | [18.0, 17.0] | [242, 251] |
p02777 | u018771977 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ["#! env/bin/local python3\n\ns, t = input().split()\na, b = map(int, input().split())\nu = int(input())\n\nballs = {\n s: a,\n t: b\n}\n\nballs[u] -= 1\n\nprint(f'{balls[s]} {balls[t]}')\n", "#! env/bin/local python3\n\ns, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nballs = {\n s: a,\n t: b\n}\n\nballs[u] -= 1\n\nprint('{} {}'.format(balls[s], balls[t]))\n"] | ['Runtime Error', 'Accepted'] | ['s371420908', 's847253967'] | [2940.0, 2940.0] | [17.0, 17.0] | [179, 184] |
p02777 | u018984506 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t = input().split()\na,b = (int(x) for x in input().split())\nu = input()\n\nif u==s:\n print(a-1)\nelif u==t:\n print(b-1) ', 's,t = input().split()\na,b = (int(x) for x in input().split())\nu = input()\n\nif u==s:\n print(a-1)\nelif u==t:\n print(b-1) ', 's = list(input().split())\na,b = map(int, input().split()) \nu = input()\n\nif u == s[0]:\n a -= 1\nelse:\n b -= 1\n\nprint(a,b)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s170428008', 's249857811', 's991023140'] | [2940.0, 3060.0, 2940.0] | [17.0, 19.0, 17.0] | [125, 125, 125] |
p02777 | u019355060 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['import numpy as np\nN,K=map(int,input().split())\nP=np.array(list(map(int,input().split())))\n\nmax_value=0\nfor i in range(N-K+1):\n if max_value < sum(P[i:i+K]):\n max_value = sum(P[i:i+K])\n max_i = i\nmax_vector = P[max_i:max_i+K]\n\nsum_ex = 0\nfor i in range(K):\n sum_ex = sum_ex + sum(np.arange(max_vector[i]+1)) / max_vector[i]\nprint(sum_ex)', 'S,T=input().split()\nA,B=map(int,input().split())\nU=input()\nif U==S:\n A=A-1\nelse:\n B=B-1\nprint(A,B)'] | ['Runtime Error', 'Accepted'] | ['s930535978', 's575569218'] | [12504.0, 2940.0] | [149.0, 17.0] | [357, 104] |
p02777 | u020390084 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ["#!/usr/bin/env python3\nimport sys\ninput = sys.stdin.readline\ndef INT(): return int(input())\ndef MAP(): return map(int,input().split())\ndef LI(): return list(map(int,input().split()))\n\nimport numpy as np\ndef main():\n S,T = input().split()\n A,B = MAP()\n U = input()\n\n if S == U:\n print(A-1,B)\n else:\n print(A,B-1)\n\n return\n\nif __name__ == '__main__':\n main()\n", "#!/usr/bin/env python3\nimport sys\ninput = sys.stdin.readline\ndef INT(): return int(input())\ndef MAP(): return map(int,input().split())\ndef LI(): return list(map(int,input().split()))\n\nimport numpy as np\ndef main():\n S,T = input().split()\n A,B = MAP()\n U = INT()\n\n if S == U:\n print(A-1,B)\n else:\n print(A,B-1)\n\n return\n\nif __name__ == '__main__':\n main()\n", "#!/usr/bin/env python3\nimport sys\n# input = sys.stdin.readline\ndef INT(): return int(input())\ndef MAP(): return map(int,input().split())\ndef LI(): return list(map(int,input().split()))\n\ndef main():\n S,T = input().split()\n A,B = MAP()\n U = input()\n\n if S == U:\n print(A-1,B)\n else:\n print(A,B-1)\n\n return\n\nif __name__ == '__main__':\n main()\n"] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s136082701', 's785055871', 's131589978'] | [12440.0, 12436.0, 2940.0] | [150.0, 150.0, 17.0] | [392, 390, 375] |
p02777 | u021217230 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['a,b=input().spit()\nd={}\nd[a]=0\nd[b]=0\nd[a],d[b]=map(int,input().split())\nx=input()\nd[x]-=1\nprint(d[a],d[b])', 'a,b=input().split()\nd={}\nd[a]=0\nd[b]=0\nd[a],d[b]=map(int,input().split())\nx=input()\nd[x]-=1\nprint(d[a],d[b])\n'] | ['Runtime Error', 'Accepted'] | ['s968483230', 's049968587'] | [3064.0, 3060.0] | [17.0, 17.0] | [107, 109] |
p02777 | u021763820 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['# -*- coding: utf-8 -*-\nN, K = map(int, input().split())\np = list(map(int, input().split()))\nExp = [0]*(N-K+1)\nfor i in range(N-K+1):\n x = 0\n for j in range(i, i+K):\n x += (sum(range(1, p[j]+1)))/p[j]\n Exp[i] = x\nprint(max(Exp))', '# -*- coding: utf-8 -*-\ns, t = input().split()\na, b = map(int, input().split())\nu = input()\nif u == s:\n a -= 1\nif u == t:\n b -= 1\nprint(a, b)'] | ['Runtime Error', 'Accepted'] | ['s585534183', 's734251561'] | [3060.0, 2940.0] | [17.0, 17.0] | [244, 147] |
p02777 | u021916304 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['def ii():return int(input())\ndef iim():return map(int,input().split())\ndef iil():return list(map(int,input().split()))\ns,t=iim()\na,b=iim()\nu=ii()\n\nif u == s:\n print(a-1,b)\nelse:\n print(a,b-1)', 'def ii():return int(input())\ndef iim():return map(int,input().split())\ndef ism():return map(str,input().split())\ndef iil():return list(map(int,input().split()))\ns,t=ism()\na,b=iim()\nu=input()\n\nif u == s:\n print(a-1,b)\nelse:\n print(a,b-1)'] | ['Runtime Error', 'Accepted'] | ['s656879331', 's244115398'] | [3060.0, 3060.0] | [18.0, 17.0] | [197, 242] |
p02777 | u023229441 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t=map(str,input().split())\na,b=map(int,input().split())\nq=input()\nprint("{x} {y}".format(a-1,b) if q==s else "{x} {y}".format(a,b-1))\n', 's,t=map(str,input().split())\na,b=map(int,input().split())\nq=input()\nprint(a-1,b if q==s else a,b-1)', 's,t=map(str,input().split())\nq,w=map(int,input().split())\nQ=input()\nprint("{} {}".format(q-1,w) if Q==s else "{} {}".format(q,w-1))\n '] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s024045676', 's357233556', 's331372053'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [136, 99, 138] |
p02777 | u024782094 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t=map(input().split())\na,b=map(int,input().split())\nu=input()\nif s==u:\n print(a-1,b)\nelse:\n print(a,b-1)', 's,t=input().split()\na,b=map(int,input().split())\nu=input()\nif s==u:\n print(a-1,b)\nelse:\n print(a,b-1)'] | ['Runtime Error', 'Accepted'] | ['s235624771', 's365245621'] | [2940.0, 2940.0] | [18.0, 19.0] | [108, 103] |
p02777 | u025501820 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['import numpy as np\nN, K = map(int, input().split(" "))\np = np.array(list(map(int, input().split(" "))))\nex = np.array([(i + 1) / 2 for i in p])\nans = np.sum(ex[0: K])\nmax_ans = ans\nfor i in range(K, N):\n diff = ex[i] - ex[i - K]\n ans += diff\n if diff > 0:\n max_ans = ans\nprint(max_ans)', 's, t = input().split(" ")\na, b = map(int, input().split(" "))\nif input() == s:\n print(a - 1, b)\nelse:\n print(a, b - 1)'] | ['Runtime Error', 'Accepted'] | ['s458952913', 's291799704'] | [12444.0, 2940.0] | [149.0, 17.0] | [301, 124] |
p02777 | u031115006 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s, t = input().split()\na, b = map(int, input().split())\nu=input()\n\nif(u==s):\n print(a-1)\nelse:\n print(b-1)', 's, t = input().split()\na, b = map(int, input().split())\nu=input()\n\nif(u==s):\n print(str(a-1)+" "+str(b))\nelse:\n print(str(a)+" "+str(b-1))'] | ['Wrong Answer', 'Accepted'] | ['s320663133', 's135900618'] | [2940.0, 2940.0] | [17.0, 17.0] | [107, 139] |
p02777 | u031118696 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t = input().split()\na,b = input().split()\nu = input().split()\n\nif u == s:\n print(int(a)-1,b)\nelse:\n print(a,int(b)-1)\n', 's,t = input().split()\na,b = input().split()\nu = input()\n\nprint(s)\nprint(u)\nif u == s:\n print(int(a)-1,b)\nelse:\n print(a,int(b)-1)', 's,t = input().split()\na,b = input().split()\nu = input()\n\nif u == s:\n print(int(a)-1,b)\nelse:\n print(a,int(b)-1)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s562708164', 's916382386', 's974777486'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [126, 135, 117] |
p02777 | u038132197 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['color = input().split()\nnum = input().split()\nchoice = input()\nfor i in 2:\n if choice == color[i]:\n num[i] = int(num[i]) - int(color[i])\n \nprint(num)', 'color = input().split()\nnum = input().split()\nchoice = input()\n\nfor i in range(2):\n num[i] = int(num[i])\n if color[i] == choice:\n num[i] = num[i] - 1\nprint(num[0], num[1])'] | ['Runtime Error', 'Accepted'] | ['s620089468', 's147573795'] | [2940.0, 3060.0] | [17.0, 17.0] | [156, 176] |
p02777 | u038819082 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t=str(input(),split())\na,b=int(input(),split())\nu=str(input())\nif u==s:\n a-=1\nelse:\n b-=1\nprint(a,b)', 's,t=input().split()\na,b=map(int,input(),split()\nu=input()\nif u==s:\n a-=1\nelse:\n b-=1\nprint(a,b)\n', 's,t=input().split()\na,b=map(int,input().split())\nu=input()\nif u==s:\n a-=1\nelse:\n b-=1\nprint(a,b)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s787732955', 's897795384', 's946928894'] | [3060.0, 2940.0, 2940.0] | [19.0, 17.0, 17.0] | [104, 98, 99] |
p02777 | u039065404 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['S,T=input().split()\nA,B=map(int,input().split())\nU=input()\n\nif S=U:\n print(A-1, B)\nelse:\n print(A, B-1)', 'S,T=input().split()\nA,B=map(int,input().split())\nU=input()\n \nif S==U:\n print(A-1, B)\nelse:\n print(A, B-1)'] | ['Runtime Error', 'Accepted'] | ['s040966666', 's016440318'] | [2940.0, 2940.0] | [17.0, 17.0] | [105, 107] |
p02777 | u039189422 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t=map(input().split())\na,b=map(int,input().split())\nu =input()\nif s==u:\n\tprint(a-1)\nelse:\n\tprint(b-1)', 's,t=input().split()\na,b=map(int,input().split())\nu =input()\nif s==u:\n\tprint(a-1)\nelse:\n\tprint(b-1)', 's,t=input().split()\na,b=map(int,input().split())\nu =input()\nif s==u:\n\tprint(a-1,b)\nelse:\n\tprint(a,b-1)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s437356541', 's610024018', 's108897600'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [104, 99, 103] |
p02777 | u041046014 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['ss=input().split()\na,b=list(map(int,input()))\ns=input()\nif s==ss[0]: print(a-1,b)\nelif s==ss[1]:print(a,b-1)', 'l=input().split()\nfor i in l:\n if l.count(i)!=1:\n print("NO")\n exit(0)\nprint("YES")', 'ss=input().split()\na,b=list(map(int,input().split()))\ns=input()\nif s==ss[0]: print(a-1,b)\nelif s==ss[1]:print(a,b-1)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s718952997', 's752098858', 's394215484'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [108, 90, 116] |
p02777 | u042626629 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ["print('x'*len(input()))", 's,t = input().split()\na,b = map(int,input().split())\nu = input()\n\nif u == s:\n print(a - 1, b)\nelse:\n print(a, b- 1)'] | ['Wrong Answer', 'Accepted'] | ['s533538508', 's645896833'] | [2940.0, 2940.0] | [17.0, 17.0] | [23, 121] |
p02777 | u045235021 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t = input().split()\na,b = input().split()\na = int(a)\nb = int(b)\nu = input()\n \n\nprint(s,t,a,b,u)\n\nif u == s:\n\ta= a-1\n\nelif u==t:\n\tb= b-1\n \nprint(a,b)', 's,t = input().split()\na,b = input().split()\na = int(a)\nb = int(b)\nu = input()\n\nif u == s:\n\ta= a-1\n\nelif u==t:\n\tb= b-1\n \nprint(a,b)'] | ['Wrong Answer', 'Accepted'] | ['s265085026', 's224196454'] | [3060.0, 3060.0] | [17.0, 18.0] | [152, 131] |
p02777 | u053909865 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['\nS, T = map(str, input().split())\nA, B = map(int, input().split())\nU = str(input())\n\n\nif S == U:\n print( [A-1,B] )\nelse:\n print( [A, B-1] )', '\nS, T = map(str, input().split())\nA, B = map(int, input().split())\nU = str(input())\n\n\nif S == U:\n print( A-1,B )\nelse:\n print( A, B-1 )'] | ['Wrong Answer', 'Accepted'] | ['s954134938', 's565452736'] | [2940.0, 2940.0] | [17.0, 17.0] | [159, 155] |
p02777 | u054514819 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['S, T = map(str, input().split())\nA, B = map(int, input().split())\nU = str(input())\nif S==U:\n print(A-1)\nelse:\n print(B-1)', 'S, T = map(str, input().split())\nA, B = map(int, input().split())\nU = str(input())\nif S==U:\n print(A-1, B)\nelse:\n print(A, B-1)'] | ['Wrong Answer', 'Accepted'] | ['s456555847', 's586628244'] | [2940.0, 3064.0] | [17.0, 17.0] | [123, 129] |
p02777 | u054662964 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['a,b = input().split()\nA,B = input().split()\nc = input()\na = str(a)\nb = str(b)\nA = int(A)\nB = int(B)\nc = str(c)\nd = A - 1\nD = B - 1\nif c == a:\n print(d)\nelif c == b:\n print(D)', 'a,b = input().split()\nA,B = input().split()\nc = input()\na = str(a)\nb = str(b)\nA = int(A)\nB = int(B)\nc = str(c)\nd = A - 1\nD = B - 1\nif c == a:\n print(d,B)\nelif c == b:\n print(A,D)'] | ['Wrong Answer', 'Accepted'] | ['s261978768', 's163870876'] | [3064.0, 3060.0] | [17.0, 19.0] | [180, 184] |
p02777 | u056830573 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['[S, T] = input().split()\nprint(S)\nprint(T)\n\n[A, B] = input().split()\n\nU = input()\n\nif U == S:\n print(f"{int(A)-1} {B}")\nelse:\n print(f"{A} {int(B) - 1}")\n', 'X = input().split()\nS = X[0]\nT = X[1]\nY = input().split()\nA = int(Y[0])\nB = int(Y[1])\nU = input()\n \nA -= 1 if U == S else B -= 1\n \nprint(str(A) + " " + str(B))', 'X = input().split()\nS = X[0]\nT = X[1]\nY = input().split()\nA = int(Y[0])\nB = int(Y[1])\nU = input()\n\nA -= 1 if U == S else B-= 1\n\nprint(A + " " + B)', '[S, T] = input().split()\n[A, B] = [int(x) for x in input().split()]\nU = input()\n\nif U == S:\n print(A-1, B)\nelse:\n print(A, B-1)\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s592616231', 's679869430', 's759583429', 's486080916'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0, 18.0] | [160, 159, 146, 134] |
p02777 | u056977516 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | [',', "# ANSHUL GAUTAM\n# IIIT-D\n\nfrom math import *\nfrom copy import *\nfrom string import *\t\t\t\t\nfrom random import *\t\t\t\t# l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference\nfrom sys import stdin\nfrom sys import maxsize\nfrom operator import *\t\t\t\t\nfrom itertools import *\nfrom collections import Counter\t\t\nfrom collections import defaultdict \n\n'''\n\n'''\n\ndef solve(l):\n\tn = len(l)\n\t\n\ns,t = map(str, stdin.readline().rstrip().split())\na,b = map(int, stdin.readline().rstrip().split())\nu = input()\nif(u == s):\n\ta -= 1\nelse:\n\tb -= 1\nprint(a,b)"] | ['Runtime Error', 'Accepted'] | ['s163297143', 's840609744'] | [2940.0, 4464.0] | [17.0, 37.0] | [1, 661] |
p02777 | u057362336 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t=input().split()\na,b=map(int,input().split())\nu=input().split()\nif s==u:\n print(str(a-1)+" "+str(b))\nelse:\n print(str(a)+" "+str(b-1))', 's, t = input().split()\na, b = map(int, input().split())\nu = input()\nif s == u:\n print(str(a-1)+" "+str(b))\nelse:\n print(str(a)+" "+str(b-1))\n'] | ['Wrong Answer', 'Accepted'] | ['s097821583', 's465184896'] | [9164.0, 9156.0] | [26.0, 33.0] | [139, 147] |
p02777 | u057993957 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['n, k = list(map(int, input().split()))\np = list(map(int, input().split()))\nexp = [sum([(pi + 1) / 2 for pi in p[i:i+k]]) for i in range(n-k+1)]\nprint(max(exp))', 'a, b = input().split()\na1, b1 = list(map(int, input().split()))\n\nprint(str(a1) + " " + str(b1 - 1) if input() == b else str(a1 - 1) + " " + b1)', 'a, b = input().split()\na1, b1 = list(map(int, input().split()))\n\nprint(str(a1) + " " + str(b1 - 1) if input() == b else str(a1 - 1) + " " + str(b1))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s053213246', 's150583390', 's678148917'] | [3060.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [159, 143, 148] |
p02777 | u064571674 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['Last login: Wed Mar 4 17:18:27 on ttys000\n~ tmux\nzsh: command not found: tmux\n~ brew install tmux\nUpdating Homebrew...\n==> Auto-updated Homebrew!\nUpdated 1 tap (homebrew/core).\n==> Updated Formulae\nccm fobis gcovr gitlab-gem nginx passenger\n\n==> Installing dependencies for tmux: utf8proc\n==> Installing tmux dependency: utf8proc\n==> Downloading https://homebrew.bintray.com/bottles/utf8proc-2.4.0.catalina.bot\n######################################################################## 100.0%\n==> Pouring utf8proc-2.4.0.catalina.bottle.tar.gz\n🍺 /usr/local/Cellar/utf8proc/2.4.0: 10 files, 648.1KB\n==> Installing tmux\n==> Downloading https://homebrew.bintray.com/bottles/tmux-3.0a_1.catalina.bottle\n==> Downloading from https://akamai.bintray.com/d8/d83b378969a8af595451db10bf4b8\n######################################################################## 100.0%\n==> Pouring tmux-3.0a_1.catalina.bottle.tar.gz\n==> Caveats\nExample configuration has been installed to:\n /usr/local/opt/tmux/share/tmux\n\nBash completion has been installed to:\n /usr/local/etc/bash_completion.d\n==> Summary\n🍺 /usr/local/Cellar/tmux/3.0a_1: 9 files, 803.1KB\n==> Caveats\n==> tmux\nExample configuration has been installed to:\n /usr/local/opt/tmux/share/tmux\n\nBash completion has been installed to:\n /usr/local/etc/bash_completion.d\n~ \n~ \n~ \n~ tmux ls\nerror connecting to /tmp//tmux-501/default (No such file or directory)\n~ tmux\n[exited]\n~ tmux new -s normal\n[exited]\n~ \n~ \n~ \n~ \n~ cd\n~ cd atcoder\n~/atcoder ll\ntotal 80\ndrwxr-xr-x 7 yoshidafumiya staff 224 3 4 16:59 .\ndrwxr-xr-x+ 108 yoshidafumiya staff 3456 3 4 17:28 ..\ndrwxr-xr-x 5 yoshidafumiya staff 160 3 1 20:26 .ipynb_checkpoints\n-rw-r--r-- 1 yoshidafumiya staff 3801 3 1 20:55 155.ipynb\n-rw-r--r-- 1 yoshidafumiya staff 12413 3 1 17:28 156.ipynb\n-rw-r--r-- 1 yoshidafumiya staff 15032 3 4 16:59 157.ipynb\n-rw-r--r-- 1 yoshidafumiya staff 785 3 4 16:59 157c.py\n~/atcoder mkdir 155\n~/atcoder mv 155.ipynb 155\n~/atcoder mkdir 156\n~/atcoder mv 156.ipynb 156\n~/atcoder mkdir 157\n~/atcoder mv 157.ipynb 157\n~/atcoder mv 157c.py 157\n~/atcoder ll\ntotal 0\ndrwxr-xr-x 6 yoshidafumiya staff 192 3 4 17:47 .\ndrwxr-xr-x+ 108 yoshidafumiya staff 3456 3 4 17:28 ..\ndrwxr-xr-x 5 yoshidafumiya staff 160 3 1 20:26 .ipynb_checkpoints\ndrwxr-xr-x 3 yoshidafumiya staff 96 3 4 17:47 155\ndrwxr-xr-x 3 yoshidafumiya staff 96 3 4 17:47 156\ndrwxr-xr-x 4 yoshidafumiya staff 128 3 4 17:47 157\n~/atcoder mkdir 154\n~/atcoder cd 154\n~/atcoder/154 vi a.py\n~/atcoder/154 p a.py \nred blue\n3 4\nredTraceback (most recent call last):\n File "a.py", line 1, in <module>\n s,t = map(int,input().split())\nValueError: invalid literal for int() with base 10: \'red\'\n~/atcoder/154 3 4\nzsh: command not found: 3\n~/atcoder/154 p a.py\n^CTraceback (most recent call last):\n File "a.py", line 1, in <module>\n s,t = map(int,input().split())\nKeyboardInterrupt\n~/atcoder/154 vi a.py\n~/atcoder/154 p a.py \nred blue\n3 4\nred\nTraceback (most recent call last):\n File "a.py", line 3, in <module>\n u = int(input())\nValueError: invalid literal for int() with base 10: \'red\'\n~/atcoder/154 vi a.py\n~/atcoder/154 p a.py \nred blue\n3 4\nred\n2\n~/atcoder/154 vi a.py\n~/atcoder/154 p a.py \nred blue\n3 4\nred\n(\'red\', 2)\n(\'blue\', 4)\n~/atcoder/154 vi a.py\n~/atcoder/154 p a.py \ntext = text[:-1]\nTraceback (most recent call last):\n File "a.py", line 1, in <module>\n s,t = map(str,input().split())\nValueError: too many values to unpack (expected 2)\n~/atcoder/154 p a.py\nred blue\n3 4\nred\nTraceback (most recent call last):\n File "a.py", line 13, in <module>\n ans = ans + value + \' \'\nTypeError: can only concatenate str (not "int") to str\n~/atcoder/154 vi a.py\n~/atcoder/154 p a.py \nred blue\n3 4\nred\n2 4\n~/atcoder/154 p a.py\nred blue\n5 5\nblue\n5 4\n~/atcoder/154 p a.py\n^CTraceback (most recent call last):\n File "a.py", line 1, in <module>\n s,t = map(str,input().split())\nKeyboardInterrupt\n~/atcoder/154 vi a.py\n\ns,t = map(str,input().split())\na,b = map(int,input().split())\nu = str(input())\n\nh1 = {}\nh1[s] = a\nh1[t] = b\n\nh1[u] = h1[u] - 1\n\nans = \'\'\nfor key, value in h1.items():\n ans = ans + str(value) + \' \'\n\nans = ans[:-1]\nprint(ans) ', 's,t = map(str,input().split())\na,b = map(int,input().split())\nu = str(input())\n\nh1 = {}\nh1[s] = a\nh1[t] = b\n\nh1[u] = h1[u] - 1\n\nprint(h1[s],h1[t])'] | ['Runtime Error', 'Accepted'] | ['s523475735', 's986641335'] | [2940.0, 3060.0] | [17.0, 17.0] | [4340, 146] |
p02777 | u071361440 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t=input().split()\na,b=map(int,input()split())\nu=input()\nif u==s:\n a-=1\nelse: b-=1\nprint(a, b)', 's,t=input().split()\na,b=map(int,input()split())\nu=input()\nif u==s:\n a-=1\nelse:\n b-=1\nprint(a, b)', 's,t=input().split()\na,b=map(int,input()split())\nu=input()\nif u==s:\n a--\nelif u==t:\n b--\nprint("{} {}".format(a,b))', 's,t=input().split()\na,b=map(int,input()split())\nu=input()\nif u==s:\n a-=\nelif:b-=\nprint(a, b)', 's,t=input().split()\na,b=map(int,input()split())\nu=input()\nif u==s:\n a--\nelif u==t:\n b--\nprint({} {},format(a,b))', 's,t=input().split()\na,b=map(int,input()split())\nu=input()\nif u==s:\n a-=1\nelif:b-=1\nprint(a, b)', 's,t=input().split()\na,b=map(int,input().split())\nx=input()\nif x==s:\n print(a-1, b)\nelse: print(a, b-1)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s131572392', 's207319883', 's323006056', 's479335948', 's757236895', 's763051555', 's569001623'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [99, 102, 120, 95, 118, 97, 105] |
p02777 | u080477366 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['moji = list(map(str,input().split()))\nkazu = list(map(int,input().split()))\nU = input()\nprint(kazu[moji.index(U)] -1)', 'moji = list(map(str,input().split()))\nkazu = list(map(int,input().split()))\nU = input()\nkazu[moji.index(U)] -= 1\nprint(kazu[0],kazu[1])'] | ['Wrong Answer', 'Accepted'] | ['s457789186', 's995645028'] | [2940.0, 2940.0] | [17.0, 20.0] | [117, 135] |
p02777 | u082861480 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t = input().split()\nans = map(int,input().split())\nm = input()\nif m == s:\n ans[0] -= 1\nelif m == t:\n ans[1] -= 1\nprint(ans[0],ans[1])', 's,t = input().split()\nans = [int(i) for i in input().split()]\nm = input()\nif m == s:\n ans[0] -= 1\nelif m == t:\n ans[1] -= 1\nprint(ans[0],ans[1])'] | ['Runtime Error', 'Accepted'] | ['s208238286', 's764264699'] | [2940.0, 2940.0] | [17.0, 17.0] | [137, 146] |
p02777 | u085329544 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['w = list(map(input().split()))\nn = list(map(int, input().split()))\nu = input()\n\nif u == w[0]:\n print(n[0]-1,n[1])\nelse:\n print(n[0],n[1]-1)', 'w = list(input().split())\nn = list(map(int, input().split()))\nu = input()\n\nif u == w[0]:\n print(n[0]-1,n[1])\nelse:\n print(n[0],n[1]-1)'] | ['Runtime Error', 'Accepted'] | ['s532028995', 's585013527'] | [3060.0, 3060.0] | [18.0, 19.0] | [141, 136] |
p02777 | u091217940 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ["s,t=input().split()\na,b=input().split()\na=int(a)\nb=int(b)\nu=input()\ndict={}\ndict[s]=a\ndict[t]=b\n\ndict[u]-=1\n\nfor k,v in dict.items():\n print(v,end=' ')", "s,t=input().split()\na,b=input().split()\na=int(a)\nb=int(b)\nu=input()\ndict={}\ndict[s]=a\ndict[t]=b\n\ndict[u]-=1\n\nfor k,v in dict.items():\n print(v,end=' ')", 's,t=input().split()\na,b=input().split()\na=int(a)\nb=int(b)\nu=input()\nif s==u:\n print(a-1, b)\nelse:\n print(a, b-1)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s241444285', 's335073169', 's327782920'] | [3060.0, 3064.0, 2940.0] | [17.0, 17.0, 17.0] | [154, 154, 118] |
p02777 | u094102716 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['a = list(map(str, input().split()))\nb = list(map(int, input().split()))\nc = list(map(str, input().split()))\nif a[0] == c:\n\tb[0] = b[0] - 1\nelse: b[1] = b[1] -1\nprint(b[0],b[1])', 'a = list(map(str, input().split()))\nb = list(map(int, input().split()))\nc = list(map(str, input().split()))\nif a[0] == c[0]:\n\tb[0] = b[0] - 1\nelse: b[1] = b[1] -1\nprint(b[0],b[1])\n'] | ['Wrong Answer', 'Accepted'] | ['s237610908', 's643576196'] | [3060.0, 2940.0] | [17.0, 17.0] | [176, 180] |
p02777 | u096025032 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['as. bs = map(str,input().split())\nci, di = map(int,input().split())\nes = str(input())\n\nif es == as:\n ca = ci - 1\n print(ca)\nelif es == bs:\n da = di -1\n print(da)', 'fs, bs = map(str,input().split())\nci, di = map(int,input().split())\nes = str(input())\n\nif es == fs:\n ca = ci - 1\n print(ca)\nelif es == bs:\n da = di -1\n print(da)\n', 'A, B = map(str, input().split())\nN, M = map(int, input().split())\nS = input()\n\nif A == S:\n print(N-1,M)\nelif B == S:\n print(N,M-1)\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s663059149', 's948054643', 's047413477'] | [2940.0, 2940.0, 9152.0] | [17.0, 17.0, 28.0] | [165, 166, 133] |
p02777 | u098165618 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ["import collections\nN = int(input())\nA = input().split(' ')\n\nc = max(collections.Counter(A).values())\nif c == 1:\n\tprint('YES')\nelse:\n\tprint('NO')\n", "S, T = map(str, input().split())\nA, B = map(int, input().split())\nU = input()\n\nif U == S:\n\tA = A - 1\nelse:\n\tB = B - 1\n\nprint('{} {}'.format(A, B))\n"] | ['Runtime Error', 'Accepted'] | ['s741878985', 's597920412'] | [3316.0, 2940.0] | [21.0, 17.0] | [145, 147] |
p02777 | u105124953 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['n,k = map(int,input().split())\nlis = list(map(int,input().split()))\ntmp = 0\nfor i,l in enumerate(lis):\n if i+k <= len(lis)-1:\n #print(i,k)\n if lis[i+k]>l:\n tmp = i+1\n#print(tmp)\n#print(new_lis)\n#print(lis[tmp:tmp+k])\nprint(sum([(ll+1)/2 for ll in lis[tmp:tmp+k+1]]))\n#print((sum(lis[tmp:tmp+k])+k)/2)', 's,t = input().split()\na,b = map(int,input().split())\nu = input()\nif s == u:\n print(a-1,b)\nelse:\n print(a,b-1)'] | ['Runtime Error', 'Accepted'] | ['s701806296', 's765868613'] | [3060.0, 2940.0] | [18.0, 17.0] | [329, 115] |
p02777 | u106311097 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ["#!python3.4\n# -*- coding: utf-8 -*-\n# abc154/abc154_a\nimport sys\n\ns2nn = lambda s: [int(c) for c in s.split(' ')]\nss2nn = lambda ss: [int(s) for s in list(ss)]\nss2nnn = lambda ss: [s2nn(s) for s in list(ss)]\ni2s = lambda: sys.stdin.readline().rstrip()\ni2n = lambda: int(i2s())\ni2nn = lambda: s2nn(i2s())\nii2ss = lambda n: [i2s() for _ in range(n)]\nii2nn = lambda n: ss2nn(ii2ss(n))\nii2nnn = lambda n: ss2nnn(ii2ss(n))\n\ndef main():\n S,T = i2s().split()\n A,B = i2nn()\n U = i2s()\n d = {S:A, T:B}\n d[U] -= 1\n print(d[A], d[B])\n return\n\nmain()\n", "#!python3.4\n# -*- coding: utf-8 -*-\n# abc154/abc154_a\nimport sys\n\ns2nn = lambda s: [int(c) for c in s.split(' ')]\nss2nn = lambda ss: [int(s) for s in list(ss)]\nss2nnn = lambda ss: [s2nn(s) for s in list(ss)]\ni2s = lambda: sys.stdin.readline().rstrip()\ni2n = lambda: int(i2s())\ni2nn = lambda: s2nn(i2s())\nii2ss = lambda n: [i2s() for _ in range(n)]\nii2nn = lambda n: ss2nn(ii2ss(n))\nii2nnn = lambda n: ss2nnn(ii2ss(n))\n\ndef main():\n S,T = i2s().split()\n A,B = i2nn()\n U = i2s()\n d = {S:A, T:B}\n d[U] -= 1\n print(d[S], d[T])\n return\n\nmain()\n"] | ['Runtime Error', 'Accepted'] | ['s511083984', 's063949412'] | [3064.0, 3064.0] | [17.0, 18.0] | [560, 560] |
p02777 | u114641312 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['import math\n\nimport numpy as np\nimport scipy as scp\nimport sklearn as skl\n\n\ns,t = input().split()\na,b = map(int,input().split())\nu = input()\n\ndic = {s:a,t:b}\n\nif u == s:\n dic[s] -= 1\nelse:\n dic[t] -= 1\n\nprint(dic[s],dic[t])', 'import math\n\nimport numpy as np\nimport scipy as scp\n\n\ns,t = input().split()\na,b = map(int,input().split())\nu = input()\n\ndic = {s:a,t:b}\n\nif u == s:\n dic[s] -= 1\nelse:\n dic[t] -= 1\n\nprint(dic[s],dic[t])'] | ['Runtime Error', 'Accepted'] | ['s782836181', 's519983787'] | [13004.0, 12876.0] | [167.0, 166.0] | [252, 230] |
p02777 | u115877451 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['a,b=map(str,input().split())\nc.d=map(int,input().split())\ne=str(input())\nif a==e:\n print(c-1,d)\nelse:\n print(c,d-1)\n ', 'a,b=map(str,input().split())\nc.d=map(int,input().split())\ne=input()\nif a==e:\n print(c-1,d)\nelse:\n print(c,d-1)\n ', 'a,b=map(str,input().split())\nc.d=map(int,input().split())\ne=input()\nif c==e:\n print(c-1,d)\nelse:\n print(c,d-1)\n ', 'a,b=map(str,input().split())\nc,d=map(int,input().split())\ne=str(input())\nif a==e:\n print(c-1,d)\nelse:\n print(c,d-1)\n '] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s023633383', 's144848367', 's200080604', 's606532581'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [123, 114, 114, 123] |
p02777 | u119947188 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['S,T = map(str,input().split())\nA,B = map(str,input().split())\nU = input()\nif U == S:\n print(A-1 B)\nelse:\n print(A B-1)', 'S,T = map(str,input().split())\nA,B = map(str,input().split())\nU = input()\nif U == S:\n print(A-1,B)\nelse:\n print(A,B-1)', 'S,T = map(str,input().split())\nA,B = map(int,input().split())\nU = input()\nif U == S:\n print(A-1 B)\nelse:\n print(A B-1)', 'S,T = map(str,input().split())\nA,B = map(int,input().split())\nU = input()\nif U == S:\n print(A-1,B)\nelse:\n print(A,B-1)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s008432594', 's190437578', 's743303584', 's029141356'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0, 17.0] | [120, 120, 120, 120] |
p02777 | u121698457 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['print((lambda x:((x[2]-1) if x[4] == x[0] else x[2]),((x[3]-1) if x[4] == x[1] else x[3]) )(input().split()+list(map(int,input().split()))+input()))', "print(' '.join((lambda x:[str((x[2]-1)) if x[4] == x[0] else str(x[2]),str((x[3]-1)) if x[4] == x[1] else str(x[3])])(input().split()+list(map(int,input().split()))+[input()])))"] | ['Runtime Error', 'Accepted'] | ['s969997116', 's303204891'] | [2940.0, 3060.0] | [17.0, 17.0] | [148, 177] |
p02777 | u125799132 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['[H, A] = [int(i) for i in input().split()]\nt = 0\nif H/A != int(H/A):\n t = 1\nprint(int(H/A) + t)', '[S, T] = [str(i) for i in input().split()]\n[A, B] = [int(i) for i in input().split()]\nU = str(input())\n\nif S == U:\n print(A-1, B)\nelse:\n print(A, B-1)'] | ['Runtime Error', 'Accepted'] | ['s511467429', 's890001053'] | [9008.0, 9020.0] | [21.0, 27.0] | [98, 156] |
p02777 | u131464432 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['S,T,U = input().split()\nA,B = map(int,input()split())\nif U == S:\n A -= A\nelse:\n B -= B\nprint(A,B)', 'S,T,A,B,U = input().split()\nA = int(A)\nB = int(B)\nif U == S:\n A -= 1\nelse:\n B -= 1\nprint(A,B)', 'S,T = map(str,input().split())\nA,B = map(int,input().split())\nU = input()\nif S == U:\n A -= 1\nelse:\n B -= 1\nprint(A,B)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s656224661', 's670642648', 's753818184'] | [2940.0, 3060.0, 9164.0] | [17.0, 17.0, 28.0] | [99, 95, 119] |
p02777 | u137226361 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ["s, t = map(str, input().split())\na, b = map(int, input().split())\nu = str(input())\n\nif u==s:\n print('{}, {}' .format(a-1, b))\nelse:\n print('{}, {}'.format(a, b-1))", "s, t = map(str, input().split())\na, b = map(int, input().split())\nu = str(input())\n\nif u==s:\n print('{} {}' .format(a-1, b))\nelse:\n print('{} {}'.format(a, b-1))"] | ['Wrong Answer', 'Accepted'] | ['s560653291', 's061606805'] | [3060.0, 3064.0] | [17.0, 17.0] | [169, 167] |
p02777 | u141410514 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t = input().split()\na,b = map(int,input().split())\nj = input()\nif s == j or t == j:\n print(a+b-1)\nelse:\n print(a+b)', 's,t = input().split()\na,b = map(int,input().split())\nj = input()\nif s == j:\n a -= 1\nelif t == j:\n b -= 1\nprint(a,b)'] | ['Wrong Answer', 'Accepted'] | ['s917888062', 's035651267'] | [2940.0, 2940.0] | [18.0, 17.0] | [119, 117] |
p02777 | u143976525 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t=map(sting,input())\na,b=map(int,input())\nu=map(sting,input())\n\nif s==u:\n print(a-1,b)\nelse\n print(a,b-1)\n\n', 's,t=input().split()\na,b=map(int,input().split())\nu=input().split()\n\nif s==u:\n print(a-1,b)\nelse:\n print(a,b-1)\n\n', 's,t=map(str,input().split())\na,b=map(int,input().split())\nu=input()\n\nif s==u:\n print(a-1,b)\nelif t==u:\n print(a,b-1)\n '] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s325417919', 's345494329', 's758598201'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0] | [115, 118, 121] |
p02777 | u144203608 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['S=input()\nword="S"\nprint(word.replace("S","X")*len(S))', 'S,T=input().split()\nA,B=map(int,input().split())\nU=input()\nif U==S :\n print(A-1,B)\nelse :\n print(A,B-1)'] | ['Wrong Answer', 'Accepted'] | ['s182099863', 's550994479'] | [2940.0, 2940.0] | [17.0, 17.0] | [54, 105] |
p02777 | u149073695 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['color = input()\n\nkosuu = input()\n\ntrashc = input()\n\n_ = 0\n\ncolor = color.split()\nkosuu = kosuu.split()\ntrashc = trashc.split()\n\n\nwhile True:\n if(trashc[0] == color[_]):\n if(int(kosuu[_]) > 0):\n \tanswer = int(kosuu[_]) -1\n \tbreak\n else:\n answer = 0\n break\n \n _= _+1\n \nprint(answer)', 'color = input()\n\nkosuu = input()\n\ntrashc = input()\n\n_ = 0\n\ncolor = color.split()\nkosuu = kosuu.split()\ntrashc = trashc.split()\n\n\nwhile True:\n if(trashc[0] == color[_]):\n kosuu[_] = int(kosuu[_]) -1\n break\n \n _= _+1\n \nprint(kosuu)\n', 'color = input()\n\nkosuu = input()\n\ntrashc = input()\n\n_ = 0\n\ncolor = color.split()\nkosuu = kosuu.split()\ntrashc = trashc.split()\n\n\nwhile True:\n if(trashc[0] == color[_]):\n kosuu[_] = int(kosuu[_]) -1\n break\n \n _= _+1\n \nprint(" ".join(map(str, kosuu)))\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s653175647', 's719992478', 's142679832'] | [3064.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0] | [312, 246, 266] |
p02777 | u150112687 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ["def main():\n\tall,rolls=map(int,input().split())\n\tList=list(map(int,input().split()))\n\n\tsum = 0\n\tsumList =[]\n\n\tfor i in range(all - rolls + 1):\n\t\tsum = 0\n\t\tfor j in range(rolls):\n\t\t\tsum = sum + (List[i + j] + 1) / 2\n\t\tsumList.append(sum)\n\n\tsumList.sort(reverse=True)\n\tprint(sumList[0])\n\nif __name__ == '__main__':\n\tmain()", 'import sys\ninput = sys.stdin.readline\n\nall,rolls=map(int,input().split())\nList=list(map(int,input().split()))\n\nsum = 0\nsumList =[]\n\nfor i in range(all - rolls + 1):\n\tsum = 0\n\tfor j in range(rolls):\n\t\tsum = sum + (List[i + j] + 1) / 2\n\tsumList.append(sum)\n\nsumList.sort(reverse=True)\nprint(sumList[0])', 'all,rolls=map(int,input().split())\nList=list(map(int,input().split()))\n\nsum = 0\nsumList =[]\n\nfor i in range(all - rolls + 1):\n\tsum = 0\n\tfor j in range(rolls):\n\t\tsum = sum + (List[i + j] + 1) / 2\n\tsumList.append(sum)\n\nsumList.sort(reverse=True)\nprint(sumList[0])', 'a,b=input().split()\nc,d=map(int,input().split())\ne=input()\n \nif a==e:\n\tc = c - 1\nelse:\n\td = d - 1\n \nprint(c,d)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s269080675', 's928729929', 's928856164', 's336889140'] | [3068.0, 3064.0, 3064.0, 2940.0] | [17.0, 17.0, 18.0, 17.0] | [320, 300, 261, 110] |
p02777 | u150272898 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['ball1,ball2=map(str,input().split())\nc1,c2=map(int,input().split())\nx=input()\nprint(c1-1,c2 if x==ball1 else c1,c2-1)', 'b1,b2=map(str,input().split())\nc1,c2=map(int,input().split())\nx=input()\nif x==b1:\n\tprint(c1-1,c2)\nelif x==b2:\n\tprint(c1,c2-1)\nelse:\n\tprint(c1,c2)'] | ['Wrong Answer', 'Accepted'] | ['s464046629', 's804577007'] | [2940.0, 2940.0] | [20.0, 17.0] | [117, 145] |
p02777 | u153968927 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['N, K = input().split()\nP = input().split()\nP.sort(reverse=True)\nsum = 0\nfor k in range(int(K)):\n p = int(P[k])\n sum += (p / 2) + 0.5\nprint(sum)\n', 'S, T = input().split()\nA, B = input().split()\nU = input()\n\nans1 = int(A)\nans2 = int(B)\nif S == U:\n ans1 = ans1 - 1\nif T == U:\n ans2 = ans2 - 1\n\nprint(ans1, ans2)\n'] | ['Runtime Error', 'Accepted'] | ['s389824803', 's180203118'] | [3064.0, 2940.0] | [18.0, 17.0] | [146, 164] |
p02777 | u157874153 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nif s == t:\n a -= 1\nelse:\n b -= 1\nprint(str(a) + " " + str(b))', 's, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nif s == u:\n a -= 1\nelse:\n b -= 1\nprint(str(a) + " " + str(b))'] | ['Wrong Answer', 'Accepted'] | ['s493100654', 's494028912'] | [2940.0, 2940.0] | [17.0, 17.0] | [132, 132] |
p02777 | u159369286 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t = map(str,input.split())\na,b = map(int,input.split())\nu = str(input())\nif s == u:\n a -= 1\nif s == u :\n b -= 1\nprint("{0} {1}".format(a,b))', 'S,T = map(str,input.split())\nA,B = map(int,input.split())\nu = str(input())\nif s == u:\n a -= 1\nelse :\n b -= 1\nprint("{0} {1}".format(a,b))', 's,t = map(str,input.split())\na,b = map(int,input.split())\nu = str(input())\nif s == u:\n a -= 1\nelse :\n b -= 1\nprint("{0} {1}".format(a,b))', 's, t = map(str,input.split())\na, b = map(int,input.split())\nu = input()\nif s == u:\n a -= 1\nif t == u:\n b -= 1\nprint("{0} {1}".format(a,b))', 's,t = map(str,input().split())\na,b = map(int,input().split())\nu = str(input())\nif s == u:\n a -= 1\nelif t == u:\n b -= 1\nprint("{0} {1}".format(a,b))'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s522700603', 's614326263', 's648672683', 's711625096', 's608014025'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [148, 143, 143, 144, 153] |
p02777 | u162612857 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s, t = input().split()\na, b = list(map(int, input, split()))\nu = input()\nif u == s:\n print("{} {}".format(a-1, b))\nelse:\n print("{} {}".format(a, b-1))\n', "print('x'*len(input()))", 's, t = input().split()\na, b = list(map(int, input().split()))\nu = input()\nif u == s:\n print("{} {}".format(a-1, b))\nelse:\n print("{} {}".format(a, b-1))\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s635884534', 's847115161', 's940569430'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [158, 23, 159] |
p02777 | u163501259 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s, t = map(str, input().split())\na, b = map(int, input().split())\nu = str(input())\nif u == s:\n a = a-1\nelse :\n b = b-1\n \nprint("{} {}".format(s, t))\nprint("{} {}".format(a,b))', 's, t = map(str, input().split())\na, b = map(int, input().split())\nu = str(input())\nif u == s:\n a = a-1\n \nelse :\n b = b-1\n\nprint("{} {}".format(a,b))'] | ['Wrong Answer', 'Accepted'] | ['s200595626', 's098847390'] | [3060.0, 3060.0] | [19.0, 17.0] | [184, 156] |
p02777 | u165268875 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nprint((A-1, B) if "S"=="U" else (A, B-1))\n', '\nS, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nif "S"=="U":\n print(A-1, B)\nelse :\n print(A, B-1)', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nprint(A-1, B if S==U else A, B-1)\n', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nprint( (A-1,B) if S==U else (A,B-1) )', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nprint(A-1, B if "S"=="U" else A, B-1)\n', '\nS, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nif S==U:\n print(A-1, B)\nelse :\n print(A, B-1)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s218385597', 's280819769', 's282906419', 's470106091', 's879282612', 's489040844'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [111, 125, 103, 106, 107, 121] |
p02777 | u165436807 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t = map(input().split())\na,b = map(int,input().split())\nu = input()\n\nif u == s:\n print((a-1),b)\nelse:\n print(a,(b-1))', 's,t = input().split()\na,b = map(int,input().split())\nu = input()\n\nif u == s:\n print((a-1),b)\nelse:\n print(a,(b-1))\n'] | ['Runtime Error', 'Accepted'] | ['s387971662', 's179941101'] | [3060.0, 2940.0] | [18.0, 17.0] | [121, 117] |
p02777 | u166807268 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nif U == S: A -= 1\nelse: B -= 1\nprint(A, 😎', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nif U == S: A -= 1\nelse: B -= 1\nprint(A)', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nif U == S: A -= 1\nelse: B -= 1\nprint(A,B)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s313958346', 's537741290', 's722378614'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0] | [115, 110, 112] |
p02777 | u170183831 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s, t = input().split()\na, b = map(int, input().split())\nu = input()\nif u == s:\n a -= 1\nif u == s:\n b -= 1\nprint(a, b)\n', 's, t = input().split()\na, b = map(int, input().split())\nu = input()\nif u == s:\n a -= 1\nif u == t:\n b -= 1\nprint(a, b)\n'] | ['Wrong Answer', 'Accepted'] | ['s339510156', 's084701154'] | [2940.0, 2940.0] | [17.0, 17.0] | [120, 120] |
p02777 | u170410075 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['red blue\n5 5\nblue', "s,t=map(str,input().split())\na,b=map(int,input().split())\nu=input()\nif s==u:\n a-=1\nelif t==u:\n b-=1\n\nprint('{} {}'.format(a,b))\n"] | ['Runtime Error', 'Accepted'] | ['s662828518', 's024857128'] | [2940.0, 2940.0] | [17.0, 17.0] | [17, 134] |
p02777 | u174181999 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['N, K = map(int, input().split())\np = list(map(int, input().split()))\n\ns = 0\n\nfor j in range(K):\n s += p[j]\n \nx = s\n\nfor k in range(N - K):\n t = s - p[k] + p[K + k]\n if s <= t:\n x = t\n else:\n pass\n s = t\n\nprint((x + K) / 2)', 'S, T = map(str, input().split())\nA, B = map(int, input().split())\nU = str(input())\n\nif S == U:\n print(A-1, B)\nelse:\n print(A, B-1)'] | ['Runtime Error', 'Accepted'] | ['s033581678', 's949671584'] | [3064.0, 2940.0] | [17.0, 19.0] | [234, 132] |
p02777 | u175590965 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t = map(input().split())\na,b = map(int,input().split())\nu = input()\n\nif s == u:\n print(a-1,b)\nelse:\n print(a,b-1)', 's,t = input().split()\na,b = map(int,input().split())\nu = input()\nif s == u:\n print(a-1,b)\nelse:\n print(a,b-1)'] | ['Runtime Error', 'Accepted'] | ['s940868803', 's820602446'] | [2940.0, 9124.0] | [17.0, 27.0] | [121, 115] |
p02777 | u178110837 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ["s, t = map(str,input().split())\na, b = map(int,input().split())\nu = input()\n\nif s == u:\n a -= a\nelse:\n b -=b\n\nprint(a, b, sep='\\t')\n\n", 'print(S)', 's, t = map(str,input().split())\na, b = map(int,input().split())\nu = input()\n \nif s == u:\n\tprint(a-1, b)\nelse:\n\tprint(a, b-1)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s425791970', 's729799814', 's596330246'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [135, 8, 124] |
p02777 | u178465329 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['a,b=input().split()\nn,m=map(int,input().split())\nc=input()\nif a==c:\n print(a-1,b)\nelse:\n print(a,b-1)', 'a,b=input().split()\nn,m=map(int,input().split())\nc=input()\nif a==c:\n print(n-1,m)\nelse:\n print(n,m-1)'] | ['Runtime Error', 'Accepted'] | ['s893678984', 's450520942'] | [2940.0, 2940.0] | [17.0, 17.0] | [107, 107] |
p02777 | u179335173 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['str1, str2 = input().split()\nnum1, num2 = map(int,input.split())\ntrim = input()\n\nif trim == str1:\n\tnum1 = num1 - 1\nelse:\n \tnum2 = num2 - 1\n\nprint("%d %d",%(num1, num2))\n', 'str1, str2 = input().split()\nnum1, num2 = map(int,input.split())\ntrim = input()\n \nif trim == str1:\n\tnum1 = num1 - 1\nelse:\n \tnum2 = num2 - 1\n \nprint("%d %d",%(num1, num2))', 'num = input()\nlist = list(map(int,input().split()))\nflg = False\nfor i in list:\n if list.count(i) >= 2:\n \tflg = True\n break\nprint("NO") if flg else print("YES")\n', 'str1, str2 = input().split()\nnum1, num2 = map(int,input.split())\ntrim = input()\n \nif trim == str1:\n\tnum1 = num1 - 1\nelse:\n \tnum2 = num2 - 1\n \nprint("%d %d",%(num1, num2))', 'str1, str2 = input().split()\nnum1, num2 = map(int,input().split())\ntrim = input()\n \nif trim == str1:\n\tnum1 = num1 - 1\nelse:\n \tnum2 = num2 - 1\n \nprint("%d %d" %(num1, num2))'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s611239702', 's857412114', 's911811312', 's919247510', 's463151310'] | [2940.0, 2940.0, 3060.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0, 17.0, 17.0] | [170, 171, 166, 171, 174] |
p02777 | u182139295 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['# -*- coding: utf-8 -*-\nimport math\n\n\n#a = int(input())\n\nst = input().split()\nst_list = []\nst_list = [int(st) for st in st]\n\n\na, b = map(int, input().split())\n\n\ns = input()\n\n\n#a,b = map(input().split())\n\nif(str(s) == st_list[0]):\n a = a-1\nelif(str(s) == st_list[1]):\n b = b-1\n\n\nprint(a,b)\n\n', '# -*- coding: utf-8 -*-\n#import math\n\n\n#a = int(input())\n\nst = input().split()\nst_list = []\nst_list = [str(st) for st in st]\n\n\na, b = map(int, input().split())\n\n\ns = input()\n\n\n#a,b = map(input().split())\n\nif(str(s) == st_list[0]):\n a = a-1\nelif(str(s) == st_list[1]):\n b = b-1\n\n\nprint(a,b)\n\n'] | ['Runtime Error', 'Accepted'] | ['s477451491', 's073517050'] | [3060.0, 3060.0] | [18.0, 17.0] | [466, 467] |
p02777 | u183976155 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['N = input()\nA = sorted(list(map(int,input().split())))\nans = "YES"\nfor i in range (1,len(A)):\n if A[i] == A[i-1]:\n ans = "NO"\nprint(ans)', 's = input().split()\na = list(map(int,input().split()))\nU = input()\nif U == s[0]:\n a[0] = a[0] - 1\nelse:\n a[1] = a[1] - 1\nprint(str(a[0])+" "+str(a[1]))'] | ['Wrong Answer', 'Accepted'] | ['s840682469', 's052810007'] | [3060.0, 3060.0] | [17.0, 17.0] | [146, 153] |
p02777 | u184882264 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,b = input().split()\nd = {}\nd[s],d[b] = [int(x) for x in input().split()]\nd[input] -= 1\nprint(d[s],d[b])', 's,b = input().split()\nd = {}\nd[s],d[b] = [int(x) for x in input().split()]\nd[input()] -= 1\nprint(d[s],d[b])'] | ['Runtime Error', 'Accepted'] | ['s286381613', 's279942111'] | [2940.0, 2940.0] | [17.0, 17.0] | [105, 107] |
p02777 | u185405877 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s = input().split()\ni = list(map(int, input().split()))\na=input()\nif a==s[0]:\n i[0]-=1\nelif a==s[1]:\n i[1]-=1\nprint(i)', 's = input().split()\ni = list(map(int, input().split()))\na=input()\nif a==s[0]:\n i[0]-=1\nelif a==s[1]:\n i[1]-=1\nprint(i[0],i[1])'] | ['Wrong Answer', 'Accepted'] | ['s999865596', 's037041609'] | [3064.0, 3060.0] | [17.0, 17.0] | [120, 128] |
p02777 | u185424824 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['N,K = map(int,input().split())\nP = list(map(int, input().split()))\n \nA = 0\nfor i in range(N-K+1):\n B = 0\n for j in range(K):\n B += (1 + P[i+j])/2\n if B > A:\n A = B\n \nprint(A)', 'S,T = map(str,input().split())\nA,B = map(int,input().split())\nU = input()\n\nif U == S:\n A -=1\nelse:\n B -= 1\n\nprint(str(A) +" " + str(B))'] | ['Runtime Error', 'Accepted'] | ['s138565237', 's730813796'] | [2940.0, 3060.0] | [17.0, 32.0] | [187, 137] |
p02777 | u186121428 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['S, T = int, input().split()\nA, B = map(int, input().split())\nU = input()\nans = [A, B]\nif U == S:\n ans[0] = A - 1\nelse:\n ans[1] = B - 1\nprint(" ".join(map(str, ans)))\n', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nans = [A, B]\nif U == S:\n ans[0] = A - 1\nelse:\n ans[1] = B - 1\nprint(" ".join(map(str, ans)))\n'] | ['Wrong Answer', 'Accepted'] | ['s741922206', 's371538038'] | [2940.0, 2940.0] | [17.0, 17.0] | [172, 167] |
p02777 | u187058053 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['n, k = map(int, input().split())\np = list(int(i) for i in input().split())\n\nkitai = list(map(lambda x: (x+1)/2, p))\n\ngokei = 0\n\nfor i in range(n-k+1):\n wa = sum(kitai[i:i+k])\n if gokei < wa:\n gokei = wa\n\nprint(gokei)', 's, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nif s==u:\n a=a-1\nelse:\n b=b-1\n\nprint(a, b)'] | ['Runtime Error', 'Accepted'] | ['s294850152', 's332290717'] | [3060.0, 2940.0] | [17.0, 17.0] | [229, 116] |
p02777 | u190873802 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nif S==U:\n print(A-1)\nelse:\n print(B-1)', 'S, T = map(int, input().split())\nA, B = map(int, input().split())\nU = input()\n\nif S==U:\n print(A-1)\nelse:\n print(B-1)', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\n\nif S==U:\n print(A-1,B)\nelse:\n print(A,B-1)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s141211521', 's182821310', 's540593210'] | [2940.0, 2940.0, 2940.0] | [17.0, 19.0, 17.0] | [113, 123, 117] |
p02777 | u193222738 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ["s = input()\nprint('×' * len(s))", 's, t = map(str, input().split())\na, b = map(int, input().split())\nu = input()\n\nif s == u:\n a -= 1\nelse:\n b -= 1\n\nprint(a, b)'] | ['Wrong Answer', 'Accepted'] | ['s483634572', 's980552749'] | [2940.0, 2940.0] | [17.0, 17.0] | [32, 126] |
p02777 | u195210605 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s, t = map(str, input().split())\na, b = map(int, input().split())\nu = input()\n\nif u == s:\n a = a - 1\nif u == t:\n b = b - 1\n\nprint(a+" "+b)\n', 's, t = map(str, input().split())\na, b = map(int, input().split())\nu = input()\n\nif u == s:\n a = a - 1\nif u == t:\n b = b - 1\n\nprint(str(a)+" "+str(b))'] | ['Runtime Error', 'Accepted'] | ['s304255224', 's907733305'] | [2940.0, 2940.0] | [18.0, 17.0] | [141, 150] |
p02777 | u199677882 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['n, k = map(int, input().split())\np = list(map(int, input().split()))\n\nvalue = 0\nindex = 0\n\nfor i in range(0, k):\n value += p[i]\n\nmax = value\n\nfor i in range(1, n - k + 1):\n value = value - p[i - 1] + p[i + k - 1]\n if value > max:\n max = value\n index = i\n\ntotal = 0\nfor i in range(index, index + k):\n total += p[i] / 2 + 0.5\n\nprint(total)', 's, t = input().split()\na, b = map(int, input().split())\nu = input()\n\nif s == u:\n a -= 1\nelse:\n b -= 1\n\nprint(str(a) + " " + str(b))'] | ['Runtime Error', 'Accepted'] | ['s292417429', 's683873619'] | [3064.0, 2940.0] | [18.0, 17.0] | [363, 137] |
p02777 | u200228637 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s, t = map(input().split())\na, b = map(int, input().split())\nu = input()\n\nif s, t == u:\n print(a + b - 1)\nelse:\n print(a + b)', 's, t = map(input().split())\na, b = map(int, input().split())\nu = input()\nif s == u:\n print(a - 1, b)\nelse:\n print(a, b - 1)', 's, t = map(str, input().split())\na, b = map(int, input().split())\nu = input()\nif s == u:\n print(a - 1, b)\nelse:\n print(a, b - 1)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s180024353', 's409258534', 's577720261'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [127, 125, 130] |
p02777 | u201387466 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['import sys\ninput=sys.stdin.buffer.readline\n#from collections import defaultdict\n\n#import fractions\n#import math\n#import collections\n#from collections import deque\n\n#N = int(input())\n#A = list(map(int,input().split()))\n#S = list(input())\n#S.remove("\\n")\n#N,M = map(int,input().split())\n#S,T = map(str,input().split())\n#A = [int(input()) for _ in range(N)]\n#S = [input() for _ in range(N)]\n#A = [list(map(int,input().split())) for _ in range(N)]\n#import itertools\nS,T = input().split()\nA,B = map(int,input().split())\nU = input()\nif S == U:\n print(A-1,B)\nelse:\n print(A,B-1)', 'a = list(input())\nn = len(a)\nfor i in range(n):\n a[i] = "x"\nl = "".join(a)\nprint(l)', '#import sys\n\n#from collections import defaultdict\n\n#import fractions\n#import math\n#import collections\n#from collections import deque\n\n#N = int(input())\n#A = list(map(int,input().split()))\n#S = list(input())\n#S.remove("\\n")\n#N,M = map(int,input().split())\n#S,T = map(str,input().split())\n#A = [int(input()) for _ in range(N)]\n#S = [input() for _ in range(N)]\n#A = [list(map(int,input().split())) for _ in range(N)]\n#import itertools\nS,T = input().split()\nA,B = map(int,input().split())\nU = input()\nif S == U:\n print(A-1,B)\nelse:\n print(A,B-1)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s054788378', 's149914592', 's918944894'] | [2940.0, 3060.0, 2940.0] | [17.0, 20.0, 17.0] | [629, 84, 631] |
p02777 | u203383537 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t=input().split()\na,b=map(int,input().split())\nu=input().split()\n\nprint(a+b-1)', 's,t=input().split()\na,b=map(int,input().split())\nu=input()\n\nif u==s:\n print(a-1,b)\nelse:\n print(a,b-1)\n'] | ['Wrong Answer', 'Accepted'] | ['s265613908', 's373702116'] | [2940.0, 2940.0] | [17.0, 17.0] | [80, 109] |
p02777 | u204260373 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['A,B=map(int,input().split())\nS,T=map(str,input().split())\nU=input()\nif S==U:\n print(A-1,B)\nelse:\n print(A,B-1)', 'S,T=map(str,input().split())\nA,B=map(int,input().split())\nU=input()\n\nif S==U:\n print(A-1,B)\nelse:\n T==U:\n print(A,B-1)', 'S,T=map(str,input().split())\nA,B=map(int,input().split())\nU=input()\nif S==U:\n print(A-1,B)\nelse:\n print(A,B-1)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s549735639', 's987960732', 's415693410'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [112, 123, 112] |
p02777 | u205087376 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['s,t = map(str,input().split())\na,b = map(int,input().split())\nu = str(input())\nif u == s:\n print(int(a-1) int(b))\nelse:\n print(int(a) int(b-1))', "s,t = map(str,input().split())\na,b = map(int,input().split())\nu = str(input())\nif u == s:\n print('{} {}'.format(a-1,b))\nelse:\n print('{} {}'.format(a,b-1))"] | ['Runtime Error', 'Accepted'] | ['s812091198', 's813150454'] | [2940.0, 3060.0] | [17.0, 17.0] | [145, 157] |
p02777 | u205758185 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['a = input().split()\nc, d = map(int, input().split())\ne = input()\n\nif (e == a): c -= 1\nelse: d -= 1\n\nprint("{}" "{}" "{}".format(c," ",d))\n', 'a = input().split()\nc, d = map(int, input().split())\ne = input()\n\nif (e == a[0]): c -= 1\nelse: d -= 1\n\nprint("{}" "{}" "{}".format(c," ",d))\n'] | ['Wrong Answer', 'Accepted'] | ['s974898380', 's509519404'] | [3060.0, 2940.0] | [20.0, 17.0] | [138, 141] |
p02777 | u212347962 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['N = int(input())\nA = []\nA = input().split()\nans = 1\n\nfor x in range(N):\n for y in range(N):\n if(x == y):\n continue\n if(A[x] == A[y]):\n ans = 0\n break\n\nif(ans == 1):\n print("YES")\nelse:\n print("NO")', 'S, T = map(str,input().split())\nA, B = map(int,input().split())\nU = str(input())\n\nif(S == U):\n A -= 1\nelif(T == U):\n B -= 1\nelse:\n A\n B\n \nprint("{} {}".format(A, B))'] | ['Runtime Error', 'Accepted'] | ['s992540679', 's400743839'] | [3060.0, 3060.0] | [18.0, 17.0] | [253, 180] |
p02777 | u213314609 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['S, a = input(), ""\nfor x in range(len(S)):\n a += "x"\nprint(a)\n', 'S, T = input().split()\nA, B = map(int, input().split())\nU = input()\nif U == S: A -= 1\nelse: B -= 1\nprint(A, B)'] | ['Wrong Answer', 'Accepted'] | ['s422881451', 's342969130'] | [2940.0, 2940.0] | [17.0, 17.0] | [65, 113] |
p02777 | u216888678 | 2,000 | 1,048,576 | We have A balls with the string S written on each of them and B balls with the string T written on each of them. From these balls, Takahashi chooses one with the string U written on it and throws it away. Find the number of balls with the string S and balls with the string T that we have now. | ['S,T=input().split()\n\nA,B=int(input().split())\n\nU=input()\n\nif S==U:\n A=A-1\n\nelif T==U:\n B=B-1\nelse:\n pass\n\nprint(A,B)\n\n\n', 'S,T=input().split()\nA,B=map(int,input().split())\nU=input()\nif S==U:\n print(A-1,B)\nelif T==U:\n print(A,B-1)'] | ['Runtime Error', 'Accepted'] | ['s468799362', 's406380589'] | [2940.0, 2940.0] | [18.0, 18.0] | [128, 112] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.