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
|
---|---|---|---|---|---|---|---|---|---|---|
p03767 | u556160473 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['10\n1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000', "n = int(input())\na = list(map(int, input().split(' ')))\na = sorted(a)\nret = sum(a[n::2])\nprint(ret)"] | ['Runtime Error', 'Accepted'] | ['s850821103', 's851460088'] | [2940.0, 37084.0] | [17.0, 208.0] | [332, 99] |
p03767 | u557437077 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\na = [int(i) for i in input().split()]\n\n\n\n\n\nsum = 0\nfor i in range(n, 2*n):\n sum += a[i]\nprint(sum)\n', 'n = int(input())\na = [int(i) for i in input().split()]\na = list(reversed(sorted(a)))\n\n\n\n\nsum = 0\nfor i in range(2*n):\n if i % 2 == 1:\n sum += a[i]\n # print(a[i])\nprint(sum)\n'] | ['Wrong Answer', 'Accepted'] | ['s797276814', 's125630445'] | [37084.0, 37084.0] | [116.0, 263.0] | [347, 427] |
p03767 | u580920947 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['# -*- coding: utf-8 -*-\n\n\nn = int(input())\na = list(map(int, input().split()))\na = sorted(a, reverse=True)\n\ndef prob_a(n, a):\n ans = 0 \n for i in range(0, 2*n, 2):\n ans += a[i+1]\n return(ans)\n \nprob_a(n=n, a=a)', '# -*- coding: utf-8 -*-\n\n\nn = int(input())\na = list(map(int, input().split()))\na = sorted(a, reverse=True)\n\ndef prob_a(n, a):\n ans = 0 \n for i in range(0, 2*n, 2):\n ans += a[i+1]\n return(ans)\n \nprob_a(n=n, a=a)', '# -*- coding: utf-8 -*-\n\n\nn = int(input())\na = list(map(int, input().split()))\na = sorted(a, reverse=True)\n\ndef prob_a(n, a):\n ans = 0 \n for i in range(0, 2*n, 2):\n ans += a[i+1]\n return(ans)\n \nx = prob_a(n=n, a=a)\nprint(x)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s147400312', 's199182095', 's234323347'] | [37084.0, 39492.0, 39492.0] | [216.0, 214.0, 225.0] | [243, 243, 256] |
p03767 | u594567187 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['num = 3 * int(input())\ntarget = [int(n) for n in input().split(" ")]\ntarget.sort()\nthird = num // 3\nanswer = 0\nprint(target)\nfor i in range(third):\n answer += target[i + third]\nprint(answer)', 'num = 3 * int(input())\ntarget = [int(n) for n in input().split(" ")]\ntarget.sort()\nthird = num // 3\nanswer = 0\ntemp = 0\nfor i in range(third):\n answer += target[num - (2 * (i+1))]\n temp += target[third+i]\n\nprint(max(answer,temp))'] | ['Wrong Answer', 'Accepted'] | ['s956138876', 's979368984'] | [37084.0, 37084.0] | [262.0, 269.0] | [193, 265] |
p03767 | u602860891 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ["def main():\n N = int(input())\n a_list = get_a_list()\n\n a_list.sort(reverse=True)\n\n sum_second_a = 0\n \n a_list = a_list[:int(2*N/3)]\n for i in range(1, int(2*N/3), 2):\n sum_second_a += a_list[i]\n\n print(sum_second_a)\n\ndef get_a_list():\n a_list = []\n strs = input().split()\n\n for a in strs:\n a_list.append(int(a))\n\n return a_list\n\n\nif __name__ == '__main__':\n main()\n", "\ndef main():\n N = int(input())\n a_list = get_a_list()\n\n a_list.sort(reverse=True)\n\n sum_second_a = 0\n \n import pdb; pdb.set_trace()\n while len(a_list) > 0:\n a_list.pop(0)\n sum_second_a += a_list.pop(0)\n a_list.pop(-1)\n\n print(sum_second_a)\n\ndef get_a_list():\n a_list = []\n strs = input().split()\n\n for a in strs:\n a_list.append(int(a))\n\n return a_list\n\n\nif __name__ == '__main__':\n main()\n", "\ndef main():\n N = int(input())\n a_list = get_a_list()\n\n a_list.sort(reverse=True)\n\n sum_second_a = 0\n \n a_list = a_list[:int(2*N/3)]\n for i in range(1, int(2*N/3), 2):\n sum_second_a += a_list[i]\n\n print(sum_second_a)\n\ndef get_a_list():\n a_list = []\n strs = input().split()\n\n for a in strs:\n a_list.append(int(a))\n\n return a_list\n\n\nif __name__ == '__main__':\n main()\n", "\ndef main():\n N = int(input())\n a_list = get_a_list()\n\n a_list.sort(reverse=True)\n\n sum_second_a = 0\n \n a_list = a_list[:2*N]\n for i in range(1, 2*N, 2):\n sum_second_a += a_list[i]\n\n print(sum_second_a)\n\ndef get_a_list():\n a_list = []\n strs = input().split()\n\n for a in strs:\n a_list.append(int(a))\n\n return a_list\n\n\nif __name__ == '__main__':\n main()\n"] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s015576426', 's191448718', 's432850917', 's206582163'] | [37084.0, 37084.0, 39492.0, 37084.0] | [225.0, 262.0, 223.0, 235.0] | [418, 456, 419, 405] |
p03767 | u606043821 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input())\na = list(map(int,input().split()))\n\nA = sorted(a, reverse=True)\nB = []\nans = 0\nB = A[:2*N]\nfor i in range(int(len(B)/2)):\n ans += B[2*i+1]\n\nprint(B)\nprint(int(len(B)/2))\nprint(ans)', 'N = int(input())\na = list(map(int,input().split()))\n\nA = sorted(a, reverse=True)\nB = []\nans = 0\nB = A[:2*N]\nfor i in range(int(len(B)/2)):\n ans += B[2*i+1]\n\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s942306329', 's809370551'] | [39492.0, 37084.0] | [260.0, 238.0] | [200, 170] |
p03767 | u607074939 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input())\na = list(map(int, input().split()))\na.sort(reverse = True)\nans = 0\nif N ==1:\n print(a[1])\nelse:\n for n in range(N):\n ans += a[2*n-1]\n print(ans)', 'N = int(input())\na = list(map(int, input().split()))\na.sort(reverse = True)\nans = 0\nif N ==1:\n print(a[1])\nelse:\n for n in range(N):\n ans += a[2*n+1]\n print(ans)'] | ['Wrong Answer', 'Accepted'] | ['s372827348', 's390351801'] | [37084.0, 37084.0] | [231.0, 221.0] | [177, 177] |
p03767 | u608088992 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['import sys\n\ndef solve():\n input = sys.stdin.readline\n N = int(input())\n A = [int(a) for a in input().split()]\n A.sort(reverse = True)\n ans = 0\n for i in range(N):\n ans += (2 * i + 1)\n print(ans)\n return 0\n\nif __name__ == "__main__":\n solve()', 'import sys\n\ndef solve():\n input = sys.stdin.readline\n N = int(input())\n A = [int(a) for a in input().split()]\n A.sort(reverse = True)\n ans = 0\n for i in range(N):\n ans += A[2 * i + 1]\n print(ans)\n return 0\n\nif __name__ == "__main__":\n solve()'] | ['Wrong Answer', 'Accepted'] | ['s663004224', 's560711473'] | [37084.0, 37084.0] | [218.0, 225.0] | [275, 276] |
p03767 | u608297208 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ["import numpy as np\nN,M = map(int,input().split())\nnodes = [[False]* N for j in range(N)]\nfor m in range(M):\n\ta,b = map(int,input().split())\n\tnodes[a-1][b-1] = True\n\tnodes[b-1][a-1] = True\nmat1 = np.matrix(nodes,dtype=bool)\nmat2 = mat1.copy()\nA = [mat1.tolist()]\nfor i in range(10):\n\tmat2 = mat2.dot(mat1)\n\ta = mat2.tolist()\n\tA.append(a)\n'''\nfor ai,a in enumerate(A):\n\tfor k in a:\n\t\tprint(k)\n\tprint(ai)\n'''\nColour = [0] * N\nQ = int(input())\nfor q in range(Q):\n\tv,d,c = map(int,input().split())\n\tColour[v - 1] = c\n\tif d == 0:\n\t\tcontinue\n\tfor n in range(N):\n\t\tif d == 1 :\n\t\t\tif (not A[0][v - 1][n]):\n\t\t\t\tcontinue\n\t\t\telse:\n\t\t\t\tColour[n] = c\n\t\telse:\n\t\t\tif A[d - 1][v - 1][n] or A[d - 2][v - 1][n] > 0:\n\t\t\t\tColour[n] = c\n\t\nfor C in Colour:\n\tprint(C)\n", 'import numpy as np\nN,M = map(int,input().split())\nnodes = [[False]* N for j in range(N)]\nfor m in range(M):\n\ta,b = map(int,input().split())\n\tnodes[a-1][b-1] = True\n\tnodes[b-1][a-1] = True\nmat1 = np.matrix(nodes,dtype=bool)\nmat2 = mat1.copy()\nA = [mat1.tolist()]\nfor i in range(10):\n\tmat2 = mat2.dot(mat1)\n\ta = mat2.tolist()\n\tA.append(a)\n\nwhite = [i for i in range(N)]\nColour = [0] * N\npaint = []\nQ = int(input())\nfor q in range(Q):\n\tline = list(map(int,input().split()))\n\tpaint.append(line)\nwhite2 = white[:]\npaint.reverse()\nfor p in paint:\n\tv,d,c = p[0],p[1],p[2]\n\tif d == 0 and v - 1 in w:\n\t\tColour[v - 1] = c\n\t\twhite2.remove(v - 1)\n\t\tcontinue\n\telif d == 0:\n\t\tcontinue\n\telse:\n\t\tfor w in white:\n\t\t\tif d == 1:\n\t\t\t\tif not A[0][v - 1][w]:\n\t\t\t\t\tcontinue\n\t\t\t\telse:\n\t\t\t\t\tColour[w] = c\n\t\t\t\t\twhite2.remove(w)\n\t\t\telse:\n\t\t\t\tif A[d - 1][v - 1][w] or A[d - 2][v - 1][w]:\n\t\t\t\t\tColour[w] = c\n\t\t\t\t\twhite2.remove(w)\n\t\tif len(white2) == 0:\n\t\t\tbreak\n\tif v - 1 in white:\n\t\tColour[v - 1] = c\n\t\tif v - 1 in white2:\n\t\t\twhite2.remove(v - 1)\n\twhite = white2[:]\n\nfor C in Colour:\n\tprint(C)', 'N = int(input())\nA = list(map(int,input().split()))\nA.sort()\nA = A[N:]\nB = A[::2]\nprint(sum(B))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s378947166', 's886802575', 's430116104'] | [21336.0, 20792.0, 37084.0] | [311.0, 303.0, 206.0] | [744, 1065, 95] |
p03767 | u627417051 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input())\nl = input().split()\nl.sort()\nl = map(int, l)\nl = list(l)\nS = 0\nfor i in range(N):\n S += l[N + 2 * i]\nprint(l)\nprint(S) ', 'N = int(input())\nl = input().split()\nl = map(int, l)\nl = list(l)\nl.sort()\nS = 0\nfor i in range(N):\n S += l[N + 2 * i]\nprint(S)'] | ['Wrong Answer', 'Accepted'] | ['s175167733', 's235441877'] | [37084.0, 37084.0] | [346.0, 233.0] | [139, 129] |
p03767 | u629350026 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n=int(input())\na=list(map(int,input().split()))\na.sort(reverse=True)\nans=0\nfor i in range(n):\n ans=ans+a[2*i-1]\nprint(ans)', 'n=int(input())\na=list(map(int,input().split()))\na.sort(reverse=True)\nans=0\nfor i in range(n):\n ans=ans+a[2*i+1]\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s224314508', 's947232687'] | [37084.0, 37084.0] | [225.0, 226.0] | [123, 123] |
p03767 | u631238602 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\narr = map(int, input().strip().split())\narr.sort(reverse=True)\nprint(sum(arr[1:2*n:2]))', 'n = int(input())\narr = list(map(int, input().strip().split()))\narr.sort(reverse=True)\nprint(sum(arr[1:2*n:2]))'] | ['Runtime Error', 'Accepted'] | ['s919679686', 's864317719'] | [27612.0, 39492.0] | [49.0, 212.0] | [104, 110] |
p03767 | u633548583 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n=int(input())\na=list(map(int,input().split()))\na.sort()\na.reverse()\n\nif n>=2:\n for i in range(n):\n sum=sum(a[2*i+1])\n \nelse:\n print(a[1])\n', 'n=int(input())\na=list(map(int,input().split()))\na.sort()\na.reverse()\n\n\nfor i in range(n):\n sum=sum(a[2*i+1])\nprint(sum)', 'n=int(input())\na=list(map(int,input().split()))\na.sort()\na.reverse()\n\na_li=a[1:2*n:2]\nprint(sum(a_li))\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s285061747', 's916768560', 's669965797'] | [37084.0, 37084.0, 37084.0] | [201.0, 203.0, 216.0] | [155, 126, 103] |
p03767 | u637289184 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input())\nA = list(map(int, input().split()))\nA.sort(reverse=True)\nprint(A)\nsum=0\nfor i in range(2*N):\n if i%2==1:\n sum+=A[i]\n\nprint(sum)\n', 'N = int(input())\nA = list(map(int, input().split()))\nA.sort(reverse=True)\nsum=0\nfor i in range(2*N):\n if i%2==1:\n sum+=A[i]\n\nprint(sum)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s903528602', 's274358069'] | [42672.0, 42692.0] | [208.0, 163.0] | [155, 147] |
p03767 | u640603056 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['import sys\nN = int(sys.stdin.readline().rstrip())\na = sorted(list(map(int, sys.stdin.readline().rstrip().split())))\nans = 0\nprint(a)\nfor i in range(N*2+1)[N::2]:\n print(i, a[i])\n ans += a[i]\nprint(ans)\n', 'import sys\nN = int(sys.stdin.readline().rstrip())\na = sorted(list(map(int, sys.stdin.readline().rstrip().split())))\nans = 0\nprint(a)\nfor i in range(N*2+1)[N::2]:\n ans += a[i]\nprint(ans)\n', 'import sys\nN = int(sys.stdin.readline().rstrip())\na = sorted(list(map(int, sys.stdin.readline().rstrip().split())), reverse = True)\nans = 0\nfor i in range(N):\n ans += a[2*i+1]\nprint(ans)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s697627253', 's768165155', 's215063291'] | [37084.0, 39492.0, 37084.0] | [311.0, 241.0, 229.0] | [208, 189, 190] |
p03767 | u652081898 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\na = sorted(list(map(int, input().split())), reverse=True)\n\nprint(a[1:n*2:2])', 'n = int(input())\na = sorted(list(map(int, input().split())))\n\nprint(sum(a[1::2]))\n', 'n = int(input())\na = sorted(list(map(int, input().split())), reverse=True)\n\nprint(sum(a[1:n*2:2]))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s803842015', 's906434413', 's580794392'] | [37084.0, 39492.0, 37084.0] | [219.0, 213.0, 205.0] | [93, 82, 98] |
p03767 | u653485478 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\na = list(map(int, input().split()))\n\nsum = 0\na.sort(reverse=True)\n\nfor i in range(1, n+1):\n sum += a[2 * i+1]\n\nprint(sum)\n', 'n = int(input())\na = list(map(int, input().split()))\n\nsum = 0\na.sort()\n\nfor i in range(1, n+1):\n sum += a[-2 * i] \n\nprint(sum)'] | ['Wrong Answer', 'Accepted'] | ['s155759742', 's312521224'] | [37084.0, 37084.0] | [224.0, 221.0] | [142, 132] |
p03767 | u670840762 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\na = input().split()\nb = []\nresult = 0\nfor i in range(n):\n b.append([])\nfor i in range(n * 3):\n a[i] = int(a[i])\na.sort()\n\ncount = 0\nfor i in range(n):\n b[i].append(a[count])\n count += 1\n b[i].append(a[-i-1])\n b[i].append(a[count])\n count += 1\nfor i in range(len(b)):\n result += b[i][1]\nprint(result)\n', 'n = int(input())\na = list(reversed(sorted(map(int, input().split()))))\nprint(sum(a[i * 2 + 1] for i in range(n)))'] | ['Wrong Answer', 'Accepted'] | ['s702596530', 's983197699'] | [36188.0, 37212.0] | [405.0, 227.0] | [341, 113] |
p03767 | u672475305 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\nA = list(map(int,input().split()))\nA.sort()\nA = A[3:]\nres = 0\nfor i in range(n):\n res += A[i*2]\nprint(res)', 'n = int(input())\nA = list(map(int,input().split()))\nA.sort()\nA = A[n:]\nres = 0\nfor i in range(n):\n res += A[i*2]\nprint(res)'] | ['Wrong Answer', 'Accepted'] | ['s868710998', 's853682305'] | [37084.0, 39492.0] | [222.0, 222.0] | [126, 126] |
p03767 | u674588203 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N=int(input())\nai=list(map(int,input().split()))\nai.sort()\nans1=ai[N:]\nans2=ans1[:N]\n\nprint(ans1)\nprint(ans2)\n\nprint(sum(ans2))', 'N=int(input())\nai=list(map(int,input().split()))\n\nans1=ai[N:]\nans2=ans1[:N]\n\nprint(sum(ans2))', 'N=int(input())\nai=list(map(int,input().split()))\nl1=sorted(ai,reverse=True)\n\nl2=l1[1::2]\nans=l2[:N]\nprint(sum(ans))\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s369629304', 's725642202', 's459502457'] | [42824.0, 42592.0, 42764.0] | [175.0, 100.0, 148.0] | [127, 93, 116] |
p03767 | u694649864 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input())\na = input().split()\na_i = [int(s) for s in a]\na_i.sort()\nprint(a_i)\nresult = 0\nfor i in range(N,N + N):\n result += int(a_i[i])\nprint(result)', 'N = int(input())\na = input().split()\na_i = [int(s) for s in a]\na_i.sort()\nprint(a_i)\nresult = 0\nfor i in range(N,N + N):\n result += int(a[i])\nprint(result)', 'N = int(input())\na = input().split()\na_i = [int(s) for s in a]\na_i.sort(reverse=True)\nresult = 0\nfor i in range(1,2 * N,2):\n result += a_i[i]\nprint(result)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s306375366', 's347536270', 's381616781'] | [49984.0, 47704.0, 41156.0] | [276.0, 297.0, 240.0] | [160, 158, 158] |
p03767 | u713914478 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input())\na = [int(i) for i in input().split()]\na.sort()\nans = 0\nfor i in range(1,N+1):\n\tprint(a[-2*i])\n\tans += a[-2*i]\n\nprint(ans)\n\n', 'N = int(input())\na = [int(i) for i in input().split()]\na.sort()\nans = 0\nfor i in range(1,N+1):\n\t#print(a[-2*i])\n\tans += a[-2*i]\n\nprint(ans)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s480325502', 's005918933'] | [41156.0, 37084.0] | [334.0, 233.0] | [140, 141] |
p03767 | u735335967 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\na = list(map(int, input().split()))\na.sort()\na.reverse()\nans = 0\nprint(a)\nfor i in a[1:-n:2]:\n ans += i\nprint(ans)\n', 'n = int(input())\na = list(map(int, input().split()))\na.sort()\na.reverse()\nprint(sum(a[1:-n:2]))\n'] | ['Wrong Answer', 'Accepted'] | ['s670030078', 's580242833'] | [37084.0, 37084.0] | [248.0, 208.0] | [135, 96] |
p03767 | u744034042 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\na = list(map(int, input().split()))\na.sort()\nsum(a[n::2])', 'n = int(input())\na = list(map(int, input().split()))\na.sort()\nprint(sum(a[n::2]))'] | ['Wrong Answer', 'Accepted'] | ['s355443085', 's922638939'] | [37084.0, 37084.0] | [215.0, 213.0] | [74, 81] |
p03767 | u747703115 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\na = list(map(int, input().split()))\na.sort()\nprint(sum(a[::2]))', 'n = int(input())\na = list(map(int, input().split()))\na.sort\nprint(sum(a[::2]))', 'n = int(input())\na = [int(i) for i in input().split()]\na.sort()\nprint(sum(a[n::2]))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s813109782', 's944099638', 's134206915'] | [37084.0, 39492.0, 37084.0] | [211.0, 97.0, 221.0] | [80, 78, 83] |
p03767 | u757584836 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\nv = map(int, input().split())\nv.sort(reverse = True)\ns = 0\nfor i in range(0, n):\n s += v[1+2*i]\nprint(s)', 'n = int(input())\nv = list(map(int, input().split()))\nv.sort(reverse = True)\ns = 0\nfor i in range(0, n):\n s += v[1+2*i]\nprint(s)'] | ['Runtime Error', 'Accepted'] | ['s925318079', 's107539773'] | [27612.0, 39492.0] | [47.0, 223.0] | [122, 128] |
p03767 | u767664985 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input())\na = sorted(list(map(int, input().split())))[::-1]\n\nans = 0\nfor i in range(N):\n ans += a[1+3*i]\n\nprint(ans)\n', 'N = int(input())\na = sorted(list(map(int, input().split())))[::-1]\n\nans = 0\nfor i in range(N):\n ans += a[2*i+1]\n\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s635319148', 's432741374'] | [37084.0, 39492.0] | [234.0, 230.0] | [127, 127] |
p03767 | u776311944 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input())\na = list(map(int, input().split()))\n\ncnt = 0\na.sort(reverse=True)\nprint(a)\n\nfor i in range(1, 2*N, 2):\n cnt += a[i]\n\nprint(cnt)', 'N = int(input())\na = list(map(int, input().split()))\n\ncnt = 0\na.sort(reverse=True)\n\nfor i in range(1, 2*N, 2):\n cnt += a[i]\n\nprint(cnt)'] | ['Wrong Answer', 'Accepted'] | ['s171018588', 's881861162'] | [42684.0, 42612.0] | [179.0, 152.0] | [147, 138] |
p03767 | u777283665 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\na = sorted(list(map(int, input().split())))\nprint(a)\n\nprint(sum(a[n:2*n]))', 'n = int(input())\na = sorted(list(map(int, input().split())))\nprint(sum(a[n::2]))'] | ['Wrong Answer', 'Accepted'] | ['s612844085', 's198126416'] | [39492.0, 37084.0] | [239.0, 212.0] | [91, 80] |
p03767 | u785578220 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['a =int(input())\nx =list(map(int, input().split()))\nx.sort()\ns=0\nfor i in range(0,(a+1)//3,1):\n s+=x[i+1]\nprint(s)\n', 'a =int(input())\nx =list(map(int, input().split()))\nx.sort()\ns=0\nfor i in reversed(range(0,a//3,1):\n s+=x[i+1]\nprint(s)\n', 'a =int(input())\nx =list(map(int, input().split()))\nx.sort()\ns=0\nfor i in reversed(range(1,(a+1)//3,1):\n s+=x[i]\nprint(s)\n', 'a =int(input())\nx =list(map(int, input().split()))\nx.sort()\ns=0\nfor I in reversed(range(1,a//3,1):\n s+=x[i]\nprint(s)', 'a =int(input())\nx =list(map(int, input().split()))\nx.sort()\ns=0\nfor i in range(0,a//3,1):\n s+=x[i+1]\nprint(s)\n', '\na =int(input())\nx =list(map(int, input().split()))\nx.sort()\nx =x[::-1]\ns=0\nfor i in range(1,a//3+1,1):\n s+=x[i]\nprint(s)\n', 'n = int(input())\nA = list(map(int,input().split()))\nA.sort()\n\nprint(sum(A[n:3*n:2]))'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s290521168', 's314420430', 's411158797', 's769085937', 's944069397', 's970968011', 's192326199'] | [39492.0, 2940.0, 2940.0, 2940.0, 37084.0, 37084.0, 37084.0] | [204.0, 18.0, 17.0, 18.0, 219.0, 227.0, 206.0] | [115, 120, 122, 117, 111, 123, 84] |
p03767 | u791527495 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input())\nli = list(map(int,input().split()))\nli.sort(reverse = True)\ntotal = []\nfor i in li[1:3 * N:3]:\n total.append(i)\nprint(sum(total))', 'N = int(input())\nli = list(map(int,input().split()))\nli.sort(reverse = True)\ntotal = []\nfor i in li[1:2 * N:2]:\n total.append(i)\nprint(sum(total))'] | ['Wrong Answer', 'Accepted'] | ['s839832508', 's906932711'] | [37084.0, 37084.0] | [228.0, 221.0] | [147, 147] |
p03767 | u799479335 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input)\n\na_s = input().split()\n\nfor i in ragne(3*N):\n a_s[i] = int(a_s[i])\n \na_s = sorted(a_s)\n\na_1 = a_s[:N]\na_2 = a_s[N:]\n\nans = sum(a_2[0::2])\n\nprint(ans)', 'N = int(input())\n\na_s = input().split()\n\nfor i in ragne(3*N):\n a_s[i] = int(a_s[i])\n \na_s = sorted(a_s)\n\na_1 = a_s[:N]\na_2 = a_s[N:]\n\nans = sum(a_2[0::2])\n\nprint(ans)\n', 'N = int(input())\n\na_s = input().split()\n\nfor i in range(3*N):\n a_s[i] = int(a_s[i])\n \na_s = sorted(a_s)\n\na_1 = a_s[:N]\na_2 = a_s[N:]\n\nans = sum(a_2[0::2])\n\nprint(ans)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s085563197', 's472440967', 's983654836'] | [3060.0, 27612.0, 28508.0] | [17.0, 48.0, 271.0] | [166, 169, 169] |
p03767 | u808373096 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input())\nA = sorted(list(map(int, input().split())))\nprint(A)\nans = 0\nfor i in range(2 * N):\n if i % 2 == 1:\n print(3 * N - i - 1)\n ans += A[3 * N - i - 1]\n\nprint(ans)', 'N = int(input())\nA = sorted(list(map(int, input().split())))[N:]\nprint(A)\nans = 0\nfor i in range(2 * N):\n if i % N == 0:\n ans += A[i]\n\nprint(ans)', 'N = int(input())\nA = sorted(list(map(int, input().split())))\n\nans = 0\nfor i in range(2 * N):\n if i % 2 == 1:\n ans += A[3 * N - i - 1]\n\nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s136075742', 's602414635', 's796672538'] | [37084.0, 37084.0, 37084.0] | [375.0, 249.0, 251.0] | [192, 155, 155] |
p03767 | u817026203 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\nxs = [int(c) for c in input().strip().split()]\nxs.sort(reverse=True)\nans = 0\nfor i in range(n):\n ans += xs[2 * i - 1]\nprint(ans)', 'n = int(input())\nxs = [int(c) for c in input().strip().split()]\n\nans = 0\nfor i in range(n):\n ans += xs[2 * i - 1]\nprint(ans)', 'n = int(input())\nxs = [int(c) for c in input().strip().split()]\nxs.sort(reverse=True)\nans = 0\nfor i in range(n):\n ans += xs[2 * i + 1]\nprint(ans)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s965985047', 's998668040', 's058118661'] | [37084.0, 39492.0, 37084.0] | [267.0, 122.0, 240.0] | [146, 125, 149] |
p03767 | u819135704 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input())\na = list(map(int, input().split()))\n\nprint(sum(a[1:N*2:3]))\n', 'N = int(input())\na = list(map(int, input().split()))\n\nprint(a[1:N*2:3])\n', 'N = int(input())\na = list(map(int, input().split()))\n\na.sort(reverse=True)\nprint(sum(a[1:N*2+1:2]))\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s529811180', 's819678275', 's794131278'] | [42848.0, 42524.0, 42628.0] | [91.0, 96.0, 142.0] | [77, 72, 100] |
p03767 | u819208902 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ["if __name__ == '__main__':\n n = int(input())\n alist = [int(i) for i in input().split()]\n alist.sort(reverse=True)\n print(alist)\n st = 0\n for i in range(n):\n st += alist[2*i+1]\n print(st)\n", "if __name__ == '__main__':\n n = int(input())\n alist = [int(i) for i in input().split()]\n alist.sort(reverse=True)\n st = 0\n for i in range(n):\n st += alist[2*i+1]\n print(st)\n"] | ['Wrong Answer', 'Accepted'] | ['s549108223', 's293276226'] | [37084.0, 37084.0] | [288.0, 244.0] | [215, 198] |
p03767 | u821262411 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N=int(input())\na=list(map(int,input().split()))\nb=sorted(a)\nans1=sum(b[N:2*N])\n\nans2=0\nfor i in range(N):\n ans2 += b[i*3+1]\n\nans3=0\nfor i in range(N):\n ans3 += b[i*2+4]\n\nprint(max(ans1,ans2,ans3))', 'N=int(input())\na=list(map(int,input().split()))\nb=sorted(a)\n\nans3=0\nfor i in range(N):\n ans3 += b[i*2+N]\n\nprint(ans3)\n'] | ['Runtime Error', 'Accepted'] | ['s433934644', 's123530924'] | [39492.0, 37084.0] | [251.0, 231.0] | [202, 121] |
p03767 | u840310460 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input())\na = [int(i) for i in input().split()]\ns_sort = sorted(a, reverse=True)\nscore = 0\nfor i in range(1, 3N, 2):\n score += s_sort[i]\nprint(score)', 'N = int(input())\na = [int(i) for i in input().split()]\ns_sort = sorted(a, reverse=True)\nscore = 0\nfor i in range(1, 3*N, 2):\n score += s_sort[i]\nprint(score)', 'N = int(input())\na = sorted([int(i) for i in input().split()], reverse=True)\n\nans = []\nfor i in range(1, len(a), 2):\n if len(ans) < N:\n ans.append(a[i])\n\nprint(sum(ans))'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s584350005', 's901053573', 's151686303'] | [2940.0, 37084.0, 37084.0] | [17.0, 246.0, 250.0] | [159, 160, 179] |
p03767 | u845937249 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\na = list(map(int,input().split()))\n\na = sorted(a)\n\nans = 0\n\nfor i in range(3,n*3):\n\tif i%2 == 1:\n\t\tans = ans + a[i]\n\t\nprint(ans)\n', 'n = int(input())\na = list(map(int,input().split()))\n\na = sorted(a)\n\nans = 0\n\nfor i in range(n,n*3,2):\n\t\tans = ans + a[i]\n\t\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s494569214', 's558242391'] | [39492.0, 39492.0] | [260.0, 220.0] | [146, 134] |
p03767 | u846694620 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\na = map(int, input().split())\n\na = reversed(sorted(a))\nm = 0\n\nfor i in range(n, 2 * n):\n m += a[i]\n\nprint(m)', 'n = int(input())\na = map(int, input().split())\n\na = sorted(a, reverse=True)\nm = 0\n\nfor i in range(1, 2 * n, 2):\n m += a[i]\n\nprint(m)'] | ['Runtime Error', 'Accepted'] | ['s622289618', 's913636586'] | [37084.0, 37084.0] | [200.0, 218.0] | [128, 135] |
p03767 | u863370423 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['#bin/usr/env python3\n\nN = int(input())\na = input()\nx = 0\nb = []\n\na = a.split()\nfor i in a:\n\tb.append(int(i))\nb.sort()\nfor i in range(N):\n\tx += int(b[2*(i+1)+1])\nprint(x)', '#bin/usr/env python3\n\nN = int(input())\na = input()\nx = 0\nb = []\n\na = a.split()\nfor i in a:\n\tb.append(int(i))\nb.sort()\nfor i in range(N):\n\tc = b[-(2*(i+1))]\n\tx += int(c)\nprint(x)'] | ['Wrong Answer', 'Accepted'] | ['s888560944', 's343297310'] | [37084.0, 37084.0] | [304.0, 291.0] | [169, 177] |
p03767 | u864276028 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input())\nA = list(map(int, input().split()))\nA.sort(reverse=True)\nk = 0\nfor i in range(1, len(A)-N, 2):\n k += A[i]\n print(k)\n', 'N = int(input())\nA = list(map(int, input().split()))\nA.sort(reverse=True)\nk = 0\nfor i in range(1, len(A)-N, 2):\n k += A[i]\nprint(k)'] | ['Wrong Answer', 'Accepted'] | ['s699639813', 's043501143'] | [42772.0, 42604.0] | [188.0, 155.0] | [135, 132] |
p03767 | u867826040 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\na = list(map(int,input().split()))\na.sort(reverse=True)\nx,y=[],[]\nfor i in range(n*3):\n if i%2==0:\n x.append(a[i])\n else:\n y.append(a[i])\nprint(x[1],y[1])', 'n = int(input())\na = list(map(int,input().split()))\na.sort(reverse=True)\nprint(sum(a[1:n*2:2]))'] | ['Wrong Answer', 'Accepted'] | ['s061886292', 's010950242'] | [37212.0, 37084.0] | [276.0, 203.0] | [191, 95] |
p03767 | u898967808 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\na = list(map(int,input().split()))\nprint(sum(sorted(a,reverse=True)[:n*2:2]))', 'n = int(input())\na = list(map(int,input().split()))\nprint(sum(sorted(a,reverse=True)[1:n*2:2]))'] | ['Wrong Answer', 'Accepted'] | ['s691816882', 's398969699'] | [37084.0, 37084.0] | [205.0, 204.0] | [94, 95] |
p03767 | u900538037 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['# -*- coding: UTF-8 -*-\nN = int(input())\nd = list(map(int,input().split(" ")))\nd.sort(reverse = True)\n_ans = []\nfor i in range(N-1):\n _ans.append(d[2*i+1])\nprint(sum(_ans))\n', '# -*- coding: UTF-8 -*-\nN = int(input())\nd = list(map(int,input().split(" ")))\nd.sort(reverse = True)\n_ans = []\nfor i in range(N):\n _ans.append(d[2*i+1])\nprint(sum(_ans))'] | ['Wrong Answer', 'Accepted'] | ['s666942654', 's566343892'] | [37084.0, 37084.0] | [221.0, 226.0] | [176, 173] |
p03767 | u905582793 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n=int(input())\na=list(map(int,input().split()))\na.sort(reverse=True)\nprint(sum(a[1:2*n+2:2]))', 'n=int(input())\na=list(map(int,input().split()))\na.sort(reverse=True)\nprint(sum[1:2*n+2:2])', 'n=int(input())\na=list(map(int,input().split()))\na.sort()\nans=0\nfor i in range(3*n-2,2*n,-2):\n ans+=a[i]\nprint(ans)', 'n=int(input())\na=list(map(int,input().split()))\nans=0\nfor i in range(3*n-2,2*n,-2):\n ans+=a[i]\nprint(ans)', 'n=int(input())\na=list(map(int,input().split()))\na.sort(reverse=True)\nprint(sum(a[1:2*n:2]))'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s464187734', 's530329673', 's675483942', 's837381139', 's465940722'] | [37084.0, 39492.0, 37084.0, 39492.0, 37084.0] | [204.0, 205.0, 213.0, 101.0, 202.0] | [93, 90, 115, 106, 91] |
p03767 | u924308178 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input())\na = list(map(int,input().split(" ")))\na.sort()\nprint(a)\ntotal=0\nfor i in range(N):\n total+=a[len(a)-i-2]\nprint(total)\n', 'N = int(input())\na = list(map(int,input().split(" ")))\na.sort(reverse=True)\n#print(a)\ntotal=0\nfor i in range(1,N+1):\n total+=a[2*i-1]\nprint(total)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s704181323', 's090919582'] | [37084.0, 37084.0] | [268.0, 220.0] | [138, 151] |
p03767 | u934052933 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['from typing import Tuple, List\n\ndef main()->None:\n \n N, x = map(int, input().split())\n a:List[int] = list(map(int, input().split()))\n sorted_a:List[int] = sorted(a) \n count:int = 0 \n for d in sorted_a:\n x -= d\n if x < 0: \n break\n count += 1\n \n \n if x > 0:\n print(count-1)\n else: \n print(count)\n\nif __name__ == "__main__":\n main()', '\n\ndef main()->None:\n \n \n \n N = int(input()) \n a = list(map(int, input().split()))\n sorted_a = sorted(a)\n \n sum_a = 0 \n range_N = range(N)\n for i in range(N):\n sum_a += sorted_a[3*N - 2*i - 2]\n print(sum_a)\n\n\nif __name__ == "__main__":\n main()'] | ['Runtime Error', 'Accepted'] | ['s523279023', 's953125031'] | [2940.0, 37084.0] | [17.0, 224.0] | [871, 482] |
p03767 | u934740772 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N=int(input())\nA=list(map(int,input().split()))\nA.sort()\nAns=0\nfor i in range(N):\n Ans+=A[3*N-1-2*i]\nprint(Ans)', 'N=int(input())\nA=list(map(int,input().split()))\nA.sort()\nAns=0\nfor i in range(N):\n Ans+=A[3*N-2-2*i]\nprint(Ans)'] | ['Wrong Answer', 'Accepted'] | ['s964854746', 's326399733'] | [39492.0, 39492.0] | [230.0, 232.0] | [114, 114] |
p03767 | u941753895 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ["n=int(input())\nl=list(map(int,input().split()))\nif ' '.join([str(x) for x in l])=='5 2 8 5 1 5':\n exit()\nl=sorted(l,key=lambda x:x,reverse=True)\ns=0\nind=1\nwhile True:\n s+=l[ind]\n ind+=2\n if ind>2*n:\n break\nprint(s)", 'n=int(input())\nl=list(map(int,input().split()))\nl=sorted(l,key=lambda x:x,reverse=True)\ns=0\nind=1\nwhile True:\n s+=l[ind]\n ind+=2\n if ind>2*n:\n break\nprint(s)'] | ['Wrong Answer', 'Accepted'] | ['s580567497', 's950723867'] | [40412.0, 37084.0] | [336.0, 270.0] | [221, 163] |
p03767 | u958506960 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\na = sorted(list(map(int, input().split())), reverse=True)\nx = len(a) // n\nl = []\nfor i in range(n):\n for j in range(x):\n ll.append(a[i+j::x-1])\n \nans = 0\nfor i in range(n):\n ans += l[i][1]\nprint(ans)', 'n = int(input())\na = sorted(list(map(int, input().split())), reverse=True)\nx = len(a) // n\nl = []\nfor i in range(n):\n l.append(a[i*x::x-1])\n \nans = 0\nfor i in range(n):\n ans += l[i][1]\nprint(ans)', 'n = int(input())\na = sorted(list(map(int, input().split())), reverse=True)\nx = len(a) // n\nl = []\nfor i in range(n):\n tmp = a[i::x-1]\n l.append(tmp[:x])\n \nans = 0\nfor i in range(n):\n ans += l[i][1]\nprint(ans)\nprint(l)', 'n = int(input())\na = sorted(list(map(int, input().split())), reverse=True)\nx = len(a) // n\nl = []\nfor i in range(n):\n tmp = a[i::x-1]\n l.append(tmp[:x])\n \nans = 0\nfor i in range(n):\n ans += l[i][1]\nprint(ans)\nprint(l)', 'n = int(input())\na = sorted(map(int, input().split()))\nprint(sum(a[n::2]))'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s137213718', 's217289771', 's439421068', 's651045478', 's450256988'] | [37084.0, 1579068.0, 39492.0, 37084.0, 37084.0] | [206.0, 2212.0, 2105.0, 2109.0, 209.0] | [234, 206, 231, 231, 74] |
p03767 | u964521959 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['\nN = int(input())\n\n\nA_list = list(map(int, input().split()))\n\nA_list = list(reversed(sorted(A_list)))\nprint(A_list)\n\n\n\nans = 0\nfor i in range(1,2*N,2):\n #print(i)\n #print(A_list[i])\n ans = ans + A_list[i]\nprint(ans)', '\nN = int(input())\n\n\nA_list = list(map(int, input().split()))\n\nA_list = list(reversed(sorted(A_list)))\n#print(A_list)\n\n\n\nans = 0\nfor i in range(1,2*N,2):\n ans = ans + A_list[i]\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s377653119', 's350733840'] | [39492.0, 37084.0] | [259.0, 229.0] | [284, 253] |
p03767 | u966695411 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['print(sum(sorted(map(int,input().split()))[::-1][1:2*int(input()):2]))', 'N=int(input());print(sum(sorted(map(int,input().split()))[-2:N-1:-2]))'] | ['Runtime Error', 'Accepted'] | ['s339737418', 's612537224'] | [9460.0, 37084.0] | [35.0, 201.0] | [70, 70] |
p03767 | u968649733 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input())\nA = list(map(int, input().split()))\n\nA.sort()\ntotal = 0\nfor i in range(N):\n\ttotal = A[N + 1 + 2*i]\n\nprint(total)', 'N = int(input())\nA = list(map(int, input().split()))\n\nA.sort()\ntotal = 0\nfor i in range(N):\n #print(N + 1 + 2*i)\n total += A[N + 2*i]\n\nprint(total)'] | ['Wrong Answer', 'Accepted'] | ['s706512590', 's444540625'] | [39620.0, 39492.0] | [221.0, 231.0] | [129, 149] |
p03767 | u983181637 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['n = int(input())\n\n\n\n\n# m = [int(input()) for _ in range(N)]\na = list(map(int, input().split()))\n\na.sort()\n\n\nprint(sum(a[::-1][n::2]))', 'n = int(input())\n\n\n\n\n# m = [int(input()) for _ in range(N)]\na = list(map(int, input().split()))\n\na.sort()\n\n\nprint(sum(a[::-1][n-1::2]))', 'n = int(input())\n\n\n\n\n# m = [int(input()) for _ in range(N)]\na = list(map(int, input().split()))\n\na.sort()\n\n\nprint(sum(a[::-1][1:2*n:2]))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s547965723', 's592695180', 's690643685'] | [37084.0, 37084.0, 37084.0] | [214.0, 211.0, 223.0] | [149, 151, 152] |
p03767 | u985443069 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ["\ndef f(n):\n if n == 1:\n return []\n if n % 2 == 0:\n r = f(n//2)\n k = len(r)\n return r + [k+1]\n if n % 2 == 1:\n r = f(n - 1)\n k = len(r)\n return [k+1] + r\n\nn = int(input())\nr = f(n+1)\nk = len(r)\nres = r + list(range(1, k+1))\nprint(len(res))\nfor x in res:\n print(x, end=' ')\nprint()\n\n", 'n = int (input())\na = list(map(int, input().split()))\na.sort()\nres = sum(a[n::2])\nprint(res)'] | ['Wrong Answer', 'Accepted'] | ['s394685037', 's286248632'] | [3064.0, 37084.0] | [18.0, 204.0] | [342, 92] |
p03767 | u993622994 | 2,000 | 262,144 | There are 3N participants in _AtCoder Group Contest_. The _strength_ of the i-th participant is represented by an integer a_i. They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second largest strength among its members. For example, a team of participants of strength 1, 5, 2 has a strength 2, and a team of three participants of strength 3, 2, 3 has a strength 3. Find the maximum possible sum of the strengths of N teams. | ['N = int(input())\na = list(map(int, input().split()))\na.sort()\nscore = 0\n\nfor i in range(1, N*3, 3):\n score += a[i]\n\nprint(score)', 'N = int(input())\na = list(map(int, input().split()))\na.sort()\nscore = 0\n\nfor i in range(N, N*3, 2):\n score += a[i]\n\nprint(score)'] | ['Wrong Answer', 'Accepted'] | ['s450532795', 's388297942'] | [37084.0, 37084.0] | [222.0, 221.0] | [131, 131] |
p03768 | u076936237 | 2,000 | 262,144 | Squid loves painting vertices in graphs. There is a simple undirected graph consisting of N vertices numbered 1 through N, and M edges. Initially, all the vertices are painted in color 0. The i-th edge bidirectionally connects two vertices a_i and b_i. The length of every edge is 1. Squid performed Q operations on this graph. In the i-th operation, he repaints all the vertices within a distance of d_i from vertex v_i, in color c_i. Find the color of each vertex after the Q operations. | ["import numpy as np\n\ndef dp(v, d, c):\n if res[v-1] == 0:\n res[v-1] = c\n\n if d == 0:\n return None\n\n if np.all(res > 0):\n return None\n\n\n\n for e in dic.get(v, []):\n dp(e, d-1, c)\n\n\nN, M = tuple(map(int, input().split(' ')))\n\ndic = {}\n\nfor m in range(M):\n a, b = tuple(map(int, input().split(' ')))\n dic[a] = dic.get(a, []) + [b]\n dic[b] = dic.get(b, []) + [a]\n\nQ = int(input())\n\nvdc = []\n\nfor q in range(Q):\n vdc.append(tuple(map(int, input().split(' '))))\n\nvdc.reverse()\n\nres = np.zeros(N)\n\nfor q in range(Q):\n v, d, c = vdc[q]\n dp(v, d, c)\n\nprint(res)\n", "import numpy as np\n\ndef dp(v, d, c):\n if memo[v-1][d]:\n return\n\n memo[v-1][d] = True\n if d == 0:\n res[v-1] = str(c)\n return\n\n dp(v, d-1, c)\n for e in dic[v-1]:\n dp(e, d-1, c)\n\n\nN, M = [int(e) for e in input().split(' ')]\n\ndic = [[] for _ in range(N)]\nmemo = [[False]*11 for _ in range(N)]\n\nfor m in range(M):\n a, b = [int(e) for e in input().split(' ')]\n dic[a-1].append(b)\n dic[b-1].append(a)\n\nQ = int(input())\n\n\nvdc = [[int(e) for e in input().split(' ')] for _ in range(Q)]\n\nres = ['0']*N\n\n[dp(v, d, c) for v, d, c in vdc[::-1]]\n\n\nprint('\\n'.join(res))\n"] | ['Wrong Answer', 'Accepted'] | ['s138736496', 's326844817'] | [45804.0, 72292.0] | [2110.0, 1955.0] | [608, 608] |
p03768 | u104282757 | 2,000 | 262,144 | Squid loves painting vertices in graphs. There is a simple undirected graph consisting of N vertices numbered 1 through N, and M edges. Initially, all the vertices are painted in color 0. The i-th edge bidirectionally connects two vertices a_i and b_i. The length of every edge is 1. Squid performed Q operations on this graph. In the i-th operation, he repaints all the vertices within a distance of d_i from vertex v_i, in color c_i. Find the color of each vertex after the Q operations. | ['from collections import deque\n\nG = dict()\nN, M = map(int, input().split())\ncolor = [0]*(N+1)\nfor n in range(1, N+1):\n G[n] = []\nfor _ in range(M):\n a, b = map(int, input().split())\n G[a].append(b)\n G[b].append(a)\nQ = int(input())\n\n\n\n\ndata = [list(map(int, input().split())) for _ in range(Q)]\ndata.reverse()\ncolor_d = [-1]*(N+1)\n\nfor v, d, c in data:\n if color_d[v] >= d:\n pass\n # BFS\n deq = deque([v])\n if color[v] != 0:\n color[v] = c\n color_d[v] = d\n while len(deq) > 0:\n s = deq.popleft()\n for t in G[s]:\n if color_d[t] >= color_d[s] - 1:\n pass\n else:\n color_d[t] = color_d[s] - 1\n if color[t] == 0:\n color[t] = c\n if color_d[t] > 0:\n deq.append(t)\n \nfor n in range(1, N+1):\n print(color[n])\n \n\n', 'from collections import deque\n\nG = dict()\nN, M = map(int, input().split())\ncolor = [0]*(N+1)\nfor n in range(1, N+1):\n G[n] = []\nfor _ in range(M):\n a, b = map(int, input().split())\n G[a].append(b)\n G[b].append(a)\nQ = int(input())\n\nfor _ in range(Q):\n v, d, c = map(int, input().split())\n # BFS\n dist = dict()\n deq = deque([v])\n color[v] = c\n dist[v] = 0\n while len(deq) > 0:\n s = deq.popleft()\n if dist[s] >= d:\n break\n for t in G[s]:\n if t in dist.keys()\n pass\n else:\n dist[t] = dist[s] + 1\n color[t] = c\n deq.append(t)\n \nfor n in range(1, N+1):\n print(color[n])\n \n', 'from collections import deque\n\nG = dict()\nN, M = map(int, input().split())\ncolor = [0]*(N+1)\nfor n in range(1, N+1):\n G[n] = []\nfor _ in range(M):\n a, b = map(int, input().split())\n G[a].append(b)\n G[b].append(a)\nQ = int(input())\n\n\n\n\ndata = [list(map(int, input().split())) for _ in range(Q)]\ndata.reverse()\ncolor_d = [-1]*(N+1)\n\nfor v, d, c in data:\n if color_d[v] >= d:\n pass\n # BFS\n deq = deque([v])\n if color[v] == 0:\n color[v] = c\n color_d[v] = d\n while len(deq) > 0:\n s = deq.popleft()\n for t in G[s]:\n if color_d[t] >= color_d[s] - 1:\n pass\n else:\n color_d[t] = color_d[s] - 1\n if color[t] == 0:\n color[t] = c\n if color_d[t] > 0:\n deq.append(t)\n \nfor n in range(1, N+1):\n print(color[n])\n \n\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s062831690', 's281416147', 's872839616'] | [56672.0, 3064.0, 56672.0] | [1687.0, 18.0, 1614.0] | [909, 746, 909] |
p03768 | u226155577 | 2,000 | 262,144 | Squid loves painting vertices in graphs. There is a simple undirected graph consisting of N vertices numbered 1 through N, and M edges. Initially, all the vertices are painted in color 0. The i-th edge bidirectionally connects two vertices a_i and b_i. The length of every edge is 1. Squid performed Q operations on this graph. In the i-th operation, he repaints all the vertices within a distance of d_i from vertex v_i, in color c_i. Find the color of each vertex after the Q operations. | ["N, M = map(int, input().split())\nG = [[] for i in range(N)]\nfor i in range(M):\n a, b = map(int, input().split())\n G[a-1].append(b-1)\n G[b-1].append(a-1)\n\ndp = [{-1: -1} for i in range(N)]\nmark = {}\nQ = int(input())\ncol = [0]*(Q+1)\ncol[-1] = 0\nC = []\nfor i in range(Q):\n v, d, c = map(int, input().split())\n col[i] = c\n C.append((v-1, d))\n\ndef dfs(v, d, idx):\n if d <= max(dp[v]):\n return\n print(v, d, idx)\n dp[v][d] = idx\n if d:\n for w in G[v]:\n dfs(w, d-1, idx)\n\nfor i in range(Q-1, -1, -1):\n v, d = C[i]\n dfs(v, d, i)\nprint(*(col[max(e.values())] for e in dp), sep='\\n')\n", "N, M = map(int, input().split())\nG = [[] for i in range(N)]\nfor i in range(M):\n a, b = map(int, input().split())\n G[a-1].append(b-1)\n G[b-1].append(a-1)\n\ndp = [{-1: -1} for i in range(N)]\nmark = {}\nQ = int(input())\ncol = [0]*(Q+1)\ncol[-1] = 0\nC = []\nfor i in range(Q):\n v, d, c = map(int, input().split())\n col[i] = c\n C.append((v-1, d))\n\ndef dfs(v, d, idx):\n if d <= max(dp[v]):\n return\n dp[v][d] = idx\n if d:\n for w in G[v]:\n dfs(w, d-1, idx)\n\nfor i in range(Q-1, -1, -1):\n v, d = C[i]\n dfs(v, d, i)\nprint(*(col[max(e.values())] for e in dp), sep='\\n')"] | ['Wrong Answer', 'Accepted'] | ['s207113780', 's480981923'] | [84260.0, 80956.0] | [2109.0, 1628.0] | [634, 612] |
p03768 | u340781749 | 2,000 | 262,144 | Squid loves painting vertices in graphs. There is a simple undirected graph consisting of N vertices numbered 1 through N, and M edges. Initially, all the vertices are painted in color 0. The i-th edge bidirectionally connects two vertices a_i and b_i. The length of every edge is 1. Squid performed Q operations on this graph. In the i-th operation, he repaints all the vertices within a distance of d_i from vertex v_i, in color c_i. Find the color of each vertex after the Q operations. | ['from queue import deque\n\n\ndef paint(s, d, c):\n queue = deque([(d, s)])\n while queue:\n remains, v = queue.popleft()\n if painted[v] >= remains:\n continue\n if colors[v] == 0:\n colors[v] = c\n painted[v] = remains\n if remains:\n queue.extend((remains - 1, u) for u in links[v])\n\n\nn, m = map(int, input().split())\nlinks = [None] + [set() for _ in range(n)]\nfor _ in range(m):\n a, b = map(int, input().split())\n links[a].add(b)\n links[b].add(a)\n\nq = int(input())\nqueries = [map(int, input().split()) for _ in range(q)]\ncolors = [0] * (n + 1)\npainted = [0] * (n + 1)\nwhile queries:\n paint(*queries.pop())\n\nfor c in colors[1:]:\n print(c)\n', 'from queue import deque\n\n\ndef paint(s, d, c):\n queue = deque([(d, s)])\n while queue:\n remains, v = queue.popleft()\n if painted[v] >= remains:\n continue\n if colors[v] == 0:\n colors[v] = c\n painted[v] = remains\n if remains:\n queue.extend((remains - 1, u) for u in links[v])\n\n\nn, m = map(int, input().split())\nlinks = [None] + [set() for _ in range(n)]\nfor _ in range(m):\n a, b = map(int, input().split())\n links[a].add(b)\n links[b].add(a)\n\nq = int(input())\nqueries = [map(int, input().split()) for _ in range(q)]\ncolors = [0] * (n + 1)\npainted = [-1] * (n + 1)\nwhile queries:\n paint(*queries.pop())\n\nfor c in colors[1:]:\n print(c)\n'] | ['Wrong Answer', 'Accepted'] | ['s117513878', 's894875296'] | [91472.0, 91472.0] | [1683.0, 1652.0] | [717, 718] |
p03768 | u379559362 | 2,000 | 262,144 | Squid loves painting vertices in graphs. There is a simple undirected graph consisting of N vertices numbered 1 through N, and M edges. Initially, all the vertices are painted in color 0. The i-th edge bidirectionally connects two vertices a_i and b_i. The length of every edge is 1. Squid performed Q operations on this graph. In the i-th operation, he repaints all the vertices within a distance of d_i from vertex v_i, in color c_i. Find the color of each vertex after the Q operations. | ['q = int(input())\nnode_color = [0 for _ in range(n + 1)]\nvdc = [list(map(int, input().split())) for _ in range(q)]\n\nvdc = vdc[::-1]\npainted = set()\nvisited = [[0] * 11 for _ in range(n + 1)]\n\n\ndef dfs(now, dist, color):\n if dist < 0:\n return\n if visited[now][dist]:\n return\n\n visited[now][dist] += 1\n if not node_color[now]:\n node_color[now] = color\n\n for x in node[now]:\n dfs(x, dist - 1, color)\n\n\nfor i in vdc:\n v, d, c = i\n dfs(v, d, c)\n\nfor m in range(n):\n print(node_color[m + 1])\n', 'n, m = map(int, input().split())\nnode = [[] for _ in range(n + 1)]\nfor i in range(m):\n a, b = map(int, input().split())\n node[a].append(b)\n node[b].append(a)\n\nq = int(input())\nnode_color = [0 for _ in range(n + 1)]\nvdc = [list(map(int, input().split())) for _ in range(q)]\n\nvdc = vdc[::-1]\npainted = set()\nvisited = [[0] * 11 for _ in range(n + 1)]\n\n\ndef dfs(now, dist, color):\n if dist < 0:\n return\n if visited[now][dist]:\n return\n\n visited[now][dist] += 1\n if not node_color[now]:\n node_color[now] = color\n\n for x in node[now]:\n dfs(x, dist - 1, color)\n\n\nfor i in vdc:\n v, d, c = i\n dfs(v, d, c)\n\nfor m in range(n):\n print(node_color[m + 1])\n'] | ['Runtime Error', 'Accepted'] | ['s823330118', 's656549878'] | [3064.0, 64224.0] | [17.0, 1836.0] | [537, 705] |
p03768 | u543954314 | 2,000 | 262,144 | Squid loves painting vertices in graphs. There is a simple undirected graph consisting of N vertices numbered 1 through N, and M edges. Initially, all the vertices are painted in color 0. The i-th edge bidirectionally connects two vertices a_i and b_i. The length of every edge is 1. Squid performed Q operations on this graph. In the i-th operation, he repaints all the vertices within a distance of d_i from vertex v_i, in color c_i. Find the color of each vertex after the Q operations. | ["from collections import deque\n\nn, m = map(int, input().split())\nG = [list() for _ in range(n)]\nfor _ in range(m):\n a, b = map(int, input().split())\n a -= 1; b -= 1\n G[a].append(b)\n G[b].append(a)\nQ = int(input())\nqueries = [tuple(map(int, input().split())) for _ in range(Q)][::-1]\ndp = [[Q]*n for _ in range(11)]\nfor i, (v, d, _) in enumerate(queries):\n dp[v-1][d] = i\nfor d in range(10, 0, -1):\n for v in range(n):\n if dp[v][d] < Q:\n dp[v][d-1] = min(dp[v][d-1], dp[v][d])\n for x in G[v]:\n dp[x][d-1] = min(dp[x][d-1], dp[v][d])\nqueries.append((-1, -1, 0))\ncolor = [queries[dp[v][0]][2] for v in range(n)]\nprint(*color, sep='\\n')\n", "from collections import deque\n\nn, m = map(int, input().split())\nG = [list() for _ in range(n)]\nfor _ in range(m):\n a, b = map(int, input().split())\n a -= 1; b -= 1\n G[a].append(b)\n G[b].append(a)\nQ = int(input())\nqueries = [tuple(map(int, input().split())) for _ in range(Q)][::-1]\ndp = [[Q]*n for _ in range(n)]\nfor i, (v, d, _) in enumerate(queries):\n dp[v-1][d] = i\nfor d in range(10, 0, -1):\n for v in range(n):\n if dp[v][d] < Q:\n dp[v][d-1] = min(dp[v][d-1], dp[v][d])\n for x in G[v]:\n dp[x][d-1] = min(dp[x][d-1], dp[v][d])\nqueries.append((-1, -1, 0))\ncolor = [queries[dp[v][0]][2] for v in range(n)]\nprint(*color, sep='\\n')", "import sys\nfrom collections import deque\n\nreadline = sys.stdin.readline\n\nns = lambda: readline().rstrip()\nni = lambda: int(readline().rstrip())\nnm = lambda: map(int, readline().split())\nnl = lambda: list(map(int, readline().split()))\n\ndef solve():\n n, m = nm()\n G = [list() for _ in range(n)]\n for _ in range(m):\n a, b = nm()\n a -= 1; b -= 1\n G[a].append(b)\n G[b].append(a)\n Q = int(input())\n color = [0]*n\n dist = [-1]*n\n queries = [tuple(nm()) for _ in range(Q)][::-1]\n for v, d, c in queries:\n v -= 1\n q = deque()\n q.append((v, d))\n while q:\n v, d = q.popleft()\n if dist[v] >= d:\n continue\n dist[v] = d\n if not color[v]: color[v] = c\n for x in G[v]:\n if d - 1 > dist[x]:\n q.append((x, d-1))\n print(*color, sep='\\n')\n return\n\nsolve()\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s317553841', 's829273071', 's936844723'] | [43740.0, 1747400.0, 43916.0] | [728.0, 2223.0, 841.0] | [658, 656, 818] |
p03768 | u597486843 | 2,000 | 262,144 | Squid loves painting vertices in graphs. There is a simple undirected graph consisting of N vertices numbered 1 through N, and M edges. Initially, all the vertices are painted in color 0. The i-th edge bidirectionally connects two vertices a_i and b_i. The length of every edge is 1. Squid performed Q operations on this graph. In the i-th operation, he repaints all the vertices within a distance of d_i from vertex v_i, in color c_i. Find the color of each vertex after the Q operations. | ['n, m = map(int, input().split())\ng = {}\nused = {i:[False for _ in range(11)] for i in range(n)}\ncolor = [0 for _ in range(n)]\n \nfor _ in range(m):\n u, v = map(int, input().split())\n u-=1\n v-=1\n if u not in g:\n g[u] = []\n if v not in g:\n g[v] = []\n g[u].append(v)\n g[v].append(u)\n \nq = int(input())\nQ = []\n \nfor _ in range(q):\n node, dis, col = map(int, input().split())\n Q.append([node-1, dis, col])\nQ = Q[::-1]\n \ndef bfs(now, dist, col):\n if dist < 0:\n return\n \n if used[now][dist]:\n return\n \n used[now][dist] = True\n \n if not color[now]:\n color[now] = col\n \n\tif now in g:\n \tfor x in g[now]:\n \tbfs(x, dist - 1, col)\n \nfor node, dis, col in Q:\n bfs(node, dis, col)\n\nfor x in color:\n print(x)', "from collections import deque\nimport numpy as np\n\nn, m = map(int, input().split())\ng = {}\nmaxD = np.array([-1 for i in range(n)])\ncolor = np.array([0 for _ in range(n)])\n\nfor _ in range(m):\n u, v = map(int, input().split())\n u-=1\n v-=1\n if u not in g:\n g[u] = []\n if v not in g:\n g[v] = []\n g[u].append(v)\n g[v].append(u)\n \nq = int(input())\nQ = []\n\nfor _ in range(q):\n node, dis, col = map(int, input().split())\n Q.append([node-1, dis, col])\nQ = Q[::-1]\n\ndef bfs(curQ):\n while len(curQ) > 0:\n node, dis, col = curQ.pop()\n \n if maxD[node] > dis:\n continue\n \n if dis < 0:\n continue\n \n maxD[node] = dis\n \n if color[node] == 0:\n color[node] = col\n\n if node in g:\n for v in g[node]:\n if dis-1 > maxD[v]:\n curQ.append([v, dis-1, col])\n \nfor node, dis, col in Q:\n curQ = deque()\n curQ.append([node, dis, col])\n bfs(curQ)\n\nans = ''\nfor x in color:\n ans += str(x)+'\\n'\nprint(ans)", "from collections import deque\n\nn, m = map(int, input().split())\ng = {}\nmaxD = [-1 for i in range(n)]\ncolor = [0 for _ in range(n)]\n\nfor _ in range(m):\n u, v = map(int, input().split())\n u-=1\n v-=1\n if u not in g:\n g[u] = []\n if v not in g:\n g[v] = []\n g[u].append(v)\n g[v].append(u)\n \nq = int(input())\nQ = []\n\nfor _ in range(q):\n node, dis, col = map(int, input().split())\n Q.append([node-1, dis, col])\nQ = Q[::-1]\n\ndef bfs(curQ):\n while len(curQ) > 0:\n node, dis, col = curQ.popleft()\n \n if maxD[node] > dis:\n continue\n \n if dis < 0:\n continue\n \n maxD[node] = dis\n \n if color[node] == 0:\n color[node] = col\n\n if node in g:\n for v in g[node]:\n curQ.append([v, dis-1, col])\n \nfor node, dis, col in Q:\n curQ = deque()\n curQ.append([node, dis, col])\n bfs(curQ)\n\nans = ''\nfor x in color:\n ans += str(x)+'\\n'\nprint(ans) \n", '\nn, m = map(int, input().split())\ng = {}\nused = {i:[False for _ in range(11)] for i in range(n)}\ncolor = [0 for _ in range(n)]\n\nfor _ in range(m):\n u, v = map(int, input().split())\n u-=1\n v-=1\n if u not in g:\n g[u] = []\n if v not in g:\n g[v] = []\n g[u].append(v)\n g[v].append(u)\n \nq = int(input())\nQ = []\n\nfor _ in range(q):\n node, dis, col = map(int, input().split())\n Q.append([node-1, dis, col])\nQ = Q[::-1]\n\nwhile len(Q) > 0:\n node, dis, col = Q.pop(0)\n \n if used[node][dis] == True:\n continue\n \n used[node][dis] = True\n \n if color[node] == 0:\n color[node] = col\n\n if dis > 0:\n if node in g:\n for v in g[node]:\n Q.append([v, dis-1, col])\n \nfor x in color:\n print(x)', "from collections import deque\nimport numpy as np\n\nn, m = map(int, input().split())\ng = {}\nmaxD = np.array([-1 for i in range(n)])\ncolor = np.array([0 for _ in range(n)])\n\nfor _ in range(m):\n u, v = map(int, input().split())\n u-=1\n v-=1\n if u not in g:\n g[u] = []\n if v not in g:\n g[v] = []\n g[u].append(v)\n g[v].append(u)\n \nq = int(input())\nQ = []\n\nfor _ in range(q):\n node, dis, col = map(int, input().split())\n Q.append([node-1, dis, col])\nQ = Q[::-1]\n\ndef bfs(curQ):\n while len(curQ) > 0:\n node, dis, col = curQ.popleft()\n \n if maxD[node] > dis:\n continue\n \n if dis < 0:\n continue\n \n maxD[node] = dis\n \n if color[node] == 0:\n color[node] = col\n\n if node in g:\n for v in g[node]:\n curQ.append([v, dis-1, col])\n \nfor node, dis, col in Q:\n curQ = deque()\n curQ.append([node, dis, col])\n bfs(curQ)\n\nans = ''\nfor x in color:\n ans += str(x)+'\\n'\nprint(ans) \n", "from collections import deque\nimport numpy as np\n\nn, m = map(int, input().split())\ng = {}\nmaxD = np.array([-1 for i in range(n)])\ncolor = np.array([0 for _ in range(n)])\n\nfor _ in range(m):\n u, v = map(int, input().split())\n u-=1\n v-=1\n if u not in g:\n g[u] = []\n if v not in g:\n g[v] = []\n g[u].append(v)\n g[v].append(u)\n \nq = int(input())\nQ = []\n\nfor _ in range(q):\n node, dis, col = map(int, input().split())\n Q.append([node-1, dis, col])\nQ = Q[::-1]\n\ndef bfs(curQ):\n while len(curQ) > 0:\n node, dis, col = curQ.popleft()\n \n if maxD[node] > dis:\n continue\n \n if dis < 0:\n continue\n \n maxD[node] = dis\n \n if color[node] == 0:\n color[node] = col\n\n if node in g:\n for v in g[node]:\n if dis-1 > maxD[v]:\n curQ.append([v, dis-1, col])\n \nfor node, dis, col in Q:\n curQ = deque()\n curQ.append([node, dis, col])\n bfs(curQ)\n\nans = ''\nfor x in color:\n ans += str(x)+'\\n'\nprint(ans)", "from collections import deque\nimport numpy as np\nimport sys\n\nn, m = map(int, input().split())\ng = {}\nmaxD = np.array([-1 for i in range(n)])\ncolor = np.array([0 for _ in range(n)])\n\nfor u, v in (map(int, sys.stdin.readline().split()) for _ in [0]*n):\n u-=1\n v-=1\n if u not in g:\n g[u] = []\n if v not in g:\n g[v] = []\n g[u].append(v)\n g[v].append(u)\n \nq = int(input())\nQ = [list(map(int, l.split())) for l in sys.stdin][::-1]\n\ndef bfs(curQ):\n while len(curQ) > 0:\n node, dis, col = curQ.pop()\n \n if maxD[node] > dis:\n continue\n \n if dis < 0:\n continue\n \n maxD[node] = dis\n \n if color[node] == 0:\n color[node] = col\n\n if node in g:\n for v in g[node]:\n if dis-1 > maxD[v]:\n curQ.append([v, dis-1, col])\n \nfor node, dis, col in Q:\n curQ = deque()\n curQ.append([node-1, dis, col])\n bfs(curQ)\n\nans = ''\nfor x in color:\n ans += str(x)+'\\n'\nprint(ans) \n", 'n, m = map(int, input().split())\ng = {}\nused = {i:[False for _ in range(11)] for i in range(n)}\ncolor = [0 for _ in range(n)]\n\nfor _ in range(m):\n u, v = map(int, input().split())\n u-=1\n v-=1\n if u not in g:\n g[u] = []\n if v not in g:\n g[v] = []\n g[u].append(v)\n g[v].append(u)\n \nq = int(input())\nQ = []\n\nfor _ in range(q):\n node, dis, col = map(int, input().split())\n Q.append([node-1, dis, col])\nQ = Q[::-1]\n\ndef bfs(now, dist, col):\n if dist < 0:\n return\n \n if used[now][dist]:\n return\n \n used[now][dist] = True\n \n if not color[now]:\n color[now] = col\n \n if now in g:\n for x in g[now]:\n bfs(x, dist - 1, col)\n \nfor node, dis, col in Q:\n bfs(node, dis, col)\n\nfor x in color:\n print(x)'] | ['Runtime Error', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Wrong Answer', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Runtime Error', 'Accepted'] | ['s140751034', 's218312514', 's308203658', 's370953669', 's616504730', 's660834796', 's725843396', 's896461120'] | [3064.0, 65080.0, 54744.0, 75984.0, 63360.0, 63360.0, 58496.0, 74360.0] | [17.0, 2111.0, 2108.0, 2108.0, 2111.0, 2112.0, 2112.0, 1965.0] | [812, 1103, 1033, 805, 1072, 1107, 1069, 818] |
p03773 | u005469124 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a = int(input())\nb = int(input())\n\nif (a+b>=24):\n print((a+b)-24)\nelse:\n print(a+b)', 'a, b = map(int, input().split())\n\nA = a+b\nB = A%24\nprint(B)'] | ['Runtime Error', 'Accepted'] | ['s385888151', 's514272119'] | [2940.0, 2940.0] | [18.0, 17.0] | [89, 59] |
p03773 | u007263493 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a,b = map(int,input().split())\nif a + b < 24:\n print(a + b)\n else:\n print(a + b -24)', 'a,b = map(int,input().split())\nif a + b < 24:\n print(a + b)\nelse:\n print(a + b -24)'] | ['Runtime Error', 'Accepted'] | ['s084115174', 's939076913'] | [2940.0, 2940.0] | [17.0, 17.0] | [93, 89] |
p03773 | u007550226 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['A,B = map(int,input().split())\nprint((A+B)//24)', 'print(sum(map(int,input().split()))%24)'] | ['Wrong Answer', 'Accepted'] | ['s772546321', 's669497960'] | [2940.0, 2940.0] | [17.0, 18.0] | [47, 39] |
p03773 | u009102496 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a, b=map(int, input().split())\n2.c=a+b\n3.if c<24:\n4. print (c)\n5.elif c>=24:\n6. print (c-24)\n', 'a, b=map(int, input().split())\nc=a+b\nif c<24:\n print (c)\nelif c>=24:\n print (c-24)\n'] | ['Runtime Error', 'Accepted'] | ['s305490849', 's918142075'] | [2940.0, 2940.0] | [17.0, 17.0] | [95, 85] |
p03773 | u014333473 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['n=sum(list(map(int,input().split())));print(n-24 if n>=4 else n)', 'a,b=map(int,input().split());print((a+b)%24)'] | ['Wrong Answer', 'Accepted'] | ['s546013851', 's975279857'] | [9096.0, 9076.0] | [27.0, 30.0] | [64, 44] |
p03773 | u016323272 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['#ABC057.B\nN,M = map(int,input().split())\nL1 = []\nL2 = []\n\nfor i in range(N):\n a,b = map(int,input().split())\n L1.append([a,b])\nfor m in range(M):\n c,d = map(int,input().split())\n L2.append([c,d])\n\nfor j in range(N):\n L3 = []\n for l in range(M):\n L3.append(abs(L1[j][0]-L2[l][0]) + abs(L1[j][1]-L2[l][1]))\n print(L3.index(min(L3))+1)', '#ABC057.B\nN,M = map(int(input().split()))\nL1 = []\nL2 = []\n\nfor i in range(N):\n a,b = map(int,input().split())\n L1.append([a,b])\nfor m in range(M):\n c,d = map(int,input().split())\n L2.append([c,d])\n\nfor j in range(N):\n L3 = []\n for l in range(M):\n L3.append(abs(L1[j][0]-L2[l][0]) + abs(L1[j][1]-L2[l][1]))\n print(L3.index(min(L3)+1)', '#ABC057.A\nA,B = map(int,input().split())\nif A+B <24:\n print(A+B)\nelse:\n print(A+B-24)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s528965192', 's567142630', 's050742491'] | [3064.0, 3064.0, 2940.0] | [17.0, 18.0, 18.0] | [360, 360, 92] |
p03773 | u017415492 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a,b=map(int,input().split())\n\nif a+b>=23:\n print(a+b)\nelse:\n print(a+b-24)', 'a,b=map(int,input().split())\n\nif a+b<=23:\n print(a+b)\nelse:\n print(a+b-24)'] | ['Wrong Answer', 'Accepted'] | ['s687116548', 's853364502'] | [2940.0, 2940.0] | [17.0, 17.0] | [76, 76] |
p03773 | u019584841 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a,b=map(int,input().split())\nif a+b<24:\n print(a+b)\nelse:\n print(a+b-24', 'a,b=map(int,input().split())\nif a+b<24:\n print(a+b)\nelse:\n print(a+b-24)\n'] | ['Runtime Error', 'Accepted'] | ['s979161677', 's583940943'] | [2940.0, 2940.0] | [17.0, 17.0] | [73, 75] |
p03773 | u030879708 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['import math\nN,A,B=map(int,input().split())\nv=list(map(int,input().split()))\na=v.sort()[-A:]\nprint(sum(a)/A)\nb=v.count(a[0])\nc=a.count(a[0])\nif c!=A:\n print(math.factorial(b)//(math.factorial(c)*math.factorial(b-c)))\nelse:\n l=[]\n i=min([b-c,B-A])\n for k in range(0,i+1):\n l.append(math.factorial(b)//(math.factorial(c+k)*math.factorial(b-c-k)))\n print(sum(l))', 'a,b=map(int,input().split())\nprint((a+b)%24)'] | ['Runtime Error', 'Accepted'] | ['s632941258', 's916137383'] | [3064.0, 2940.0] | [17.0, 17.0] | [380, 44] |
p03773 | u034734062 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['#!/usr/bin/env python3\n# input\nn, m = map(int, input().split())\npersons = []\nchecks = []\nfor i in range(n):\n point = tuple(map(int, input().split()))\n persons.append(point)\nfor i in range(m):\n point = tuple(map(int, input().split()))\n checks.append(point)\n\n# print(persons)\n# print(checks)\n \ndef get_distance(person, check):\n return abs(person[0] - check[0]) + abs(person[1] - check[1])\n \nfor i in range(n):\n min_distance = 10 ** 10\n min_distance_point_num = -1\n\n # calculate min distance from n to each m\n for j in range(m):\n distance = get_distance(persons[i], checks[j])\n if distance < min_distance:\n min_distance = distance\n min_distance_point_num = j + 1\n\n print(min_distance_point_num)\n', '#!/usr/bin/evn python3\n# input\nn, m = map(int, input().split())\npersons = []\nchecks = []\nfor i in range(n):\n point = tuple(map(int, input().split()))\n persons.append(point)\nfor i in range(m):\n point = tuple(map(int, input().split()))\n checks.append(point)\n\n# print(persons)\n# print(checks)\n \ndef get_distance(person, check):\n return abs(person[0] - check[0]) + abs(person[1] - check[1])\n \nfor i in range(n):\n min_distance = 10 ** 10\n min_distance_point_num = -1\n\n # calculate min distance from n to each m\n for j in range(m):\n distance = get_distance(persons[i], checks[j])\n if distance < min_distance:\n min_distance = distance\n min_distance_point_num = j + 1\n\n print(min_distance_point_num)\n', '#!/usr/bin/env python3\na, b = map(int, input().split())\nprint((a+b) % 24)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s751034778', 's885979129', 's480444002'] | [3064.0, 3064.0, 2940.0] | [17.0, 17.0, 17.0] | [764, 764, 74] |
p03773 | u037901699 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['A, B = map(int, input().split())\nprint(A+B -24*((A+B)//24) if A+B > =24 else A+B)', 'A, B = map(int, input().split())\nprint(A+B -24*((A+B)//24) if A+B >=24 else A+B)'] | ['Runtime Error', 'Accepted'] | ['s662580010', 's282478818'] | [2940.0, 2940.0] | [17.0, 17.0] | [81, 80] |
p03773 | u038319219 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['import math\n\ndef C(n, r):\n\tfact = math.factorial\n\treturn fact(n) // fact(r) // fact(n-r)\n\nN, A, B = map(int, input().split())\nv = list(map(int, input().split()))\n\nv_sort = sorted(v, reverse=True)\n\nprint(sum(v_sort[:A])/A)\n\na, b = v_sort.count(v_sort[A-1]), v_sort[:A].count(v_sort[A-1])\n\nif v_sort[0] == v_sort[A-1]:\n\tprint(sum([C(a, r) for r in range(A, min(B, a)+1)]))\nelse:\n\tprint(C(a, b))\n', '# -*- coding: utf-8 -*-\n\nA, B = map(int, input().split())\n\noutput = (A + B)%24\n\nprint(output)'] | ['Runtime Error', 'Accepted'] | ['s546433304', 's385569980'] | [3064.0, 2940.0] | [17.0, 17.0] | [393, 93] |
p03773 | u054556734 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['import math\nn = int(input())\nnn = int(math.sqrt(n))\nwhile n%nn != 0: nn-=1\nans = len(str(n/nn))\nprint(ans)', 'a,b=map(int,input().split())\n\nans = (a+b)%24\n\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s988836139', 's472271137'] | [2940.0, 2940.0] | [17.0, 17.0] | [106, 56] |
p03773 | u059684599 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a,b = map(int, input().split())\nprint(str((a+b)%24)+":00")', 'a,b = map(int, input().split())\nprint((a+b)%24,":00")', 'a,b = map(int, input().split())\nprint((a+b)%24)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s556132049', 's657658757', 's198860609'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [58, 53, 47] |
p03773 | u064408584 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a,b=map(int, input().split())\nprint((a+b)//24)', 'a,b=map(int, input().split())\nprint((a+b)%24)'] | ['Wrong Answer', 'Accepted'] | ['s647440023', 's312805696'] | [2940.0, 2940.0] | [17.0, 17.0] | [46, 45] |
p03773 | u071061942 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['A,B = map(int,input().split())\nans = A + B - 24\nprint(ans)', 'A,B = map(int,input().split())\nif A + B < 24:\n print(A + B)\nelse:\n print(A + B - 24)\n'] | ['Wrong Answer', 'Accepted'] | ['s879211845', 's802684545'] | [2940.0, 2940.0] | [18.0, 18.0] | [58, 87] |
p03773 | u072717685 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['n, m = map(int,input().split())\nstudents = [None]*n\npoints = [None]*m\nstudents[i] = [tuple(map(int, input.split())) for _ in range(n)]\npoints[i] = [tuple(map(int, input.split())) for _ in range(m)]\n\nans = []\nfor s in students:\n tmp = []\n for p in points:\n tmp.append(abs(s[0] - p[0]) + abs(s[1] - p[1]))\n ans.append(tmp.index(min(tmp)) + 1)\nfor i in range(n):\n print(ans[i])\n', 'A, B = map(int, input().split())\nr = (A + B) % 24\nprint(int(r))'] | ['Runtime Error', 'Accepted'] | ['s545741109', 's876851058'] | [3064.0, 2940.0] | [17.0, 19.0] | [382, 63] |
p03773 | u074445770 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a,b=map(int,input().split())\nif a+b≧24:\n print(a+b-24)\nelse:\n print(a+b)', 'a,b=map(int,input().split())\nif (a+b≧24):\n print(a+b-24)\nelse:\n print(a+b)', 'a,b=map(int,input().split())\nif (a+b>=24):\n print(a+b-24)\nelse:\n print(a+b)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s151398230', 's516786371', 's849656250'] | [2940.0, 3188.0, 2940.0] | [18.0, 18.0, 18.0] | [80, 82, 81] |
p03773 | u075303794 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['A,B=map(int,iput().split())\n \nif A+B>=24:\n print(A+B-24)\nelse:\n print(A+B)', 'A,B=map(int,iput().splilt())\n\nif A+B>=24:\n print(A+B-24)\nelse:\n print(A+B)', 'A,B=map(int,input().split())\n \nif A+B>=24:\n print(A+B-24)\nelse:\n print(A+B)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s209740199', 's271574047', 's515116564'] | [8936.0, 9072.0, 9012.0] | [22.0, 24.0, 26.0] | [76, 76, 77] |
p03773 | u076936237 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ["def main():\n A, B = tuple(map(int, raw_input().split(' ')))\n print('{}'.format((A+B)%24))\n\n\nif __name__ == '__main__':\n main()\n", "\ndef main():\n A, B = raw_input()\n print('{}'.format((A+B)%24))\n\n\nif __name__ == '__main__':\n main()\n", "def main():\n A, B = raw_input().split(' ')\n print('{}'.format((A+B)%24))\n\n\nif __name__ == '__main__':\n main()\n", "import math\n\ndef main():\n N, M = tuple(map(int, input().split(' ')))\n man_list = []\n point_list = []\n for i in range(N):\n man_list.append(tuple(map(int, input().split(' '))))\n for i in range(M):\n point_list.append(tuple(map(int, input().split(' '))))\n\n result = []\n for i, man in enumerate(man_list):\n a, b = man\n min_ = float('inf')\n for j, point in enumerate(point_list):\n c, d = point\n v = abs(a-c)+ abs(b-d)\n if len(result) < i+1:\n min_ = v\n result.append(j+1)\n continue\n if v < min_:\n result[i] = j+1\n min_ = v\n\n\n for r in result:\n print('{}'.format(r))\n\n\nif __name__ == '__main__':\n main()\n", "def main():\n A, B = tuple(map(int, input().split(' ')))\n print('{}'.format((A+B)%24))\n\n\nif __name__ == '__main__':\n main()\n"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s380193969', 's414845082', 's504073794', 's956168709', 's775930848'] | [2940.0, 2940.0, 2940.0, 3064.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 18.0] | [136, 109, 119, 784, 132] |
p03773 | u088974156 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a,b=map(int,input().split())\nprint(sum(a+b)%24)', 'print(sum(map(int,input().split()))%24)'] | ['Runtime Error', 'Accepted'] | ['s499984706', 's450362262'] | [2940.0, 2940.0] | [17.0, 17.0] | [47, 39] |
p03773 | u089032001 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a, b = map(int, input().split())\nprint((a + b)//24)', 'a, b = map(int, input().split())\nprint((a + b)%24)'] | ['Wrong Answer', 'Accepted'] | ['s246203195', 's880499606'] | [2940.0, 2940.0] | [18.0, 18.0] | [51, 50] |
p03773 | u089142196 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['A,B=map(int,input().split())\n\nprint((A+B)//24)', 'A,B=map(int,input().split())\n\nprint((A+B)%24)'] | ['Wrong Answer', 'Accepted'] | ['s135304340', 's557756523'] | [2940.0, 2940.0] | [18.0, 17.0] | [46, 45] |
p03773 | u089376182 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['print((int(input())+int(input()))%24)', 'a, b = map(int, input().split())\nprint((a+b)%24)'] | ['Runtime Error', 'Accepted'] | ['s403159489', 's415042397'] | [2940.0, 2940.0] | [17.0, 17.0] | [37, 48] |
p03773 | u102461423 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a,b = map(int,input())\nans = (a+b)%24\nprint(ans)', 'a,b = map(int,input().split())\nans = (a+b)%24\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s241833092', 's148036406'] | [2940.0, 2940.0] | [17.0, 17.0] | [48, 56] |
p03773 | u103099441 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['n, m = map(int, input().split())\ns = []\nd = []\nfor i in range(n):\n x, y = map(int, input().split())\n s.append([x, y])\nfor i in range(m):\n x, y = map(int, input().split())\n d.append([x, y])\nfor i in s:\n a = m\n c = abs(i[0] - d[0][0]) + abs(i[1] - d[1][1])\n for j in range(1, m):\n c_t = abs(i[0] - d[j][0]) + abs(i[1] - d[j][1])\n if c_t < c:\n c = min(c, c_t)\n a = j\n print(a)\n', 'a, b = map(int, input().split())\nif a + b >= 24:\n print(a + b - 24)\nelse:\n print(a + b)'] | ['Runtime Error', 'Accepted'] | ['s373743422', 's562918637'] | [3064.0, 2940.0] | [17.0, 17.0] | [434, 93] |
p03773 | u111365959 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a = sum([int(x) for x in input().split()])\nwhile a < 24:\n a -= 24\nprint(a)', 'a = sum([int(x) for x in input().split()])\nprint(a) if a < 24 else print(a-24)'] | ['Wrong Answer', 'Accepted'] | ['s842574277', 's624165937'] | [2940.0, 2940.0] | [2104.0, 17.0] | [75, 78] |
p03773 | u121732701 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a, b = map(int, input().split())\n \nif A+B>=24:\n print(A+B-24)\nelse:\n print(A+B)\n', '\na, b = map(int, input().split())\n\nif A+B=>24:\n print(A+B-24)\nelse:\n print(A+B)', 'A, B = map(int, input().split())\n \nif A+B>=24:\n print(A+B-24)\nelse:\n print(A+B)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s300611893', 's567528935', 's044181986'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 18.0] | [86, 85, 86] |
p03773 | u124323472 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['n, m = list(map(int, input().split()))\n\na = []\nb = []\n\nfor i in range(n):\n tmp1, tmp2 = list(map(int, input().split()))\n a.append(tmp1)\n b.append(tmp2)\n\nc = []\nd = []\n\nfor i in range(m):\n tmp1, tmp2 = list(map(int, input().split()))\n c.append(tmp1)\n d.append(tmp2)\n\nfor i in range(n):\n tmp = abs(a[n] - c[0]) + abs(b[n] - d[0])\n s = 1\n for j in range(m):\n tmp3 = abs(a[i] - c[j]) + abs(b[i] - d[j])\n if tmp3 < tmp:\n tmp = tmp3\n s = j + 1\n print(s)', 'tmp = input().split()\na, b = int(tmp[0]), int(tmp[1])\n\ns = a + b\n\nif s < 24:\n print(s)\nelse:\n print(s-24)'] | ['Runtime Error', 'Accepted'] | ['s053818268', 's072754521'] | [3064.0, 2940.0] | [17.0, 19.0] | [513, 111] |
p03773 | u131405882 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['import math\nN=int(input())\nnmax = math.floor(math.sqrt(N))\nBdigimin = 10\nfor i in range(1,nmax):\n\tif N % i == 0:\n\t\tBdigi = math.floor(math.log10(N/i))\n\t\tif Bdigimin > Bdigi:\n\t\t\tBdigimin = Bdigi\nprint(int(Bdigimin+1))\n', 'import math\nN=int(input())\nnmax = math.floor(math.sqrt(N))\nBdigimin = 10\nfor i in range(1,nmax):\n\tif N % i == 0:\n\t\tBdigi = math.floor(math.log10(N/i))\n\t\tif Bdigimin > Bdigi:\n\t\t\tBdigimin = Bdigi\nprint(int(Bdigimin+1))\n', 'import math\nN=int(input())\nnmax = math.floor(math.sqrt(N))\nBdigimin = 10\nfor i in range(1,nmax):\n\tif N % i == 0:\n\t\tBdigi = math.floor(math.log10(N/i))\n\t\tif Bdigimin > Bdigi:\n\t\t\tBdigimin = Bdigi\nprint(int(Bdigimin+1))\n', 'import math\nN=int(input())\nif N==1:\n\tprint(1)\nelse:\n\tnmax = math.ceil(math.sqrt(N))\n\tBdigimin = 10\n\tfor i in range(nmax):\n\t\tif N % (i+1) == 0:\n\t\t\tBdigi = math.floor(math.log10(N/(i+1)))\n\t\t\tif Bdigimin > Bdigi:\n\t\t\t\tBdigimin = Bdigi\n\tprint(int(Bdigimin+1))\n', 'import math\nN=int(input())\nnmax = math.floor(math.sqrt(N))\nBdigimin = 10\nfor i in range(1,nmax):\n\tif N % i == 0:\n\t\tBdigi = math.floor(math.log10(N/i))\n\t\tif Bdigimin > Bdigi:\n\t\t\tBdigimin = Bdigi\nprint(int(Bdigimin+1))\n', 'import math\nN=int(input())\nnmax = math.floor(math.sqrt(N))\nBdigimax = 1\nfor i in range(1,nmax):\n\tif N % i == 0:\n\t\tBdigi = math.floor(math.log10(N/i))\n\t\tif Bdigimax < Bdigi:\n\t\t\tBdigimax = Bdigi\nprint(int(Bdigimax))\n\t\t', 'num = list(map(int, input().split()))\na = num[0] + num[1]\nprint(int(a%24))\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s010092095', 's267065796', 's493259176', 's644090292', 's868894673', 's968909513', 's310695120'] | [3316.0, 3316.0, 2940.0, 3060.0, 2940.0, 2940.0, 2940.0] | [20.0, 19.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [217, 217, 217, 255, 217, 216, 75] |
p03773 | u137808818 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a,b = map(int,input().split())\nif a+b =< 23:\n print(a+b)\nelse:\n print(a+b-24)\n', 'a,b = map(int,input().split())\nif a+b <= 23:\n print(a+b)\nelse:\n print(a+b-24)'] | ['Runtime Error', 'Accepted'] | ['s244488198', 's679159947'] | [2940.0, 2940.0] | [17.0, 17.0] | [84, 83] |
p03773 | u138486156 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a, b = map(int, input())\nprint((a+b)%24)', 'a, b = map(int, input().split())\nprint((a+b)%24)'] | ['Runtime Error', 'Accepted'] | ['s171598619', 's529288057'] | [2940.0, 2940.0] | [17.0, 17.0] | [40, 48] |
p03773 | u144029820 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a,b=map(int,inpput().split())\n\nif a+b>24:\n print((a+b)-24)\nelse:\n print(a+b)\n', 'a,b=map(int,input().split())\n\nif a+b>=24:\n print((a+b)-24)\nelse:\n print(a+b)\n'] | ['Runtime Error', 'Accepted'] | ['s357813863', 's161553056'] | [3064.0, 2940.0] | [18.0, 18.0] | [83, 83] |
p03773 | u149991748 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['a, b = input().split()\n\nans = a+b\n\nif ans > 24:\n ans -=24\n\nprint(ans)', 'a, b = map(int, input().split())\n\nans = a+b\n\nif ans > 23:\n ans = ans - 24\n\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s421478964', 's022580991'] | [2940.0, 2940.0] | [18.0, 17.0] | [72, 88] |
p03773 | u166696759 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | [' a, b = map(int, input().split())\nprint((a+b) % 24 )', 'a, b = map(int, input().split())\nprint((a+b) % 24 )'] | ['Runtime Error', 'Accepted'] | ['s102182054', 's783407393'] | [2940.0, 2940.0] | [17.0, 18.0] | [52, 51] |
p03773 | u168416324 | 2,000 | 262,144 | Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as "21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours. When will the contest begin? Answer in 24-hour time. | ['x=sum(list(map(int,input.split())))\nif x>=24:\n x-=24\nprint(x)', 'x=sum(list(map(int,input().split())))\nif x>=24:\n x-=24\nprint(x)\n'] | ['Runtime Error', 'Accepted'] | ['s949125777', 's089975476'] | [9016.0, 9016.0] | [26.0, 29.0] | [62, 65] |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.