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
p03060
u495903598
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['\n# coding: utf-8\n\n# In[ ]:\n\nN = int(input())\nV = map(int, input().split())\nC = map(int, input().split())\n\n\n# In[ ]:\n\nimport numpy as np\n\n\n# In[ ]:\n\nV = np.array(V)\nC = np.array(C)\n\n\n# In[ ]:\n\nbene = V-C\nprint(np.sum(bene[bene>0]))\n\n', '\n# coding: utf-8\n\n# In[ ]:\n\nN = int(input())\nV = m...
['Runtime Error', 'Runtime Error', 'Accepted']
['s497915688', 's793097818', 's237531990']
[12508.0, 12512.0, 19720.0]
[152.0, 150.0, 297.0]
[232, 188, 257]
p03060
u498575211
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\n\nV = list(map(int, input().split()))\n\nC = list(map(int, input().split()))\n\nP = 0\n\nfor i in range(0,N):\n Y = V[i] - C[i]\n if Y >0:\n P += Y\nprint(Y)\n', 'N = int(input())\n\nV = list(map(int, input().split()))\n\nC = list(map(int, input().split()))\n\nP = 0\n\nfor i in range(N):\n Y =...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s456670164', 's485931385', 's589209248', 's653461245', 's479371706']
[2940.0, 2940.0, 2940.0, 2940.0, 3060.0]
[17.0, 18.0, 18.0, 17.0, 17.0]
[169, 166, 167, 171, 167]
p03060
u515364861
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n=int(input())\nv=list(map(int,input().split()))\nc=list(map(int,input().split()))\nprint([v[i]-c[i] if v[i]-c[i]>0 for i in range(n)])', 'n = int(input())\nv = [int(i) for i in input().split()]\nc = [int(i) for i in input().split()]\nprint(sum([v[i]-c[i] for i in range(n) if v[i]-c[i]>0]))']
['Runtime Error', 'Accepted']
['s630706936', 's079487565']
[2940.0, 3060.0]
[17.0, 18.0]
[132, 149]
p03060
u521533140
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['in_data = [list(map(int,input().split())) for i in range(3)]\nprint(ls)\nprint(in_data[0])\nprint(in_data[1])\nprint(in_data[2])\nprint("--------")\n\nN = in_data[0][0]\n\nearn_ttl = 0\n\nfor i in range(N):\n #print(i)\n value = in_data[1][i]\n cost = in_data[2][i]\n earn = value - cost\n if (earn > 0)...
['Runtime Error', 'Accepted']
['s207337237', 's164556788']
[3064.0, 3060.0]
[17.0, 18.0]
[363, 267]
p03060
u536242462
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = input()\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\nsum = 0\nfor v,c in zip(V,C):\n if v-c<0:\n sum+=v-c\nprint(sum)', 'N = int(input())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\nsum = 0\nfor v,c in zip(V,C):\n if (v-c)>0:\n sum+=v-c\nprint(sum)\...
['Wrong Answer', 'Accepted']
['s251226195', 's155121823']
[2940.0, 2940.0]
[17.0, 17.0]
[146, 154]
p03060
u542605091
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['num = int(input())\nvalue = [int(s) for s in input().split()]\ncost = list(map(int, input().split()))\n\nsum = 0\nfor i in range(num):\n\tif (value[i] - cost[i] > 0):\n sum += value[i] - cost[i]\nprint(sum)', 'num = int(input())\nvalue = [int(s) for s in input().split()]\ncost = list(map(int, input().split()))\n...
['Runtime Error', 'Accepted']
['s749011569', 's911368654']
[2940.0, 3060.0]
[17.0, 17.0]
[202, 201]
p03060
u546853743
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n=int(input())\nk=0\nv=[map(int,input().split())]\nc=[map(int,input().split())]\nfor i in range(n):\n if (v[i]-c[i])>0:\n k += (v[i]-c[i])\nprint(k)', 'n=int(input())\nk=0\nfor i in range(n):\n v=map(int,input().split())\n c=map(int,input().split())\n if v>c:\n k += (v-c)\nprint(k)\n', 'n=in...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s130352006', 's593822129', 's750728673', 's484092808']
[9172.0, 9156.0, 9024.0, 9092.0]
[23.0, 25.0, 25.0, 26.0]
[151, 140, 140, 159]
p03060
u556589653
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nV = map(int,input().split())\nC = map(int,input().split())\nX = max(V)\nY = max(C)\nprint(X-Y)', 'N = int(input())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\nans = 0\nfor i in range(N):\n if V[i]-C[i]>0:\n ans += V[i]-C[i]\nprint(ans)']
['Wrong Answer', 'Accepted']
['s061215756', 's765928717']
[2940.0, 3060.0]
[17.0, 17.0]
[107, 163]
p03060
u558452954
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N=int(input().split())\nV=list(map(int,input().split()))\nC=list(map(int,input().split()))\ndef rescale(V,C):\n price=0\n for v,c in zip(V,C):\n if v>c:\n price=price+v-c\n return price \nprint("{}".format(rescale(V,C)))\n', 'N=int(input())\nV=list(map(int,input().split()))\nC=list(map(int,input().split())...
['Runtime Error', 'Accepted']
['s864863637', 's073028303']
[2940.0, 3060.0]
[17.0, 17.0]
[223, 214]
p03060
u561691391
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['jewel = 0\n\nfor i in range(1, 21):\n if V(i) > C(i):\n jewel += V(i) - C(i)\n else:\n pass\n\nprint(jewel)', 'N = int(input("個数を入力してください----"))\nV = list(map(int, input("価値を入力してください").split()))\nC = list(map(int, input("コストを入力してください").split()))\n\nworth = 0\n\nfor i in range(N):\n if V[i] > C[i]:\n ...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s004569175', 's368987746', 's573983096']
[2940.0, 3060.0, 3060.0]
[17.0, 18.0, 18.0]
[107, 317, 205]
p03060
u566483072
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['x = 0\ny= 0\nn = input()\nv = list(map(int, input().split()))\nc = list(map(int, input().split()))\nfor vv,cc in v,c:\n if cc < vv:\n x+=vv\n y+=cc\nprint(x-y)', 'x = 0\ny= 0\nn = input()\nv = list(map(int, input().split()))\nc = list(map(int, input().split()))\nfor (vv,cc) in zip(v,c):\n if cc < ...
['Runtime Error', 'Accepted']
['s936184355', 's292959863']
[3060.0, 3060.0]
[17.0, 17.0]
[167, 174]
p03060
u571128069
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nVs = map(int, input().split())\nCs = map(int, input().split())\n\nprint(sum([ v - c for zip(Vs, Cs) if v >= c ]))\n', 'N = int(input())\nVs = map(int, input().split())\nCs = map(int, input().split())\n\nprint(sum([ v - c for v, c in zip(Vs, Cs) if v >= c ]))\n']
['Runtime Error', 'Accepted']
['s736922728', 's576779318']
[2940.0, 2940.0]
[17.0, 19.0]
[128, 136]
p03060
u574053975
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['a=int(input())\nb=list(map(int,input().split()))\nc=list(map(int,input().split()))\nd=0\n\nfor i in range(a):\n if (b[i]-c[i]) > 0:\n d=b[i]-c[i]\n\nprint(d)\n ', 'a=int(input())\nb=list(map(int,input().split()))\nc=list(map(int,input().split()))\nd=0\n \nfor i in range(a):\n if (b[i]-c[i]) > 0:\n print(b[i]...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s605085278', 's861838112', 's100700769']
[2940.0, 3316.0, 2940.0]
[17.0, 23.0, 17.0]
[155, 177, 156]
p03060
u577138895
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\nlst = []\n\nfor i in range(N):\n\tlst.append(V[i] - C[i])\n \nhigh_score = 0\n \nfor i in range(2 ** N):\n\ta = list(str(bin(i))[2:])\n\tfor k in range(N - len(a)):\n\t\ta.insert(0, "0")\n\tb = list(map(int, a))\n\tprint(b)\...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s100253903', 's583700408', 's485873979']
[12788.0, 3064.0, 3060.0]
[2104.0, 17.0, 17.0]
[424, 381, 177]
p03060
u591690245
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = input() \nv = list(map(int, input().split())) \nc = list(map(int, input().split())) \notoku = []\n\nfor i in range(n):\n otoku.append(v[i] - c[i])\n\nres = 0\nfor j in range(n):\n if otoku[j] > 0:\n res += otoku[j]\n \nprint(res)', 'n = int(input(), 10) \nv = list(map(int, input().split())) \nc = list(map...
['Runtime Error', 'Accepted']
['s750882355', 's484482520']
[3064.0, 3064.0]
[18.0, 17.0]
[228, 239]
p03060
u600195339
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = int(input())\nvalues = [int(i) for i in input().split()]\ncosts = [int(i) for i in input().split()]\nresult = 0\n\nfor i in range(n):\n if values[i] > costs[i]:\n\tresult += values[i] - costs[i]\n\nprint(result)', 'n = int(input())\nvalues = [int(i) for i in input().split()]\ncosts = [int(i) for i in input().s...
['Runtime Error', 'Accepted']
['s965150916', 's276159483']
[2940.0, 3060.0]
[17.0, 17.0]
[208, 215]
p03060
u603324902
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = int,input()\n3\ninteger = int(0)\nv = input().split()\n\nc = input().split()\nfor i in range(n):\n if int(v[i])>int(c[i]):\n integer += int(v[i])-int(c[i])\n continue\n print(integer)\n', 'n = int,input()\n\ninteger = int(0)\nv = input().split()\n\nc = input().split()\n\nfor i in range...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s183509536', 's240832831', 's818748346', 's556055789']
[2940.0, 3060.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0, 17.0]
[206, 202, 183, 170]
p03060
u609814378
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['A = input()\n\nans = 0\n\nALEN = (len(A))\n\nB = list(A)\n\n\n\nB_re = list(reversed(B))\n\nans = 0\n\n\nfor i in range(ALEN):\n if B[i] != B_re[i]:\n ans = ans+1\n \nif ans\u3000% 2 == 0:\n print(ans//2)\nelif ans %2 != 0:\n print((ans//2) +1)\nelif ans == 0:\n print(0)', 'S = input()\n\nans =...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s782783496', 's937787400', 's864512506']
[2940.0, 3064.0, 3060.0]
[18.0, 17.0, 17.0]
[267, 271, 198]
p03060
u619197965
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n=int(input())\nv=[int(i) for i in input().split()]\nc=[int(i) for i in input().split()]\nans=0\ndiff=[0]*n\nfor i in range(n):\n diff[i]=v[i]-c[i]\nfor i in range(n):\n if diff[i]>=0:\n ans+=1\nprint(ans)', 'n=int(input())\nv=[int(i) for i in input().split()]\nc=[int(i) for i in input().split()]\nans=0\...
['Wrong Answer', 'Accepted']
['s662982441', 's239314307']
[3064.0, 3064.0]
[17.0, 20.0]
[208, 214]
p03060
u623065116
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = int(input())\n\nvalue = list(map(int(input().split()))\ncost = list(map(int(input().split()))\n\nans = 0\nfor j in range(n):\n if value[j] -cost[j] >0:\n ans +=value[j] - cost[j]\n\nprint(ans)\n\n', 'n = int(input())\n\nvalue = list(map(int(input().split()))\ncost = list(map(int(input().split()))\n\...
['Runtime Error', 'Runtime Error', 'Accepted']
['s003023521', 's007643128', 's219499998']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[202, 202, 204]
p03060
u623687794
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nA = list[int,input().split()]\nB = list[int,input().split()]\ni = 0\nfor c in range(N):\n if A[c]>B[c]:\n i += (A[c]-B[c])\nprint (i)', 'N = int(input())\nA = list[int,input().split()]\nB = list[int,input().split()]\ni = 0\nfor c in range(N):\n if A[c]>B[c]:\n i = i +A[c]-B[c]\nprint (i)', '...
['Runtime Error', 'Runtime Error', 'Accepted']
['s327723624', 's807338050', 's011990322']
[3060.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0]
[148, 148, 158]
p03060
u627234757
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\nG = [0] * N\nfor i in range(N):\n dif = V[i] - C[i]\n if(dif > 0):\n G[i] = dif\nprint(sum(G[i]))', 'N = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\nG = [0] * N\nfor i i...
['Runtime Error', 'Accepted']
['s119940663', 's300934923']
[3064.0, 3060.0]
[18.0, 17.0]
[194, 191]
p03060
u627655207
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['def sub():\n N, Vs, Cs = [e for e in input().split(" ")]\n N = int(N)\n Vs = [int(e) for e in Vs.split(" ")]\n Cs = [int(e) for e in Cs.split(" ")]\n ds = [v - c for v, c in zip(Vs, Cs)]\n ds = [d for d in ds if d > 0]\n print(sum(ds))\n\n\nsub()\n', 'def sub():\n N, Vs, Cs = [input() for _ in...
['Runtime Error', 'Accepted']
['s308117687', 's307909006']
[3060.0, 3060.0]
[17.0, 17.0]
[258, 254]
p03060
u633355062
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = int(input())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\nc = list()\nfor benefit, cost in a, b:\n if benefit - cost > 0:\n c.append(benefit - cost)\nprint(sum(c))', 'n = int(input())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\nc = list()\nfor benef...
['Runtime Error', 'Accepted']
['s734770840', 's514713200']
[3060.0, 2940.0]
[17.0, 17.0]
[194, 201]
p03060
u644516473
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = int(input())\nv = map(int, input().split())\nc = map(int, input().split())\nans = 0\nfor i, j in zip(v, c):\n if i - j > 0:\n ans = i - j\nprint(ans)\n', 'n = int(input())\nv = map(int, input().split())\nc = map(int, input().split())\nans = 0\nfor i, j in zip(v, c):\n if i - j > 0:\n ans += i - j\nprint(a...
['Wrong Answer', 'Accepted']
['s833962745', 's913483378']
[2940.0, 2940.0]
[18.0, 17.0]
[151, 152]
p03060
u656995812
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = int(input())\nv = list(map(int, input().split()))\nc = list(map(int, input().split()))\nx = []\n\nfor i in range(n):\n if v[i] - c[i] <= 0:\n x.append(v[i]-c[i])\nprint(sum(x))\n', 'n = int(input())\nv = list(map(int, input().split()))\nc = list(map(int, input().split()))\nx = []\n\nfor i in range(n):\n...
['Wrong Answer', 'Accepted']
['s248189488', 's247708917']
[2940.0, 3060.0]
[17.0, 17.0]
[183, 183]
p03060
u661439250
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N=int(input())\nV=list(map(int, input().split()))\nC=list(map(int, input().split()))\nans_max=0\n\nfor j in range(N-1):\n for i in range(j+1,N):\n X=V[j]+V[i]\n Y=C[j]+C[i]\n ans=X-Y\n if ans_max<ans:\n ans_max=ans\n if N-j<2:\n for f in range(j+2,N):\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s084835281', 's121176271', 's261312138', 's443620073', 's743054218', 's912623017', 's941007087', 's986192285']
[3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0, 3064.0]
[18.0, 17.0, 19.0, 19.0, 17.0, 18.0, 18.0, 17.0]
[516, 474, 442, 248, 541, 516, 518, 242]
p03060
u661576386
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['a = int(input())\nList=list(map(int,input().split()))\nList2=list(map(int,input().split()))\n\nprint(List)\nsum=0\ni=0\nwhile i < a:\n if List[i] - List2[i] > 0:\n sum += List[i] - List2[i]\n i +=1\nprint(sum)', 'a = int(input())\nList=list(map(int,input().split()))\nList2=list(map(int,input().split()))\n\nsum=0...
['Wrong Answer', 'Accepted']
['s165153375', 's091061951']
[3060.0, 3064.0]
[17.0, 18.0]
[203, 191]
p03060
u663230781
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
["def main():\n n = get_next_int()\n values = get_next_ints()\n costs = get_next_ints()\n \n total = 0\n for value, cost in zip(values, costs):\n if value > cost:\n total += (value - cost)\n \n print(total)\n \nif __name__ == '__main__':\n main()", 'def get_next_int():\n ...
['Runtime Error', 'Accepted']
['s744328887', 's338098863']
[3056.0, 3060.0]
[18.0, 17.0]
[279, 426]
p03060
u663710122
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = _\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\nprint(sum(map(lambda p: max(0, p[0] - p[1]), zip(V, C))))\n', '_ = input()\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\nprint(sum(map(lambda p: max(0, p[0] - p[1]), zip(V, C))))\n']
['Runtime Error', 'Accepted']
['s661702809', 's853248289']
[2940.0, 2940.0]
[17.0, 17.0]
[137, 143]
p03060
u666844906
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nv_l = [int(input()) for i in range(N)]\nc_l = [int(input()) for i in range(N)]\nnet = [v_l[i] - c_l[i] for i in range(N)]\nmax = 0\nfor i in range(N):\n if net[i] > 0:\n max = max + net[i]\n else:\n max = max\nprint(max)', 'N = int(input())\nv_l = list(map(int, input().split()))\nc_l = list(...
['Runtime Error', 'Accepted']
['s814663579', 's900289787']
[3064.0, 3064.0]
[18.0, 17.0]
[236, 234]
p03060
u682467216
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['import numpy as np\nn = int(input())\nv = np.array(list(map(int,input().split())))\nc = np.array(list(map(int,input().split())))\n\nfor i in range(n):\n profit = v[i] - c[i]\n\nmax_profit = np.sum(profit[profit>0])\nprint(max_profit)', 'import numpy as np\nn = int(input())\nv = np.array(list(map(int,input().split())...
['Runtime Error', 'Accepted']
['s011016367', 's063820468']
[14280.0, 12596.0]
[150.0, 151.0]
[225, 198]
p03060
u685662874
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n=int(input())\nv=list(map(int, input().split()))\nc=list(map(int, input().split()))\n\nans=0\nfor i in range(n):\n diff=v[i]-c[i]\n if diff > 0:\n ans+=diff\nprint(diff)\n', 'n=int(input())\nv=list(map(int, input().split()))\nc=list(map(int, input().split()))\n\nans=0\nfor i in range(n):\n diff=v[i]-...
['Wrong Answer', 'Accepted']
['s567835864', 's762612109']
[2940.0, 3060.0]
[18.0, 17.0]
[175, 174]
p03060
u687599294
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = int(input())\nv,c = list(map(int,input().split())),list(map(int,input().split()))\nans = 0\nfor i in range(n):\n if v[i] > c[i]:\n ans += v[i] - c[i]', 'n = int(input())\nv,c = list(map(int,input().split())),list(map(int,input().split()))\nans = 0\nfor i in range(n):\n if v[i] > c[i]:\n ans +=...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s224164659', 's501986957', 's904113768', 's856526638']
[2940.0, 2940.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0, 17.0]
[158, 158, 167, 169]
p03060
u687923925
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
[" = int(input())\nv = list(map(int, input().strip().split(' ')))\nc = list(map(int, input().strip().split(' ')))\nl = [0] * n\nfor i in range(n):\n l[i]=v[i]-c[i]\nl.sort(reverse=True)\ns = 0\nfor i in range(n):\n if s < sum(l[0:i+1]):\n s = sum(l[0:i+1])\nprint(s)", "n = int(input())\nv = list(map(int, input().s...
['Runtime Error', 'Accepted']
['s060256198', 's837193943']
[2940.0, 3064.0]
[17.0, 18.0]
[258, 259]
p03060
u688762199
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['# -*- coding: utf-8 -*-\nimport numpy as np\nimport itertools\n\n# input\nl = list(map(int, input().split()))\nN = l[0]\n\nl = list(map(int, input().split()))\nV = l\n\nl = list(map(int, input().split()))\nC = l\n\nbest_result = 0\n\n\nfor n in range(N):\n print("n", n)\n\n v_list = list(itertools.combinations(...
['Wrong Answer', 'Accepted']
['s677423605', 's113840559']
[88156.0, 88156.0]
[1201.0, 1307.0]
[573, 556]
p03060
u693391925
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\n 2 V=list(map(int,input().split()))\n 3 C=list(map(int,input().split()))\n 4 output = 0\n 5 for i in range(N):\n 6 if V[i]-C[i] >= 0:\n 7 output +=V[i]-C[i]\n 8\n 9 print(output)', 'N = int(input())\nV=list(map(int,input().split()))\nC=list(map(int,input().split()))\noutput = 0\n...
['Runtime Error', 'Accepted']
['s459383147', 's126772165']
[2940.0, 3060.0]
[17.0, 17.0]
[208, 177]
p03060
u701318346
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nX = list(map(int, input().split())\nY = list(map(int, input().split())\nans = 0\n \nfor i in range(N):\n ans += max(X[i] - Y[i]), 0)\n\nprint(ans)\n ', 'N = int(input())\nX = list(map(int, input().split()))\nY = list(map(int, input().split()))\nans = 0\n \nfor i in ra...
['Runtime Error', 'Accepted']
['s406850879', 's732944402']
[2940.0, 2940.0]
[17.0, 17.0]
[182, 184]
p03060
u702281275
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N=int(input())\nVlist=list(map(int, input().split()))\nClist=list(map(int, input().split()))\nprint(Vlist)\nret=0\n\nfor i in range(N):\n if Vlist[i]-Clist[i] > 0:\n ret += Vlist[i]-Clist[i]\nprint(ret)', 'N=int(input())\nVlist=list(map(int, input().split()))\nClist=list(map(int, input().split()))\n\nret=0\...
['Wrong Answer', 'Accepted']
['s163525246', 's745208885']
[3060.0, 3060.0]
[17.0, 17.0]
[203, 191]
p03060
u712082626
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nV = [int(i) for i in input().split()]\nC = [int(i) for i in input().split()]\nX = [V - C for (V, C) in zip(V, C)]\ni = 0\nfor i in X:\n if i < 0:\n X.remove(i)\n\nprint(X)', 'N = int(input())\nV = [int(i) for i in input().split()]\nC = [int(i) for i in input().split()]\nX = [V - C for (V, ...
['Wrong Answer', 'Accepted']
['s867995741', 's132379970']
[3060.0, 3060.0]
[17.0, 17.0]
[190, 190]
p03060
u713492631
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = int(input().strip())\nvalues = list(map(int, input().split()))\ncosts = list(map(int, input().split()))\n\nsales = [v - c for v, c in zip(values, costs) if v > c else 0]\n\nprint(sum(sales))', 'n = int(input().strip())\nvalues = list(map(int, input().split()))\ncosts = list(map(int, input().split()))\n \nsales = ...
['Runtime Error', 'Accepted']
['s871469851', 's057400145']
[2940.0, 3060.0]
[17.0, 18.0]
[188, 183]
p03060
u714300041
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nV = map(int, input().split())\nC = map(int, input().split())\n\nanswer = 0\nfor i in range(N):\n if V[i] > C[i]:\n answer += V[i] - C[i]\n\nprint(int(answer))', 'N =int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\nanswer = 0\nfor i in range(N):\n if V[i]...
['Runtime Error', 'Accepted']
['s470134594', 's293234221']
[3060.0, 3060.0]
[18.0, 17.0]
[171, 185]
p03060
u717993780
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = int(input())\nlist_v = map(int,input().split())\nlist_c = map(int,input().split())\n \nans = 0\nfor i in range(n):\n if list_v[i] - list_c[i] > 0:\n ans += list_v[i] - list_c[i]\nprint(int(ans))', 'n = int(input())\nlist_v = map(int,input().split())\nlist_c = map(int,input().split())\n\nans = 0\nfor i in rang...
['Runtime Error', 'Runtime Error', 'Accepted']
['s231442457', 's893976421', 's381813183']
[3060.0, 3060.0, 3060.0]
[17.0, 17.0, 18.0]
[194, 194, 206]
p03060
u729133443
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['from numpy import*;v,c=loadtxt(open(0),skiprows=1);i=v>c;print(sum(v[i]-c[i]))', 'from numpy import*;_,a,b=[int64(i.split())for i in open(0)];c=a-b;print(sum(c[c>0]))']
['Runtime Error', 'Accepted']
['s111570895', 's555506658']
[14296.0, 12472.0]
[148.0, 154.0]
[78, 84]
p03060
u729535891
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nV = list(map(int, input().split())) \nC = list(map(int, input().split())) \n\nX = 0\nY = 0\n\nfor i in range(N):\n if V[i] < C[i]:\n X = V[i]\n Y = V[i]\n X += X \n Y += Y\n\nif (X-Y) > 0:\n print(X-Y)', 'N = int(input())\nV = list(map(int, input().split()))\nC = li...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s098603911', 's259720969', 's478520081', 's496497843', 's457709741']
[3060.0, 3060.0, 3064.0, 3064.0, 3064.0]
[17.0, 17.0, 17.0, 17.0, 17.0]
[238, 230, 235, 247, 223]
p03060
u734519000
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['from functools import reduce\nimport numpy as np\na = np.array(list(map(int, input().split())))\nb = np.array(list(map(int, input().split())))\nprint(reduce(lambda x,y: max(0,x)+max(0,y), list(a-b)))', 'from functools import reduce\nn = int(input())\na = list(map(int, input().split()))\nb = list(map(int, input().spli...
['Wrong Answer', 'Accepted']
['s409351555', 's605868270']
[21232.0, 3572.0]
[296.0, 22.0]
[195, 167]
p03060
u736729525
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input()\nV = [int(x) for x in input().split()]\nC = [int(x) for x in input().split()]\n \nprint(\n sum(\n max(v - c, 0) for v, c in zip(V,C)\n )\n)', 'N = int(input())\nV = [int(x) for x in input().split()]\nC = [int(x) for x in input().split()]\n \nprint(\n sum(\n max(v - c, 0) for...
['Runtime Error', 'Accepted']
['s839880698', 's781476202']
[2940.0, 2940.0]
[17.0, 17.0]
[159, 164]
p03060
u739959951
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n=int(input())\na=[int(input()) for _ range(n)]\nb=[int(input()) for _ range(n)]\n\nans=0\nfor i in range(n):\n if a[i]>b[i]:\n ans+=a[i]\n\nprint(ans)', 'n=int(input())\na=list(map(int,input().split()))\nb=list(map(int,input().split()))\n\nans=0\nfor i in range(n):\n if a[i]>b[i]:\n ans+=a[i]\n\nprint(ans)',...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s432391062', 's821590584', 's844749366']
[2940.0, 3060.0, 3060.0]
[17.0, 17.0, 17.0]
[146, 148, 153]
p03060
u745561510
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['\ntest = {}\n\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\n\nnew_n = 0\nfor i in range(N):\n if V[i] <= C[i]:\n continue\n else:\n test[i] = [V[i],C[i]]\n new_n += 1\n\nN = new_n\n\ndef calc_cost(com,test,i):\n x = 0\n y = 0\n for j in com:\n x +...
['Runtime Error', 'Accepted']
['s211736986', 's681613960']
[3064.0, 3064.0]
[17.0, 1960.0]
[518, 534]
p03060
u747602774
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\n\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\n\na = 0\nfor i in range(N):\n if C[i] >= V[i]:\n a += C[i]-V[i]\n\nprint(a)', 'N = int(input())\n\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\n\na = 0\nfor i in range(N):\n if V[i] > C[...
['Wrong Answer', 'Accepted']
['s995737006', 's774634553']
[2940.0, 3060.0]
[17.0, 17.0]
[167, 166]
p03060
u756375338
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input)\nV=list(map(int, input().split()))\nC=list(map(int, input().split()))\n\nX_Y = 0\nfor i in range(N):\n if cost[i] > 0:\n\tX_Y += V[i] - C[i]\nprint(X_Y)', 'N = int(input())\nV = list(map(int, input().split( )))\nC = list(map(int, input().split( )))\nX = 0\nfor i in range(N):\n if(V[i]-C[i]>0):\n ...
['Runtime Error', 'Accepted']
['s958062460', 's683519125']
[2940.0, 2940.0]
[17.0, 17.0]
[159, 170]
p03060
u757117214
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n=int(input())\nv=[int(i) for i in input().split()]\nc=[int(i) for i in input().split()]\nvv=[]\ncc=[]\nans=0\nif n==1:\n ans = v[0]-c[0]\nelse:\n for i in range(n):\n vv.append(v[i])\n cc.append(c[i])\n for j in range(i+1, n):\n vv.append(vv[-1]+v[j])\n cc.append(cc[-1]+c[j])\n for i in range(l...
['Wrong Answer', 'Accepted']
['s168453859', 's846770491']
[3064.0, 3060.0]
[17.0, 17.0]
[394, 157]
p03060
u758411830
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nV_list = np.array(list(map(int, input().split())))\nC_list = np.array(list(map(int, input().split())))\n\ndiff = V_list - C_list\n\nprint(diff[diff > 0].sum())', 'import numpy as np\nN = int(input())\nV_list = np.array(list(map(int, input().split())))\nC_list = np.array(list(map(int, input().split()...
['Runtime Error', 'Accepted']
['s175079342', 's769706748']
[3060.0, 21500.0]
[17.0, 306.0]
[171, 190]
p03060
u758475901
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N=int(input())\nV=list(map(int,input().split()))\nC=list(map(int,input().split()))\nans=0\na=V[i]-C[i]\nfor i in range(N):\n if a>0:\n ans+=a\nprint(ans) ', 'N=int(input())\nV=list(map(int,input().split()))\nC=list(map(int,input().split()))\nans=0\nfor i in range(N):\n a=V[i]-C[i]\n if a>0:\n ans+=a\nprin...
['Runtime Error', 'Accepted']
['s922747577', 's354842112']
[3060.0, 3060.0]
[17.0, 19.0]
[153, 155]
p03060
u762960952
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nV = map(int,input().split(" "))\nC = map(int,input().split(" "))\nP = []\n\nfor i in range(N):\n P.append(V[i] - C[i])\n\nresult = list(filter(lambda x:x>=1,P))\nprint(sum(result))', 'N = int(input())\nV = list(map(int,input().split(" ")))\nC = list(map(int,input().split(" ")))\nP = []\n\nfor i i...
['Runtime Error', 'Accepted']
['s961000499', 's805257388']
[3060.0, 3060.0]
[17.0, 17.0]
[192, 204]
p03060
u776495719
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nV_array = [int(input()) for _ in range(N)]\nans = [max(0, V_i - int(input())) for V_i in V_array]', 'N = int(input())\nV_array = [int(V_i_str) for V_i_str in input().split()]\nC_array = [int(C_i_str) for C_i_str in input().split()]\nans = sum([max(0, V_array[i] - C_array[i]) for i in range(N)])\npri...
['Runtime Error', 'Accepted']
['s284987291', 's131392786']
[2940.0, 3060.0]
[17.0, 17.0]
[113, 202]
p03060
u780675733
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
["N = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\nList = []\nfor i in range(N):\n List.append(V[i]-C[i])\nList.sort()\nfor i in List:\n if i > 0:\n print(sum(List[i:]))\n break\nprint('0')", '#B\n\nN = int(input())\nV = list(map(int, input().split()))\nC =...
['Wrong Answer', 'Accepted']
['s326537112', 's043928512']
[3060.0, 3060.0]
[17.0, 17.0]
[239, 243]
p03060
u780698286
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = int(input())\nv = list(map(int, input().split()))\nc = list(map(int, input().split()))\nans = 0\nfor i in range(2 ** n):\n k = 0\n m = 0\n for j in range(n):\n if (i >> j) & 1:\n k += v[j]\n c += c[j]\n ans = max(ans, k - m)\nprint(ans)', 'n = int(input())\nv = list(map(int, input().split()))\nc ...
['Runtime Error', 'Accepted']
['s556626526', 's874814222']
[9068.0, 9112.0]
[23.0, 27.0]
[245, 167]
p03060
u815659544
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['import numpy as np\nimport itertools\n\nN = int(input())\n\nV = np.array(list(map(int, input().split())))\nC = np.array(list(map(int, input().split())))\n\nans = -1\n\nfor condition in itertools.product(range(2),repeat=N):\n\n cond_nparr = np.array(condition)\n\n x = np.sum(V[cond_nparr]) - np.sum(C[cond_nparr]...
['Runtime Error', 'Accepted']
['s585649044', 's787143081']
[21492.0, 3060.0]
[2108.0, 17.0]
[341, 172]
p03060
u815878613
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['import sys\nimport numpy as np\n\nN = input()\n\nV = input().split()\nv = np.array([ int(x) for x in V])\n\nC = input().split()\nc = np.array([ int(x) for x in C])\n\ndelt = v - c\nprint(delt)\nprint(delt[delt>0].sum())', 'N = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\na...
['Wrong Answer', 'Accepted']
['s639485723', 's841872716']
[21760.0, 9028.0]
[319.0, 25.0]
[206, 178]
p03060
u820052258
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\n\nVC = 0\nfor i in range(N):\n if V[i]-C[i]>0:\n VC = VC + V[i]-C[i]\n else:\n\nprint(VC)', 'N = int(input())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\n\nVC = 0\nfor i in range(N):\n ...
['Runtime Error', 'Accepted']
['s021822211', 's922685914']
[2940.0, 3060.0]
[17.0, 17.0]
[182, 198]
p03060
u821432765
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\nD = [X[i] - Y[i] for i in range(N)]\nD = filter(lambda x: x > 0, D)\nprint(sum(D))', 'N = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\nD = [V[i] - C[i] for i in range(N)]\nD = filter(...
['Runtime Error', 'Accepted']
['s375133543', 's866475465']
[3060.0, 3064.0]
[17.0, 17.0]
[169, 169]
p03060
u825378567
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N=int(input())\nV=[]\nC=[]\ndif=[]\nsum=0\nV=list(input().split())\nC=list(input().split())\nfor i in range(N):\n dif.append(int(V[i])-int(C[i]))\nprint(dif)\nfor i in range(N):\n if dif[i]>=0:\n sum+=dif[i]\nprint(sum)\n', 'N=int(input())\nV=[]\nC=[]\ndif=[]\nsum=0\nV=list(input().split())\nC=list(input...
['Wrong Answer', 'Accepted']
['s578090022', 's314800150']
[3060.0, 3060.0]
[18.0, 17.0]
[220, 209]
p03060
u825981710
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n=int(input())\nv=list(map(int,input().split()))\nc=list(map(int,input().split()))\nnum=0\nfor i in range(n):\n if(v[i]-c[i]>0):\n num+=v[i]-d[i]\nprint(num)\n', 'N=int(input())\nV=list(map(int,input().split()))\nC=list(map(int,input().split()))\nnum=0\nfor i in range(N):\n\n sum=V[i]-C[i...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s609432091', 's703695355', 's402708207']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[177, 184, 169]
p03060
u829049844
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = input()\nv = [int(x) for x in input().split()]\nc = [int(x) for x in input().split()]', 'import numpy as np\n \nn = input()\nv = [int(x) for x in input().split()]\nc = [int(x) for x in input().split()]\n \nprofit = v - c\npositive_profit = profit(profit > 0)\nprint(np.sum(positive_profit))', 'import numpy as np\n...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s004162653', 's088395456', 's460866271', 's572121939', 's635225214', 's679639849', 's906227184', 's191421184']
[2940.0, 12428.0, 12488.0, 3060.0, 12432.0, 12428.0, 2940.0, 12432.0]
[17.0, 150.0, 153.0, 17.0, 150.0, 153.0, 17.0, 150.0]
[87, 193, 190, 187, 213, 18, 234, 213]
p03060
u831084614
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nV = input().split()\nC = input().split()\ni = int(0)\nvalue = int(0)\nif i < N:\n if V[i] - C[i] > 0:\n value = value + V[i] - C[i]\n i += 1\nprint(value)', 'N = int(input())\nV = input().split()\nC = input().split()\ni = int(0)\nif i < N:\n if V[i] - C[i] > 0:\n value = v...
['Runtime Error', 'Runtime Error', 'Accepted']
['s489210211', 's765038491', 's711321527']
[3060.0, 2940.0, 3064.0]
[17.0, 18.0, 17.0]
[180, 165, 222]
p03060
u840807329
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = int(input())\nv = [int(input()) for _ in range(n)]\nc = [int(input()) for _ in range(n)]\n\na=0\nb=0\n\nfor _ in range(n):\n\tif v[_] > c[_]:\n\t\ta += v[_]\n\t\tb += c[_]\n\t\t\nprint(a-b)', 'n = int(input())\nv = list(map(int, input().split()))\nc = list(map(int, input().split()))\n\n\na=0\nb=0\n\nfor _ in rang...
['Runtime Error', 'Accepted']
['s104348624', 's283637096']
[3064.0, 3060.0]
[17.0, 17.0]
[174, 174]
p03060
u840958781
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n=int(input())\nv=list(map(int,input().split()))\nc=list(map(int,input().split()))\nans1=0\nans2=0\nfor i in range (len(v)):\n if v[i]>c[i]:\n ans1 += v[i]-c[i]\n else:\n ans2 += c[i]-v[i]\nprint(min(ans1,ans2))', 'n=int(input())\nv=list(map(int,input().split()))\nc=list(map(int,input().split()))\...
['Wrong Answer', 'Accepted']
['s225739046', 's771827185']
[3064.0, 3064.0]
[17.0, 18.0]
[221, 175]
p03060
u857070771
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n=int(input())\nv=int(x) for x in input().split()\nc=int(y) for y in input().split()\ne=[i for i in range(n) if (v[i]-c[i])>0]\nans=sum(e)\nprint(ans)', 'n=int(input())\nv=list(int(x) for x in input().split())\nc=list(int(y) for y in input().split())\ne=[]\nfor i in range(n):\n\tif (v[i]-c[i])>0:\n\t\te.append(v[i]-c...
['Runtime Error', 'Accepted']
['s787147004', 's662550680']
[2940.0, 3060.0]
[17.0, 17.0]
[145, 181]
p03060
u863150907
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = input()\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\nfor i in range(N):\n tmp = V[i]-C[i]\n if tmp > 0:\n ans += tmp\nprint(ans)\n\n\n', 'N = int(input())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\nfor i in range(N):\n tmp = V[i]-C[i]\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s503664192', 's523928570', 's276492258']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[169, 174, 216]
p03060
u867736259
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['a = int(input())\nb = [map(int,input().split()) for i in range(a) ]\nc = [map(int,input().split()) for j in range(a) ]\ne = 0\nfor k in range(a):\n d = b[k] - c[k]\n if d > 0:\n e += d\nprint(e)', 'a = int(input())\nb = map(int,input().split())\nc = map(int,input().split())\nb,c = list(b),list(c)\ne = 0\...
['Runtime Error', 'Accepted']
['s789178097', 's714234392']
[3056.0, 3060.0]
[18.0, 18.0]
[199, 179]
p03060
u870062840
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['import sys\n\nN=input()\nif isinstance(N,int)==0 or N<1 or N>20 :\n print("error")\n sys.exit()\n\nN=int(N)\n\nV=list(map(int,input().strip().split()))\nC=list(map(int,input().strip().split()))\n\nfor i in range(N):\n if C[i]<1 or C[i]>20 or V[i]<1 or v[i]>20:\n print("error")\n sys.exit()\n\nd...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s402655293', 's780205073', 's325052559']
[3064.0, 3064.0, 3064.0]
[17.0, 17.0, 17.0]
[535, 1119, 646]
p03060
u870178975
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n=input()\nv=list(map(int, input().split()))\nc=list(map(int, input().split()))\nt=[i-j,if i-j>0 else 0 for i,j in zip(v,c)]\nprint(sum(t))', 'n=input()\nv=list(map(int, input().split()))\nc=list(map(int, input().split()))\nfor i in range(n)\nt[i]=v[i]-c[i]\na=0\nfor i in range(n)\nif t[i]>0 :\na+=t[i]\nprint(a)', 'i...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s150327877', 's203851848', 's232224318', 's363365542', 's383324624', 's117855165']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0]
[135, 161, 161, 161, 134, 135]
p03060
u871602253
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\ndiff = [v-c if (v-c > 0) else 0 for v, c in zip(V, C)]\nprint(max(diff))', 'N = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\ndiff = [v-c if (v-c > 0) else 0 for v, c in zip(V, C)]...
['Wrong Answer', 'Accepted']
['s739056635', 's725830066']
[3060.0, 3060.0]
[17.0, 17.0]
[161, 161]
p03060
u872887731
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input().split())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\n\ncount = 0\nfor i in range(N):\n if V[i] > C[i]:\n count += V[i] - C[i]\n\nprint (count)', 'N = int(input())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\n\ncount = 0\nfor i in range...
['Runtime Error', 'Accepted']
['s341811316', 's771872062']
[3060.0, 3060.0]
[17.0, 17.0]
[188, 180]
p03060
u873134970
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nV = [int(input()) for i in range(N)]\nC = [int(input()) for i in range(N)]\n_ = 0\nfor j in range(N):\n if V[j] > C[j]:\n _ += V[j] - C[j]\nprint(_)', 'N = int(input())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\n_ = 0\nfor j in range(N):\n if V[j] > C[j]:\n _ +=...
['Runtime Error', 'Accepted']
['s189514708', 's743841647']
[3060.0, 2940.0]
[18.0, 17.0]
[163, 159]
p03060
u895333128
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = int(input())\nvs = input().split(" ")\ncs = input().split(" ")\n\nxy = 0\nfor i in range(n):\n v = vs[i]\n c = cs[i]\n if v>c:\n xy += v-c\n\nprint(xy)', 'n = int(input())\nvs = input().split(" ")\ncs = input().split(" ")\n \nxy = 0\nfor i in range(n):\n v = int(vs[i])\n c = int(cs[i])\n if v>c:\n xy ...
['Runtime Error', 'Accepted']
['s376291552', 's614543316']
[2940.0, 3060.0]
[17.0, 24.0]
[150, 162]
p03060
u898080410
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['import numpy as np\n\nn = int(input())\nv = np.array(list(map(int, input().split())))\nc = np.array(list(map(int, input().split())))\np = v-c\nfor i in p:\n if i>0:\n ans+=i\n\nprint(ans)\n', 'n=int(input())\nV=list(map(int,input().split()))\nC=list(map(int,input().split()))\nans=0\nfor v,c in zip(V,C):\n ...
['Runtime Error', 'Accepted']
['s961888821', 's809303091']
[12484.0, 3060.0]
[154.0, 17.0]
[188, 164]
p03060
u902462889
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['\nn = input()\nn = int(n)\n\ntotal = 0\n\nlst_a = input().split()\nlst_b = input().split()\n\nfor i in range(0, n ,1):\n a = lst_a[0]\n b = lst_b[0]\n a = int(a)\n b = int(b)\n if a > b:\n total += (a - b)\n\nprint(total)', 'n = input()\nn = int(n)\n\ntotal = 0\n\nlst_a = input().split()\nlst_b ...
['Wrong Answer', 'Accepted']
['s646819926', 's754456176']
[3064.0, 3064.0]
[19.0, 18.0]
[226, 199]
p03060
u902693400
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n= int(input())\n\nv= list(map(int, input().split())) \nc= list(map(int, input().split()))\nr=[]\n\nfor i in range(n):\n r.append(v[i]-c[i]) \n\nr.append(0)\nr.sort(reverse=True)\nprint(r)\n\nret= sum([j for j in r if j>=0])\nprint(ret)', 'n= int(input())\n\nv= list(map(int, input().split())) \nc= list(map(int, inpu...
['Wrong Answer', 'Accepted']
['s643949234', 's989120157']
[3064.0, 3064.0]
[17.0, 18.0]
[223, 214]
p03060
u912179452
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['import itertools\nN = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\nM = [[V[i], C[i]]for i in range(N)]\nprint(M)\n\ncom_M = list(itertools.combinations(M, 2))\nm_M = []\nfor i in range(N):\n X = com_M[i][0][0] + com_M[i][1][0]\n Y = com_M[i][0][1] + com_M[i][1][1]\n ...
['Runtime Error', 'Accepted']
['s489986543', 's718945604']
[3064.0, 3060.0]
[17.0, 17.0]
[371, 250]
p03060
u914330401
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = int(input())\nvs = list(map(int, input().split()))\ncs = list(map(int, input().split()))\nans = 0\nfor i in range(len(vs)):\n if vs >= cs:\n ans += (vs[i]-cs[i])\nprint(ans)', 'n = int(input())\nvs = list(map(int, input().split()))\ncs = list(map(int, input().split()))\nans = 0\nfor i in range(len(vs)):\n if...
['Wrong Answer', 'Accepted']
['s298157464', 's434552550']
[3060.0, 3060.0]
[17.0, 17.0]
[174, 180]
p03060
u917558625
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['\ni = list(map(int, input().split()))\ns = list(map(int, input().split()))\nt = list(map(int, input().split()))\nz=0\nfor q in range(0,i[0]):\n\tif(s[q]-t[0]>0):\n z+s[q]\n else:\n \nprint(z)', 's=list(map(int,input().split()))\nt=list(map(int,input().split()))\nu=list(map(int,input().split()))\nvw=[]\nf...
['Runtime Error', 'Accepted']
['s321457734', 's633523331']
[2940.0, 3060.0]
[17.0, 17.0]
[193, 184]
p03060
u923504061
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['def solve():\n N = int(input())\n V = list(map(int,input().split()))\n C = list(map(int,input().split()))\n cnt=0\n for i in range(len(V)):\n if V < C:\n pass\n else:\n cnt += V(i)-C(i)\n print(cnt)\n\n\nsolve()\n', 'def solve():\n N = int(input())\n V = lis...
['Runtime Error', 'Accepted']
['s620150079', 's879357702']
[3056.0, 3060.0]
[17.0, 17.0]
[253, 259]
p03060
u924594299
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = int(input())\nV = [int(v) for v in input().split]\nC = [int(c) for c in input().split]\n\nG = [v - c for v, c in zip(V, C)]\n\ns = 0\nfor g in G:\n if g > 0:\n s += g\n\nprint(s)', 'n = int(input())\nV = [int(v) for v in input().split()]\nC = [int(c) for c in input().split()]\n\nG = [v - c for v, c in z...
['Runtime Error', 'Accepted']
['s121803003', 's714977654']
[3060.0, 3060.0]
[17.0, 17.0]
[181, 185]
p03060
u925336653
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\n\nfor i in range(N):\n if V[i] <= C[i]:\n continue\n Max = Max + V[i] - C[i]\nprint(Max)', 'N = int(input())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\nMax = 0\n\nfor i in range(N):\n ...
['Runtime Error', 'Accepted']
['s941892982', 's453052602']
[3060.0, 3060.0]
[17.0, 17.0]
[183, 191]
p03060
u925567828
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = input("宝石の数")\nV = list(map(int,input().split())) #Value\nY = list(map(int,input().split())) \ngoukei = 0\nfor v, y in zip(V,Y): \n if(y-v >= 0):\n goukei +=0\n else:\n goukei += v-y\nprint(goukei) \n ', 'N = int(input())\nsum_value=0\nV = list(map(int,input().split()))\nC = list(m...
['Wrong Answer', 'Accepted']
['s778329241', 's609635422']
[2940.0, 2940.0]
[17.0, 17.0]
[342, 178]
p03060
u938880865
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['\nn = int(input())\n\nv = input().split()\nc = input().split()\nsum=0\n\nprint(v,c)\nfor i in range(0,n):\n s = int(v[i])-int(c[i]) \n print(s)\n if s >=0:\n sum += s\nprint(sum)', '\nn = int(input())\n\nv = input().split()\nc = input().split()\nsum=0\n\nfor i in range(0,n):\n s = int(v[i])-int(c[i...
['Wrong Answer', 'Accepted']
['s224135472', 's043724768']
[3064.0, 2940.0]
[17.0, 17.0]
[231, 207]
p03060
u939757770
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['import numpy as np\n\nn=int(input())\nv = [int(x) for x in input().split()]\nc = [int(x) for x in input().split()]\n\nv = np.array(v)\nc= np.array(c)\nhikizan = v-c\n\nx = np.zeros((3,n))\nx[1] = v\nx[2] = c\nx[0] = hikizan\n\na = x[: , x[0,:].argsort()]\n\nkotae = 0\n\nfor i in range(0,n):\n if a[0,i] > 0:\n ...
['Wrong Answer', 'Accepted']
['s036423321', 's689668445']
[12448.0, 21416.0]
[150.0, 324.0]
[337, 313]
p03060
u945181840
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N, K = map(int, input().split())\n\nans = 0\n\nfor i in range(N):\n t = 0\n p = i + 1\n while K > p:\n t += 1\n p *= 2\n ans += (0.5 ** t) / N\nprint(ans)', 'N = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\nans = 0\n\nfor i in range(N):\n d = V[i...
['Runtime Error', 'Accepted']
['s316384407', 's043646399']
[2940.0, 3060.0]
[17.0, 17.0]
[169, 179]
p03060
u945761460
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n=int(input())\nv=[]\nc=[]\nx=[]\nfor i in range(n):\n v[i]=int(input())\nfor i in range(n):\n c[i]=int(input())\n x[i]=v[i]-c[i]\n\nans=0\nwhile x[i]>0:\n ans+=x[i]\n \nprint(ans)', 'n=int(input())\nv=list(map(int, input().split()))\nc=list(map(int, input().split()))\nx=[]\nfor i in range(n):\n if v[i]-c[i]>0:...
['Runtime Error', 'Accepted']
['s132383845', 's445011326']
[9204.0, 9104.0]
[20.0, 27.0]
[171, 163]
p03060
u963915126
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['import numpy as np\n\nN = int(input())\nVS = input().split()\nCS = input().split()\n\nV = [int(v) for v in VS]\nC = [int(v) for v in CS]\n\nR = []\n\n\nfor i in range(N-1):\n R.append(V[i]/C[i])\n\nRR = reversed(R)\nRA = np.argsort(RR)\n\nbest = 0\n\nVsum=0\nCsum=0\n\nfor r in RA:\n Vsum += V[r]\n Csum += C[...
['Runtime Error', 'Runtime Error', 'Accepted']
['s462459027', 's805523974', 's756482218']
[12448.0, 12504.0, 3060.0]
[150.0, 151.0, 18.0]
[363, 344, 178]
p03060
u970899068
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n = int(input())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\n\nm = a[0]\nk = b[0]\nfor i in range(n):\n if a[i] >b[i] :\n ans = a[i]-b[i]\nprint(ans)', 'n = int(input())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\nans = 0\nm = a[0]\nk = b[0]\nfor...
['Runtime Error', 'Accepted']
['s049271736', 's377537824']
[3060.0, 3060.0]
[17.0, 17.0]
[181, 189]
p03060
u974935538
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\nS = 0\nfor i in range(N):\n D = V[i] - C[i]\n if D >0:\n S = S + D\n \nprint(S)\n\n', 'N = int(input())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\nS = 0\nfor i in range(N):\n D = V[i]...
['Runtime Error', 'Accepted']
['s017044507', 's973788442']
[2940.0, 3060.0]
[17.0, 18.0]
[174, 178]
p03060
u975719989
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['n= int(input())\nv,c= list(map(int, input().split()))\n\nans=0\nfor i in range(n):\n if v[i] > c[i]:\n ans+=v[i]-c[i]\nprint(ans)\n', 'n= int(input())\nv = list(map(int, input().split()))\nc = list(map(int, input().split()))\nans=0\nfor i in range(n):\n if v[i] > c[i]:\n ans+=v[i]-c[i]\nprint(ans)...
['Runtime Error', 'Accepted']
['s068847903', 's210195513']
[2940.0, 2940.0]
[18.0, 17.0]
[133, 167]
p03060
u979362546
2,000
1,048,576
There are N gems. The value of the i-th gem is V_i. You will choose some of these gems, possibly all or none, and get them. However, you need to pay a cost of C_i to get the i-th gem. Let X be the sum of the values of the gems obtained, and Y be the sum of the costs paid. Find the maximum possible value of X-Y.
['N = int(input().split())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\nP = []\nfor i in range(N):\n p = V[i]-C[i]\n if p >0:\n \tP.append(p)\n\nprint(sum(P))', 'N = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\nP = []\nfor i in range(N):\...
['Runtime Error', 'Accepted']
['s896152433', 's638326985']
[3060.0, 3060.0]
[18.0, 17.0]
[185, 177]
p03061
u006883624
2,000
1,048,576
There are N integers, A_1, A_2, ..., A_N, written on the blackboard. You will choose one of them and replace it with an integer of your choice between 1 and 10^9 (inclusive), possibly the same as the integer originally written. Find the maximum possible greatest common divisor of the N integers on the blackboard afte...
['from functools import reduce\n\n\ndef gcd(v1, v2):\n v3 = v1 % v2\n if v3 == 0:\n return v2\n return gcd(v2, v3)\n\n\ndef main():\n N = int(input())\n A = [int(v) for v in input().split()]\n\n max_gcd = max(reduce(gcd, A[1:]), reduce(gcd, A[:N-1]))\n\n for i in range(1, N - 1):\n v1...
['Wrong Answer', 'Accepted']
['s919679296', 's088533399']
[14576.0, 14648.0]
[2104.0, 216.0]
[491, 721]
p03061
u017271745
2,000
1,048,576
There are N integers, A_1, A_2, ..., A_N, written on the blackboard. You will choose one of them and replace it with an integer of your choice between 1 and 10^9 (inclusive), possibly the same as the integer originally written. Find the maximum possible greatest common divisor of the N integers on the blackboard afte...
['def gcd(a, b):\n\twhile b:\n\t\ta, b = b, a % b\n\treturn a\n\nN = int(input())\nA = list(map(int, input().split()))\n\ninf = int(2e9)\n\nm = inf\ncheck = 0\nfor i in range(N):\n check1 = gcd(A[0], A[i])\n if check1 < m:\n m = check1\n check = i\n\n\ncheck2 = A[1]\nfor i in range(0,N):\n check2...
['Wrong Answer', 'Accepted']
['s392697687', 's854475298']
[14440.0, 14052.0]
[168.0, 194.0]
[531, 541]
p03061
u017415492
2,000
1,048,576
There are N integers, A_1, A_2, ..., A_N, written on the blackboard. You will choose one of them and replace it with an integer of your choice between 1 and 10^9 (inclusive), possibly the same as the integer originally written. Find the maximum possible greatest common divisor of the N integers on the blackboard afte...
['import fractions\nn=int(input())\na=list(map(int,input().split()))\nx=100000\nX=0\na.sort()\nflag=False\n\nfor i in range(0,n-1):\n if fractions.gcd(a[i],a[i+1])==1 and fractions.gcd(a[i+1],a[i+2])==1:\n a.pop(i+1)\n flag=True\n break\nif flag!=True:\n for i in range(n-1):\n if x>=fractions.gcd(a[i],a[i...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s510759348', 's607850462', 's717124875', 's580401332']
[16124.0, 9608.0, 20564.0, 25768.0]
[197.0, 32.0, 54.0, 135.0]
[464, 632, 560, 541]
p03061
u020373088
2,000
1,048,576
There are N integers, A_1, A_2, ..., A_N, written on the blackboard. You will choose one of them and replace it with an integer of your choice between 1 and 10^9 (inclusive), possibly the same as the integer originally written. Find the maximum possible greatest common divisor of the N integers on the blackboard afte...
['n = int(input())\na = list(map(int, input().split()))\n\nimport fraction\nfrom functools import reduce\n\nans = 0\nfor i in range(n):\n x = a[:i] + a[i+1:]\n ans = max(ans, reduce(fraction.gcd, x))\n \nprint(ans)', 'n = int(input())\na = list(map(int, input().split()))\n\nimport fractions\nfrom functools import re...
['Runtime Error', 'Time Limit Exceeded', 'Accepted']
['s692824154', 's752074714', 's924010040']
[14080.0, 14584.0, 14076.0]
[43.0, 2104.0, 341.0]
[204, 206, 219]