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
p02716
u571969099
2,000
1,048,576
Given is an integer sequence A_1, ..., A_N of length N. We will choose exactly \left\lfloor \frac{N}{2} \right\rfloor elements from this sequence so that no two adjacent elements are chosen. Find the maximum possible sum of the chosen elements. Here \lfloor x \rfloor denotes the greatest integer not greater than x.
['n = int(input())\na = [int(i) for i in input().split()]\n\n \nb = a[:4]\ne = [True]*4\n\nfor i in range(1, n // 2):\n c = [0] * 4\n f = [False]*4\n d = -10**24\n for j in range(4):\n if 2 * i + j >= n:\n continue\n if not e[j]:\n continue\n d = max(d, b[j])\n c[j] = d + a[2 * i + j]\n f[j] = True\n e = f.copy()\n b = c.copy()\nans = -10 ** 24\nfor i in range(4):\n if e[i]:\n ans = max(ans, b[i])\nprint(e)\nprint(ans)', 'n = int(input())\na = [int(i) for i in input().split()]\n\nif n // 2 == 1:\n print(max(a))\n exit()\nif n < 20:\n d = a.copy()\n \n for i in range(1, n // 2):\n b = [0] * n\n c = -10 ** 24\n ans = -10 ** 24\n for j in range(i * 2, n):\n c = max(c, a[j - 2])\n b[j] = c + d[j]\n ans = max(ans, c + d[j])\n\n a = b.copy()\n print(ans)\n exit()\n\nb = a[:10]\ne = [True]*10\n\nfor i in range(1, n // 2):\n c = [0] * 10\n f = [False]*10\n d = -10**24\n for j in range(10):\n if 2 * i + j >= n:\n continue\n if not e[j]:\n continue\n d = max(d, b[j])\n c[j] = d + a[2 * i + j]\n f[j] = True\n e = f.copy()\n b = c.copy()\nans = -10 ** 24\nfor i in range(10):\n if e[i]:\n ans = max(ans, b[i])\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s218541871', 's031327888']
[31320.0, 33132.0]
[347.0, 732.0]
[482, 831]
p02716
u572142121
2,000
1,048,576
Given is an integer sequence A_1, ..., A_N of length N. We will choose exactly \left\lfloor \frac{N}{2} \right\rfloor elements from this sequence so that no two adjacent elements are chosen. Find the maximum possible sum of the chosen elements. Here \lfloor x \rfloor denotes the greatest integer not greater than x.
['N=int(input())\nA=list(map(int, input().split()))\nif N==2 or N==3:\n print(max(A))\n exit() \n \ndp=[[0,0,0] for i in range(N)]\ndp[0][0]=A[0]\ndp[1][1]=A[1]\ndp[2][2]=A[2]\nfor i in range(N):\n if i>1:\n dp[i][0]=dp[i-2][0]+A[i]\n if i>2:\n dp[i][1]=max(dp[i-3][0],dp[i-2][1])+A[i]\n if i>3 :\n dp[i][2]=max(dp[i-4][0],dp[i-3][1],dp[i-2][2])+A[i]\nif N%2==1:\n ans=max(dp[-1][2],dp[-2][1],dp[-3][0])\nelse:\n ans=max(dp[-1][2],dp[-2][1])\nprint(ans)', 'N=int(input())\nA=list(map(int, input().split()))\nif N==2:\n print(max(A))\n exit() \n \ndp=[[0,0,0] for i in range(N)]\ndp[0][0]=A[0]\ndp[1][1]=A[1]\ndp[2][2]=A[2]\nfor i in range(N):\n if i>1:\n dp[i][0]=dp[i-2][0]+A[i]\n if i>2:\n dp[i][1]=max(dp[i-3][0],dp[i-2][1])+A[i]\n if i>3 :\n dp[i][2]=max(dp[i-4][0],dp[i-3][1],dp[i-2][2])+A[i]\nif N%2==1:\n ans=max(dp[-1][2],dp[-2][1],dp[-3][0])\nelse:\n ans=max(dp[-1][1],dp[-2][0])\nprint(ans)']
['Wrong Answer', 'Accepted']
['s742913371', 's106685220']
[68244.0, 68072.0]
[363.0, 375.0]
[447, 439]
p02716
u595339868
2,000
1,048,576
Given is an integer sequence A_1, ..., A_N of length N. We will choose exactly \left\lfloor \frac{N}{2} \right\rfloor elements from this sequence so that no two adjacent elements are chosen. Find the maximum possible sum of the chosen elements. Here \lfloor x \rfloor denotes the greatest integer not greater than x.
["def solve(pick, idx, sum):\n\n if pick == 0: \n return sum\n if idx >= n: return -float('inf')\n\n if (pick, idx) in dp: return dp[(pick, idx)]\n\n total = 0\n for i in range(idx, n):\n total = max(total, solve(pick-1, i+2, sum+A[i]))\n\n dp[(pick, idx)] = total\n return total\n\nn = int(input())\nA = list(map(int, input().split()))\ndp = {}\npick = n//2+1\ntotal = -float('inf')\nfor i, val in enumerate(A):\n total = max(total, solve(pick-1, i+2, val))\nprint(total)", "import sys\n\nsys.setrecursionlimit(10 ** 9)\ndef solve(pick, idx):\n\n if pick == 0: return 0\n if idx >= n: return -float('inf')\n if (pick, idx) in dp: return dp[pick, idx]\n if n-idx+2 < pick*2: return -float('inf')\n total = max(A[idx] + solve(pick-1, idx+2), solve(pick, idx+1))\n\n dp[(pick, idx)] = total\n return total\n\nn = int(input())\nA = list(map(int, input().split()))\ndp = {}\npick = n//2\n\nprint(solve(pick, 0))"]
['Runtime Error', 'Accepted']
['s592022520', 's214459856']
[31520.0, 142872.0]
[74.0, 593.0]
[486, 433]
p02716
u600402037
2,000
1,048,576
Given is an integer sequence A_1, ..., A_N of length N. We will choose exactly \left\lfloor \frac{N}{2} \right\rfloor elements from this sequence so that no two adjacent elements are chosen. Find the maximum possible sum of the chosen elements. Here \lfloor x \rfloor denotes the greatest integer not greater than x.
['# coding: utf-8\nimport sys\nfrom functools import lru_cache\nsys.setrecursionlimit(10 ** 9)\n\nsr = lambda: sys.stdin.readline().rstrip()\nir = lambda: int(sr())\nlr = lambda: list(map(int, sr().split()))\n\nN = ir()\nA = lr()\n\nINF = 10 ** 17\n\n@lru_cache(None)\ndef F(index, n):\n if index >= N:\n return -INF\n if N - index < 2 * n:\n return -INF\n if n == 0:\n return 0\n elif n == 1:\n return max(A[index:])\n ret = max(A[index] + F(index+2, n-1), F(index+1, n))\n return ret\n\nanswer = F(0, N//2)\nprint(answer)\n', '# coding: utf-8\nimport sys\nfrom functools import lru_cache\nsys.setrecursionlimit(10 ** 7)\n\nN = int(input())\nA = list(map(int, input().split()))\nINF = 10 ** 17\n\n@lru_cache(None)\ndef F(index, n):\n \n if index >= N: \n return -INF\n if N - index < 2 * n - 1: \n return -INF\n if n == 0:\n return 0\n elif n == 1:\n return max(A[index:])\n ret = max(A[index] + F(index+2, n-1), F(index+1, n))\n return ret\n\nanswer = F(0, N//2)\nprint(answer)\n']
['Wrong Answer', 'Accepted']
['s579514119', 's830200875']
[158324.0, 173732.0]
[364.0, 467.0]
[620, 543]
p02716
u686230543
2,000
1,048,576
Given is an integer sequence A_1, ..., A_N of length N. We will choose exactly \left\lfloor \frac{N}{2} \right\rfloor elements from this sequence so that no two adjacent elements are chosen. Find the maximum possible sum of the chosen elements. Here \lfloor x \rfloor denotes the greatest integer not greater than x.
['import numpy as np\n\nn = int(input())\na = np.array(input().split(), dtype=np.int)\n\nif n % 2 == 0:\n print(max(a[::2].sum(), a[1::2].sum()))\nelse:\n half = n // 2\n dp = a[:3]\n for i in range(half - 1):\n index_ = 2 * i + 2\n dp[:] = (\n dp[0] + a[index_],\n max(dp[0] + a[index_ + 1], dp[1] + a[index_ + 1]),\n max(dp[0] + a[index_ + 2], dp[1] + a[index_ + 2], dp[2] + a[index_ + 2])\n )\n print(dp.max())', 'import numpy as np\n\nn = int(input())\na = np.array(input().split(), dtype=np.int)\n\nif n % 2 == 0:\n print(max(a[::2].sum(), a[1::2].sum()))\nelse:\n dp = a[:3]\n for i in range(1, n // 2):\n dp = dp[0] + a[2*i], dp[:2].max() + a[2*i+1], dp.max() + a[2*i+2]\n print(dp.max())', 'import numpy as np\n\nn = int(input())\na = np.array(input().split(), dtype=np.int)\n\nif n % 2 == 0:\n print(max(a[::2].sum(), a[1::2].sum()))\nelse:\n half = n // 2\n dp = a[:3]\n for i in range(half - 1):\n index_ = 2 * i + 2\n dp[0] += a[index_]\n dp[1] = max(dp[0] + a[index_ + 1], dp[1] + a[index_ + 1])\n dp[2] = max(dp[0] + a[index_ + 2], dp[1] + a[index_ + 2], dp[2] + a[index_ + 2])\n print(dp.max())', 'n = int(input())\na = list(map(int, input().split()))\n\nif n % 2 == 0:\n dp = a[:2]\n for i in range(1, n // 2):\n dp = dp[0] + a[2*i], max(dp) + a[2*i+1]\nelse:\n dp = a[:3]\n for i in range(1, n // 2):\n dp = dp[0] + a[2*i], max(dp[:2]) + a[2*i+1], max(dp) + a[2*i+2]\n\nprint(max(dp))']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s193954847', 's457627414', 's534531183', 's411207673']
[54084.0, 54336.0, 54328.0, 31544.0]
[493.0, 158.0, 432.0, 142.0]
[423, 274, 412, 286]
p02716
u707124227
2,000
1,048,576
Given is an integer sequence A_1, ..., A_N of length N. We will choose exactly \left\lfloor \frac{N}{2} \right\rfloor elements from this sequence so that no two adjacent elements are chosen. Find the maximum possible sum of the chosen elements. Here \lfloor x \rfloor denotes the greatest integer not greater than x.
['import numpy as np\nn=int(input())\na=list(map(int,input().split()))\n\n\ndp=np.full((n+1,n+1),-1e+9)\ndp[1,1]=a[0]\nfor i in range(2,n+1): \n for j in range(i//2-1,(i+1)//2+1):\n dp[i,j]=max(dp[i-2,j-1]+a[i-1],dp[i-1,j])\nprint(int(dp[n,n//2]))', 'n=int(input())\na=list(map(int,input().split()))\nimport numpy as np\ndp=np.full((3,n+1),-pow(10,15))\ndp[:,0]=0\ndp[1,1]=a[0]\nfor i in range(2,n+1):\n #l,r=max(1,n//2-(n-i+1)//2),(i+1)//2+1\n l,r=max(1,i//2-1),(i+1)//2+1\n if i%3==2:\n now,pre,prepre=2,1,0\n elif i%3==0:\n now,pre,prepre=0,2,1\n elif i%3==1:\n now,pre,prepre=1,0,2\n dp[now,l:r]=np.maximum(dp[pre,l:r],dp[prepre,l-1:r-1]+a[i-1])\nprint(dp[now,n//2])']
['Runtime Error', 'Accepted']
['s136154265', 's287663063']
[50752.0, 39492.0]
[159.0, 809.0]
[402, 442]
p02716
u708019102
2,000
1,048,576
Given is an integer sequence A_1, ..., A_N of length N. We will choose exactly \left\lfloor \frac{N}{2} \right\rfloor elements from this sequence so that no two adjacent elements are chosen. Find the maximum possible sum of the chosen elements. Here \lfloor x \rfloor denotes the greatest integer not greater than x.
['N,K = [int(x) for x in input().split()]\ncount = [0]*(K+1)\nans = 0\nmod = 1000000007\nfor i in range(K,0,-1):\n kosuu = pow(K//i,N,mod)\n if K // i >= 2:\n for j in range(K//i,1,-1):\n kosuu -= count[j*i]\n ans += i*kosuu\n count[i] = kosuu\nprint(ans%mod)', 'import sys\nsys.setrecursionlimit(2000000000)\nN = int(input())\nimport math\nl = [int(x) for x in input().split()]\ntobi = [0]*(math.ceil(N/2))\ntobi[0] = l[0]\nfor i in range(1,math.ceil(N/2)):\n tobi[i] = tobi[i-1] + l[i*2]\nfrom functools import lru_cache\n@lru_cache(maxsize=1000000000)\ndef motomeru(x,y):\n if y == 0 or x == 0 or x == 1:\n return 0\n elif x % 2 == 0:\n return max(motomeru(x-2,y-1)+l[x-1],tobi[math.floor((x-1)/2)])\n else:\n return max(motomeru(x-2,y-1)+l[x-1],motomeru(x-1,y))\nprint(motomeru(N,N//2))']
['Runtime Error', 'Accepted']
['s638288575', 's724278296']
[9152.0, 164912.0]
[24.0, 415.0]
[276, 542]
p02716
u712284046
2,000
1,048,576
Given is an integer sequence A_1, ..., A_N of length N. We will choose exactly \left\lfloor \frac{N}{2} \right\rfloor elements from this sequence so that no two adjacent elements are chosen. Find the maximum possible sum of the chosen elements. Here \lfloor x \rfloor denotes the greatest integer not greater than x.
['N = int(input())\nA = list(map(int, input().split()))\n\nDP_odd = [0, 0, A[0]]\nDP_even = [0, max(A[0], A[1])]\n\nif N >= 3:\n DP_odd = [DP_even[0], max(DP_odd[1] + A[i], DP_even[1]), DP_odd[2] + A[2]]\n\nfor i in range(3, N):\n if (i + 1) % 2 == 1: \n DP_odd = [max(DP_odd[0] + A[i], DP_even[0]), max(DP_odd[1] + A[i], DP_even[1]), DP_odd[2] + A[i]]\n print(DP_odd)\n else:\n DP_even = [max(DP_even[0] + A[i], DP_odd[1]), max(DP_even[1] + A[i], DP_odd[2])]\n print(DP_even)\n\nif N % 2 == 1:\n ans = DP_odd[1]\nelse:\n ans = DP_even[1]\n\nprint(ans)', 'N = int(input())\nA = list(map(int, input().split()))\n\nDP_odd = [0, A[0]]\nDP_even = [0, max(A[0], A[1])]\n\nfor i in range(2, N):\n if (i + 1) % 2 == 1: \n DP_odd = [max(DP_odd[0] + A[i], DP_even[1]), DP_odd[1] + A[i]]\n else:\n DP_even = [max(DP_even[0] + A[i], DP_odd[0]), max(DP_even[1] + A[i], DP_odd[1])]\n\nif N % 2 == 1:\n ans = DP_odd[0]\nelse:\n ans = DP_even[1]\n\nprint(ans)']
['Runtime Error', 'Accepted']
['s599301540', 's636873814']
[31768.0, 31624.0]
[64.0, 173.0]
[574, 400]
p02716
u722148122
2,000
1,048,576
Given is an integer sequence A_1, ..., A_N of length N. We will choose exactly \left\lfloor \frac{N}{2} \right\rfloor elements from this sequence so that no two adjacent elements are chosen. Find the maximum possible sum of the chosen elements. Here \lfloor x \rfloor denotes the greatest integer not greater than x.
['from collections import defaultdict, Counter\nfrom heapq import heapify, heappop, heappush\nfrom sys import stdin\n\n\ndef main():\n n = int(input())\n a = [int(x) for x in input().split()]\n if n % 2 == 0:\n v = [[None for j in range(2)] for i in range(n)]\n v[0][0] = a[0]\n v[1][1] = a[1]\n for i in range(2, n):\n for j in range(2):\n c = []\n if v[i-2][j] is not None:\n c.append(v[i-2][j])\n if j >= 1 and i >= 3:\n if v[i-3][j-1] is not None:\n c.append(v[i-3][j-1])\n if len(c) == 0:\n continue\n v[i][j] = max(c) + a[i]\n c = [v[n-1][j] for j in range(2)]\n print(max(c))\n else:\n v = [[None for j in range(3)] for i in range(n)]\n v[0][0] = a[0]\n v[1][1] = a[1]\n v[2][0] = a[0]+a[2]\n v[2][2] = a[2]\n for i in range(3, n):\n for j in range(3):\n c = []\n if v[i-2][j] is not None:\n c.append(v[i-2][j])\n if j >= 1:\n if v[i-3][j-1] is not None:\n c.append(v[i-3][j-1])\n if j >= 2 and i >= 4:\n if v[i-4][j-2] is not None:\n c.append(v[i-4][j-2])\n if len(c) == 0:\n continue\n v[i][j] = max(c) + a[i]\n c = [v[n-1][j] for j in range(3) if v[n-1][j] is not None]\n print(max(c))\n\n\ndef input(): return stdin.readline().rstrip()\n\n\nmain()\n', 'from collections import defaultdict, Counter\nfrom heapq import heapify, heappop, heappush\nfrom sys import stdin\n\n\ndef main():\n n = int(input())\n a = [int(x) for x in input().split()]\n if n % 2 == 0:\n if n == 2:\n print(max(a))\n return\n v = [[None for j in range(2)] for i in range(n)]\n v[0][0] = a[0]\n v[1][1] = a[1]\n for i in range(2, n):\n for j in range(2):\n c = []\n if v[i-2][j] is not None:\n c.append(v[i-2][j])\n if j >= 1 and i >= 3:\n if v[i-3][j-1] is not None:\n c.append(v[i-3][j-1])\n if len(c) == 0:\n continue\n v[i][j] = max(c) + a[i]\n c = [v[n-1][j] for j in range(2) if v[n-1][j] is not None]\n print(max(c))\n else:\n if n == 3:\n print(max(a))\n return\n v = [[None for j in range(3)] for i in range(n)]\n v[0][0] = a[0]\n v[1][1] = a[1]\n v[2][0] = a[0]+a[2]\n v[2][2] = a[2]\n for i in range(3, n):\n for j in range(3):\n c = []\n if v[i-2][j] is not None:\n c.append(v[i-2][j])\n if j >= 1:\n if v[i-3][j-1] is not None:\n c.append(v[i-3][j-1])\n if j >= 2 and i >= 4:\n if v[i-4][j-2] is not None:\n c.append(v[i-4][j-2])\n if len(c) == 0:\n continue\n v[i][j] = max(c) + a[i]\n c = [v[n-1][j] for j in range(1, 3) if v[n-1][j] is not None]\n print(max(c))\n\n\ndef input(): return stdin.readline().rstrip()\n\n\nmain()\n']
['Runtime Error', 'Accepted']
['s906237633', 's002912999']
[53988.0, 54188.0]
[530.0, 520.0]
[1604, 1760]
p02716
u836311327
2,000
1,048,576
Given is an integer sequence A_1, ..., A_N of length N. We will choose exactly \left\lfloor \frac{N}{2} \right\rfloor elements from this sequence so that no two adjacent elements are chosen. Find the maximum possible sum of the chosen elements. Here \lfloor x \rfloor denotes the greatest integer not greater than x.
["import sys\nimport numpy as np\ndef input(): return sys.stdin.readline().rstrip()\n\ndef odd(A):\n oddi=np.array(A[::2],dtype=np.int64)\n eveni=np.array(A[1::2],dtype=np.int64)\n left=np.cumsum(oddi[:-1]-eveni)\n left=np.insert(left,0,0)\n left=np.append(left,0)\n right=np.cumsum(oddi[:0:-1]-eveni[::-1])[::-1]\n right=np.insert(right,0,0)\n right=np.append(right,0)\n tmp=np.max(np.maximum.accumulate(left)+right)\n return tmp+np.sum(eveni)\n\ndef even(A):\n left=np.array([0]+A[::2],dtype=np.int64)\n right=np.array(A[1::2]+[0],dtype=np.int64)\n return np.max(left.cumsum()+right.cumsum())\n\ndef main():\n n=int(input())\n A=list(map(int, input().split()))\n if n%2==1:\n print(odd(A))\n else:\n print(even(A))\n\n\nif __name__ == '__main__':\n main()", "import sys\nimport numpy as np\ndef input(): return sys.stdin.readline().rstrip()\n\ndef odd(A):\n oddi=np.array(A[::2],dtype=np.int64)\n eveni=np.array(A[1::2],dtype=np.int64)\n left=np.cumsum(oddi[:-1]-eveni)\n left=np.insert(left,0,0)\n right=np.cumsum(oddi[:0:-1]-eveni[::-1])[::-1]\n right=np.append(right,0)\n tmp=np.max(np.maximum.accumulate(left)+right)\n return tmp+np.sum(eveni)\n\ndef even(A):\n left=np.array([0]+A[::2],dtype=np.int64)\n right=np.array(A[1::2]+[0],dtype=np.int64)[::-1]\n return np.max(left.cumsum()+right.cumsum()[::-1])\n\ndef main():\n n=int(input())\n A=list(map(int, input().split()))\n if n%2==1:\n print(odd(A))\n else:\n print(even(A))\n\n\nif __name__ == '__main__':\n main()"]
['Wrong Answer', 'Accepted']
['s331884043', 's244732636']
[50896.0, 50744.0]
[173.0, 170.0]
[792, 746]
p02716
u858742833
2,000
1,048,576
Given is an integer sequence A_1, ..., A_N of length N. We will choose exactly \left\lfloor \frac{N}{2} \right\rfloor elements from this sequence so that no two adjacent elements are chosen. Find the maximum possible sum of the chosen elements. Here \lfloor x \rfloor denotes the greatest integer not greater than x.
['def main():\n N = int(input())\n A = list(map(int, input().split()))\n a0, a1, a2, b0, b1, b2 = 0, 0, 0, 0, 0, 0\n for i, a in enumerate(A):\n a0, a1, a2, b0, b1, b2 = (\n b0,\n max(b1, a0),\n max(b2, a1),\n a0 + a,\n a1 + a if i >= 1 else a1,\n a2 + a if i >= 2 else a2)\n print(a0, a1, a2, b0, b1, b2)\n\n if N & 1:\n return max(a2, b1)\n else:\n return max(a1, b0)\n\n\nprint(main())\n', 'def main():\n N = int(input())\n A = list(map(int, input().split()))\n a0, a1, a2, b0, b1, b2 = A[0], 0, 0, A[1], 0, 0\n for a in A[2:]:\n a0, a1, a2, b0, b1, b2 = (\n b0,\n max(b1, a0),\n max(b2, a1),\n a0 + a,\n a1 + a,\n a2 + a)\n\n if N & 1:\n return max(b2, a1)\n else:\n return max(a0, b1)\n\n\nprint(main())\n', 'def main():\n N = int(input())\n A = list(map(int, input().split()))\n a0, a1, a2, b0, b1, b2 = 0, 0, 0, 0, 0, 0\n for i, a in enumerate(A):\n a0, a1, a2, b0, b1, b2 = (\n b0,\n max(b1, a0),\n max(b2, a1),\n a0 + a,\n a1 + a if i >= 1 else a1,\n a2 + a if i >= 2 else a2)\n\n if N & 1:\n return max(b2, a1)\n else:\n return max(b1, a0)\n\n\nprint(main())\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s185076812', 's492333606', 's524964716']
[31568.0, 30892.0, 30876.0]
[505.0, 143.0, 163.0]
[503, 425, 465]
p02716
u868628468
2,000
1,048,576
Given is an integer sequence A_1, ..., A_N of length N. We will choose exactly \left\lfloor \frac{N}{2} \right\rfloor elements from this sequence so that no two adjacent elements are chosen. Find the maximum possible sum of the chosen elements. Here \lfloor x \rfloor denotes the greatest integer not greater than x.
['n = int(input())\nnums = list(map(int,input().split()))\ndp = [[0,0,0] for _ in range(n)]\ndp[0][0] = nums[0]\ndp[1][0],dp[1][1],dp[1][2] = nums[1],nums[0],-float("inf")\ndp[2][0],dp[2][1],dp[2][2] = nums[2],nums[1],nums[0]\nfor i in range(3,n):\n if i%2 == 0:\n dp[i][0] = max(dp[i-2]) + nums[i]\n dp[i][1] = max(dp[i-3]) + nums[i-1]\n dp[i][2] = sum(nums[0:i-1:2])\n else:\n dp[i][0] = max(dp[i-2]) + nums[i]\n dp[i][1] = sum(nums[0:i-2:2]) + nums[i-1]\n dp[i][2] = -float("inf")\nprint(max(dp[n-1]))\nprint(dp)', 'n = int(input())\nnums = list(map(int,input().split()))\nif n == 2:\n print(max(nums[0],nums[1]))\nelse:\n temp =[0]\n for i in range(n):\n if i%2 == 0:\n temp += [temp[-1]+nums[i]]\n dp = [[0,0,0] for _ in range(n)]\n dp[0][0] = nums[0]\n dp[1][0],dp[1][1],dp[1][2] = nums[1],nums[0],-float("inf")\n dp[2][0],dp[2][1],dp[2][2] = nums[2],nums[1],nums[0]\n for i in range(3,n):\n if i%2 == 0:\n dp[i][0] = max(dp[i-2]) + nums[i]\n dp[i][1] = max(dp[i-3]) + nums[i-1]\n dp[i][2] = temp[i//2]\n else:\n dp[i][0] = max(dp[i-2]) + nums[i]\n dp[i][1] = temp[(i-1)//2] + nums[i-1]\n dp[i][2] = -float("inf")\n print(max(dp[n-1]))']
['Runtime Error', 'Accepted']
['s294673663', 's905400757']
[41840.0, 66236.0]
[2206.0, 366.0]
[545, 725]
p02716
u875291233
2,000
1,048,576
Given is an integer sequence A_1, ..., A_N of length N. We will choose exactly \left\lfloor \frac{N}{2} \right\rfloor elements from this sequence so that no two adjacent elements are chosen. Find the maximum possible sum of the chosen elements. Here \lfloor x \rfloor denotes the greatest integer not greater than x.
['from itertools import accumulate\nn,*a = [int(i) for i in open(0).read().split()]\na1 = list(accumulate([0]+a[::2]))\na2 = list(accumulate([0]+a[n-1::-2]))[::-1]\nans = max(x+y for x,y in zip(a1,a2[1:]))\nif n&1: ans = max(ans, max(x+y+mid for x,y,mid in zip(a1,a2[2:],a[1::2])))\nprint(ans)', '# coding: utf-8\n# Your code here!\nimport sys\nsys.setrecursionlimit(10**6)\nreadline = sys.stdin.readline\nread = sys.stdin.read\n\nn,*a = [int(i) for i in read().split()]\n\nfrom itertools import accumulate\nif n%2==0:\n a1 = list(accumulate([0]+a[::2]))\n a2 = list(accumulate([0]+a[n-1::-2]))[::-1]\n #print(a1,a2)\n print(max(x+y for x,y in zip(a1,a2)))\n#elif n==3: print(max(a))\nelse:\n dp0 = [0]*(n+9)\n dp1 = [0]*(n+9)\n dp2 = [0]*(n+9)\n for i in range(n):\n if i%2==0:\n dp0[i] = dp0[i-2]+a[i]\n if i >= 2:\n dp2[i] = max(dp2[i-2],dp1[i-3],dp0[i-4]) + a[i]\n else:\n dp1[i] = max(dp1[i-2],dp0[i-3]) + a[i]\n #print(dp0)\n #print(dp1)\n #print(dp2)\n print(max(dp2[n-1],dp1[n-2],dp0[n-3]))\n\n\n\n']
['Wrong Answer', 'Accepted']
['s496701551', 's095856969']
[31792.0, 36428.0]
[112.0, 197.0]
[285, 773]
p02716
u997641430
2,000
1,048,576
Given is an integer sequence A_1, ..., A_N of length N. We will choose exactly \left\lfloor \frac{N}{2} \right\rfloor elements from this sequence so that no two adjacent elements are chosen. Find the maximum possible sum of the chosen elements. Here \lfloor x \rfloor denotes the greatest integer not greater than x.
['n = int(input())\n*A, = map(int, input().split())\ninf = 10**18\n\n\nDP = [(None, None) for i in range(n)]\nDP[0] = (0, A[0])\nDP[1] = (0, max(A[0], A[1]))\nfor i in range(2, n):\n if i % 2 == 0:\n DP[i][0] = max(DP[i-2][0]+A[i], DP[i-1][1])\n DP[i][1] = DP[i-2][1]+A[i]\n else:\n DP[i][0] = max(DP[i-2][0]+A[i], DP[i-1][0])\n DP[i][1] = max(DP[i-2][1]+A[i], DP[i-1][1])\nif n % 2 == 0:\n print(DP[n-1][1])\nelse:\n print(DP[n-1][0])\n', 'n = int(input())\n*A, = map(int, input().split())\ninf = 10**18\n\n\nDP = [[-inf]*2 for i in range(n)]\nDP[0][0] = 0\nDP[0][1] = A[0]\nDP[1][0] = 0\nDP[1][1] = max(A[0], A[1])\nfor i in range(2, n):\n if i % 2 == 0:\n DP[i][0] = max(DP[i-2][0]+A[i], DP[i-1][1])\n DP[i][1] = DP[i-2][1]+A[i]\n else:\n DP[i][0] = max(DP[i-2][0]+A[i], DP[i-1][0])\n DP[i][1] = max(DP[i-2][1]+A[i], DP[i-1][1])\nif n % 2 == 0:\n print(DP[n-1][1])\nelse:\n print(DP[n-1][0])\n']
['Runtime Error', 'Accepted']
['s021176438', 's028663589']
[31176.0, 55196.0]
[75.0, 300.0]
[562, 580]
p02717
u004823354
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['X,Y,Z = map(int,input().split())\nX = Z\nY = X\nZ = Y\nprint(X,Y,Z)', 'X,Y,Z = map(int,input().split())\n\nprint(Z,X,Y)']
['Wrong Answer', 'Accepted']
['s510398755', 's856826133']
[9156.0, 9012.0]
[28.0, 26.0]
[63, 46]
p02717
u005517181
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['p,x,y=map(int,input().split())\nprint(y,x,p)\n ', 'x,y,z = map(int, input().split())\nprint(z,x,y)']
['Wrong Answer', 'Accepted']
['s613876754', 's588231988']
[2940.0, 2940.0]
[17.0, 17.0]
[46, 46]
p02717
u007074599
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['A = list(map(int, input().split()))\nprint(A[2])\nprint(A[1])\nprint(A[0])', 'x,y,z=map(int, input().split())\nprint(z,x,y)']
['Wrong Answer', 'Accepted']
['s668022132', 's948960132']
[2940.0, 2940.0]
[18.0, 17.0]
[71, 44]
p02717
u008911501
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['a,b,c=map(int,input().split())\nprint(a,b,c)\n', 'a,b,c=map(int,intput().split())\nprint(a," ",b," ",c)', 'a,b,c=map(int,input().split())\nprint(c,a,b)\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s247340791', 's345582697', 's609300271']
[2940.0, 2940.0, 3060.0]
[17.0, 17.0, 18.0]
[44, 52, 44]
p02717
u015845133
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['def calc():\n d = a\n a = b\n b = d\n\n d = a\n a = c\n c = d\n\n list = [a,b,c]\n return list\n\na, b, c = map(int, input().split())\nprint(calc())', 'def calc():\n d = a\n a = b\n b = d\n\n d = a\n a = c\n c = d\n\n mytuple = (a,b,c)\n return mytuple\n\na, b, c = map(int, input().split())\nans = calc()\nprint(*ans)', 'def calc():\n d = a\n a = b\n b = d\n\n d = a\n a = c\n c = d\n\n print(a,b,c)\n\na, b, c = map(int, input().split())\ncalc()\n', 'def calc():\n d = a\n a = b\n b = d\n\n d = a\n a = c\n c = d\n return a, b, c\n\na, b, c = map(int, input().split())\nprint(calc())', 'def calc():\n x, y, z = c, a, b\n\n print(x, y, z)\n\na, b, c = map(int, input().split())\ncalc()\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s587865178', 's717955749', 's768089155', 's825027789', 's606177208']
[3060.0, 3060.0, 3056.0, 3060.0, 2940.0]
[17.0, 30.0, 19.0, 17.0, 17.0]
[159, 176, 135, 142, 98]
p02717
u018469350
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['a, b, c = map(int, input().split())\n\na, b = b, a\na, c = c, a\n\nprint(a + " " + b + " " + c)', 'a, b, c = map(int, input().split())\n\na, b = b, a\na, c = c, a\n\nprint(a, b, c)']
['Runtime Error', 'Accepted']
['s720418432', 's635467303']
[2940.0, 2940.0]
[17.0, 18.0]
[90, 76]
p02717
u018597853
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['A = list(map(int,input().split()))\nB = []\nB.append(A[2])\nB.append(A[0])\nB.append(A[1])\nprint(B)', 'A = list(map(int,input().split()))\nB = []\nB.append(A[2])\nB.append(A[0])\nB.append(A[1])\nprint(B[0],B[1],B[2])\n\n']
['Wrong Answer', 'Accepted']
['s260159406', 's341891853']
[2940.0, 2940.0]
[17.0, 17.0]
[95, 110]
p02717
u021763820
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['# -*- coding: utf-8 -*-\nBOX = list(map(int, input().split()))\nprint([BOX[2], BOX[0], BOX[1]])', '# -*- coding: utf-8 -*-\nN, M = map(int, input().split())\nA = list(map(int, input().split()))\ncnt = 0\nfor Ai in A:\n k = 1/(4*M)\n if (sum(A))*k <= Ai:\n cnt += 1\nif cnt >= M:\n print("Yes")\nelse:\n print("No")', '# -*- coding: utf-8 -*-\nBOX = list(map(int, input().split()))\nprint(BOX[2], BOX[0], BOX[1])']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s452376827', 's837534233', 's620462181']
[2940.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0]
[93, 223, 91]
p02717
u021770165
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['x,y,z = map(int,input().split())\nprint(z,x,y,sep=",")', 'x,y,z = map(int,input().split())\nprint(z,x,y)']
['Wrong Answer', 'Accepted']
['s325113016', 's419991454']
[9056.0, 9072.0]
[27.0, 24.0]
[53, 45]
p02717
u022658079
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['a,b,c=map(int, input().split()) \ntemp = b\nb = c\nc = temp\nprint(a,b,c)', 'a,b,c=map(int, input().split()) \n\n\ntemp = b\nb = a\na =temp\n\n\ntemp = c\nc = a\na =temp\n\n\nprint(a,b,c)']
['Wrong Answer', 'Accepted']
['s842803158', 's954817961']
[2940.0, 3060.0]
[17.0, 17.0]
[149, 226]
p02717
u022846086
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['a, b, c = map(int, input().split())\nlist = [a, b, c]\nlist.sort()\nprint("{} {} {}".format(list[0], list[1], list[2]))', 'a, b, c = map(int, input().split())\na, b = b, a\na, c = c, a\nprint("{} {} {}".format(a, b, c))']
['Wrong Answer', 'Accepted']
['s737105129', 's893614845']
[2940.0, 2940.0]
[17.0, 17.0]
[116, 93]
p02717
u026487567
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['a, b, c = [int(x) for x in input().split()\na, b = b, a\na, c = c, a\nprint (a,b,c)', 'a, b, c = [int(x) for x in input().split()]\na, b =b, a\na, c = c, a\nprint (a,b,c)']
['Runtime Error', 'Accepted']
['s418375066', 's355910098']
[2940.0, 2940.0]
[17.0, 17.0]
[80, 80]
p02717
u028489522
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['k = input().split()\ns = int(k[0])\nj = int(k[1])\nv = 10000000000\nwhile v > s:\n v = s\n s = abs(s - j)\n \nprint(s)', 's = input().split()\ni = s[0]\nm = int(s[1])\nj = 0\nel = input().split()\nfor p in el:\n if int(p) < 1 / (4 * m):\n j = 1 \nif j == 0:\n print("Yes")\nelse:\n print("No")\n', 's = input().split()\ni = s[0]\nm = int(s[1])\nj = 0\nel = input().split()\nfor p in el:\n if int(p) < (1 / (4 * m)):\n j = 1 \nif j == 0:\n print("Yes")\nelse:\n print("No")', 's = input().split()\ni = s[0]\nm = int(s[1])\nj = 0\nel = input().split()\nfor p in el:\n if int(p) < 1 / (4 * m):\n j = 1 \nif j == 0:\n print("Yes")\nelse:\n print("No")', 'k = input().split()\ns = int(k[0])\nj = int(k[1])\nv = s + 1\nwhile v > s:\n v = s\n s = abs(s - j)\n\nv = s\ns = abs(s-j)\nif v > s:\n print(s)\nelse:\n print(v)', 'el = input().split()\nprint("{} {} {}".format(el[2],el[0],el[1]))']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s231573597', 's486566804', 's632550490', 's865153253', 's977657599', 's368303742']
[2940.0, 3060.0, 3060.0, 3060.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0]
[120, 175, 176, 174, 157, 64]
p02717
u031132940
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['N,K = map(int, input().split())\nprint(min(N%K,abs(N%K-K)))\n', 'x,y,z = map(int, input().split())\nprint(z,x,y)\n']
['Runtime Error', 'Accepted']
['s075227803', 's918237647']
[3060.0, 2940.0]
[37.0, 17.0]
[59, 47]
p02717
u031679985
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['from sys import stdin\n#n = int(stdin.readline().rstrip())\nl = list(map(int, stdin.readline().rstrip().split()))\n#A, B, C = map(int, stdin.readline().rstrip().split())\na=l[0]\nb=l[1]\nc=l[2]\n\nprint("c a b")', 'from sys import stdin\nA, B, C = map(int, stdin.readline().rstrip().split())\n\n\nprint(C,A,B)']
['Wrong Answer', 'Accepted']
['s773691115', 's557394041']
[2940.0, 2940.0]
[17.0, 17.0]
[203, 90]
p02717
u033272694
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['s = list(map(int,input().split()))\nprint(s[2],s[1],s[0])', 's = list(map(int,input().split()))\nprint(s[2],s[0],s[1])']
['Wrong Answer', 'Accepted']
['s667314985', 's686338325']
[2940.0, 2940.0]
[17.0, 17.0]
[56, 56]
p02717
u037601040
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['c, a, b= input().split()\nPrint(a, b, c) ', 'c, a, b= input().split()\nprint(a, b, c) ', 'b, c, a= input().split()\nprint(a, b, c) ']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s267427909', 's950976819', 's596858274']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[40, 40, 40]
p02717
u037901699
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['s = list(input().split())\ns_ordered = [s[2], s[0], s[1]]\nprint(s_ordered)', 's1, s2, s3 = input().split()\nprint("{} {} {}".format(s3, s1, s2))']
['Wrong Answer', 'Accepted']
['s449632671', 's707373492']
[2940.0, 2940.0]
[17.0, 17.0]
[73, 65]
p02717
u038819082
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['X,Y,Z=map(int(input().split()))\nprint(Z,X,Y)', 'X,Y,Z=map(int,input().split())\nprint(Z,X,Y)\n']
['Runtime Error', 'Accepted']
['s370446844', 's324787395']
[2940.0, 2940.0]
[17.0, 17.0]
[44, 44]
p02717
u039934639
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
["N, M = map(int, input().split())\nA = map(int, input().split())\n\na = sorted(A, reverse=True)\n\nb = a[M-1]\nc = sum(a)\nd = 4*M\ne = c//d\n\nif a[M-1]>e:\n print('Yes')\nelse:\n print('No')", 'X, Y, Z = map(int, input().split())\n\nX, Y = Y, X\nX, Z = Z, X\n\nprint(X, Y, Z)']
['Runtime Error', 'Accepted']
['s717103018', 's212314094']
[3060.0, 2940.0]
[18.0, 18.0]
[180, 76]
p02717
u040141413
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['a,b,c=input()\nprint(c+" "+a+""+b)', 'a,b,c= input().split()\nprint(c+" "+a+" "+b)\n']
['Runtime Error', 'Accepted']
['s501573803', 's844219587']
[2940.0, 2940.0]
[18.0, 18.0]
[33, 44]
p02717
u048521352
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['a, b, c = map(int, input().split())\na = b\na = c\nprint(a,b,c)', 'x,y,z = map(input().split())\nprint(z,x,y)', 'a, b, c = map(int, input().split())\na = b\na = c\nprint(a b c)', 'a,b,c = map(int, input().split())\nprint(c,a,b)']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s339950576', 's620917533', 's714197722', 's125206744']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 18.0]
[60, 41, 60, 46]
p02717
u050805798
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['a,b,c = map(int,input().split())\nlist = [c,a,b]\nprint(list)', 'a,b,c = map(int,input().split())\nlist = [c,a,b]\nprint(*list)']
['Wrong Answer', 'Accepted']
['s275655961', 's461121159']
[2940.0, 2940.0]
[17.0, 18.0]
[59, 60]
p02717
u054471580
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
["a = input().split(' ')\nfor i in a[::-1]:\n print(i,end=' ')", "a = input().split(' ')\nprint(a[-1],end=' ')\nprint(a[0],end=' ')\nprint(a[1])"]
['Wrong Answer', 'Accepted']
['s945831634', 's078856246']
[2940.0, 2940.0]
[17.0, 17.0]
[59, 75]
p02717
u055668007
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['import sys\ninput = sys.stdin.readline\n\n\nN ,M = map(int,input().split())\n\nintlist = list(map(int, input().split()))\nnewlist = sorted(intlist, reverse=True)[:M]\n\nif newlist[M-1] > ( sum(intlist) / (4 * M) ):\n print ("Yes")\nelse:\n print ("No")\n ', 'import sys\ninput = sys.stdin.readline\n \n\nX,Y,Z = map(int,input().split()) \nprint ( Z, X ,Y)']
['Runtime Error', 'Accepted']
['s602323340', 's766163114']
[3064.0, 2940.0]
[17.0, 18.0]
[258, 108]
p02717
u060012100
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['A,B,C = list(map(int,input().split()))\ndef swap(x,y):\n tmp=x\n x=y\n y=temp\n return(x,y)\nA,B = swap(A,B)\nA,C = swap(A,C)\nprint(X,Y,Z)', 'a,b,c = list(map(int,input().split()))\n\ndef swap(x,y):\n tmp=x\n x=y\n y=temp\n return(x,y)\n\na,b = swap(a,b)\na,c = swap(a,c)\nprint(x,b,c)\n', 'x,y,z = list(map(int,input().split()))\n \ndef swap(a,b):\n tmp = a\n a = b\n b = tmp\n return (a,b)\n \nx,y = swap(x,y)\nx, z = swap(x, z)\nprint(x,y,z)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s027035234', 's888382405', 's458771628']
[3056.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0]
[135, 138, 155]
p02717
u064027771
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['print(input()[::-1])', 'print(*sorted(list(map(int,input().split()))))', 'a,b,c=map(int,input().split())\nprint(c,a,b)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s462141137', 's701348297', 's119493146']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[20, 46, 43]
p02717
u064434060
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['a = list(map(int,input().split()))\na[0],a[1],a[2] = a[2], a[0] ,a[1]\nprint(a)', 'a = list(map(int,input().split()))\na[0],a[1],a[2] = a[2], a[0], a[1]\nprint(*a)']
['Wrong Answer', 'Accepted']
['s410791046', 's915733892']
[2940.0, 2940.0]
[17.0, 17.0]
[77, 78]
p02717
u065578867
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['k = int(input())\na = [1, 2, 3, 4, 5, 6, 7, 8, 9]\n\nfor i in range(k):\n if a[i] % 10 != 0:\n a.append(10*a[i] + a[i] % 10 - 1)\n a.append(10*a[i] + a[i] % 10)\n if a[i] % 10 != 9:\n a.append(10*a[i] + a[i] % 10 + 1)\n\nprint(a[k - 1])\n', "x, y, z = map(int, input().split())\nx_swap_1 = y\ny_swap_1 = x\nx = x_swap_1\ny = y_swap_1\nx_swap_2 = z\nz_swap_2 = x\nx = x_swap_2\nz = z_swap_2\nprint(str(x) + ' ' + str(y) + ' ' + str(z))\n"]
['Runtime Error', 'Accepted']
['s287950243', 's854392023']
[3060.0, 2940.0]
[17.0, 17.0]
[250, 184]
p02717
u066411497
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['a, b ,c = map(input().split(" "))\nprint(c+" "+a+" "+b)', 'a,b,c = map(int, input().split())\nprint(c,a,b)']
['Runtime Error', 'Accepted']
['s174091595', 's328808358']
[2940.0, 2940.0]
[17.0, 18.0]
[54, 46]
p02717
u068492563
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
["num_list = list(map(int,input().split()))\nnum_list.sort()\n\nL=[str(a) for a in num_list]\nL = ' '.join(L)\nprint(L)", 'num_list = list(map(int,input().split()))\nnum_list.sort()\nprint(num_list[0],num_list[1],num_list[2])\n', 'num_list = list(map(int,input().split()))\n\nnew_list = []\nnew_list.append(num_list[2])\nnew_list.append(num_list[0])\nnew_list.append(num_list[1])\n\nprint(new_list[0],new_list[1],new_list[2])']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s187923816', 's806812528', 's326298253']
[2940.0, 3060.0, 2940.0]
[17.0, 19.0, 17.0]
[112, 101, 187]
p02717
u069273180
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['x,y,z=int(input())\nv=0\n\nv=x\nx=y\ny=v\n\nv=x\nx=z\nz=v\nprint(x,y,z)', 'n,m=map(int,input())\nN=n\nx=0\nz=m\nfor i in range(100):\n x=N-z\n x=abs(x)\n z=x*z\n N=min(N,x,n)\n\nprint(N) ', 'n,m=map(int,input().split())\na=list(map(int,input().split()))\n \ntoku = sum(a) // (4*m)\n \na.sort(reverse=True)\nif a[m-1] >= toku:\n print("Yes")\n else:\n print("No")', 'x,y,z=map(int,input().split())\nv=0\n\nv=x\nx=y\ny=v\n\nv=x\nx=z\nz=v\nprint(x,y,z)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s218849875', 's257956729', 's796735868', 's613913772']
[3060.0, 3060.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0, 17.0]
[61, 114, 165, 73]
p02717
u069516541
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['X, Y, Z = input()\nprint(Z X Y)', 'X, Y, Z = map(int, input().split())\nprint (Z, X, Y)']
['Runtime Error', 'Accepted']
['s385724784', 's967846606']
[2940.0, 2940.0]
[17.0, 17.0]
[30, 51]
p02717
u069891817
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['def swap(a,b):\n temp=a\n a=b\n b=temp\n\n\nlis=[]\nfor i in range(3):\n a=int(input())\n lis.append(a)\nfor j in lis:\n print(j,end=" ")\n \nswap(a[1],a[2])\nswap(a[1],a[3])\nfor j in lis:\n print(j)\n\n', 'a,b,c=map(int,input().split())\nprint(c,a,b)']
['Runtime Error', 'Accepted']
['s460752202', 's860580962']
[3060.0, 2940.0]
[17.0, 17.0]
[210, 43]
p02717
u073402484
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['x = input().split()\nprint("{} {} {}".format(x[1], x[2], x[0]))', 'x = input().split()\nprint("{} {} {}".format(x[2], x[0], x[1]))']
['Wrong Answer', 'Accepted']
['s609053372', 's992480216']
[2940.0, 2940.0]
[17.0, 17.0]
[62, 62]
p02717
u075303794
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['import sys\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nX,Y,Z = map(int, readline())\n\nA,B,C = Z,X,Y\n\nprint(A,B,C)', 'import sys\n \nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n \nX,Y,Z = map(int, readline().split())\n \nA,B,C = Z,X,Y\n \nprint(A,B,C)']
['Runtime Error', 'Accepted']
['s486253549', 's739337690']
[9108.0, 9236.0]
[25.0, 23.0]
[175, 187]
p02717
u078960732
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['for _ in range(1):\n\ta,b,c = map(int,input().split())\n print(c,a,b)\n', 'for _ in range(1):\n\ta,b,c = map(int,input().split())\n\tprint(c,a,b)']
['Runtime Error', 'Accepted']
['s659035909', 's251432470']
[2940.0, 2940.0]
[17.0, 17.0]
[70, 66]
p02717
u080685822
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['x, y, z = map(int, input().split())\nprint("z", "x", "y")', 'x, y, z = map(int, input().split())\nprint(z, x, y)\n']
['Wrong Answer', 'Accepted']
['s846957683', 's533289202']
[9160.0, 9084.0]
[22.0, 22.0]
[56, 51]
p02717
u085530099
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['x = list(map(int, input().split()))\nx[0], x[1], x[2] = x[2], x[0], x[1]\nprint(x)', "x = input().split()\nx[0], x[1], x[2] = x[2], x[0], x[1]\nprint(x[0]+' '+x[1]+' '+x[2])"]
['Wrong Answer', 'Accepted']
['s122576467', 's192931658']
[2940.0, 8992.0]
[17.0, 21.0]
[80, 85]
p02717
u088115428
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
["from sys import stdin, stdout\nl = list(map(int, stdin.readline().rstrip().split(' ')))\nprint(l)\nf=[]\ni=-1\nfor n in (0,(len(l)-1)):\n f[n] = l[i]\n i = i+1\nprint(l)", 'n, m = map(int, input().split())\nl = []\nans = 1\nif(n%m == 0):\n ans=0\nelse:\n for x in (0,1000000000000000000):\n n = abs(n%m)\n l.append(n)\n l.sort()\n ans = min(m-n,l[0])\nprint(ans)', 'import sys\n\nl = []\n\nfor line in sys.stdin:\n new_list = [int(elem) for elem in line.split()]\n l.append(new_list)\n print(l)', "from sys import stdin, stdout\nl = list(map(int, stdin.readline().rstrip().split(' ')))\nf=[]\ni=-1\nn = 0\nwhile(n<len(l)):\n f.append(l[i])\n i = i+1\n n= n+1\nprint(f)", "from sys import stdin, stdout\nl = list(map(int, stdin.readline().rstrip().split(' ')))\nprint(l)\nf=[]\ni=-1\nn = 0\nwhile(n<len(l)):\n \n f.append(l[i])\n i = i+1\n n= n+1\nprint(f)", 'import sys\n\nl = []\n\nfor line in sys.stdin:\n new_list = [int(elem) for elem in line.split()]\n l.append(new_list)\nf=[]\ni=1\nfor x in range(0,len(l)):\n \n f[x] = l[-i]\n i++\nprint(f)', 'from sys import stdin, stdout\nl = list(map(int, stdin.readline().rstrip().split(\' \')))\nf=[]\ni=-1\nn = 0\nwhile(n<len(l)):\n f.append(l[i])\n i = i+1\n n= n+1\nprint(*f,sep=" ")\n']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s217647268', 's294700377', 's538220621', 's540579437', 's603796290', 's729532159', 's587241646']
[2940.0, 3060.0, 3060.0, 2940.0, 3060.0, 2940.0, 3060.0]
[17.0, 18.0, 18.0, 17.0, 17.0, 17.0, 17.0]
[167, 188, 130, 164, 176, 181, 174]
p02717
u089239168
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['n, k = map(int, input().split())\n\nmo = n%k\n\nmok = abs(mo - k)\n\nif mo <= mok:\n print(mo)\nelse:\n print(mok)', 'x, y, z = map(int, input().split())\n\nprint(z, x, y)']
['Runtime Error', 'Accepted']
['s182103469', 's095017455']
[2940.0, 2940.0]
[17.0, 17.0]
[111, 51]
p02717
u090445726
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['X,Y,Z = list(map(int, input().split(" ")))\nprint(Z + " " + X + " " + Y)\n', 'X,Y,Z = list(map(int, input().split(" ")))\nprint(str(Z) + " " + str(X) + " " + str(Y))\n']
['Runtime Error', 'Accepted']
['s462806003', 's084409799']
[2940.0, 2940.0]
[17.0, 17.0]
[72, 87]
p02717
u091307273
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
["x, y, z = (int(i) for i in input().split())\n\nprint('f{z} {x} {y}')\n", "x, y, z = (int(i) for i in input().split())\n\nprint(f'{z} {x} {y}')\n"]
['Wrong Answer', 'Accepted']
['s080469435', 's990551752']
[9124.0, 9056.0]
[28.0, 24.0]
[67, 67]
p02717
u095384238
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['X, Y, Z = list(map(int, input().split()))\nprint(Z, Y, X)', 'X, Y, Z = list(map(int, input().split()))\nprint(Z, X, Y)']
['Wrong Answer', 'Accepted']
['s223718074', 's603193887']
[2940.0, 2940.0]
[18.0, 17.0]
[56, 56]
p02717
u096025032
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['a, b, c = map(int,input().split())\n\nprint(c, b ,a)', 'a, b, c = map(int,input().split())\n\nprint(c, a ,b)']
['Wrong Answer', 'Accepted']
['s868076461', 's120057632']
[2940.0, 2940.0]
[17.0, 17.0]
[50, 50]
p02717
u096446417
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
[' x, y ,z = map(int, input().split())\n x, y, z = y,x,z\n y,x,z = z,x,y\n print(y,x,z)\n', 'x, y ,z = map(int, input().split())\nprint(z,x,y)']
['Runtime Error', 'Accepted']
['s874167104', 's610436051']
[2940.0, 2940.0]
[17.0, 17.0]
[95, 48]
p02717
u097069712
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['x,y,z=map(int,input().split())\nprint(str(y)+" "+str(z)+" "+str(x))', 'a,b,c=map(int, input.split())\nprint(str(z)+" "+str(x)+" "+str(y))', 'a,b,c=map(int, input.split())\nprint(map(str(a b c)))', 'x,y,z=map(int,(input.split())\nprint(str(y)+" "+str(z)+" "+str(x))', 'z,x,c=map(int, input.split())\nprint(str(x)+" "+str(y)+" "+str(z))', 'a,b,c=map(int, input.split())\nprint(z,x,y)', 'x,y,z=map(int, input.split())\nprint(str(y)+" "+str(z)+" "+str(x))', 'z,x,c=map(int, input.split())\nprint(str(z)+" "+str(x)+" "+str(y))', 'a,b,c=map(int, input.split())\nprintstr((z x y))', 'a,b,c=map(int, input.split())\nprint(str(z x y))', 'a,b,c=map(int, input.split())\nprint(str(a b c))', 'x,y,z=map(int,input().split())\nprint(str(z)+" "+str(x)+" "+str(y))']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s054803887', 's149099867', 's406283952', 's447261113', 's468596653', 's545245093', 's599033489', 's716348670', 's783671949', 's870127516', 's878679583', 's116137139']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 3064.0, 2940.0, 3064.0, 2940.0]
[18.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 19.0, 18.0, 17.0, 17.0]
[66, 65, 52, 65, 65, 42, 65, 65, 47, 47, 47, 66]
p02717
u100873497
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['a,b,c=num(input(),split())\n \n print(c,a,b)', "num1 = int(input().split())\nnum2 = list(map(int, input().split()) \n \nnum2 = sorted(num2, reverse=True)\n \nN=num1[0]\nM=num1[1]\nA=num2[M-1]\n\nif A<N/M/4:\n print('No')\nelse:\n print('Yes')\n", 'a,b,c=num(int,input().split())\n\nprint(c,a,b)', 'num=input()\nnum=num.split()\n\nprint(num[2]+num[0]+num[1])', 'num=input()\nnum=num.split()\n\nprint(num[2]+" "+num[0]+" "+num[1])\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s332534486', 's334413555', 's592601556', 's764007769', 's639739394']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0, 17.0, 17.0]
[44, 213, 44, 56, 65]
p02717
u101112282
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['mport sys\ninput = sys.stdin.readline\n\na, b, c = list(map(int, input().split()))\nx = a\na = b\nb = x\n\nx = a\na = c\nc = x\n\nprint(a, b, c)', 'import sys\ninput = sys.stdin.readline\n\na, b, c = list(map(int, input().split()))\nx = a\na = b\nb = x\n\nx = a\na = c\nc = x\n\nprint(a, b, c)\n']
['Runtime Error', 'Accepted']
['s133091635', 's932254836']
[2940.0, 2940.0]
[17.0, 17.0]
[132, 134]
p02717
u101350975
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['li= list(map(int, input().split()))\nli.insert(1, li.pop(0))\nli.insert(2, li.pop(0))\nli.insert(0, li.pop(1))\nprint(li)\n', "N, M = map(int, input().split())\nA = list(map(int, input().split()))\nA.sort(reverse=True)\nS = sum(A)\nif A[M-1] >= S / (4 * M):\n print('Yes')\nelse:\n print('No')\n", 'li= list(map(int, input().split()))\nli.insert(1, li.pop(0))\nli.insert(2, li.pop(0))\nli.insert(0, li.pop(1))\nprint(li(0), li(1), li(2))\n', 'li= list(map(int, input().split()))\nli.insert(1, li.pop(0))\nli.insert(2, li.pop(1))\nprint(li)\n', 'li= list(map(int, input().split()))\nli.insert(1) = li.pop(0)\nli.insert(2) = li.pop(0)\nprint(li)', 'li= list(map(int, input().split()))\nli.insert(1, li.pop(0))\nli.insert(2, li.pop(0))\nli.insert(0, li.pop(1))\nprint(li[0], li[1], li[2])\n']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s242296734', 's413271448', 's605117578', 's711660311', 's882066661', 's818022904']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0, 17.0, 17.0, 17.0]
[118, 167, 135, 94, 95, 135]
p02717
u105659451
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['X,Y,Z=map(int, input().split()) \nX,Y = Y,X\nX,Z = Z,X\nL =[X,Y,Z]\nprint(L)', 'X,Y,Z=map(int, input().split()) \nX,Y = Y,X\nX,Z = Z,X\nprint(X,Y,Z)']
['Wrong Answer', 'Accepted']
['s168760151', 's379895787']
[2940.0, 2940.0]
[17.0, 18.0]
[72, 65]
p02717
u106181248
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['x, y ,z = map(int,input().split())\n\nprint(z, y, x)', 'k = int(input())\ni = 1 \nc = 0 \n\nif k > 13000:\n i = 34454557\n c = 13000\n\nwhile c < k:\n j = str(i)\n if i < 13: \n c = c + 1 \n #print(c, i)\n else: \n x = 0\n for n in range(len(j)-1): 判定を行う\n if abs(int(j[n]) - int(j[n+1])) > 1:\n x = 1\n break\n if x == 0:\n c = c + 1\n #print(c, i)\n i = i + 1 \n\nprint(i-1)', 'x, y ,z = map(int,input().split())\n \nprint(z, x, y)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s072130115', 's105665642', 's699155330']
[2940.0, 3064.0, 2940.0]
[17.0, 17.0, 17.0]
[50, 520, 51]
p02717
u106284621
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['A, B, C = map(int, input().split())\nprint(B, C, A)', "A, B, C = map(int, input().split())\nprint(B, ' ', C, ' ', A)", 'X, Y, Z= map (int, input().split())\nprint(Z, X, Y)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s027774956', 's405333628', 's721389306']
[9160.0, 9152.0, 9132.0]
[21.0, 24.0, 22.0]
[50, 60, 50]
p02717
u108136854
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['x, y, z = map(int, input().split())\nprint(z, y, x)\n', 'x, y, z = map(int, input().split())\nprint(z, x, y)\n']
['Wrong Answer', 'Accepted']
['s680757244', 's336915208']
[2940.0, 2940.0]
[17.0, 17.0]
[51, 51]
p02717
u110090109
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['X, Y, Z = input().split()\nA = X\nB = Y\nC = Z\n# swap the contents of the boxes A and B\ntemp = B\nB = A\nA = temp\nprint(A + " " + B + " " + C)\n# swap the contents of the boxes A and C\nswapAC = C\nC = A\nA = swapAC\nprint(A + " " + B + " " + C)\n', 'A = "1"\nB = "2"\nC = "3"\n\n# swap the contents of the boxes A and B\ntemp = B\nB = A\nA = temp\nprint("Swap the contents of boxes A and B ", A + " " + B + " " + C)\n# swap the contents of the boxes A and C\nswapAC = C\nC = A\nA = swapAC\nprint("Swap the contents of boxes A and C ", A + " " + B + " " + C)\n', 'X = input()\nY = input()\nZ = input()\nA = X\nB = Y\nC = Z\n# swap the contents of the boxes A and B\ntemp = B\nB = A\nA = temp\nprint(A + " " + B + " " + C)\n# swap the contents of the boxes A and C\nswapAC = C\nC = A\nA = swapAC\nprint(A + " " + B + " " + C)\n', 'X, Y, Z = input().split()\nA = X\nB = Y\nC = Z\n# swap the contents of the boxes A and B\ntemp = B\nB = A\nA = temp\n# swap the contents of the boxes A and C\nswapAC = C\nC = A\nA = swapAC\nprint(A, B, C)\n']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s402656635', 's516482489', 's970724888', 's743300330']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[236, 295, 246, 193]
p02717
u111320409
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['N, M = map(int,input().split())\nA = list(map(int,input().split()))\nS = sum(A)\ncnt = 0 \n\nfor a in A:\n if a >= S / (4*M):\n cnt += 1\n if cnt >= M:\n print("Yes")\n else:\n print("No")', 'a, b, c = map(int,input().split())\na,b = b,a\na,c = c,a \n\nprint(a,b,c)']
['Runtime Error', 'Accepted']
['s202167056', 's500054642']
[3060.0, 2940.0]
[17.0, 17.0]
[207, 69]
p02717
u111652094
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['X,Y,Z=map(int,input().split())\n\nprint(Z,X,Y)X,Y,Z=map(int,input().split())\n\nprint(Z,X,Y)', 'X,Y,Z=map(int,input().split())\n\nprint(Z,X,Y)']
['Runtime Error', 'Accepted']
['s362573547', 's137019836']
[2940.0, 2940.0]
[17.0, 17.0]
[88, 44]
p02717
u112747720
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
["A , B, C = int(input()).split(' ')\ntemp = 0\ntemp = A\nA = B\nB = temp\ntemp = A\nA = C\nC = temp\nprint(f'{A} {B} {C}')", "A,B,C = input()\nA, B = B, A\nA, C = C, A\n\nprint(f'{A} {B} {C}')\n\n", "A, B = B, A\nA, C = C, A\n\nprint(f'{A} {B} {C}')\n\n", "A,B,C = [int(i) for i in input().split(' ')]\n\n\nA, B = B, A\nA, C = C, A\n\nprint('{} {} {}'.format(A, B, C))\n\n"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s445954110', 's941469759', 's992871633', 's765974719']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[113, 64, 48, 107]
p02717
u113107956
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['n,k=map(int,input().split())\nt=n%k\nn=min(t,k)\nprint(n)', "x,y,z=map(int,input().split())\nprint('{} {} {}'.format(z,x,y))"]
['Runtime Error', 'Accepted']
['s199923940', 's892776064']
[3060.0, 2940.0]
[18.0, 18.0]
[54, 62]
p02717
u113991073
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['x,y,z=list(map(int,input().split()))\na=x\nb=y\nc=z\nprint(c a b)', 'x,y,z=list(map(int,input().split()))\nprint(x,y,z)\n', 'x,y,z=list(map(int,input().split()))\nprint(z,x,y)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s065052582', 's781640396', 's891325174']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[61, 50, 49]
p02717
u114720832
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['data=input()\nx = data.split(" ")\ntmp=x[0]\nx[0]=x[2]\nx[2]=tmp\nprint(x[0],x[1],x[2])', 'data=input()\nx = data.split(" ")\ntmp=x[2]\nx[2]=x[1]\nx[1]=x[0]\nx[0]=tmp\nprint(x[0],x[1],x[2])']
['Wrong Answer', 'Accepted']
['s000070743', 's195327154']
[8976.0, 9008.0]
[27.0, 25.0]
[82, 92]
p02717
u117078923
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['x,y,z = map(int,input().split())\nprint(y,z,x)', 'x,y,z = map(int,input().split())\nprint(y,z,x)', 'x,y,z = map(int,input().split())\nprint(z,x,y)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s448447127', 's530753723', 's622349979']
[9080.0, 9088.0, 9044.0]
[29.0, 22.0, 28.0]
[45, 45, 45]
p02717
u119294725
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['tmp = list(map(int, input("input some numbers.").split()))\nprint(tmp[2], tmp[0], tmp[1])', 'tmp = list(map(int, input("input some numbers.").split()))\nprint(tmp[2], tmp[0], tmp[1], sep=\' \')', 'x, y, z = input().split()\nprint(z, x, y)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s186624265', 's891070007', 's617381828']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[88, 97, 41]
p02717
u119655368
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['n, m = map(int, input().split())\nl = list(map(int,input().split()))\nl = sorted(l)[::-1]\ncheck = l[m - 1] > (sum(l) / 4 / m)\nprint("Yes" if check else "No")', 'a, b, c = map(int, input().split())\nprint(c,a,b)']
['Runtime Error', 'Accepted']
['s536461830', 's766779622']
[3064.0, 2940.0]
[17.0, 17.0]
[155, 48]
p02717
u121276807
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['N,K = list(map(int, input().split()))\n\n\nif N == 0:\n print(N)\n\ninitialK = K\nwhile True:\n if N <= initialK/2:\n print(N)\n break\n K = N%K\n if K <= initialK/2:\n print(K)\n break\n', 'N,K = list(map(int, input().split()))\n\n\nif N == 0:\n print(N)\n\ninitialK = K\n\nif N <= initialK/2:\n print(N)\nwhile True:\n K = N%K\n if K <= initialK/2:\n print(K)\n break', 'X,Y,Z = list(map(int, input().split()))\n\nprint(Z, X, Y)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s090074475', 's728895986', 's183035105']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[212, 190, 55]
p02717
u124046631
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['def swap(a,b):\n temp = a\n a = b\n b = temp\n \nls = input().split(" ")\nswap(ls[0],ls[1])\nswap(ls[0],ls[2])\nprint(("{} {} {}").format(ls[0],ls[1],ls[2]))', '\nls = input().split(" ")\ntemp = ls[0]\nls[0] = ls[1]\nls[1] = temp\ntemp = ls[0]\nls[0] = ls[2]\nls[2] = temp\nprint(("{} {} {}").format(ls[0],ls[1],ls[2]))']
['Wrong Answer', 'Accepted']
['s392073054', 's084005717']
[3060.0, 3060.0]
[17.0, 18.0]
[152, 150]
p02717
u125389321
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
["N,M = list(map(int,input().split()))\nL = list(map(int,input().split()))#len(L) == N\n\np = sum(L)/(4*M)\n\ncnt = 0\nfor i in range(N):\n if L[i] >= p:\n cnt += 1\nif cnt >= M:\n print('Yes')\nelse:\n print('No')", "l_0 = list(map(int,input().split()))\n\nl_1 = []\nl_1.append(l_0[1])\nl_1.append(l_0[0])\nl_1.append(l_0[2])\n\nl_2 = []\nl_2.append(l_1[2])\nl_2.append(l_1[1])\nl_2.append(l_1[0])\n\nprint('{} {} {}'.format(l_2[0],l_2[1],l_2[2]))"]
['Runtime Error', 'Accepted']
['s308803176', 's208897218']
[3060.0, 3064.0]
[17.0, 17.0]
[216, 218]
p02717
u131464432
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['X,Y,Z = map(int,input().split())\nprint(Z X Y)', 'X,Y,Z = map(int,input().split())\nprint("Z X Y")', 'X,Y,Z = map(int,input().split())\nprint(Y,Z,X)', 'X,Y,Z = map(int,input().split())\nprint(Z,X,Y)']
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s325028566', 's331910524', 's521807266', 's223095275']
[2940.0, 2940.0, 9156.0, 8908.0]
[18.0, 17.0, 23.0, 21.0]
[45, 47, 45, 45]
p02717
u131666536
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
["a, b, c = [int(s) for s in input().split()]\n\na, b = b, a\na, c = c, a\n\nprint(' '.join([a, b, c])", "a, b, c = input().split()\n \na, b = b, a\na, c = c, a\n \nprint(' '.join([a, b, c]))"]
['Runtime Error', 'Accepted']
['s898955505', 's316832872']
[2940.0, 2940.0]
[17.0, 19.0]
[95, 80]
p02717
u132878037
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['a,b,c=(int(x) for x in input().split())\n\nprint(str(a)+" "+str(c)+" "+str(b))\n', 'a,b,c=(int(x) for x in input().split())\n\nprint(str(c)+" "+str(a)+" "+str(b))\n']
['Wrong Answer', 'Accepted']
['s556441542', 's955873216']
[2940.0, 2940.0]
[17.0, 17.0]
[77, 77]
p02717
u136284779
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
["n,m=map(int,input().split())\nA=list(map(int,input().split()))\ns=sorted(A,reverse=True)[m-1]\nt=sum(A)//(4*m)+1\nif s>=t:\n ans='Yes'\nelse:\n ans='No'\nprint(ans)", 'X,Y,Z=input().split()\nN=[X,Y,Z]\nprint(N[2],N[0],N[1])\n']
['Runtime Error', 'Accepted']
['s066534116', 's783345117']
[9084.0, 8964.0]
[23.0, 25.0]
[162, 54]
p02717
u136451021
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['import sys\na, b, c = int(sys.stdin.readline().split())\n\nprint(c, a, b)', 'import sys\na, b, c = map(int, sys.stdin.readline().split())\n\nprint(c, a, b)']
['Runtime Error', 'Accepted']
['s582856168', 's908129533']
[2940.0, 2940.0]
[17.0, 17.0]
[70, 75]
p02717
u137962336
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['X, Y, Z = [int(input()) for a in range(3)]\nprint(Z, X, Y)', 'a = int(input())\nb = int(input())\nc = int(input())\nprint(c,a,b)', 'X = int(input())\nY = int(input())\nZ = int(input())\nprint(Z, X, Y)', 'X = int(input())\nY = int(input())\nZ = int(input())\n\nprint(Z,X,Y)', 'X,Y,Z = input()\nprint(Z,X,Y)', 'X, Y, Z = [int(a) for b in input() .split()]\nprint(Z, X, Y)', 'X = int(input())\nY = int(input())\nZ = int(input())\n\nprint(Z, X, Y)\n', 'X, Y, Z = input()\nprint(Z, X, Y)\n', 'X, Y, Z = input().split()\nprint(Z, X, Y)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s027044294', 's031368303', 's198127460', 's256249939', 's559141946', 's774726510', 's784151078', 's867689269', 's392924819']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 3060.0, 3188.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 18.0, 18.0, 17.0]
[57, 63, 65, 64, 28, 59, 67, 33, 40]
p02717
u141152123
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['Z,X,Y =int(input().split())\nprint(X,Y,Z)', 'Y, Z, X =map(int, input().split())\nprint(X,Y,Z)']
['Runtime Error', 'Accepted']
['s172844147', 's210023805']
[2940.0, 2940.0]
[17.0, 17.0]
[40, 47]
p02717
u141419468
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['n, m = map(int, input().split())\na = list(map(int, input().split()))\n\nA = sum(a)\na.sort(reverse=True)\nprint(a)\n\nif a[m-1] >= A/(4*m):\n print("No")\nelse:\n print("Yes")', 'n, m = map(int, input().split())\na = list(map(int, input().split()))\n\nA = sum(a)\na.sort(reverse=True)\n\nif a[m-1] >= A/(4*m):\n print("Yes")\nelse:\n print("No")', 'a, b, c = input().split()\n\na1 = b\nb1 = a\na2 = c\nc1 = a1\n\nprint(a2, b1, c1)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s158547018', 's616407697', 's559345942']
[3060.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0]
[172, 163, 74]
p02717
u144072139
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['x,y,z=(map(int,input().split())\n\nprint(z, x, y)', 'x,y,z=(map(int,input().split())\n\nprint(z,x,y)', 'x,y,z=(map(int,input().split())\n\nprint("{} {}".format(z,x,y))', 'x,y,z=map(int,input().split())\nprint(z,x,y)\n#print("{} {}".format(z,x,y))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s251302006', 's325962039', 's817653699', 's499508992']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 18.0]
[47, 45, 61, 73]
p02717
u146346223
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['x, y, z = map(int, input().split())\nprint(z, y, x)', 'x, y, z = map(int, input().split())\nprint(z, x, y)']
['Wrong Answer', 'Accepted']
['s656319925', 's642468845']
[9020.0, 9064.0]
[21.0, 20.0]
[50, 50]
p02717
u152891327
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['C,A,B = map(int, input().split())\nprint(A,B,C)\n', 'C,B,A = map(int, input().split())\nprint(A,B,C)', 'A,B,C = map(int, input().split())\nA,B = B,A\nA,C = C,A\nprint(A, B, C)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s086614301', 's826615126', 's990020817']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0]
[47, 46, 68]
p02717
u153729035
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['X,Y,Z = input().split()\nprint(" ".join([Y,X,Z]))', 'X,Y,Z = input().split()\nprint(" ".join([Y,Z,X]))', 'X,Y,Z = input().split()\nprint(" ".join([Z,X,Y]))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s432019378', 's928535322', 's486682124']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[48, 48, 48]
p02717
u153823221
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['s = input().split()\n\nprint(s[1],s[2],s[0])', 's = input().split()\n\nprint(s[2],s[0],s[1])']
['Wrong Answer', 'Accepted']
['s148829562', 's836750240']
[2940.0, 2940.0]
[19.0, 17.0]
[42, 42]
p02717
u155687575
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
["lst = map(int, input().split())\nprint(' '.join(map(str, sorted(lst))))", "lst = list(map(int, input().split()))\na, b, c = lst[0], lst[1], lst[2]\nans = [c, a, b]\nprint(' '.join(map(str, ans)))"]
['Wrong Answer', 'Accepted']
['s051825513', 's046437145']
[2940.0, 2940.0]
[17.0, 19.0]
[70, 117]
p02717
u157672361
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['n,m=map(int,input().split())\na=list(map(int,input().split()))\nS=sum(a)\np=0\nfor i in range(n):\n if a[i]>=S/(4*m):\n p+=1\nif p>=m:\n print("Yes")\nelse:\n print("No")\n', "s= input().split(' ')\ns[0]=X\ns[1]=Y\ns[2]=Z\nd=X\na=Y\nb=d\nd=a\na=c\nc=d\n\nprint(a, b, c)\n\n", 'X,Y,Z= input().split()\nd=X\na=Y\nb=d\nd=a\na=Z\nc=d\n\nprint(a, b, c)\n\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s375650421', 's888745015', 's263955412']
[3060.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[192, 84, 64]
p02717
u159975271
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['i,j,k = list(map(int , input().split()))\nprint(j,k,i)\n', 'i,j,k = list(map(int , input().split()))\nprint(k,i,j)\n']
['Wrong Answer', 'Accepted']
['s057365642', 's742886182']
[2940.0, 2940.0]
[17.0, 17.0]
[54, 54]
p02717
u165436807
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['A, B, C = input().split() \nprint(C A B) ', 'a, b, c = input().split()\nprint(c,a,b)\n']
['Runtime Error', 'Accepted']
['s461862022', 's295737998']
[2940.0, 2940.0]
[17.0, 17.0]
[59, 39]
p02717
u166849422
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['a,b,c = input().split()\nprint(c,b,a)', 'a,b,c = input().split()\nprint(c,a,b)']
['Wrong Answer', 'Accepted']
['s269935553', 's099774208']
[2940.0, 2940.0]
[17.0, 17.0]
[36, 36]
p02717
u167302065
2,000
1,048,576
We have three boxes A, B, and C, each of which contains an integer. Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively. We will now do the operations below in order. Find the content of each box afterward. * Swap the contents of the boxes A and B * Swap the contents of the boxes A and C
['A, B, C = map(int, input().split())\nprint(map(C, A, B)', 'A, B, C = map(int, input().split())\nprint(C, A, B)']
['Runtime Error', 'Accepted']
['s208610408', 's110412028']
[2940.0, 2940.0]
[17.0, 17.0]
[54, 50]