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
p02984
u360515075
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import numpy as np\n\nN = int(input())\nA = list(map(int, input().split()))\n\nC = np.zeros((N, N))\n\nfor i in range(N-1):\n C[i][i] = 0.5\n C[i+1][i] = 0.5\n\nC[0][N-1] = 0.5\nC[N-1][N-1] = 0.5\n\nCin = np.linalg.inv(C)\nB = np.dot(A , Cin)\n\nprint (int(B[0]), end = "")\nfor i in range(1,N):\n print ( " " + str...
['Runtime Error', 'Accepted']
['s571753630', 's051279682']
[460984.0, 28176.0]
[2110.0, 234.0]
[324, 215]
p02984
u367130284
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['from itertools import*\n\n\nn,*b=map(int,open(0).read().split())\n\na1=sum(b[i]*(-1)**(i%2) for i in range(n))\n\nprint(a1)\n\nl=[a1]\nfor i in range(n-1):\n l.append((b[i]-l[-1]//2)*2)\nprint(*l)', 'from itertools import*\n\n\nn,*b=map(int,open(0).read().split())\n\na1=sum(b[i]*(-1)**(i%2) for i in range(n))\n\n\...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s044443003', 's464529833', 's643802506', 's212792375']
[14508.0, 15704.0, 14032.0, 14508.0]
[141.0, 111.0, 193.0, 147.0]
[187, 176, 96, 177]
p02984
u369502636
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\na = list(map(int,input().split()))\na2 = list(map(lambda x:x*2,a))\nAll = sum(a)\np = All-sum(a2[1::2])\na3 = [p]\nfor i in range(n-1) :\n q = a[i]*2 - p\n a3.append(q)\nmountain = ""\nfor j in range(n) :\n mountain += str(a3[j])\n if j == n-1 :\n exit()\n mountain += " "\nprin...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Time Limit Exceeded', 'Accepted']
['s035003747', 's288051860', 's310634626', 's416181355', 's794149113', 's859971395', 's890896378', 's570764740']
[17164.0, 18572.0, 19212.0, 18696.0, 14092.0, 14028.0, 14092.0, 18120.0]
[154.0, 154.0, 140.0, 93.0, 43.0, 56.0, 2104.0, 152.0]
[314, 322, 281, 193, 218, 214, 219, 322]
p02984
u370721525
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = list(map(int, input().split()))\n\ntmp = 0\nfor i in range(N//2-1):\n tmp += A[2*i]\n \nans = []\nif sum(A) > 2*tmp:\n ans.append(sum(A)-2*tmp)\nelse:\n ans.append(0)\n \nfor i in range(N):\n ans.append(2*A[i]-ans[-1])\nprint(*ans)', 'N = int(input())\nA = list(map(int, input().split()))\n...
['Wrong Answer', 'Accepted']
['s308435641', 's829945526']
[20460.0, 20456.0]
[103.0, 100.0]
[244, 247]
p02984
u375616706
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import sys\nsys.setrecursionlimit(10**9)\ninput = sys.stdin.readline\n\nN = int(input())\nA = list(map(int, input().split()))\n\nsum_odd = sum([v for v in A[1::2]])\nx0 = sum(A)-2*sum_odd\nans = [x0]\n\nx = x0\nfor a in A:\n nex = 2*a-x\n ans.append(nex)\n x = nex\nprint(*ans)\n', 'import sys\nsys.setrecursi...
['Wrong Answer', 'Accepted']
['s239525616', 's751072886']
[14124.0, 14316.0]
[114.0, 126.0]
[271, 276]
p02984
u383416302
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['input()\na=[int(x) for x in input().split()]\nb=sum(a)-2*sum(a[1::2])\nprint(sum(a))\nprint(sum(a[1::2]))\nans = [b]\nfor x in a:\n b = x*2-b\n ans.append(b)\nprint(*ans[:-1])', 'input()\na=[int(x) for x in input().split()]\nb=sum(a)-2*sum(a[1::2])\n# print(sum(a))\n# print(sum(a[1::2]))\nans = [b]\nfor x in a:...
['Wrong Answer', 'Accepted']
['s660348467', 's216929783']
[14412.0, 14408.0]
[116.0, 109.0]
[172, 176]
p02984
u392319141
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["N = int(input())\nA = list(map(int,input().split()))\n\nout = [0] * N\n\nfor i in range(N) :\n ans = A[i]\n sig = i % 2\n\n \n for j in range(0,i) :\n ans += (-1)**(j+sig) * A[j]\n\n \n for j in range(i+1,N) :\n ans += (-1)**(j+sig+1) * A[j]\n out[i] = ans\n\nprint('{} '.format(out[...
['Time Limit Exceeded', 'Accepted']
['s377710695', 's375560133']
[14028.0, 14028.0]
[2104.0, 167.0]
[401, 227]
p02984
u393167737
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import numpy as np\nN = int(input())\np = np.array(list(map(int,input().split())))\na0 = 0\nfor i in range(0,N,2):\n a0 += p[i]\n \nfor i in range(1,N-1,2):\n a0 -= p[i]\n \nans2 = [a0]*N\n\nfor i,one in enumerate(p[1:]):\n ans2[i+1] = 2*p[i] - ans2[i] ', 'import numpy as np\nN = int(input())\np = np.a...
['Wrong Answer', 'Accepted']
['s148330128', 's485312508']
[23092.0, 23104.0]
[434.0, 488.0]
[332, 429]
p02984
u393512980
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = list(map(int, input().split()))\nt = [0]\nfor i, a in enumerate(A):\n if i % 2 == 0:\n t.append(a)\n else:\n t.append(-a)\nfor i in range(N):\n t[i+1] += t[i]\nprint(t)\nfor i in range(1, N+1):\n if i % 2:\n print(t[N] - t[i-1] - t[i-1])\n else:\n print...
['Wrong Answer', 'Accepted']
['s519266890', 's629592872']
[14616.0, 17632.0]
[203.0, 181.0]
[328, 350]
p02984
u402672613
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["n=int(input())\naList=list(map(int,input().split()))\n\nfor i in range(n):\n\tr = 0\n\tfor j in range(n):\n\t\tk = (i+j)%n\n\t\tif j%2 == 0:\n\t\t\t\n\t\t\tr += aList[k]\n\t\t\t#print(aList[k])\n\t\telse:\n\t\t\t#print('minus')\n\t\t\tr -= aList[k]\n\t\t\t#print(aList[k])\n\tprint(str(r) ,end=' ')\n\t\t\t\n\t\n", "n=...
['Time Limit Exceeded', 'Accepted']
['s509577211', 's259907576']
[14140.0, 19144.0]
[2104.0, 117.0]
[277, 264]
p02984
u405832869
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import collections as cl\nN = int(input())\nwater = cl.deque(map(int,input().split()))\nsum = sum(water)\nans = []\nfor i in range(N):\n sum_odd = 0\n sum_even = 0\n for k in range((N+1)//2):\n sum_odd += water[2*k]\n sum_even = sum - sum_odd\n ans.append((sum_odd - sum_even))\n water.rotate(-1)\n \nprint(*...
['Wrong Answer', 'Accepted']
['s624433748', 's234862148']
[14404.0, 14404.0]
[2104.0, 248.0]
[317, 452]
p02984
u422242927
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = map(lambda x: 2 * int(x), input().split())\n\nall_mount = sum(A) // 2\nA_1 = all_mount\nfor i in range(1, N, 2):\n A_1 -= A[i]\n \nmounts = [A_1]\nfor i in range(N-1):\n mounts.append(A[i] - mounts[i])\n \nprint(" ".join(mounts))', 'N = int(input())\nA = list(map(lambda x: 2 * int(x), input(...
['Runtime Error', 'Accepted']
['s144118633', 's971400562']
[11132.0, 19144.0]
[54.0, 107.0]
[243, 259]
p02984
u443536265
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nl_a = list(map(int,input().split()))\nprint(l_a[1::2])\nb_x = sum(l_a) - sum(l_a[1::2])*2\nl_x =[b_x]\nfor s in range(N-1):\n x = l_a[s]*2 - b_x\n l_x.append(x)\n b_x = x\nprint(l_x)\n', 'N = int(input())\nl_a = list(map(int,input().split()))\nb_x = sum(l_a) - sum(l_a[1::2])*2\nl_x =[b_x]\n...
['Wrong Answer', 'Accepted']
['s085599659', 's534687956']
[16196.0, 14032.0]
[94.0, 127.0]
[201, 185]
p02984
u445624660
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['\n\n\nn = int(input())\ndum = list(map(int, input().split()))\ncount = 0\nl, r = 0, (10 ** 9 + 1000000) // 2\n\nwhile True:\n mid = (l + r) // 2\n \n rain = [0 for _ in range(n)]\n rain[0] += mid * 2\n flag = True\n for i in range(1, n):\n next_amount = (dum[i - 1] - (rain[i - 1] // 2)) * 2\n...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s021783701', 's328463655', 's393538603', 's450657592', 's488471350', 's636071393', 's947904431', 's809517798']
[18260.0, 18528.0, 18260.0, 54196.0, 14400.0, 18260.0, 18616.0, 19236.0]
[1740.0, 1809.0, 1919.0, 2104.0, 2104.0, 1817.0, 1808.0, 1594.0]
[1166, 1116, 1162, 1070, 1246, 1166, 1116, 767]
p02984
u455707769
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import numpy as np\n\nn = int(input())\n\na = list(map(int, input().split()))\n\ny = np.zeros((n, 1), dtype=np.int)\n\nfor i, wa in enumerate(a):\n y[i][0] = wa\n\n\nA = np.zeros((n, n), dtype=np.int)\nexit()\nfor i in range(n-1):\n A[i][i] = 1\n A[i][i+1] = 1\nexit()\nA[n-1][n-1] = 1\nA[n-1][0] = 1\n\nexit(...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s051344216', 's079927515', 's145859651', 's308129021', 's341587390', 's393064070', 's458574099', 's479745433', 's644323624', 's677451381', 's758829007', 's775155477', 's788604426', 's809187576', 's622401193']
[23104.0, 462520.0, 23120.0, 462136.0, 23100.0, 158168.0, 158168.0, 23072.0, 23116.0, 158168.0, 23116.0, 462260.0, 23072.0, 23120.0, 23976.0]
[209.0, 2110.0, 214.0, 2110.0, 214.0, 213.0, 219.0, 217.0, 217.0, 215.0, 212.0, 2110.0, 220.0, 318.0, 262.0]
[300, 383, 391, 383, 300, 287, 390, 392, 206, 294, 294, 383, 200, 391, 379]
p02984
u466331465
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = [int(x) for x in input().split()]\nr = [0]*(N+1)\nfor i in range(N):\n r[i+1] = A[i]-r[i]\nx = r[N]\nr[1::2] = r[1::,2]-x\nr[0::2] = r[1::,2]+x\nr = list(map(str,r))\nprint(" ".join(r))\n', 'import numpy as np\nN = int(input())\nA = [int(x) for x in input().split()]\nr = np.array([0]*(N+1))\nfo...
['Runtime Error', 'Accepted']
['s030663862', 's911843148']
[14024.0, 26784.0]
[72.0, 612.0]
[200, 252]
p02984
u489559146
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import sympy\n\nN = input()\nY = list(map(int,input().split(\' \')))\n\nsymbols = []\nfor i in range(N):\n symbols.append(sympy.Symbol(\'x\' + str(i)))\n\nequation = []\nfor i in range(N):\n i1 = i\n i2 = i + 1 \n if i2 >= N:\n i2 = 0\n equation.append(0.5*symbols[i1] + 0.5*symbols[i2] - Y[i])\n...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s392624807', 's619043761', 's871694308', 's600730158']
[3064.0, 3064.0, 3064.0, 18116.0]
[17.0, 17.0, 17.0, 88.0]
[395, 390, 401, 229]
p02984
u497046426
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["import numpy as np\n\nN = int(input())\n*A, = map(int, input().split())\nA = np.array(A, dtype='int64')\nC = np.diag([1 for _ in range(N)]) + np.diag([1 for _ in range(N-1)], k=1)\nC[-1, 0] = 1\nX = np.linalg.solve(C, A)\nX = list(map(int, X))\nprint(*X)", 'N = int(input())\n*A, = map(int, input().split())\nX = [0]*N...
['Runtime Error', 'Accepted']
['s077264037', 's672325627']
[466172.0, 14092.0]
[2110.0, 122.0]
[245, 177]
p02984
u500297289
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = list(map(int, input().split()))\n\ns = sum(A)\nc = 0\nfor i in range(2, N, 2):\n c += A[i]\n\nans = [s - 2 * c]\n\nfor i in range(1, N):\n ans.append((A[i] - ans[-1] // 2) * 2)\n\nprint(*ans)\n', 'N = int(input())\nA = list(map(int, input().split()))\n\ns = sum(A)\nc = 0\nfor i in range(2,...
['Wrong Answer', 'Accepted']
['s995038332', 's764118893']
[14412.0, 15128.0]
[121.0, 131.0]
[207, 235]
p02984
u507027929
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['\nL, R = map(int, input().split())\n# 2019 = 3*673\np = 673\nif R-L>=p:\n print(0)\nelse:\n ans = 2019\n for i in range(L,R+1):\n for j in range(i+1,R+1):\n ans = min((i*j)%2019, ans)\n print(ans)', "N = int(input())\nA = list(map(int, input().split()))\n\nx = 0\nfor i,a in enumerate(A):...
['Runtime Error', 'Accepted']
['s443882020', 's854106249']
[3060.0, 17224.0]
[17.0, 125.0]
[215, 242]
p02984
u516949135
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = list(map(int,input().split()))\nX =[0]*N\nsum_=0\nfor i in range(N):\n if i%2==0:\n sum_=sum_+A[i]\n else:\n sum_=sum_-A[i]\nX[0]=sum_/2\nprint(X[0])\nfor i in range(1,N):\n X[i]=A[i]-X[i-1]\n print(X[i])\n ', 'N = int(input())\nA = list(map(int,input().split()))\nX =[0]*N\nsum_=0\nfo...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s556096976', 's664041365', 's283849439']
[14028.0, 14472.0, 24656.0]
[211.0, 98.0, 566.0]
[226, 211, 257]
p02984
u520276780
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\na = list(map(int, input().split( )))\n\na_sum = sum(a)\na_sum //= 2\n\na_sum_0 = sum(a[1::2])\n\nans = []\na0 = a_sum -a_sum_0\nprint(a_sum,a_sum_0,a0)\nans.append(2*a0)\na[0] -= a0\nfor i in range(n-1):\n ans.append(2*a[i])\n a[i+1] -= a[i]\n \nprint(*ans)', 'n = int(input())\na = list(map...
['Wrong Answer', 'Accepted']
['s559268804', 's141898629']
[14092.0, 14092.0]
[126.0, 132.0]
[267, 243]
p02984
u525227429
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import numpy as np\nN = int(input())\nA = list(map(int, input().split()))\n\nfor i in range(N):\n ans = 0\n for j in range(N):\n if j % 2 == i % 2:\n ans += A[j]\n else:\n ans -= A[j]\n print(ans * 2 ,end = "")\n if i != N - 1:\n print(" ", end = "")\n else:\n print()', 'import numpy as np\...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s155734221', 's203735061', 's256145652', 's667420691']
[23096.0, 23084.0, 23088.0, 14092.0]
[2109.0, 2112.0, 2109.0, 338.0]
[280, 276, 281, 336]
p02984
u533232830
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\nl = list(map(int, input().split()))\nall_rain = sum(l)\nans = []\n\nfor i in range(n):\n now = (i+2)%n\n others = 0\n while now%n != (i+1)%n:\n others += l[(now-1)%n]\n now = (now+2)%n\n ans.append(all_rain-others*2)\n\nprint(ans)', 'n = int(input())\nl = list(map(int, inpu...
['Wrong Answer', 'Accepted']
['s982909953', 's861169214']
[14028.0, 19096.0]
[2104.0, 106.0]
[261, 270]
p02984
u539367121
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['def nCk(_n,_k):\n if _k==0:\n return 1\n else:\n if _n<0 or _k<0 or _n-_k<0:\n return 0\n else:\n return (fact[_n]//(fact[_k]*fact[_n-_k]))%m\n\nfact=[1]*2005\nfor i in range(1,2001):\n fact[i]=fact[i-1]*i\n\nn,k=map(int,input().split())\nm=10**9+7\nans=cnt=0\nfor _k in range(1,k+1):\n ans=(nCk...
['Runtime Error', 'Runtime Error', 'Accepted']
['s652079278', 's956764965', 's724296628']
[11436.0, 9196.0, 20516.0]
[29.0, 27.0, 101.0]
[395, 167, 161]
p02984
u545368057
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nAs = list(map(int, input().split()))\n\nA_all = sum(As)//2\n\nans = []\nfor i in range(N):\n cnt = 0\n for j in range(N//2):\n index = i+2*j\n cnt += As[index%N]\n ans.append((A_all-cnt)*2)\n \na = ""\nfor i in range(1,N+1):\n a += str(ans[i%N])+" "\nprint(a)', 'N = int(inp...
['Time Limit Exceeded', 'Accepted']
['s553823702', 's795858811']
[14028.0, 14916.0]
[2104.0, 186.0]
[287, 509]
p02984
u548684908
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import numpy as np\n\nN=int(input())\nRain = np.array(list(map(int,input().split())))\nRain = np.reshape(Rain,(N,1))\n\nn1 = np.ones(N)\nn2 = np.ones(N-1)\na = np.diag(n1)\nb = np.diag(n2,k=1)\nc = a+b\nc[N-1][0] = 1\nd = 0.5 * c\n\nans = np.linalg.solve(d,Rain)\nfor i in ans:\n print(int(i[0]),end=" ")', "import ...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s308803547', 's396266870', 's402645026', 's663770679', 's691959665', 's732814723', 's729664932']
[751688.0, 303880.0, 23100.0, 453332.0, 158156.0, 751688.0, 20500.0]
[2117.0, 233.0, 183.0, 326.0, 184.0, 2117.0, 129.0]
[291, 315, 310, 313, 317, 304, 282]
p02984
u571199625
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\na = list(map(int, input().split()))\n\nsuma = sum(a)\nsuma2 = sum([a[x] for x in range(1,n,2)])\nb = [suma-suma2*2]\nfor i in range(1,n):\n b.append(a[i-1]*2-b[i-1])\nprint(b)', 'n = int(input())\na = list(map(int, input().split()))\n\nfor i in range(a[0]*2+1):\n b = [i]\n for j in range(1,...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s237653587', 's732565499', 's791301098']
[14364.0, 14092.0, 14028.0]
[86.0, 2104.0, 123.0]
[188, 300, 189]
p02984
u572142121
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N=int(input())\nA=list(map(int,input().split()))\nS=sum(A)\nB=[0]*N\nB[0]=S-2*sum(A[1::2])\nfor i in range(n-1):\n B[i+1]=2*A[i]-B[i]\nprint(*B)', 'N=int(input())\nA=list(map(int,input().split()))\nS=sum(A)\nB=[0]*N\nB[0]=S-2*sum(A[1::2])\nfor i in range(N-1):\n B[i+1]=2*A[i]-B[i]\n\nprint(*B)']
['Runtime Error', 'Accepted']
['s243331159', 's446197928']
[14028.0, 14028.0]
[44.0, 116.0]
[140, 141]
p02984
u580362735
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = list(map(int,input().split()))\nif A[0] == 0 or A[N-1] == 0:\n A_tmp = A[0]\n A_ = A[1:N]\n A_.append(A_tmp)\n A = A_\n flag = 1\nelse:\n flag = 0\nif A[0]<A[N-1]:\n start = A[0]\nelse:\n start = A[N-1]\nfor i in range(2*start,1,-2):\n ans = [i]\n A_tmp = A[:]\n A_tmp[0] -= ans[0]//2\...
['Runtime Error', 'Runtime Error', 'Accepted']
['s454630049', 's881018655', 's121801997']
[14156.0, 17952.0, 19100.0]
[2104.0, 2104.0, 91.0]
[687, 719, 186]
p02984
u580904613
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\na = [int(i) for i in input().split()]\nx = [0]*n\nfor i in range(n):\n x[i] = sum(a)\n for j in range(0, i):\n if (j-i) % 2 == 0:\n x[i] -= 2*a[j]\n for j in range(i, n):\n if (j-i) % 2 == 1:\n x[i] -= 2*a[j]\nprint(x)', 'n = int(input())\na = [int(i) for i in input().split()]\nx ...
['Wrong Answer', 'Accepted']
['s212830887', 's323635098']
[14092.0, 14092.0]
[2104.0, 133.0]
[244, 197]
p02984
u586759271
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n=int(input())\na=[int(i) for i in input().split()]\nM=[0]*n\nM[0]=sum(a[i]*(-1)**i for i in range(n))\nfor i in range(1,n):\n M[i]=2*a[i-1]-M[i-1]\nprint(M)', 'n=int(input())\na=[int(i) for i in input().split()]\nM=[0]*n\nM[0]=sum(a[i]*(-1)**i for i in range(n))\nfor i in range(1,n):\n M[i]=2*a[i-1]-M[i-1]\npr...
['Wrong Answer', 'Accepted']
['s490244403', 's008302775']
[15252.0, 14092.0]
[121.0, 158.0]
[154, 155]
p02984
u593938737
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import sys\n\ndef solve(N, A):\n def moutain(x):\n sum = 0\n for i in range(N):\n sum += A[(x+i)%N] * (-1) ** (i)\n return sum\n\n m = [int()] * N\n for i in range(N):\n m[i] = moutain(i)\n\n print(m)\n\n\ndef main():\n N = int(input())\n A = list(map(int, inpu...
['Wrong Answer', 'Accepted']
['s677403186', 's687178921']
[14092.0, 18072.0]
[2104.0, 121.0]
[368, 343]
p02984
u597455618
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import sys\nn = int(input())\na = [ 2*int(i) for i in sys.stdin.readline().split()]\nf = (sum(a) - 2* sum(a[1::2]))//2\nans = [f] + [0 for i in range(n-1)]\nprint(ans)\nfor i in range(n-1):\n ans[i+1] = a[i] - ans[i]\nprint(" ".join(map(str, ans)))\n', 'import sys\nn = int(input())\na = [ 2*int(i) for i in sys.st...
['Wrong Answer', 'Accepted']
['s238345912', 's425230833']
[20152.0, 19904.0]
[106.0, 101.0]
[245, 234]
p02984
u602715823
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\na = list(map(int, input().split()))\n\ns = sum(a)\n\nx1 = s - 2 * (sum(a[1::2])) \nx = [x1]\nfor i in range(2, n + 1):\n x.append(2 * a[i - 2] - x[i - 2])\n\nprint(x)\n', 'n = int(input())\na = list(map(int, input().split()))\n\ns = sum(a)\n\nx1 = s - 2 * (sum(a[1::2])) \nx = [x1]\nfor i in ran...
['Wrong Answer', 'Accepted']
['s245866337', 's300603812']
[15252.0, 14092.0]
[83.0, 119.0]
[210, 211]
p02984
u604398799
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['# -*- coding: utf-8 -*-\n"""\nCreated on Sat Apr 20 20:47:47 2019\n\n@author: Owner\n"""\n\nimport numpy as np\nimport sys\nimport collections\nimport scipy.misc\nimport math\nfrom operator import itemgetter\nimport itertools\nimport copy\nimport bisect\nimport heapq\n\n\ndef prime_decomposition(n):\n i = 2\n table...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s378405841', 's499181331', 's858579968']
[25652.0, 24924.0, 24844.0]
[257.0, 247.0, 402.0]
[4511, 4522, 4521]
p02984
u609061751
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\nimport numpy as np\n\nN = int(readline())\nA = np.array([int(x) for x in readline().rstrip().split()])\nA_sum = A.sum()\nA_sum //= 2\nA_bi = 2 * A\nans = []\nif N > 3:\n for i in range(N):\n ...
['Wrong Answer', 'Accepted']
['s875460346', 's296929810']
[21524.0, 23528.0]
[307.0, 810.0]
[669, 430]
p02984
u617515020
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["import numpy as np\nn=int(input())\ny=list(map(int,input().split()))\ny=list(map(lambda x: x*2,y))\nA=np.zeros((n,n),dtype='int')\nfor i in range(n-1):\n for j in range(i,i+2):\n A[i][j]=1\nA[n-1][0],A[n-1][n-1]=1,1\nb=np.linalg.solve(A,y)\nprint(*b)", 'n=int(input())\na=list(map(int,input().split()))\nb=[sum(a)-...
['Runtime Error', 'Accepted']
['s712495498', 's614570692']
[461256.0, 14028.0]
[2110.0, 115.0]
[244, 134]
p02984
u626684023
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['# input\nN = int(input())\nA = [int(i) for i in input().split()]\n\n# main\nx = sum(A) - 2*sum([A[i] for i in range(1, N, 2)])\nwater = [x]\n\nfor i in range(N):\n x = 2*A[i] - x\n water.append(x)\n # print("new water: ", water)\n\n# output\nprint(*water)', '# input\nN = int(input())\nA = [int(i) for i in input()....
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s543317072', 's780210133', 's323266005']
[14024.0, 14400.0, 14092.0]
[116.0, 259.0, 128.0]
[244, 395, 248]
p02984
u626881915
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\na = list(map(int, input().split()))\nx = [0] * n\nx[0] += a[0]\nfor i in range(1, n, 2):\n x[0] += - a[i] + a[i+1]\n\nfor i in range(1, n):\n x[i] = -x[i-1] + 2*a[i-1]\n \no = " ".join(x)\nprint(o)\n', 'n = int(input())\na = list(map(int, input().split()))\nx = [0] * n\nx[0] += a[0]\nfor i in ran...
['Runtime Error', 'Runtime Error', 'Accepted']
['s082093811', 's219227824', 's486847608']
[14092.0, 14028.0, 19144.0]
[87.0, 87.0, 107.0]
[208, 205, 218]
p02984
u638320267
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["N = int(input())\nA = list(map(int, input().split()))\ns = sum(A)\nA = A*2\n\nans = []\nfor i in range(2):\n ans.append(str(s - sum(A[i+1:N+i-1:2])*2 ))\nfor i in range(2,N):\n ans.append(str(int(ans[i-2])+(A[i-11]-A[N+i-2])*2))\n\nans = ' '.join(ans)\nprint(ans)", "N = int(input())\nA = list(map(int, input().s...
['Runtime Error', 'Accepted']
['s634713419', 's712904395']
[16380.0, 15896.0]
[145.0, 143.0]
[257, 256]
p02984
u638456847
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import numpy as np\n\nN = int(input())\nB = [int(i)*2 for i in input().split()]\n\na = [[0]*N for i in range(N)]\n\nfor i in range(N-1):\n for j in range(N):\n if j == i:\n a[i][j] += 1\n if j == i+1:\n a[i][j] += 1\n\na[-1][0] += 1\na[-1][-1] += 1\n\nA = np.array(a, dtype=np.in...
['Time Limit Exceeded', 'Runtime Error', 'Time Limit Exceeded', 'Accepted']
['s524396763', 's680697764', 's814677218', 's883488518']
[1978676.0, 313416.0, 1978628.0, 65236.0]
[2231.0, 2109.0, 2231.0, 861.0]
[400, 352, 295, 367]
p02984
u638795007
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["import sys\ndef I(): return int(sys.stdin.readline())\ndef LI(): return list(map(int,sys.stdin.readline().split()))\nmod = 10**9 + 7\ninf = float('inf')\n\nN = I()\nA = LI()\nans = [0]*N\ndis = [0]*N\ndis[0] = (A[1]-A[0])*2\nfor i in range(N-1):\n dis[i+1] = dis[i]+2*(A[-N+2*i+3]-A[-N+2*i+2])\n#print(dis)\n\nbasic...
['Wrong Answer', 'Accepted']
['s588799657', 's042353827']
[19152.0, 23212.0]
[143.0, 153.0]
[410, 432]
p02984
u638902622
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["import sys\ninput = lambda: sys.stdin.readline().rstrip()\ninput_nums = lambda: list(map(int, input().split()))\n\ndef main():\n L, R = input_nums()\n MOD = 2019\n a = L%MOD\n b = R%MOD\n if a < b and R - L < 2019:\n print((a*(a+1))%MOD)\n else:\n print(0)\n\nif __name__ == '__main__':...
['Runtime Error', 'Accepted']
['s599091503', 's197375255']
[3060.0, 14400.0]
[18.0, 111.0]
[315, 554]
p02984
u650265349
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nx = list(map(int, input().split()))\ny = [0] * N\n\nodd = sum([n for i, n in enumerate(shifted_x) if i % 2 == 1])\neven = sum([n for i, n in enumerate(shifted_x) if i % 2 == 0])\ny[0] = even - odd\n\nfor i in range(N-1):\n y[i+1] = 2 * x[1] - y[i]\n\n\nstr_y = map(str, y)\noutput = " ".join(str_y)\...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s219428654', 's416749930', 's476477170', 's891144039']
[14028.0, 14864.0, 26040.0, 19144.0]
[44.0, 2104.0, 2104.0, 118.0]
[318, 267, 302, 302]
p02984
u659481093
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['l, r = [int(i) for i in input().split()]\n\nbase = 2019\nl_mod = l % base\nr_mod = r % base\n\nprint(l_mod * (l_mod + 1))\n', "n = int(input())\nA = [int(a) for a in input().split()]\n\nx = 0\nrains = [x]\nfor a in A:\n x = a - x\n rains.append(x)\n\ndiff = (rains[-1] - rains[0]) // 2\nresult = []\nfor i, x in ...
['Runtime Error', 'Accepted']
['s410146348', 's724371924']
[2940.0, 21820.0]
[17.0, 116.0]
[116, 343]
p02984
u659511702
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\nt = [int(i) for i in input().split()] \n\nans = []\na = 0\n\nfor i in range(len(t)):\n if i % 2 == 0:\n a += t[i]\n else:\n a -= t[i]\n\nans.append(a)\n\nfor i in range(1,len(t)):\n print(t[i-1],ans[i-1])\n ans.append(2*(t[i-1]-(ans[i-1]//2)))\n\nmap_result = map(str, ans)\nprint(" ".join(...
['Wrong Answer', 'Accepted']
['s846182319', 's128199533']
[21276.0, 19096.0]
[256.0, 121.0]
[311, 286]
p02984
u665335685
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\na = list(map(int,input().split()))\nList = []\nList.append(sum(a[0::2])-sum(a[1::2]))\nfor i in range(n-1):\n\tList.append(2 * a[i]-List[i])\nprint(List)', "n = int(input())\na = list(map(int,input().split()))\nList = []\nList.append(sum(a[0::2])-sum(a[1::2]))\nfor i in range(n-1):\n\tList.append(2 ...
['Wrong Answer', 'Accepted']
['s297451226', 's080819254']
[15032.0, 19144.0]
[79.0, 92.0]
[164, 183]
p02984
u669173971
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n=int(input())\na=list(map(int, input().split()))\ntotal=0\nb=[0]*n\na_cycle=a*2\n\nfor i in range(n):\n total+=a[i]\nprint(total)\nfor i in range(n):\n a_tot=0\n for j in range(n//2):\n \ta_tot+=a_cycle[i+2*j+1]\n b[i]=total-2*a_tot\nprint(*b)', 'n=int(input())\na=list(map(int, input().split()))\ntotal=0\nb=[0]...
['Wrong Answer', 'Accepted']
['s607839641', 's399810466']
[14028.0, 15260.0]
[2108.0, 140.0]
[234, 237]
p02984
u669240121
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nwaters = list(map(int, input().split()))\nans = []\nx = sum(waters) - sum([waters[i] for i in range(1, N-1, 2)])*2\nans.append(x)\nfor i in range(N-1):\n ans.append(waters[i] * 2 - x)\n x = ans[-1]\nprint(ans)', "N = int(input())\nwaters = list(map(int, input().split()))\nans = []\nx = sum(wat...
['Wrong Answer', 'Accepted']
['s801933790', 's557904761']
[14412.0, 21316.0]
[85.0, 97.0]
[225, 273]
p02984
u673559119
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["#coding utf-8\nN=int(input())\nA=list(map(int,input().split())) \nx = [0 for i in range(N)]\nS =sum(A)\nx[0]=S\nfor i in range(1,N,2):\n x[0]-=2*A[i]\n\nfor i in range(1,N):\n x[i]=2*A[i-1]-x[i-1]\nprint(S)\nans= map(str,x)\nprint(' '.join(ans))", "#coding utf-8\nN=int(input())\nA=list(map(int,input().split())) \nx...
['Wrong Answer', 'Accepted']
['s156736118', 's224923667']
[19096.0, 19100.0]
[106.0, 105.0]
[234, 225]
p02984
u677267454
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["N = int(input())\nA = list(map(int, input().split()))\n\nfor i in range(0, min(2 * A[0], 2 * A[1]) + 1, 2):\n ans = [0] * N\n ans[0] = i\n odd = False\n for j in range(1, N):\n ans[j] = 2 * A[j - 1] - ans[j - 1] // 2\n if ans[j] % 2 == 1:\n odd = True\n break\n if no...
['Wrong Answer', 'Accepted']
['s382715158', 's965510904']
[14032.0, 19088.0]
[2104.0, 92.0]
[352, 203]
p02984
u677440371
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import numpy as np\nn = int(input())\nA = [int(i) * 2 for i in input().split()]\n\nL1 = [[0] * n for _ in range(n)]\nfor i in range(n):\n if i + 1 <= n-1:\n L1[i][i] = 1\n L1[i][i+1] = 1\n else:\n L1[i][i] = 1\n L1[i][0] = 1\n \nL1 = np.linalg.inv(L1)\nL2 = np.array(A)', 'n = ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s340633921', 's485555693', 's355804398']
[1978776.0, 20364.0, 19144.0]
[2238.0, 131.0, 130.0]
[296, 248, 253]
p02984
u679131784
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = list(map(int, input().split()))\n\nx1 = sum(A) - 2 * sum([A[i] for i in range(1,N,2)])\nx = [x1]\n\nfor i in range(1,N):\n xi = 2 * A[i - 1] - x[i - 1]\n x.append(xi)\n\nprint(x)', 'import numpy as np\n\nN = input()\nA = list(map(int,input().split()))\n\nN = int(N)\nflag = 0\nx = np.zeros(...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s448556677', 's495311058', 's834685335']
[15252.0, 23104.0, 14092.0]
[92.0, 2109.0, 122.0]
[196, 355, 197]
p02984
u681110193
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n=int(input())\nL=list(map(int,input().split()))\nans=[0 for i in range(n)]\n\nL=[i for i in L]\n\n\nm=n//2\na=L[m]\n\nfor i in range(1,(n+1)/2):\n a=L[m-i]+L[m+1]-a\n\nans[0]=a/2\n\nfor i in range(1,n):\n ans[i]=L[i]-ans[i-1]\n \nprint(ans)', 'n=int(input())\nL=list(map(int,input().split()))\nans=[0 for i in rang...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s034052874', 's800999921', 's172835491']
[14032.0, 17788.0, 14092.0]
[51.0, 118.0, 147.0]
[226, 240, 231]
p02984
u681150536
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["from sys import exit\n\nN = int(input())\n\nA = list(map(int, input().split()))\n\n\na = 0\nfor i in range(N - 1):\n if i % 2 == 0:\n a -= A[i]\n else:\n a += A[i]\n\nn = A[N - 1] + a\n\n_x = n\nans = []\nfor i in range(N - 1):\n if i == 0:\n ans.append((A[N - 1] - _x / 2) * 2)\n ...
['Wrong Answer', 'Accepted']
['s239754537', 's876348392']
[18504.0, 19096.0]
[182.0, 180.0]
[464, 474]
p02984
u685263709
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['macro_rules! input {\n (source = $s:expr, $($r:tt)*) => {\n let mut iter = $s.split_whitespace();\n let mut next = || { iter.next().unwrap() };\n input_inner!{next, $($r)*}\n };\n ($($r:tt)*) => {\n let stdin = std::io::stdin();\n let mut bytes = std::io::Read::bytes(std::i...
['Runtime Error', 'Accepted']
['s641513780', 's697028376']
[2940.0, 18504.0]
[17.0, 110.0]
[2735, 293]
p02984
u688375653
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N=int(input())\ndums = list(map(int, input().split()))\n\nM_1 = 0\nfor i,val in enumerate(dums):\n i+=1\n if i%2==1:\n M_1 += val\n else:\n M_1 -= val\n\nout_dict = {i+1:0 for i in range(N)}\nout_dict[1] = M_N\n\nfor i in range(1,N):\n out_dict[i+1] = 2*dums[i-1] - out_dict[i]\n\nprint(" ".j...
['Runtime Error', 'Accepted']
['s663124283', 's220328575']
[20420.0, 28344.0]
[85.0, 144.0]
[340, 340]
p02984
u692453235
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import scipy.linalg as linalg\n\nN = int(input())\nb = np.array(list(map(int, input().split())))\n\nA = np.zeros(N**2).reshape(N, N)\nfor i in range(N):\n for j in range(N):\n if i == j or i+1 == j:\n A[i, j] = 1\n else:\n continue\nA[N-1, 0] = 1\nA = A / 2\nA_inv = linalg.inv(A...
['Runtime Error', 'Accepted']
['s309073290', 's114403816']
[26096.0, 14028.0]
[426.0, 143.0]
[337, 224]
p02984
u695811449
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import sys\ninput = sys.stdin.readline\n\nN=int(input())\nA=list(map(int,input().split()))\n\nX=0\nfor i in range(N):\n if i%2==0:\n X+=A[i]\n else:\n X-=A[i]\n\nprint(X)\n\n\nANS=[X]\n\nfor i in range(N-1):\n ANS.append((A[i]-ANS[-1]//2)*2)\n\nprint(*ANS)\n', 'import sys\ninput = sys.stdin.rea...
['Wrong Answer', 'Accepted']
['s837851628', 's767828242']
[14108.0, 14124.0]
[145.0, 142.0]
[259, 260]
p02984
u709304134
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import numpy as np\nN = int(input())\nA = np.array(list(map(int,input().split())))\nargmn = np.argmin(A)\nmn = A[argmn]\nfor m in range(mn+1):\n B = np.zeros(len(A))\n B[argmn] = m * 2\n for i in range(len(A)):\n idx = (i + argmn)%len(A)\n B[(idx+1)%len(A)] += A[idx] * 2 - B[idx]\n B[argmn] -= m * 2\n if...
['Time Limit Exceeded', 'Accepted']
['s977694893', 's466396835']
[34840.0, 17228.0]
[2109.0, 98.0]
[417, 187]
p02984
u712822150
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import sys\nimport numpy as np\n\n\ndef input():\n return sys.stdin.readline().rstrip()\n\n\ndef main():\n n = int(input())\n a = [int(e) for e in input().split()]\n va = np.array(a)\n m = np.identity(n, dtype=int)\n for i in range(n):\n if i < n - 1:\n m[i][i + 1] = 1\n els...
['Runtime Error', 'Accepted']
['s690514734', 's746256936']
[461012.0, 23132.0]
[2110.0, 251.0]
[404, 450]
p02984
u716529032
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = list(map(int, input().split()))\n\na = 0\nfor i in range(N):\n a += A[i] * (1 if not i%2 else -1)\nprint(a)\n\nans = [0] * N\nans[0] = a\n\nfor i in range(1, N):\n ans[i] = 2 * A[i-1] - ans[i-1]\n\nprint(*ans)', 'N = int(input())\nA = list(map(int, input().split()))\n\na = 0\nfor i in range(N)...
['Wrong Answer', 'Accepted']
['s927669782', 's058512555']
[14032.0, 14032.0]
[146.0, 144.0]
[219, 210]
p02984
u716530146
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["n = int(input())\na = list(map(int, input().split()))\nx=a[n-1]\nfor i in range(0,n-2,2):\n\tx += a[i] - a[i+1]\nx /= 2\nm = [x]\nfor t in range(n-1):\n\tm.append(a[t]-m[t])\nm = [int(mountain * 2) for mountain in m]\nprint(m)\n\n# m = []\n# m.append(a[0]+a[n-1])\n\n# \tm.append(a[i-1]+a[i])\n# # print(' '.join(m))\...
['Wrong Answer', 'Accepted']
['s041099292', 's614467769']
[16712.0, 14664.0]
[115.0, 155.0]
[342, 446]
p02984
u731028462
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = list(map(int, input().split()))\nX = []\n\nx0 = sum(A)\nfor i in range(1,N-1,2):\n x0 = x0-2*A[i]\nX.append(x0)\n\nfor i in range(N-1):\n X.append(2*A[i]-X[i])\n \nprint(X)', 'N = int(input())\nA = list(map(int, input().split()))\nX = []\n\nx0 = sum(A)\nfor i in range(1,N-1,2):\n x0 ...
['Wrong Answer', 'Accepted']
['s784000207', 's167914384']
[15304.0, 19144.0]
[90.0, 100.0]
[191, 210]
p02984
u731291894
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['# coding: utf-8\nimport math\n\nN = int(input())\nA = list(map(int, input().split()))\nA_sum = sum(A)\n\nres = [0 for i in range(N)]\n\nfor i in range(N):\n res[i] = A_sum - 2 * sum([A[(i+(2*j+1)) % N] for j in range(int((N-1)/2))])\n\nprint(res)', "# coding: utf-8\nimport math\n\nN = int(input())\nA = list(map(in...
['Wrong Answer', 'Accepted']
['s015298990', 's820023828']
[14264.0, 19224.0]
[2104.0, 96.0]
[237, 272]
p02984
u735891571
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\na = list(map(int,input().split()))\nans = [0] * n\ndouble_x = 0\n\nfor i, t in enumerate(a):\n double_x += (1 + -2 * (i % 2)) * t\n\nans[0] = double_x\n\nfor i in range(1, n):\n ans[i] = 2 * (a[i-1] - ans[i-1] // 2)\n\nprint(ans)', 'n = int(input())\na = list(map(int,input().split()))\nans = [...
['Wrong Answer', 'Accepted']
['s388172461', 's568393757']
[14364.0, 14028.0]
[116.0, 151.0]
[240, 241]
p02984
u752774573
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["from array import array\nN = int(input())\nS = input()\na = ['A', 'B', 'X', 'Y']\nL = []\nfor i in range(16):\n L.append(a[i//4]+a[i%4])\nans = N+1\nfor m in range(16):\n for n in range(16):\n i=L[m]\n j=L[n]\n dp = array('i', [k for k in range(N+1)])\n for k in range(2, N+1):\n ...
['Wrong Answer', 'Accepted']
['s629875873', 's975283501']
[14644.0, 20728.0]
[2206.0, 98.0]
[480, 159]
p02984
u767664985
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import numpy as np\nN = int(input())\nA = list(map(int, input().split()))\n\n# solve "mat * x = b" about x\nx, y = np.identity(N), np.identity(N)\ny0 = y[0]\ny = np.reshape(np.append(np.delete(y, 0, 0), y0), (N, N))\nmat = (x + y) / 2\n\nb = np.array(A)\n\nfor i in range(len(mat) - 1):\n for j in range(i + 1, len(...
['Runtime Error', 'Accepted']
['s947885034', 's650349466']
[746708.0, 19144.0]
[2110.0, 102.0]
[635, 214]
p02984
u774160580
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import numpy as np\n\nN = int(input())\nA = np.array([int(i) for i in input().split()])\nP = []\nfor i in range(N):\n if i == N - 1:\n P.append([0.5] + [0] * (N - 2) + [0.5])\n else:\n P.append([0] * i + [0.5, 0.5] + [0] * (N - 2 - i))\nP = np.array(P)\nfor i in np.dot(np.linalg.inv(P), A):\n p...
['Time Limit Exceeded', 'Accepted']
['s584313079', 's068000239']
[1423364.0, 14020.0]
[2193.0, 165.0]
[331, 266]
p02984
u778113870
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\na = [int(x) for x in input().split(\' \')]\n# a = [int(input()) for x in range (n)]\n\nb = [0] * n\nif(a[0] > a[-1]) : mi = a[-1]\nelse : mi = a[-0]\n\n\nfor x in range(mi*2, -1,-2) :\n # print(x)\n b[0] = x\n\n for i in range(1,n) :\n b[i] = 2 * a[i-1] - b[i-1]\n # print(b)\n...
['Time Limit Exceeded', 'Time Limit Exceeded', 'Accepted']
['s055264673', 's638893331', 's393672129']
[14400.0, 14400.0, 14092.0]
[2108.0, 2104.0, 97.0]
[472, 471, 285]
p02984
u778926388
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\nA = list(map(int,input().split()))\n\nxn = 0\nfor i in range(n-1):\n xn = xn + (-1) ** (i+1) * int(A[i])\n\nxn = xn + A[n-1]\n\nx = []\nx1 = 2*A[n-1]-xn\nx.append(x1)\n\nfor i in range(n-1):\n xi=2*A[i]-x1\n x.append(xi)\n x1 = xi\nprint(x)\n', 'n = int(input())\nA = list(map(int,input()...
['Wrong Answer', 'Accepted']
['s131399374', 's655423691']
[14412.0, 14028.0]
[148.0, 190.0]
[254, 255]
p02984
u782748646
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n=int(input())\na=list(map(int, input().split()))\nr=[0]*n\n\n\nfor i in range(n):\n a1,a2,a3=a[i-1], a[i], a[(i+1)%n]\n if a2 > a1:\n r[i+1]+=(a2-a1)*2\n a[i]-=(a2-a1)\n a[i+1]-=(a2-a1)\n if a2 > a3:\n r[i]+=(a2-a3)*2\n a[i]-=(a2-a3)\n a[i-1]-=(a2-a3)\n\nb=max(a)\np...
['Runtime Error', 'Accepted']
['s402627370', 's101463893']
[15944.0, 19256.0]
[154.0, 418.0]
[360, 782]
p02984
u787456042
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\ndl = list(map(int, input().split()))\n\nml = [0 for _ in range(n)]\n\nwhile len(set(dl)) != 1 :\n m = max(dl)\n for i in range(n) :\n if dl[i] == m :\n if dl[i-1] >= dl[(i+1)%n] :\n lain = max(dl[i-1]-dl[i-2], dl[i]-dl[(i+1)%n])\n dl[i-1] -= lain...
['Time Limit Exceeded', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Time Limit Exceeded', 'Runtime Error', 'Accepted']
['s044920046', 's081301006', 's090753553', 's242982973', 's848076233', 's538218844']
[14104.0, 14620.0, 14616.0, 14616.0, 1062480.0, 22492.0]
[2104.0, 2104.0, 2104.0, 2104.0, 2169.0, 199.0]
[660, 598, 598, 608, 451, 568]
p02984
u787562674
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input()) \ninputs = [int(i) for i in input().split()]\n\ndouble_inputs = list(map(lambda x: x * 2, inputs))\nfor i in range(N):\n total = sum(inputs)\n for j in range((N - 1) // 2):\n total -= double_inputs[(i+1+2*j)%N]\n print(total)', "N = int(input()) \ninputs = [int(i) for i in input().spl...
['Time Limit Exceeded', 'Accepted']
['s240629020', 's501413104']
[14092.0, 23732.0]
[2104.0, 128.0]
[258, 394]
p02984
u809849468
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = [int(i) for i in input().split()]\nX = [0] * N\nsum_A = sum(A)\nsum_subA = 0\nfor i in range(1, N, 2):\n sum_subA += 2 * A[i]\nX[0] = sum_A - sum_subA\nfor i in range(1, N):\n X[i] = 2 * A[i - 1] - X[i-1]\nprint(X)', 'N = int(input())\nA = [int(i) for i in input().split()]\nX = [0] * N\nsu...
['Wrong Answer', 'Accepted']
['s397801631', 's955257718']
[15244.0, 14024.0]
[98.0, 132.0]
[232, 233]
p02984
u817422853
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import sys\n\nn=int(input())\nls=list(map(int,input().split()))\nms=[]\n\n\nfor i in range(0,10**9,2):\n x=i\n for j in range(n):\n x=(ls[j]-x//2)*2\n if x==0:\n ms.append(i//2)\n break\n\nfor i in range(n-1):\n ms.append((ls[i]-ms[-1]//2)*2)\nprint(ms)\n', 'n=int(input())\nls=list(ma...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s371081923', 's667352787', 's164096866']
[14036.0, 14404.0, 14092.0]
[2104.0, 77.0, 113.0]
[301, 139, 140]
p02984
u820839927
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["import os, sys, re, math\n\nN = int(input())\nA = list(map(int, input().split(' ')))\nret = [0 for _ in range(len(A))]\ntmp = [0 for _ in range(len(A))]\n\ninit = sum(A) - 2 * sum([A[i] for i in range(1,N,2)])\nret[0] = init\nfor i in range(N):\n if i == 0:\n tmp[i] += ret[i] // 2\n tmp[i-1] += ret[i...
['Wrong Answer', 'Accepted']
['s489470686', 's744643882']
[18760.0, 23596.0]
[133.0, 151.0]
[467, 486]
p02984
u824326335
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["n = int(input())\na = list(map(int,input().split()))\nx =0\nfor i,w in enumerate(a):\n x += (-1)*(i%2)*w\nans = [x]\nfor i,t in enumerate(a[:-1]):\n ans.append(int(((ans[i]/2)-t)*(-2)))\nprint(' '.join(map(str, ans)))", "n = int(input())\na = list(map(int,input().split()))\nx =0\nfor i,w in enumerate(a):\n i...
['Wrong Answer', 'Accepted']
['s667420391', 's597247709']
[20028.0, 19144.0]
[141.0, 138.0]
[215, 232]
p02984
u826929627
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = list(map(int, input().split()))\n\n\n\n\nX1 = sum(A) - 2 * sum([A[i] for i in range(1,N,2)])\nans = [X1]\n\n\nfor n in range(1,N,1):\n _ = 2 * A[n-1] - ans[n-1]\n ans.append(_)\n\n\nprint(ans)', 'N = int(input())\nA = list(map(int, input().split()))\n\n\n\n\nX1 = sum(A) - 2 * sum([A[i] for i i...
['Wrong Answer', 'Accepted']
['s297815407', 's930102785']
[14360.0, 14028.0]
[88.0, 127.0]
[538, 539]
p02984
u836737505
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\nl = list(map(int,input().split()))\nans = [(l[0]-l[1]+l[-1])]\nfor i in range(1,n):\n if i == n-1:\n ans.append((l[n-1]-l[0]+l[i-1]))\n else:\n ans.append((l[i]-l[i+1]+l[i-1]))\nprint(ans)', "from itertools import accumulate\nn = int(input())\nl = list(map(int,input().split()))\n...
['Wrong Answer', 'Accepted']
['s464662315', 's533739700']
[15300.0, 40912.0]
[95.0, 173.0]
[218, 541]
p02984
u837286475
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['\n\nn = int(input())\nDn = list(map(int, input().split()))\n\n\nmemo = 0 # M_n = M_0\nfor i in range(n):\n memo += Dn[i]*(-1 if i%2==0 else 1)\n\nmemo *= -1\n\nprint(memo)\n\n\n\nM0_max = min(Dn[0], Dn[-1])*2 \nMn0 = 0\n\nfor i in range(0, M0_max+1, 2):\n \n valid = i == memo \n \n\n# print(Dn)\n# p...
['Wrong Answer', 'Accepted']
['s567128194', 's189844926']
[14028.0, 14400.0]
[2104.0, 143.0]
[467, 738]
p02984
u837677955
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["import numpy as np\n\nN = int(input())\nC = list(map(int,input().split()))\n\nA = np.zeros((N,N),dtype = int)\n\nfor i in range(N-1):\n A[i][i] = 1\n A[i][i+1] = 1\nA[N-1][0] = 1\nA[N-1][N-1] = 1\n\nB = np.array(C)\n\nX = np.linalg.solve(A,B)\nY = X.tolist()\n\nfor j in range(N):\n print(str(int(Y[j]*2)),end...
['Runtime Error', 'Accepted']
['s628961115', 's109906021']
[463704.0, 19148.0]
[2110.0, 94.0]
[306, 229]
p02984
u844646164
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = list(map(int, input().split()))\nS = sum(A)\neven_s, even_t = 2, N-1\neven = 0\nfor i in range(N):\n if (i+1) % 2 == 0:\n even += A[i]\nodd_s, odd_t = 3, N\nodd = 0\nfor i in range(2, N):\n if (i+1) % 2 == 1:\n odd += A[i]\nodd_s, odd_t = 3, N\nX = [0]*N\nX[0] = S - even * 2\nX[1] = S - ...
['Wrong Answer', 'Accepted']
['s137136124', 's582087201']
[14624.0, 18488.0]
[192.0, 192.0]
[604, 636]
p02984
u844789719
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["N=int(input())\nA=[int(_) for _ in input().split()]\nans=[0]*N\nans[0]=sum(A)//2-sum(A[1::2])\nfor i in range(N-1):\n ans[i+1]=A[i]-ans[i]\nprint(' '.join(str(2*a) for a in ans))", "N=int(input())\nA=[int(_) for _ in input().split()]\nans=[0]*N\nans[0]=sum(A)//2-sum(A[1::2])\nfor i in range(N-):\n ans[i+1]=A[i]...
['Runtime Error', 'Runtime Error', 'Accepted']
['s077818718', 's936558258', 's621534346']
[2940.0, 2940.0, 19092.0]
[17.0, 17.0, 100.0]
[177, 174, 175]
p02984
u852690916
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N=int(input())\nA=list(map(int,input().split()))\n\nok=0\nover=(10**9)*2\nrains=[0]*(N+1)\nwhile over-ok>1:\n m=(ok+over)//2\n rains[0]=m\n for i in range(N):\n rains[i+1]=(A[i]-rains[i]//2)*2\n if rains[N]<rains[0]:\n over=m\n else:\n ok=m\n\nrain=ok\nfor i in range(N):\n print...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s303237219', 's992068998', 's634539654']
[14040.0, 14036.0, 14032.0]
[1162.0, 1045.0, 162.0]
[332, 322, 485]
p02984
u870262604
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['import sys\nsys.setrecursionlimit(10**7)\n\ndebug = True\ndebug = False\n\ndef dprint(*objects):\n if debug == True:\n print(*objects)\n\ndef solve():\n N = int(input())\n A = list(map(int, input().split()))\n\n def check(A, x):\n ans = [x]\n for i in range(1, N):\n tmp = A...
['Wrong Answer', 'Accepted']
['s224639759', 's271941846']
[18112.0, 19128.0]
[2104.0, 389.0]
[1067, 1169]
p02984
u873134970
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['# x_(n+1) = 2*a_n - x_n\ndef xn(ans,a,n):\n for i in range(n-1):\n ans[i+1]=2*a[i]-ans[i]\n return ans\n \n\nn = int(input())\nA = list(map(int,input().split()))\nans = [0]*n\nans[0] = sum(A)-2*sum(A[1:n:2])\nfor j in range(2*max(A)):\n ans = xn(ans,A,n)\n if sum(ans)==sum(A):\n print(" ".join(list(map(str...
['Wrong Answer', 'Accepted']
['s888820430', 's457792032']
[79476.0, 19144.0]
[2105.0, 83.0]
[328, 257]
p02984
u879478232
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\na = list(map(int,input().split()))\nx=[]\nfor i in range(n):\n x.append(int(0))\ns = sum(a)\nx[0] = s -2*(sum(a[1:n:2]))\nfor i in range(0,n-1):\n x[i+1] = 2*a[i]-x[i]\nprint(x)', 'n = int(input())\na = list(map(int,input().split()))\nx=[]\nfor i in range(n):\n x.append(int(0))\ns = sum(a)\...
['Wrong Answer', 'Accepted']
['s046630515', 's382531859']
[14412.0, 14028.0]
[101.0, 136.0]
[192, 193]
p02984
u888965338
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["def mul(inp):\n return int(inp * 2)\n\n\nif __name__ == '__main__':\n n = int(input())\n a = list(map(mul, map(int, input().split())))\n res = [0] * n\n for x in range(0, n):\n res[x] = a[x]\n count = 1\n for i in range(x + 1, n + x):\n mod_i = i % n\n count +...
['Wrong Answer', 'Accepted']
['s446915239', 's846845677']
[14036.0, 19644.0]
[2104.0, 126.0]
[492, 467]
p02984
u891482208
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['n = int(input())\na = list(map(int, input().split()))\nb = [0] * (n + 1)\nfor i in range(n):\n b[i + 1] = a[i] - b[i]\nx = b[-1] / 2\nfor i in range(n):\n if i & 1 == 1:\n b[i] -= x\n else:\n b[i] += x\n b[i] *= 2\nprint(" ".join(map(str, b[:-1])))', 'n = int(input())\na = list(map(int, input().split()))\nb...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s918885071', 's925249446', 's127151116']
[19360.0, 20000.0, 20000.0]
[150.0, 128.0, 122.0]
[246, 240, 247]
p02984
u894381129
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['\nn = int(input())\na = list(map(int, input().split()))\n\nright = np.asarray(a)*2\nleft = np.zeros([n,n])\nfor i,_ in enumerate(a):\n if i != n-1:\n left[i,i:i+2] = 1\n else:\n left[i,0] = 1\n left[i,i] = 1\n \nout = list(map(int, solve(left, right)))\nprint(" ".join(map(str, out)))...
['Runtime Error', 'Accepted']
['s226584995', 's766553063']
[14028.0, 19912.0]
[44.0, 104.0]
[304, 308]
p02984
u896206464
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nv = [int(_) for _ in input().split()]\n\nimport numpy as np\n\n\n# N = len(v)\n\nA = np.zeros((N, N))\nfor i in range(N):\n A[(i - 1) % N][i] = 1 / 2\n A[i][i] = 1 / 2\n\nans = np.dot(np.linalg.inv(A), v)\nans = [int(x) for x in ans]\nprint(ans)', 'N = int(input())\nv = [int(_) for _ in input(...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s190444502', 's591507194', 's662638559', 's283265371']
[463848.0, 461928.0, 462184.0, 23112.0]
[2110.0, 2110.0, 2110.0, 256.0]
[276, 334, 336, 444]
p02984
u902973687
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = list(map(int, input().split()))\n\nY = [sum(A) - 2 * sum(A[1::2])]\nfor i in range(1, N):\n Y.append(2 * A[i-1] - Y[i-1])\n\nprint(Y)\n', 'import numpy as np\n\nN = int(input())\nA = np.array(list(map(int, input().split()))) * 2\nC = np.linalg.inv([[1 if i == j or i % N == (j + 1) % N else 0 ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s037073550', 's047432717', 's882233884']
[15108.0, 111108.0, 14092.0]
[81.0, 2114.0, 120.0]
[152, 209, 153]
p02984
u904943473
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nlst = list(map(int, input().split()))\nS = sum(lst)\nans = []\n\nfor i in range(2, N, 2):\n S -= 2 *lst[i-1]\n \nans.append(S)\n\nfor i in range(1, N):\n ans.append(2 * lst[i-1] - ans[i-1])\nprint("".join(ans))', 'N = int(input())\nlst = list(map(int, input().split()))\nS = sum(lst)\nans = []\n\n...
['Runtime Error', 'Accepted']
['s050893429', 's507825768']
[14028.0, 19092.0]
[81.0, 108.0]
[219, 245]
p02984
u905268546
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = list(map(int, input().split()))\nMt = [0] * N\n\nfor i in range(N):\n Mt[0] += A[i] * (-1) ** i\n\nfor i in range(1, N):\n Mt[i] = 2 * A[i - 1] - Mt[i-1]\n\nprint(Mt)\n', 'N = int(input())\nA = list(map(int, input().split()))\nMt = [0] * N\n\nfor i in range(N):\n Mt[0] += A[i] * (-1) **...
['Wrong Answer', 'Accepted']
['s468231878', 's548193552']
[14356.0, 14092.0]
[133.0, 157.0]
[185, 186]
p02984
u905711033
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['N = int(input())\nA = list(map(int, input().split()))\nA = A + A\nall_neg = sum(A)\n\nres = []\nfor i in range(N):\n res_tmp = 0\n for j, a in enumerate(A[i:i+N]):\n res_tmp += a if j % 2 == 0 else -a\n res.append(res_tmp)\nprint(res)\n', 'N = int(input())\nA = list(map(int, input().split()))\nres = "...
['Wrong Answer', 'Accepted']
['s493371640', 's287557910']
[14028.0, 14092.0]
[2104.0, 128.0]
[240, 276]
p02984
u912179452
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
["N = int(input())\nA = list(map(int, input().split()))\n\nprint(A[0], A[-1])\nx1 = sum(A) - 2 * (sum(A) - int(A[0]) - int(A[-1]))\n\nx = []\nx.append(x1)\nfor i in range(N-1):\n x.append(2 * A[i] - x[i])\n\nprint(' '.join(map(str, x)))\n", 'L, R = map(int, input().split())\n\nmodule = []\nfor i in range(L, R):\n ...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s005300238', 's139752639', 's566624522', 's943799235', 's885977171']
[20364.0, 3060.0, 17020.0, 14028.0, 19148.0]
[93.0, 18.0, 85.0, 54.0, 103.0]
[227, 358, 207, 225, 227]
p02984
u921773161
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['L = 2*(10**2)\nR = 2*(10**5)\n\nif L >= 2019:\n L = L%2019\nif R >= 2019:\n R = R%2019\n\nprint(L)\nprint(R)\n\nlist = []\nif L < R :\n for i in range(L,R):\n for j in range(i+1,R+1):\n list.append(i*j%2019)\n\nelse :\n for i in range(0,2018):\n for j in range(i+1,2019):\n list.append(...
['Wrong Answer', 'Accepted']
['s742787005', 's513458412']
[75416.0, 21808.0]
[537.0, 137.0]
[327, 372]
p02984
u922487073
2,000
1,048,576
There are N mountains in a circle, called Mountain 1, Mountain 2, ..., Mountain N in clockwise order. N is an _odd_ number. Between these mountains, there are N dams, called Dam 1, Dam 2, ..., Dam N. Dam i (1 \leq i \leq N) is located between Mountain i and i+1 (Mountain N+1 is Mountain 1). When Mountain i (1 \leq i ...
['# ABC 133 D\nN = int(input())\nA_list = list(map(int, input().split()))\nx_list = [0] * N\nx_list[0] = sum(A_list) - sum([2*a for a in A_list[1::2]])\nfor i, a in enumerate(A_list[:-1]):\n x_list[i+1] = 2*a - x_list[i]\n\nprint(x_list)', '# ABC 133 D\nN = int(input())\nA_list = list(map(int, input().split()))\nx_l...
['Wrong Answer', 'Accepted']
['s185850531', 's547301022']
[20732.0, 20584.0]
[89.0, 102.0]
[230, 231]