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 | u104922648 | 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 itertools import combinations\n\nn = int(input())\nvalue = list(map(int, input().split()))\ncost = list(map(int, input().split()))\n\nidx = range(n)\nresult = [0, sum(value)-sum(cost)]\nindex = [idx for idx, v, c in enumerate(zip(value, cost)) if v > c]\ncomb = [com for i in range(1, len(index)) for com in combi... | ['Runtime Error', 'Accepted'] | ['s327378748', 's460408971'] | [3064.0, 2940.0] | [18.0, 18.0] | [444, 180] |
p03060 | u111652094 | 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,B,T = map(int,input().split())\n\nC = int((T + 1/2)//A)\nans = B*C\n\nprint(ans)', '# -*- coding: utf-8 -*-\n\n\nN = int(input())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\nans = 0\n\nfor i in range(N):\n if V[i]-C[i]>0:\n ans += V[i]-C[i]\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s992625858', 's039098042'] | [2940.0, 3064.0] | [17.0, 17.0] | [77, 259] |
p03060 | u116038906 | 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. | ['\nimport numpy as np\nimport sys\ninput = sys.stdin.readline\nN = int(input())\nV = np.array(list(map(int, input().split())))\nC = np.array(list(map(int, input().split())))\n\n\nv_c_sum=[]\nfrom itertools import combinations\nfor i in range(N+1):\n for t in combinations(range(N), i):\n print(t)\n\n v... | ['Wrong Answer', 'Accepted'] | ['s212605622', 's019999173'] | [17972.0, 12484.0] | [2109.0, 149.0] | [449, 313] |
p03060 | u116233709 | 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()))\na[0]*n\nfor i in range(0,n):\n a[i]=v[i]-c[i]\n \nans=0 \nfor j in range(0,n):\n if a[j]>0:\n ans+=a[j]\n \nprint(ans) \n \n ', 'n=int(input())\nv=list(map(int,input().split()))\nc=list(map(int,input().split()))\nans=0\... | ['Runtime Error', 'Accepted'] | ['s437748557', 's212511997'] | [3060.0, 3060.0] | [17.0, 17.0] | [210, 169] |
p03060 | u117545210 | 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()\np=list(map(int,input().split()))\nq=list(map(int,input().split()))\ncost=0\nfor i in range(a):\n if p[i] - q[[i] > 0:\n cost += (p[i]-q[i]) \nprint(n)', 'a=int(input())\np=list(map(int,input().split()))\nq=list(map(int,input().split()))\ncost=0\nfor i in range(a):\n if p[i] - q[i] > 0:\n ... | ['Runtime Error', 'Accepted'] | ['s800522706', 's765157235'] | [2940.0, 3060.0] | [17.0, 17.0] | [166, 173] |
p03060 | u117980998 | 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. | ['ef resolve():\n n = int(input())\n v = map(int,input().split())\n c = map(int,input().split())\n s = [x-y for x,y in zip(v,c) if (x-y)>0]\n ans = 0\n if s:\n ans = sum(s)\n print(ans)\n\nif __name__ == "__main__":\n resolve()', 'def resolve():\n n = int(input())\n v = map(int,inpu... | ['Runtime Error', 'Accepted'] | ['s773579042', 's455811882'] | [2940.0, 3060.0] | [17.0, 19.0] | [245, 246] |
p03060 | u124025116 | 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()\nvli = list(map(int,input().split()))\ncli = list(map(int,input().split()))\nfor i in n:\n sli = []\n sli.append(vli[i] - cli[i])\nfor j in n:\n ans = []\n if sli[j] > 0:\n ans.append(sli[j])\nanswer = sum(ans) \nprint(answer)', 'n=input()\nvli = list(map(int,input().split()))\ncli = list(map(in... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s196924733', 's829506513', 's865496615'] | [3064.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [237, 207, 169] |
p03060 | u125348436 | 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=[]\nfor i in N-1:\n m=v[i]-c[i]\n if m>0:\n d.append(m)\nprint(sum(d))', 'N=int(input())\nv=list(map(int,input().split()))\nc=list(map(int,input().split()))\nd=[]\nfor i in range(N):\n m=v[i]-c[i]\n if m>0:\n d.append(m)\n... | ['Runtime Error', 'Accepted'] | ['s854234643', 's315554661'] | [3060.0, 3060.0] | [17.0, 18.0] | [153, 158] |
p03060 | u126232616 | 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())\nval = []\ncos = []\nfor i in range(N):\n val.append(int(input())\nfor i in range(N):\n cos.append(int(input())\ndif = [val[i]-cos[i] for i in range(N)]\nma = 0\nfor d in dif:\n ma += d if d >= 0 else 0\nreturn ma', 'n = int(input())\nva = input().split()\nco = input().split()\n\nval = [int(... | ['Runtime Error', 'Accepted'] | ['s235104128', 's185749509'] | [2940.0, 3064.0] | [17.0, 17.0] | [228, 214] |
p03060 | u131264627 | 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 = 0\nfor i range(n):\n d = v[i] - c[i]\n if 0 < d:\n ans += d\nprint(int(ans))', 'n = int(input())\nv = list(map(int, input().split()))\nc = list(map(int, input().split()))\nans = 0\nfor i range(n):\n d = v[i... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s147608022', 's455616225', 's969941925', 's664481918'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 18.0] | [177, 179, 174, 183] |
p03060 | u138781768 | 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())\nb = input()\nv = []\nv.append(b.split())\nv = v[0]\ncount = 0\nfor v1 in v:\n v.remove(v1)\n v.insert(count, int(v1))\ns = input()\nc = []\nc.append(s.split())\nc = c[0]\ncount = 0\nfor c1 in c:\n c.remove(c1)\n c.insert(count, int(c1))\nprint(v)\nprint(c)\na = []\nfor (v1,c1) in zip(v,c... | ['Wrong Answer', 'Accepted'] | ['s461686418', 's144121284'] | [3064.0, 3064.0] | [18.0, 17.0] | [402, 384] |
p03060 | u140697185 | 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. | ['Number = input()\n\ntresure_value = list(map(int , input().split()))\n\ncost = list(map(int , input().split()))\n\ncount = 0\n\nfor i in range(Number):\n if tresure_value[i] - cost[i] > 0:\n count += tresure_value[i] - cost[i]\n \nprint(count)', 'Number = input()\n \ntresure_value = list(map(int , input().spli... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s108269270', 's122534982', 's176002942', 's188135702', 's331278533', 's889215190', 's461542715'] | [3060.0, 3060.0, 3060.0, 2940.0, 3060.0, 2940.0, 3064.0] | [18.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [238, 250, 255, 260, 252, 254, 256] |
p03060 | u141410514 | 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()))\nsum=0\ni=0\nwhile i<n:\n if v[i]>c[i]:\n sum+=v[i]-c[i]\nprint(sum)', 'n=int(input())\nv=list(map(int,input().split()))\nc=list(map(int,input().split()))\nsum=0\ni=0\nwhile i<n:\n if v[i]>c[i]:\n sum+=v[i]-c[i]\n i+=1\nprin... | ['Time Limit Exceeded', 'Time Limit Exceeded', 'Accepted'] | ['s456939300', 's762938453', 's328382222'] | [3060.0, 3060.0, 3060.0] | [2104.0, 2104.0, 17.0] | [147, 157, 163] |
p03060 | u145600939 | 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,j in zip(v,c):\n ans += max(0, v-c)\nprint(ans)\n', 'n = int(input())\nv = list(map(int,input().split()))\nc = list(map(int,input().split()))\nans = 0\nfor i,j in zip(v,c):\n ans += max(0, i-j)\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s535327794', 's583391128'] | [2940.0, 3064.0] | [17.0, 17.0] | [148, 148] |
p03060 | u146597538 | 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\nans = 0\nfor i in range(n):\n if v[i] - c[i] > 0:\n ans += v[i] - c[i]\n\nprint(ans)', 'n = int(input())\nv = list(map(int, input().split()))\nc = list(map(int, input().split()))\n\nans = 0\nfor i in range(n):\n if v[i] - c[i] > 0:... | ['Runtime Error', 'Accepted'] | ['s944638768', 's841505194'] | [3060.0, 3060.0] | [17.0, 17.0] | [161, 173] |
p03060 | u151365505 | 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 = list(map(int,input().split()))\nC_list = list(map(int,input().split())\n \ndiff_list = [v_list[i]-c_list[i] for i in range(n) if v_list[i] - c_list[i] > 0]\ndiff_list.append(0)\nprint(sum(diff_list))', 'N = input()\nV_list = list(map(int,input().split()))\nC_list = list(map(int,input().split())\... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s141421727', 's195653586', 's240932558', 's876788376', 's423534690'] | [2940.0, 2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [215, 248, 247, 215, 214] |
p03060 | u161201983 | 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())\nval = []\nfor i in map(int, input().split()):\n i.append(val)\ncost = []\nfor i in map(int, input().split()):\n i.append(cost)\n\nx = 0\ny = 0\nm1 = 0\nfor i in range(n):\n x += val[i]\n y += cost[i]\n m2 = x-y\n if m1 < m2:\n m1 = m2\n\nprint(m2)\n', 'n = int(input())\nval ... | ['Runtime Error', 'Accepted'] | ['s160396385', 's266230518'] | [3064.0, 3064.0] | [18.0, 17.0] | [273, 240] |
p03060 | u161442663 | 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=str(input())\nCs=str(input())\nListV=Vs.split()\nListC=Cs.split()\nfor i in range(0,len(ListV),1):\n a=ListV.pop(0)\n ListV.insert(0,int(a))\n\nfor i in range(0,len(ListC),1):\n b=ListC.pop(0)\n ListC.insert(0,int(b))\n\nListI=[]\nfor i in range(0,len(ListV),1):\n c=ListV[i]-ListC[i]\n ListI.... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s227588125', 's566900093', 's161886736'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [397, 398, 394] |
p03060 | u169070893 | 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 = input()\nvalue = [int(n) for n in input().split()]\ncost = [int(n) for n in input().split()]\n\nans=0\nfor i in range(num):\n if value[i] > cost[i]:\n ans = ans + value[i] - cost[i]\n\nprint(ans)', 'num = input()\nvalue = list(map(int, input().split()))\ncost = list(map(int, input().split()))\nans=0\nfor i ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s167893136', 's233406117', 's140969611'] | [3060.0, 3060.0, 2940.0] | [19.0, 19.0, 17.0] | [196, 192, 200] |
p03060 | u169138653 | 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. | ['v=list(map(int,input().split()))\nc=list(map(int,input().split()))\ncnt=0\nfor i in range(n):\n if v[i]-c[i]>0:\n cnt+=v[i]-c[i]\nprint(cnt)', 'n=int(input())\nv=list(map(int,input().split()))\nc=list(map(int,input().split()))\ncnt=0\nfor i in range(n):\n if v[i]-c[i]>0:\n cnt+=v[i]-c[i]\nprint(cnt)'] | ['Runtime Error', 'Accepted'] | ['s088460288', 's906763647'] | [3060.0, 3060.0] | [18.0, 23.0] | [138, 153] |
p03060 | u178192749 | 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())\nvl = [int(input()) for _ in range(n)]\ncl = [int(input()) for _ in range(n)]\nans = 0\nfor i in range(n):\n if vl[i] > cl[i]:\n ans += v[i]-c[i]\nprint(ans)', 'n = int(input())\nvl = list(map(int, input().split()))\ncl = list(map(int, input().split()))\nans = 0\nfor i in range(n):\n if ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s570628612', 's758917738', 's601543614'] | [3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [177, 175, 177] |
p03060 | u181644161 | 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().split()]\nC=[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)', '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)'] | ['Runtime Error', 'Accepted'] | ['s522654901', 's229011406'] | [3060.0, 3060.0] | [17.0, 17.0] | [136, 154] |
p03060 | u194440952 | 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 -*-\nn = int(input())\nv = input()\nc = input()\nri = 0\nfor i in range(0,n):\n a = v[i] - c[i] \n if a > 0:\n ri += a\n else:\n pass\nprint(ri)', '# -*- coding: utf-8 -*-\nn = int(input())\nv = input().split()\nc = input().split()\nri = 0\nfor i in range(0,n):\n a = v[... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s437494208', 's475123369', 's984019689', 's257881590'] | [2940.0, 2940.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0, 17.0] | [177, 191, 211, 223] |
p03060 | u197968862 | 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\ncal = []\nfor i in range(0,n):\n cal.append(v[i]-c[i])\ncal.sort(reverse=True)\nprint(cal)\nans = 0\nfor j in range(0,n):\n if cal[j] < 0:\n break\n ans += cal[j]\nprint(ans)', 'n = int(input())\nv = list(map(i... | ['Wrong Answer', 'Accepted'] | ['s045395226', 's623370263'] | [3064.0, 3060.0] | [17.0, 17.0] | [268, 176] |
p03060 | u201449687 | 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 = map(int, input().split())\nvalues = [int(input()) for _ in range(N)]\ncosts = [int(input()) for _ in range(N)]\n# N = 3\n# values = [10, 2, 5]\n# costs = [6, 3, 4]\n# N = 4\n# values = [13, 21, 6, 19]\n# costs = [11, 30, 6, 15]\n# N = 1\n# values = [1,]\n# costs = [50,]\n\n\ndef calculate_maximum_gain(values, cos... | ['Runtime Error', 'Accepted'] | ['s128439016', 's080990972'] | [3060.0, 2940.0] | [17.0, 17.0] | [501, 499] |
p03060 | u201856486 | 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\n# import math\n# import itertools\nimport numpy as np\n# import collections\n\n"""Template"""\n\n\nclass IP:\n \n\n def __init__(self):\n self.input = sys.stdin.readline\n\n def I(self):\n \n return int(self.input())\n\n def S(self):\n \n return self.input(... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s056118430', 's131535586', 's632418823', 's826804284'] | [12096.0, 12632.0, 21236.0, 12424.0] | [149.0, 151.0, 325.0, 148.0] | [4812, 4813, 4812, 146] |
p03060 | u213401801 | 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=map(int,input().split())\nxlist=[]\nylist=[]\nv=list(map(int,input().split()))\nc=list(map(int,input().split()))\nfor i in range(n):\n if v[i]>c[i]:\n xlist.append(v[i])\n ylist.append(c[i])\nans=sum(xlist)-sum(ylist)\nprint(ans)', 'n=int(input())\nxlist=[]\nylist=[]\nv=list(map(int,input().split()))\nc=list... | ['Runtime Error', 'Accepted'] | ['s486833818', 's241317396'] | [3064.0, 3064.0] | [20.0, 17.0] | [228, 222] |
p03060 | u215315599 | 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 \nsumV = 0\nsumC = 0\nmaxi = 0\nfor i in range(n):\n sumV += v[i]\n sumC += c[i]\n maxi = max(sumV-sumC,maxi)\nprint(maxi)', 'n = int(input())\nv = list(map(int, input().split()))\nc = list(map(int, input().spli... | ['Wrong Answer', 'Accepted'] | ['s299617827', 's035137711'] | [3064.0, 3060.0] | [17.0, 17.0] | [218, 183] |
p03060 | u225627575 | 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 = 0\nV = []\nC = []\n \ni = 0\nans = 0\n\nstr = input()\nN = int(str)\n \nstr = input().split()\nwhile i < N:\n V.append(int(str[i]))\n i = i+1\n \ni=0\nstr = 0\nstr = input().split()\nwhile i < N:\n C.append(int(str[i]))\n i = i+1\n \nwhile i<N:\n if V[i] > C[i]:\n ans = ans + V[i] - C[i]\n \n \npri... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Time Limit Exceeded', 'Accepted'] | ['s200553715', 's278619687', 's400275297', 's552502211', 's664981067', 's674114972', 's697629257', 's932230752', 's506773023'] | [3064.0, 3064.0, 2940.0, 3064.0, 2940.0, 2940.0, 2940.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 2104.0, 17.0] | [298, 282, 211, 251, 241, 302, 212, 313, 312] |
p03060 | u227429529 | 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\nlv = []\nlc = []\ndiff = []\nfor i in range(1,n+1):\n for p in itertools.combinations(v,i):\n lv.append(sum(p))\n for p in itertools.combinations(c,i):\n lc.append(sum(p))\nfor i in range(len(lv)):\n diff.append(lv[i]-lc[i])\nprint(0 if max(diff)<0 else max(diff))', 'n = int(i... | ['Runtime Error', 'Accepted'] | ['s485522503', 's102099755'] | [3064.0, 3060.0] | [18.0, 17.0] | [294, 162] |
p03060 | u228592109 | 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()\na = [input() for i in range(N)]\nb = [input() for i in range(N)]\n\nsum = 0\n\nfor i in range(N):\n if a[i] > b[i]:\n sum += a[i] -b[i]\n\nprint(sum)', 'N = int(input())\na = input().split()\nb = input().split()\n\nsum = 0\n\nfor i in range(N):\n if int(a[i]) > int(b[i]):\n sum += int(a[i]) -int(... | ['Runtime Error', 'Accepted'] | ['s081467783', 's216945913'] | [3060.0, 3060.0] | [17.0, 17.0] | [156, 157] |
p03060 | u230416699 | 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\nN = []\nfor i, v in enumerate(V):\n N.append(V[i]-C[i])\n\nN.sort(reverse=True)\n\nresult = 0\nfor n in N:\n if 0<n:\n result += n\n else:\n break\n\nprint(result)', 'N = int(input())\nV = map(int, input().split()... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s177773073', 's401502784', 's303627204'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [251, 251, 269] |
p03060 | u231905444 | 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())\narr=list(map(int,input().split()))\narr2=lisT9map(int,input().split())\nans=0\nfor i in range(n):\n\tif(arr[i]-arr2[i]>0):\n\t\tans+=arr[i]-arr2[i]\n\n\t#ans=max(ans,arr[i]-arr2[i])\nprint(ans)\n', 'n=int(input())\narr=list(map(int,input().split()))\narr2=lisT9map(int,input().split())\nans=0\nfor i in... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s736762174', 's937190368', 's800992629'] | [3060.0, 3060.0, 2940.0] | [18.0, 17.0, 17.0] | [197, 197, 198] |
p03060 | u233183615 | 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())\nC = list(map(int, input().split()))\nV = list(map(int, input().split()))\nsum = 0\nfor i in range(N):\n if V[i] > C[i]:\n sum += V[i] - C[i]\nprint(sum)', 'N = int(input())\nC = list(map(int, input().split()))\nV = list(map(int, input().split()))\nsum = 0\nfor i in range(N):\n sum += max(0, V... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s230402824', 's868928833', 's276956437'] | [3060.0, 3060.0, 3060.0] | [17.0, 17.0, 18.0] | [167, 155, 155] |
p03060 | u235655730 | 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\nW = [v-c for v, c in zip(V, C) if (v-c) > 0]\nprint(sum(W)', 'N = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\nW = [v-c for v, c in zip(V, C) if (v-c) > 0]\nprint(sum(W))'] | ['Runtime Error', 'Accepted'] | ['s675630149', 's739785495'] | [2940.0, 3060.0] | [17.0, 17.0] | [147, 148] |
p03060 | u238801602 | 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 = input().split()\nC = input().split()\nret_X_Y = 0\n\nfor i in range(len(V)):\n if (V[i] - C[i]) > 0:\n ret_X_Y += V[i] - C[i]\nprint(ret_X_Y)', 'N = input()\nV = input().split()\nC = input().split()\nret_X_Y = 0\nV = [int(i) for i in V]\nC = [int(i) for i in C]\nfor i in range(len(V)):\n ... | ['Runtime Error', 'Accepted'] | ['s689722347', 's672767224'] | [2940.0, 3064.0] | [17.0, 17.0] | [160, 207] |
p03060 | u239301277 | 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 -*-\n\nN = int(input())\nV = map(int, input().split())\nC = map(int, input().split())\n\ngain = 0\nfor i in range(0,N):\n if(V[i]>C[i]):\n gain += V[i] - C[i]\n\nprint(gain)', 'n=int(input())\nv=list(map(int,input().split()))\nc=list(map(int,input().split()))\nans=0\nfor i in range(n):\n... | ['Runtime Error', 'Accepted'] | ['s090035912', 's840382062'] | [3060.0, 3060.0] | [18.0, 18.0] | [192, 151] |
p03060 | u245931985 | 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 for i in range(2**N)]\nY = [0 for i in range(2**N)]\nZ = [0 for i in range(2**N)]\n\nfor i in range(2**N):\n select = []\n if i > 0:\n temp = i\n for n in reversed(range(1, N+1)):\n if temp - 2**(n-1) >= 0:\n temp = temp - 2**(n-1)\n select.append(n-... | ['Runtime Error', 'Accepted'] | ['s520790157', 's619099145'] | [3064.0, 3060.0] | [18.0, 18.0] | [475, 181] |
p03060 | u252964975 | 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()))\nZ=X-Y\nZ=Z[Z>0]\nprint(sum(Z))', "import numpy as np\nN=int(input())\nX=list(map(int, input().split()))\nY=list(map(int, input().split()))\nZ=np.zeros(N)\nfor i in range(N):\n Z[i]=X[i]-Y[i]\nprint('{:.0f}'.format(sum(Z[np.where(Z>... | ['Runtime Error', 'Accepted'] | ['s919869007', 's465304244'] | [3060.0, 12488.0] | [18.0, 152.0] | [111, 197] |
p03060 | u256464928 | 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()))\nc = list(map(int,input()))\n\ntotal_v = 0\n\nfor i in range(n-1)\n\tif v[i] - c[i] > 0:\n \ttotal_v += v[i] - c[i]\nprint(total_v)', 'n = int(input())\nv = list(map(int,input().split()))\nc = list(map(int,input().split()))\n\ntotal_v = 0\n\nfor i in range(n-1):\n if v... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s035402906', 's306556964', 's891152844', 's686937703'] | [2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 18.0, 18.0, 17.0] | [168, 187, 185, 186] |
p03060 | u259755734 | 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 = []\nY = []\n\nfor x in map(int, input().split()):\n X.append(x)\n\nfor y in map(int, input().split()):\n Y.append(y)\n\nd_list = []\n\nfor i in range(N):\n d = X[i] - Y[i]\n if d > 0:\n d_list.append(d)\n\nif d_list:\n print(max(d_list) + min(d_list))\nelse:\n \xa0print(... | ['Runtime Error', 'Accepted'] | ['s549066316', 's296280835'] | [3060.0, 3064.0] | [17.0, 17.0] | [300, 150] |
p03060 | u260009060 | 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\nXY = 0\n\nfor i in range(N):\n XY += np.maximum(0, V[i]-C[i])\n\nprint(XY)', '\nN = int(input())\nV = [int(x) for x in input().split()]\nC = [int(x) for x in input().split()]\n\nXY = 0\n\nfor i in range(N):\n if (V... | ['Runtime Error', 'Accepted'] | ['s035830900', 's693600674'] | [3060.0, 3060.0] | [18.0, 19.0] | [166, 181] |
p03060 | u265401619 | 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=list(map(int, input().split()))\nlist_c=list(map(int, input().split()))\nlist_ans = list_v - list_c\nans = 0\nfor i in range(n):\n if list_ans[i] > 0:\n ans += list_ans[i]\nprint(ans)', 'n=int(input())\nlist_v=list(map(int, input().split()))\nlist_c=list(map(int, input().split()))\nans = 0\... | ['Runtime Error', 'Accepted'] | ['s165399184', 's797459747'] | [3060.0, 3060.0] | [17.0, 17.0] | [202, 195] |
p03060 | u270681687 | 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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# ■■■■■■■■■■■■■■■■■■■■■\n\nn = int(input())\nv = list(map(int, input().split()))\nc = list(map(int, input().split()))\n\nans = 0\nfor i in range(n):\n if v[i] - c[i] > 0:\n ans += v[i] + c[i]\n\nprint(ans)', '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nn = int(input()... | ['Wrong Answer', 'Accepted'] | ['s727198650', 's755810077'] | [3060.0, 2940.0] | [17.0, 17.0] | [3102, 2935] |
p03060 | u274045692 | 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()))\nc = []\nA = 0\nfor i in range (N):\n V[i] - C[i] > 0\n c.append(i)\nfor j in c:\n A += V[j] + C[j]\nprint(A)', 'N = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\nc = []\nA = 0... | ['Wrong Answer', 'Accepted'] | ['s451207341', 's029140402'] | [3060.0, 3060.0] | [17.0, 17.0] | [199, 207] |
p03060 | u278296307 | 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()\nlist_v = list(map(int, input.split()))\nlist_c = list(map(int, input.split()))\n\nmax_value = 0\n\nfor i in range(n):\n if list_v[i]>list_c[i]:\n max_value = max_value + (list_v[i]-list_c[i])\n \nprint(max_value)', 'n = int(input())\nlist_v = list(map(int, input().split()))\nlist_c = lis... | ['Runtime Error', 'Accepted'] | ['s562037613', 's085716220'] | [3060.0, 3060.0] | [17.0, 17.0] | [232, 233] |
p03060 | u282335165 | 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\nvc=[v[i]-c[i] for i in range(n) if (v[i]-c[i]) > 0]\nprint(sum(vc))', 'n=int(input())\nv=list(map(int, input().split()))\nc=list(map(int, input().split()))\nvc=[(v[i]-c[i]) for i in range(n) if (v[i]-c[i]) > 0]\nprint(sum(vc))'] | ['Runtime Error', 'Accepted'] | ['s463863405', 's965656135'] | [3060.0, 3060.0] | [17.0, 17.0] | [138, 151] |
p03060 | u283520984 | 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(int(i) for i in input().split()) \nC = list(int(i) for i in input().split()) \nS=[]\nfor i in range(N):\n\tS.append(V[i]-C[i])\nfor i in range(N):\n\tif S[i]>0:\n\t\tans=ans+S[i]\nprint(ans)', 'N=int(input())\nV = list(int(i) for i in input().split()) \nC = list(int(i) for i in input().split(... | ['Runtime Error', 'Accepted'] | ['s455740670', 's440307199'] | [3064.0, 3060.0] | [17.0, 17.0] | [202, 212] |
p03060 | u285121325 | 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,c)\nresult = 0\nfor i in range(n):\n if v[i] > c[i]:\n result += v[i] - c[i]\nprint(result)', 'N = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\nprint(sum([V[i] - C[i] for ... | ['Wrong Answer', 'Accepted'] | ['s836827452', 's307096938'] | [3060.0, 2940.0] | [17.0, 17.0] | [187, 148] |
p03060 | u305052967 | 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())\nlist1 = map(int,input().split())\nlist2 = map(int,input().split())\nx = 0\nfor i in range(N):\n x = list1[i] - list2[i]\n if x >> 0:\n y += x\nprint(y)', 'N = int(input())\nlist1 = []\nfor i in range(N):\n list1.append(int(input))\nlist2 = []\nfor i in range(N):\n list2.append(in... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s819679572', 's975089998', 's167199930'] | [2940.0, 3060.0, 2940.0] | [17.0, 18.0, 17.0] | [175, 227, 172] |
p03060 | u306497037 | 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\nanc = 0\nfor i in range(N):\n if V[i] > C[i]:\n anc = anc + (V[i]-C[i])\n\nprint(ans)', 'N = int(input())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\n\nans = 0\nfor i in range(N):\n if V[i] > ... | ['Runtime Error', 'Accepted'] | ['s036200282', 's791920456'] | [3060.0, 3060.0] | [17.0, 17.0] | [172, 172] |
p03060 | u310108817 | 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 = [int(i) for i in input().split()]\nc_list = [int(i) for i in input().split()]\n\nfor _ in zip(v_list, c_list):\n if(v_list>=c_list):\n val = val + (v_list-c_list)\n\nprint(val)', 'n= int(input())\nv_list = [int(i) for i in input().split()]\nc_list = [int(i) for i in input().split()]\n\nv... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s337057341', 's950087107', 's068816316'] | [2940.0, 3060.0, 3060.0] | [18.0, 17.0, 17.0] | [198, 207, 192] |
p03060 | u322185540 | 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())\nv = list(map(int,input().split()))\nc = list(map(int,input().split())) \nans = 0\n\nfor i in range(a):\n if v(i) >= c(i):\n ans += (v(i)-c(i))\n \nprint(ans)', 'a = int(input())\nv = list(map(int,input().split()))\nc = list(map(int,input().split())) \nans = 0\nfor i in range(a):\n ... | ['Runtime Error', 'Accepted'] | ['s313416036', 's287293856'] | [3060.0, 3060.0] | [17.0, 17.0] | [183, 173] |
p03060 | u325704929 | 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\na = list(zip(v, c))\nt = 0\nfor i, m in a:\n p = m - i\n if p > 0:\n t += p\n\nprint(t)\n ', 'n = int(input())\nv = list(map(int, input().split()))\nc = list(map(int, input().split()))\n\na = list(zip(v, c))\nt = 0\n... | ['Wrong Answer', 'Accepted'] | ['s265927854', 's042215180'] | [3064.0, 3060.0] | [18.0, 17.0] | [180, 181] |
p03060 | u326328575 | 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)\nprint(C)\nans =0\nfor i in range(N):\n z = V[i]-C[i]\n if z>0:\n ans+=z\n \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 z = V[i]-C[i... | ['Wrong Answer', 'Accepted'] | ['s325625251', 's648360921'] | [3060.0, 3060.0] | [17.0, 18.0] | [177, 159] |
p03060 | u327668449 | 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 = input()\nv = v.split()\nc = input()\nc = c.split()\n\nVSubC = []\n\nfor index in range(n):\n heapq.heappush(VSubC, -(v[index] - c[index]))\n\nanswer = 0\nwhile(len(VSubC) > 0):\n item = heapq.heappop(VSubC)\n if (item < 0):\n answer -= item\n else:\n break\n\nprint(answer)', 'import heapq\n... | ['Runtime Error', 'Accepted'] | ['s654386213', 's671559988'] | [3064.0, 3064.0] | [17.0, 18.0] | [281, 310] |
p03060 | u329573160 | 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 sys import stdin\n\nN = int(stdin.readline().rstrip())\ndata = [stdin.readline().rstrip().split() for _ in range(N)]\n\nprofit = []\nsum_profit = 0\n\nfor i in N:\n profit[i] = data[0][i] - data[1][i]\n if profit[i] > 0:\n sum_profit += profit[i]\n\nprint(sum_profit)', 'from sys import stdin\n\nN = ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s234232773', 's493300150', 's585580860'] | [3060.0, 3060.0, 3064.0] | [17.0, 18.0, 17.0] | [272, 272, 294] |
p03060 | u329731898 | 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))\nmouke=0\nfor i in range(N):\n adv=V[i]-C[i]\n if adv>0:\n mouke+=adv:\nprint(mouke)', 'N=int(input())\nV=list(map(int,input().split))\nC=list(map(int,input().split))\nmouke=0\nfor i in range(N):\n adv=V[i]-C[i]\n if adv... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s274467757', 's278575106', 's268855568'] | [2940.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [168, 167, 171] |
p03060 | u330314953 | 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 = []\n\nfor i in range(n):\n x.append(int(v[i]-c[i]))\n\nx.sort()\n\ny = 0\n\ni = n-1\n\nwhile x[i] >= 0 and i >= 0 :\n y += x[i]\n i += -1\n\nprint(y)', 'n = int(input())\nv = [int(i) for i in input().split()]\nc = [int(j) for j in input().split()]\n\nx = []\n \nfor i in range(n):\n x.append(int(v[i]-c... | ['Runtime Error', 'Accepted'] | ['s473311366', 's772443587'] | [2940.0, 3064.0] | [17.0, 17.0] | [147, 247] |
p03060 | u331464808 | 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())\nmaxbenefit = 0\nfor i in range(n):\n if c[i]<v[i]:\n maxbenefit += v[i]-c[i]\nprint(maxbenefit)', 'n = int(input())\nv = list(map(int,input().split()))\nc = list(map(int,input().split()))\nmaxbenefit = 0\nfor i in range(n):\n i... | ['Runtime Error', 'Accepted'] | ['s819644611', 's797027589'] | [3060.0, 3060.0] | [17.0, 17.0] | [176, 188] |
p03060 | u334260611 | 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 = input().split(' ')\nC = input().split(' ')\n\nmax = -1000\nfor value, cost in zip(V, C):\n value_int = int(value)\n cost_int = int(cost)\n if(max < value_int - cost_int):\n max = value_int - cost_int\n\nprint(max)", "N = input()\nV = input().split(' ')\nC = input().split(' ')\n\nmax =... | ['Wrong Answer', 'Accepted'] | ['s382352028', 's183077724'] | [3060.0, 3060.0] | [17.0, 17.0] | [235, 230] |
p03060 | u344030307 | 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\nm = 0\n\nfor i in range(len(v)):\n if v[i] > c[i]:\n m += v[i] - c[i]\n\nprint(m)', 'n = int(input())\nv = list(map(int, input().split()))\nc = list(map(int, input().split()))\n\nm = 0\n\nfor i in range(len(v)):\n if v[i... | ['Runtime Error', 'Accepted'] | ['s495836856', 's097580888'] | [8952.0, 9164.0] | [24.0, 24.0] | [168, 169] |
p03060 | u345483150 | 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. | ['v=list(map(int, input().split()))\nc=list(map(int, input().split()))\nn=int(input())\ns=0\nfor i in range(n):\n if v[i]-c[i]>0:\n s=s+v[i]-c[i]\n else:\n continue\nprint(s)', 'v, c=list(map(int, input().split()))\nn=len(v)\nn=len(c)\ns=0\nfor i in range(n):\n if v[i]-c[i]>0:\n s=s+v[i]-c[i]\nprint(s)', 'v... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s560355074', 's588273150', 's679228529', 's770923057', 's893236469', 's571630864'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [171, 122, 119, 140, 188, 189] |
p03060 | u346629192 | 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()))\na = 0\nfor i in range(N):\n a += abs(V[i]-C[i])\nprint(a)', 'N = int(input())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\na = 0\nfor i in range(N):\n if V[i] > C[i]:\n a += V[i]-C[i]\npr... | ['Wrong Answer', 'Accepted'] | ['s379123995', 's825277523'] | [2940.0, 3060.0] | [18.0, 17.0] | [144, 163] |
p03060 | u347640436 | 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)]\nresult = 0\nfor i in range(n):\n if v[i] > c[i]:\n result += v[i] - c[i]\nprint(result)\n', 'n = int(input())\nv = [int(e) for e in input().split()]\nc = [int(e) for e in input().split()]\nresult = 0\nfor i in range(n):\... | ['Runtime Error', 'Accepted'] | ['s443024899', 's542034362'] | [3056.0, 2940.0] | [19.0, 17.0] | [179, 181] |
p03060 | u348432940 | 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 calculate_max(Ans, value):\n temp = Ans\n if (Ans + value) > Ans:\n temp += value\n if tmep < 0 :\n temp = 0\n return temp\n# input processing \nN = int(input())\nValue = map(int, input().split())\nCost = map(int, input().split())\n# profit calculation\nProfit = [Value[i] - Cost[i] for i... | ['Runtime Error', 'Accepted'] | ['s233328947', 's906965352'] | [3064.0, 3064.0] | [17.0, 17.0] | [429, 441] |
p03060 | u348868667 | 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())\nH = list(map(int,input().split()))\ncount = 1\nfor i in range(1,N):\n if max(H[:i]) <= H[i]:\n count += 1\nprint(count)', 'N = int(input())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\ntmp = list()\nfor i in range(N):\n if V[i] - C[i] > 0:\n tmp.append... | ['Wrong Answer', 'Accepted'] | ['s842339997', 's888184362'] | [2940.0, 3060.0] | [17.0, 17.0] | [141, 188] |
p03060 | u357218223 | 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\nN = int(input())\nV = list(map(int,input().split()))\nC = list(map(int,input().split()))\nans = 0\nfor i in [ V[_] - C[_] for _ in range(N)]:\n if i> 0:\n ans+=j\nprint(ans)', 'N = int(input())\nVC = [list(map(int,input().split())) for _ in range(2) ] \nans = 0\nfor i in [ VC[0][_] - VC[1][... | ['Runtime Error', 'Accepted'] | ['s079640325', 's612473747'] | [3060.0, 3060.0] | [17.0, 17.0] | [192, 172] |
p03060 | u358791207 | 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()]\n\nsum = 0\nfor i in range(N):\n if V[i] > C[i]:\n sum += V[i]\n \nprint(sum)', 'N = int(input())\nV = [int(i) for i in input().split()]\nC = [int(i) for i in input().split()]\n\nsum = 0\nfor i in range(N):\n if V[i... | ['Wrong Answer', 'Accepted'] | ['s415983632', 's841762857'] | [3060.0, 2940.0] | [17.0, 17.0] | [170, 178] |
p03060 | u360090862 | 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()]\nres=0\nfor vv cc in zip(V,C):\n if vv-cc>0:\n res=res+vv-cc\nprint(res)', 'N=int(input())\nV=[int(i) for i in input().split()]\nC=[int(i) for i in input().split()]\nres=0\nfor vv,cc in zip(V,C):\n if vv-cc>0:\n res=res+v... | ['Runtime Error', 'Accepted'] | ['s690271520', 's845148334'] | [2940.0, 2940.0] | [17.0, 17.0] | [158, 158] |
p03060 | u361826811 | 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. | ['#include <stdio.h>\n\n\nusing namespace std;\ntypedef long long ll;\n\nint main()\n{\n int N, ans = 0;\n vector<int> V(N), C(N);\n scanf("%d", &N);\n for (int i = 0; i < N; i++)\n {\n scanf("%d", V.at(i));\n }\n for (int i = 0; i < N; i++)\n {\n scanf("%d", C.at(i));\n }\n\n ... | ['Runtime Error', 'Accepted'] | ['s789173594', 's191033845'] | [2940.0, 3060.0] | [17.0, 20.0] | [491, 366] |
p03060 | u363836311 | 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=0\nfor i in range(n):\n tmp=v[i]-c[i]\n if tmp>0:\n d+=tmp\nprint(tmp)', 'n=int(input())\nv=list(map(int, input().split()))\nc=list(map(int, input().split()))\nd=0\nfor i in range(n):\n tmp=v[i]-c[i]\n if tmp>0:\n d+=tmp... | ['Wrong Answer', 'Accepted'] | ['s475226913', 's981237802'] | [3060.0, 2940.0] | [18.0, 17.0] | [155, 154] |
p03060 | u363992934 | 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. | ['input();\nValues = list(map(int, input().split()))\nCosts = list(map(int, input().split()))\ntotal = 0\nfor (value, cost) in zip(Values, Costs):\n if value > cost:\n total = value - cost\n\nprint(total)', 'input()\nValues = list(map(int, input().split()))\nCosts = list(map(int, input().split()))\ntotal = 0\nfor (... | ['Wrong Answer', 'Accepted'] | ['s532675772', 's413466928'] | [2940.0, 2940.0] | [17.0, 17.0] | [198, 208] |
p03060 | u364439209 | 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. | ['inputs = input().split("\\n")\nN = int(inputs[0])\nV = list(map(int, inputs[1].split(" ")))\nC = list(map(int, inputs[2].split(" ")))\nZ = 0\nfor v, c in zip(V, C):\n if v-c>0: z += v-c\nprint(Z)', 'inputs = input().split("\\n")\nN = int(inputs[0])\nV = list(map(int, inputs[1]))\nC = list(map(int, inputs[2]))\nZ =... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s263224009', 's279880236', 's563033715', 's600183703'] | [3060.0, 3060.0, 3060.0, 2940.0] | [17.0, 18.0, 17.0, 17.0] | [190, 168, 190, 155] |
p03060 | u369630760 | 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()\ncost = []\nx = 0\nfor i in range(N):\n cost.append(int(V[int(i)]) - int(C[int(i)]))\nprint(cost)\nprint(sorted(cost,reverse=True))\nfor i in range(N):\n if cost[i] > 0:\n x = x + int(cost[i])\nprint(x)', 'N = int(input())\nV = input().split()\nC... | ['Wrong Answer', 'Accepted'] | ['s568591609', 's385331593'] | [3060.0, 3060.0] | [17.0, 17.0] | [262, 217] |
p03060 | u370576244 | 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())\nb = list(input().split())\nc = list(input().split())\nr=0\nfor i in range(n):\n if b[i]-c[i]>0:\n r = r + b[i] - c[i]\n \nprint(r)', 'n = int(input())\nb = list(map(int,input().split()))\nc = list(map(int,input().split()))\nr=0\nfor i in range(n):\n if b[i]-c[i]>0:\n r = r + b[i] - c[i]\n... | ['Runtime Error', 'Accepted'] | ['s097325711', 's030362204'] | [3064.0, 2940.0] | [17.0, 18.0] | [147, 166] |
p03060 | u371467115 | 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()))\ncnt=0\nfor _ in range(n):\n if v[i]-c[i]>0:\n cnt+=v[i]-c[i]\nprint(cnt)', 'n=int(input())\nv=list(map(int,input().split()))\nc=list(map(int,input().split()))\ncnt=0\nfor i in range(n):\n if v[i]-c[i]>0:\n cnt+=v[i]-c[i]\nprin... | ['Runtime Error', 'Accepted'] | ['s043470619', 's596156990'] | [3060.0, 3060.0] | [17.0, 17.0] | [153, 153] |
p03060 | u373047809 | 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())]\nprint(sum([max(v[i] - c[i], 0) for i in range(n)]))', 'n, *d = map(int, open(0).read().split())\nprint(sum([max(d[i] - d[i+n], 0) for i in range(n)]))'] | ['Runtime Error', 'Accepted'] | ['s202298699', 's998986855'] | [3060.0, 2940.0] | [18.0, 17.0] | [132, 94] |
p03060 | u374146618 | 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\nimport numpy as np\n\nN = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\nans = 0\nfor k in range(1, N+1):\n chosen = list(itertools.combinations(range(N), k))\n for a in range(np.shape(chosen)[0]):\n X = 0\n Y = 0\n for b in range... | ['Wrong Answer', 'Accepted'] | ['s970632331', 's691001134'] | [14420.0, 13708.0] | [2108.0, 174.0] | [483, 171] |
p03060 | u375282392 | 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\n\ngetsum = 0\nfor i in range(n):\n\tprofit = v[i]-c[i]\n\tif profit > 0:\n\t\tgetsum += profit\n\t\t\n\nprint(getsum)', 'n = int(input())\nv = list(map(int,input().split()))\nc = list(map(int,input().split()))\n\n\ngetsum = 0\nfor i in ra... | ['Runtime Error', 'Accepted'] | ['s274179627', 's987532179'] | [2940.0, 3060.0] | [17.0, 17.0] | [179, 191] |
p03060 | u390170391 | 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 = 0\n\nfor i in range(0,n):\n if a[i] > b[i]:\n c = c + a[i] - b[i]\n else:\n continue\n \nprint(c)\n', 'n = int(input())\na = []\nb = []\nc = 0\nfor _ in range(n):\n a.append(int(input()))\nfor _ in range(n):\n b.app... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s222799703', 's299137960', 's467878548'] | [2940.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0] | [188, 222, 192] |
p03060 | u392938961 | 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()))\ndiff = [x[i]-y[i] for i in range(n)]\nnum = 0\nfor d in diff:\n if(d > 0):\n num += d', 'n = int(input())\nx =list(map(int, input().split()))\ny =list(map(int, input().split()))\ndiff = [x[i]-y[i] for i in range(n)]\nn... | ['Wrong Answer', 'Accepted'] | ['s150227562', 's538207503'] | [3060.0, 3060.0] | [18.0, 17.0] | [178, 189] |
p03060 | u399721252 | 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 = [ int(v) for v in input().split() ]\nc_list = [ int(v) for v in input().split() ]\n\nans = sum([ max( 0, (v_list[i]-c_list[i]) ) for i in range(n) ])', 'n = int(input())\n\t\nv_list = [ int(v) for v in input().split() ]\nc_list = [ int(v) for v in input().split() ]\n\t\nans = sum([ max( 0... | ['Wrong Answer', 'Accepted'] | ['s191933081', 's528434019'] | [3060.0, 3060.0] | [17.0, 17.0] | [173, 187] |
p03060 | u402467563 | 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())\nH = list(map(int, input().split()))\ncount = 0\nM = 0\nfor i in range(N):\n if H[i]>=M:\n count += 1\n M = H[i]\nprint(count)', 'N = int(input())\nH = list(map(int, input().split()))\ncount = 0\nM = 0\nfor i in range(N):\n print(H[i])\n if H[i]>=M:\n count += 1\n M = H[i]\nprint(count... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s057858463', 's982724040', 's811035445'] | [2940.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [142, 156, 165] |
p03060 | u405353249 | 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. | ['\ndef problem():\n N = int(input())\n V = list(map(int, input().split()))\n C = list(map(int, input().split()))\n\n print(algorithm(N, V, C))\n\n\ndef algorithm(N: int, V: List[int], C: List[int]):\n indices = list(filter(lambda i: V[i] - C[i] > 0, list(range(0, N))))\n\n sum = 0\n for i in indic... | ['Runtime Error', 'Accepted'] | ['s440129508', 's665946125'] | [3060.0, 3064.0] | [17.0, 17.0] | [363, 334] |
p03060 | u408375121 | 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()))\nR = []\nfor i range(N):\n R.append(V[i] - C[i])\ncost = 0\nfor r in R:\n if r > 0:\n cost += r\nprint(cost)\n ', 'N = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\nR = []\nfor i ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s095212783', 's890546405', 's428184722'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0] | [197, 206, 209] |
p03060 | u426649993 | 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 -*-\n\nN = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\ngain = 0\nfor i in range(0,N):\n if(V>C):\n gain += V[i] - C[i]\n\nprint(gain)', '# -*- coding: utf-8 -*-\n\nN = int(input())\nV = list(map(int, input().split()))\nC = list(map(int, input... | ['Wrong Answer', 'Accepted'] | ['s034650236', 's335315291'] | [3060.0, 3060.0] | [17.0, 17.0] | [198, 204] |
p03060 | u430223993 | 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 = [i for i in input().split('\\n')]\nvalue = [int(i) for i in jewel[1].split()]\ncost = [int(i) for i in jewel[2].split()]\ndiff = [i-j for i,j in zip(value, cost)]\nprice = 0\nfor i in sorted(diff):\n if i>0:\n price += i\n\nprint(price)", 'jewel = int(input())\nvalue = [int(i) for i in input().split... | ['Runtime Error', 'Accepted'] | ['s056566469', 's247881243'] | [3064.0, 3060.0] | [17.0, 17.0] | [244, 222] |
p03060 | u437215432 | 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. | ['# ABC125B\n\nn = int(input())\nv = list()\nc = list(map(int, input().split()))\nx = 0\ny = 0\nfor i in range(n):\n v, c = map(int, input().split())\n if v > c:\n x += v\n y += c\nprint(abs(x - y))\n', '# ABC125B\n\nn = int(input())\nx = 0\ny = 0\nfor i in range(n):\n v, c = map(int, input().spl... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s250989351', 's909392846', 's746540869'] | [3060.0, 2940.0, 3060.0] | [17.0, 17.0, 18.0] | [205, 158, 197] |
p03060 | u439063038 | 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 _ in range(N):\n if v[i] > c[i]:\n ans += v[i] - c[i]\nprint(ans)', 'N = int(input())\nv = list(map(int, input().split()))\nc = list(map(int, input().split()))\n\nans = 0\nfor i in range(N):\n if v[... | ['Runtime Error', 'Accepted'] | ['s954296970', 's570947496'] | [9036.0, 9120.0] | [24.0, 27.0] | [174, 174] |
p03060 | u443151804 | 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())\nl=map(int,input().split())\nm=map(int,input().split())\ndef f(x):\n\treturn l[x]-m[x]\nprint(sum([f(i) for i in range(n) if f(i)>0]))', 'n=int(input())\nl=list(map(int,input().split()))\nm=list(map(int,input().split()))\ndef f(x):\n\treturn l[x]-m[x]\nprint(sum([f(i) for i in range(n) if f(i)>0]))'] | ['Runtime Error', 'Accepted'] | ['s914471678', 's751333663'] | [3060.0, 3060.0] | [18.0, 17.0] | [143, 155] |
p03060 | u456198602 | 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 = input().split(" ")\nC = input().split(" ")\n\nn = int(n)\nV_tmp = []\nfor v in V:\n V_tmp.append(int(v))\nV = V_tmp\nC_tmp = []\nfor c in C:\n C_tmp.append(int(v))\nC = C_tmp\nSA = []\nfor i in range(n):\n SA.append(C[i]-V[i])\nmax_ = 0\nfor i in range(n):\n if SA[i] >= 0:\n max_ +... | ['Wrong Answer', 'Accepted'] | ['s646047861', 's692140112'] | [3064.0, 3064.0] | [18.0, 17.0] | [318, 318] |
p03060 | u463655976 | 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. | ['print(sum(max(int(x)- int(y), 0) for x, y in zip(input().split(), input().split())))', 'input()\nprint(sum(max(int(x)- int(y), 0) for x, y in zip(input().split(), input().split())))\n'] | ['Wrong Answer', 'Accepted'] | ['s706417238', 's860742726'] | [2940.0, 2940.0] | [18.0, 17.0] | [84, 93] |
p03060 | u465903301 | 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(sum([i for i in range(n) if v[i] > c[i]]))', 'n=int(input())\nv=list(map(int,input().split()))\nc=list(map(int,input().split()))\nprint(sum([v[i] - c[i] for i in range(n) if v[i] > c[i]]))'] | ['Wrong Answer', 'Accepted'] | ['s684529970', 's544954100'] | [2940.0, 3060.0] | [17.0, 17.0] | [129, 139] |
p03060 | u466331465 | 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().spplit()]\nans = [l-p for l,p in zip(v,c)]\nans1 = 0\nfor i in ans :\n ans1 += i if i>0 else 0\nprint(ans1)', 'N = int(input())\nv = [int(x) for x in input().split()]\nc = [int(x) for x in input().split()]\nans = [l-p for l,p in zi... | ['Runtime Error', 'Accepted'] | ['s560226414', 's749264661'] | [3060.0, 3060.0] | [17.0, 17.0] | [187, 186] |
p03060 | u472234259 | 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\nans = 0\n\nfor i in range(n):\n if v[i] - c[i]:\n ans += v[i] - c[i]\nprint(ans) ', 'n = int(input())\nv = [int(x) for x in input().split()]\nc = [int(x) for x in input().split()]\n\nans = 0\n\nfor i in range(n):\n ... | ['Wrong Answer', 'Accepted'] | ['s091190894', 's745904058'] | [3060.0, 3060.0] | [18.0, 17.0] | [174, 178] |
p03060 | u481026841 | 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()))\ncnt = 0\nfor i in range(len(n)):\n if v[i] > c[i]:\n cnt += (v[i] - c[i])\n else:\n cnt += 0\nprint(cnt) \n', 'n = int(input())\nv = map(int,input().split())\nc = map(int,input().split())\ncnt = 0\nfor... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s267896633', 's369156353', 's491868182', 's673962457', 's682479604', 's689615286', 's794917458', 's934757674', 's965495419', 's979417758', 's644297700'] | [2940.0, 3060.0, 3060.0, 3060.0, 3060.0, 3060.0, 3060.0, 3060.0, 2940.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [214, 194, 186, 193, 192, 234, 202, 173, 215, 165, 173] |
p03060 | u483885886 | 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())\nsum = 0\nfor i in range(n):\n if v[i] >c[i]:\n sum += v[i]-c[i]\nprint(sum)\n', 'n = int(input())\nv = list(map(int,input().split()))\nc = list(map(int,input().split()))\nsum = 0\nfor i in range(n):\n if v[i] >c[i]:\n... | ['Runtime Error', 'Accepted'] | ['s718241028', 's037914523'] | [2940.0, 2940.0] | [17.0, 17.0] | [166, 168] |
p03060 | u490623664 | 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()]\ns=0\nfor i in range(n):\n if v[i]>c[i]:\n s+=v[i]-c[i]\nprint(s)', 'n=int(input())\nv=[int(x) for x in input().split()]\nc=[int(x) for x in input().split()]\ns=0\nfor i in range(n):\n d=v[i]-c[i]\n if d>0:\n s+=d\nprin... | ['Runtime Error', 'Accepted'] | ['s394975004', 's829430268'] | [2940.0, 2940.0] | [17.0, 17.0] | [152, 151] |
p03060 | u490642448 | 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. | ['input()\nv=list(map(int,input().split())\nc=list(map(int,input().split())\na=[max(0,i-j) for i,j in zip(v,c)]\nprint(sum(a))', 'input()\nv=list(map(int,input().split()))\nc=list(map(int,input().split()))\na=[max(0,i-j) for i,j in zip(v,c)]\nprint(sum(a))\n'] | ['Runtime Error', 'Accepted'] | ['s562792158', 's249047352'] | [8708.0, 9052.0] | [23.0, 27.0] | [120, 123] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.