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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02725 | u995419623 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['K,N = map(int,input().split())\nA = list(map(int,input().split()))\n\nmax_distance = K + (A[0] + A[-1])\n\nfor i in range(1,N):\n max_distance = max(max_distance, A[i] - A[i-1])\n \nprint(K - max_distance)', 'K,N = map(int,input().split())\nA = list(map(int,input().split()))\n\nmax_distance = K + (A[0] - A[-1])\n\n... | ['Wrong Answer', 'Accepted'] | ['s742942901', 's118966933'] | [26436.0, 26444.0] | [135.0, 135.0] | [199, 199] |
p02725 | u999503965 | 2,000 | 1,048,576 | There is a circular pond with a perimeter of K meters, and N houses around them. The i-th house is built at a distance of A_i meters from the northmost point of the pond, measured clockwise around the pond. When traveling between these houses, you can only go around the pond. Find the minimum distance that needs to ... | ['k,n=map(int,input().split())\nl=list(map(int,input().split()))\n\ndiff=[]\nl.append(l[0]+k)\n\nfor i in range(n-1):\n diff.append(l[n+1]-l[n])\n \nprint(sum(diff)-max(diff))', 'k,n=map(int,input().split())\nl=list(map(int,input().split()))\n\ndiff=[]\nl.append(l[0]+k)\nfor i in range(n):\n diff.append(l[i+1]-l[i])... | ['Runtime Error', 'Accepted'] | ['s570386668', 's272109018'] | [32304.0, 32240.0] | [71.0, 110.0] | [166, 162] |
p02727 | u011276976 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x, y, a, b, c = map(int, input().split())\n\nred = sorted(list(map(int, input().split())), reverse=True)[0:x-1]\ngre = sorted(list(map(int, input().split())), reverse=True)[0:y-1]\nnon = sorted(list(map(int, input().split())), reverse=True)\n\neat = red + gre + non\n\neat.sort(reverse=True)\n\nprint(sum(eat[0:x+y-1])... | ['Wrong Answer', 'Accepted'] | ['s681446614', 's936059020'] | [22488.0, 23200.0] | [240.0, 252.0] | [310, 325] |
p02727 | u012955130 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ["import heapq\n\nX, Y, A, B, C = map(int ,input().split(' '))\np = list(map(int ,input().split(' ')))\nq = list(map(int ,input().split(' ')))\nR = set(map(int ,input().split(' ')))\n\neat = sorted(p, reverse=True)[:X]\nheapq.heapify(eat)\n[heapq.heappush(eat, i) for i in sorted(q, reverse=True)[:Y]]\n\nfirst = min(eat... | ['Wrong Answer', 'Accepted'] | ['s216699436', 's602846584'] | [29344.0, 23328.0] | [2105.0, 235.0] | [429, 308] |
p02727 | u017050982 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X,Y,A,B,C =map(int,input().rstrip().split(" "))\nRA = list(map(int,input().rstrip().split(" ")))\nGA = list(map(int,input().rstrip().split(" ")))\nWA = list(map(int,input().rstrip().split(" ")))\nRA.sort()\nRA.reverse()\nGA.sort()\nGA.reverse()\nWA.sort()\nWA.reverse()\neatRA = X\neatGA = Y\neatWA = 0\nans = 0\nRAeat... | ['Runtime Error', 'Accepted'] | ['s976142570', 's386599948'] | [23328.0, 23328.0] | [2104.0, 350.0] | [822, 1019] |
p02727 | u017415492 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x,y,a,b,c=map(int,input().split())\np=list(map(int,input().split()))\nq=list(map(int,input().split()))\nr=list(map(int,input().split()))\np.sort()\nq.sort()\nr.sort()\npcount=0\nqcount=0\nrcount=0\nans=[]\nfor i in range(x):\n ans.append(p[-1-i])\nfor i in range(y):\n ans.append(q[-1-i])\nans.sort()\nfor i in range... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s259234651', 's298486001', 's316926076', 's978078478', 's890668078'] | [22720.0, 22720.0, 22720.0, 24552.0, 29536.0] | [310.0, 270.0, 264.0, 305.0, 172.0] | [410, 390, 390, 406, 302] |
p02727 | u020449748 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['[X, Y, A, B, C] = list(map(int, input().split()))\n\np = sorted(list(map(int, input().split())), reverse=True)\nq = sorted(list(map(int, input().split())), reverse=True)\nr = sorted(list(map(int, input().split())), reverse=True)\n\neatCandi = p[0:X] + q[0:Y] + r[0:X+Y]\nprint(sum(eatCandi[0:X+Y]))', '[X, Y, A, B, C] ... | ['Wrong Answer', 'Accepted'] | ['s006746774', 's292620211'] | [23200.0, 23200.0] | [210.0, 250.0] | [291, 315] |
p02727 | u022979415 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ["def main():\n x, y, a, b, c = map(int, input().split())\n p = list(map(int, input().split()))\n q = list(map(int, input().split()))\n r = list(map(int, input().split()))\n p.sort()\n q.sort()\n for i in range(-1, -x - 1, -1):\n r.append(p[i])\n for i in range(-1, -y - 1, -1):\n r... | ['Wrong Answer', 'Accepted'] | ['s289848536', 's015215503'] | [23328.0, 23328.0] | [249.0, 239.0] | [414, 414] |
p02727 | u025287757 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x, y, a, b, c = map(int, input().split())\nA = list(map(int, input().split()))\nB = list(map(int, input().split()))\nC = list(map(int, input().split()))\n\nA = sorted(A)\nB = sorted(B)\n\nA = A[len(A)-x:]\nB = B[len(B)-y:]\nC = list(map(lambda x: x*(-1), C))\n\nimport heapq\nheapq.heapify(A)\nheapq.heapify(B)\nheapq.... | ['Runtime Error', 'Accepted'] | ['s049881760', 's141559810'] | [22720.0, 23328.0] | [450.0, 473.0] | [677, 724] |
p02727 | u025463382 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['from collections import deque\nx,y,a,b,c = map(int,input().split())\nred = [int(i) for i in input().split()]\ngw = [int(i) for i in input().split()] + [int(i) for i in input().split()]\nred.sort()\ngw.sort()\ngwrui = []\nrui = 0\nfor i in range(b+c):\n rui += gw[i]\n gwrui.append(rui)\nredq = deque(red[:x])\nan... | ['Runtime Error', 'Accepted'] | ['s957014682', 's684520753'] | [26704.0, 31784.0] | [368.0, 363.0] | [446, 639] |
p02727 | u037430802 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['import heapq\n\n\nX,Y,A,B,C = map(int, input().split())\nP = list(map(int, input().split()))\nQ = list(map(int, input().split()))\nR = list(map(int, input().split()))\n\nr = []\ng = []\nnc = []\nfor p in P:\n heapq.heappush(r, -p)\n\nfor q in Q:\n heapq.heappush(g, -q)\n\nfor i in R:\n heapq.heappush(nc, -i)... | ['Runtime Error', 'Accepted'] | ['s562470416', 's539903804'] | [3064.0, 31052.0] | [18.0, 546.0] | [1957, 892] |
p02727 | u038408819 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x, y, a, b, c = map(int, input().split())\np = list(map(int, input().split()))\nq = list(map(int, input().split()))\nr = list(map(int, input().split()))\np.sort(reverse=True)\nq.sort(reverse=True)\nr.sort(reverse=True)\nans = p[:x] + q[:y] + r\nprint(sum(ans.sort(reverse=True)[:x + y]))', 'x, y, a, b, c = map(int, in... | ['Runtime Error', 'Accepted'] | ['s600087569', 's028984789'] | [23328.0, 23328.0] | [248.0, 241.0] | [279, 283] |
p02727 | u042802884 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['import heapq as hq\n\nX, Y, A, B, C = map(int,input().split())\np = list(map(int,input().split())); p.sort(); p.reverse()\nq = list(map(int,input().split())); q.sort(); q.reverse()\nr = list(map(int,input().split())); r.sort(); r.reverse()\n\npq1 = []; hq.heapify(pq1) \nfor i in range(X):\n hq.heappush(pq1, p[i])\... | ['Runtime Error', 'Accepted'] | ['s470909763', 's652296628'] | [23360.0, 23216.0] | [405.0, 443.0] | [584, 597] |
p02727 | u064434060 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['#import sys\n#import numpy as np\nimport math\n#from fractions import Fraction\nimport itertools\nfrom collections import deque\nfrom collections import Counter\n#import heapq\n#from fractions import gcd\n#input=sys.stdin.readline\nimport bisect\nx,y,a,b,c=map(int,input().split())\np=list(map(int,input().split()))\n... | ['Wrong Answer', 'Accepted'] | ['s042082388', 's413554131'] | [29516.0, 29448.0] | [264.0, 204.0] | [938, 917] |
p02727 | u078181689 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['2 2 4 4 4\n11 12 13 14\n21 22 23 24\n1 2 3 4\n', 'x,y,a,b,c = list(map(int,input().split()))\nparr = list(map(int,input().split()));parr.sort(reverse=True);parr = parr[:x]\nqarr = list(map(int,input().split()));qarr.sort(reverse=True);qarr = qarr[:y]\nrarr = list(map(int,input().split()))\narr = parr+qarr+rarr\narr.s... | ['Runtime Error', 'Accepted'] | ['s098849948', 's827562316'] | [2940.0, 22528.0] | [17.0, 240.0] | [42, 302] |
p02727 | u088115428 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x,y,a,b,c = map(int, input().split())\np1 = list(map(int, input().split()))\np2 = list(map(int, input().split()))\np3 = list(map(int, input().split()))\nans1 = 0\nans2 = 0\np1.sort(reverse = True)\np2.sort(reverse = True)\np3.sort(reverse = True)\nfor i in range(0, max(x,y)):\n p3.append(0)\nfor i in range(0,x):\n ... | ['Runtime Error', 'Accepted'] | ['s885681049', 's505503858'] | [22720.0, 23328.0] | [286.0, 241.0] | [472, 262] |
p02727 | u091051505 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x, y, a, b, c = map(int, input().split())\np = [int(i) for i in input().split()]\nq = [int(i) for i in input().split()]\nr = [int(i) for i in input().split()]\n\np = list(reversed(sorted(p)))\nq = list(reversed(sorted(q)))\nr = list(reversed(sorted(r)))\np_cum = [0]\nq_cum = [0]\nr_cum = [0]\nfor i in range(a):\n ... | ['Wrong Answer', 'Accepted'] | ['s766211178', 's149903885'] | [45700.0, 25264.0] | [2105.0, 266.0] | [632, 334] |
p02727 | u093861603 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X,Y,A,B,C=map(int,input().split())\nP=list(map(int,input().split()))\nQ=list(map(int,input().split()))\nR=list(map(int,input().split()))\nP.sort(reverse=True)\nQ.sort(reverse=True)\nR.sort(reverse=True)\n\nans=sum(P[:X]+Q[:Y])\nr,g,f=X,Y,0\nwhile (R[f]>P[r] or R[f]>Q[g]) and r>=0 and g>=0 and f<C:\n if P[r]<Q[g]:\... | ['Runtime Error', 'Accepted'] | ['s557340889', 's303277261'] | [23328.0, 23328.0] | [296.0, 271.0] | [433, 492] |
p02727 | u095021077 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ["import sys\nsys.setrecursionlimit(10**8)\n\nN, X, Y=map(int, input().split())\nans=[0 for _ in range(N)]\nlink=[[]]+[[2]]+[[i-1, i+1] for i in range(2, N)]+[[N-1]]\nlink[X].append(Y)\nlink[Y].append(X)\n\ndef f(p, length, moto):\n ans[length]+=1\n for data in link[p]:\n if data!=moto:\n f(data, length+1, p)... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s182640806', 's910162771', 's554737632'] | [3064.0, 3060.0, 23328.0] | [17.0, 18.0, 233.0] | [408, 599, 218] |
p02727 | u100572972 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X,Y,A,B,C = map(int,input().split())\nP = list(map(int, input().split()))\nQ = list(map(int, input().split()))\nR = list(map(int, input().split()))\n\nP_up = P[-X:]\nQ_up = Q[-Y:]\n\nP_up.append(Q_up)\nP_up.extend(R)\n\nP_up.sort()\na=-(X+Y)\nprint(sum(P_up[a:]))', 'X,Y,A,B,C = map(int,input().split())\nP = list(map(... | ['Runtime Error', 'Accepted'] | ['s301401264', 's849010070'] | [22560.0, 23328.0] | [115.0, 235.0] | [250, 218] |
p02727 | u102461423 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['#!/usr/bin/ python3.8\nimport sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nN = int(readline())\nm = map(int, read().split())\nAB = zip(m, m)\n\nMOD = 10 ** 9 + 7\n\ngraph = [[] for _ in range(N + 1)]\nfor a, b in AB:\n graph[a].append(b)\n gr... | ['Runtime Error', 'Accepted'] | ['s744842342', 's180720111'] | [3192.0, 21088.0] | [18.0, 246.0] | [1481, 452] |
p02727 | u103724957 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ["val = input().split(' ')\nx = int(val[0])\ny = int(val[1])\na = int(val[2])\nb = int(val[3])\nc = int(val[4])\n\np_list = sorted([int(a) for a in input().split(' ')]).reverse()\nq_list = sorted([int(a) for a in input().split(' ')]).reverse()\nr_list = sorted([int(a) for a in input().split(' ')]).reverse()\n\nxapples ... | ['Runtime Error', 'Accepted'] | ['s860412934', 's694965633'] | [15440.0, 24972.0] | [203.0, 264.0] | [469, 536] |
p02727 | u105124953 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x,y,a,b,c = map(int,input().split())\npl = list(map(int,input().split()))\nql = list(map(int,input().split()))\nrl = list(map(int,input().split()))\n\npp = sorted(pl,reverse=True)[:x-1]\nqq = sorted(pl,reverse=True)[:y-1]\nall = pp + qq + rl\nprint(sum(sorted(pl,reverse=True)[:x+y-1]))', 'import heapq\nx,y,a,b,c = ma... | ['Wrong Answer', 'Accepted'] | ['s276697937', 's787529209'] | [22720.0, 24240.0] | [212.0, 240.0] | [278, 304] |
p02727 | u112629957 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X,Y,A,B,C=map(int,input().split())\nls_a=sorted(list(map(int,input().split())))\nls_b=sorted(list(map(int,input().split())))\nls_c=sorted(list(map(int,input().split())))\nls_x=ls_a[A-X:A]\nls_y=ls_b[B-Y:B]\nls_c.reverse()\n\nans=sum(ls_x)+sum(ls_y)\na=b=c=0\nfor _ in range(X+Y):\n if a==len(ls_x):\n m=min([ls_y[b... | ['Runtime Error', 'Accepted'] | ['s621755854', 's897646338'] | [22720.0, 23328.0] | [321.0, 248.0] | [779, 352] |
p02727 | u134520518 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x,y,a,b,c = map(int, input().split())\np = list(map(int, input().split()))\nq = list(map(int, input().split()))\nr = list(map(int, input().split()))\n\np =sorted(p)[::-1][:x][::-1]\nq =sorted(q)[::-1][:y][::-1]\nr =sorted(r)[::-1][:x+y]\n\npp = 0\nqq = 0\npf = True\nqf = True\nfor rr in r:\n lll = False\n if pf... | ['Wrong Answer', 'Accepted'] | ['s601226406', 's980978379'] | [23328.0, 23328.0] | [294.0, 292.0] | [1116, 1125] |
p02727 | u135847648 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['def main():\n x, y, a, b, c = map(int, input().split())\n P = list(map(int, input().split()))\n Q = list(map(int, input().split()))\n R = list(map(int, input().split()))\n P.sort(reverse=True)\n Q.sort(reverse=True)\n R.sort(reverse=True)\n\n s = P[:x] + Q[:y]\n s.sort()\n for i in range... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s411960950', 's718136429', 's553754883'] | [23328.0, 23328.0, 23328.0] | [229.0, 238.0, 220.0] | [453, 488, 545] |
p02727 | u146575240 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['#E - Red and Green Apples\nX,Y,A,B,C= map(int, input().split())\na =sorted(list(map(int, input().split())),reverse=True)\nb =sorted(list(map(int, input().split())),reverse=True)\nc =sorted(list(map(int, input().split())),reverse=True)\n\nDP_a =[]\nDP_b =[]\nj = 1\nk = 1\na_s =sum(a[:X])\nb_s =sum(b[:Y])\n\nfor i in r... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s388649131', 's547178350', 's757149444'] | [23472.0, 24096.0, 24244.0] | [295.0, 321.0, 257.0] | [814, 826, 341] |
p02727 | u149752754 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x, y, al, bl, cl = map(int, input().split())\na = list(map(int, input().split()))\nb = list(map(int, input().split()))\nc = list(map(int, input().split()))\na.sort(reverse=True)\nb.sort(reverse=True)\nc.sort(reverse=True)\nam = x-1\nbm = y-1\ncm = 0\nwhile True:\n #print(am)\n #print(bm)\n #print(cm)\n if... | ['Wrong Answer', 'Accepted'] | ['s597146788', 's751672366'] | [23328.0, 23116.0] | [422.0, 403.0] | [1187, 1192] |
p02727 | u161712560 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X, Y, A, B, C = map(int, input().split())\n\npList = list(map(int, input().split()))\nqList = list(map(int, input().split()))\nrList = list(map(int, input().split()))\n\npList.sort(reverse=True)\nqList.sort(reverse=True)\nrList.sort(reverse=True)\n\npList = pList[:X]\nqList = qList[:Y]\n\nvalue = 0\n\nfor indx in ran... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s524645931', 's996908934', 's046996153'] | [22720.0, 22720.0, 23328.0] | [1582.0, 469.0, 241.0] | [778, 886, 391] |
p02727 | u166340293 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X,Y,A,B,C=map(int,input().split())\np=list(map(int,input().split()))\nq=list(map(int,input().split()))\nr=list(map(int,input().split()))\np.sort(reverse=True)\nq.sort(reverse=True)\nr.sort(reverse=True)\nx=0\ny=0\nR=0\nz=0\ns=0\nwhile (x<X or y<Y) and z<X+Y:\n if (max(p[0],q[0],r[0])==p[0] or (y==Y and r[0]<p[0])) a... | ['Runtime Error', 'Accepted'] | ['s285823176', 's815731937'] | [23328.0, 23328.0] | [443.0, 458.0] | [529, 640] |
p02727 | u167943640 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ["x,y,a,b,c = list(map(int, input().split(' ')))\np = sorted(list(map(int, input().split(' '))))[-x:]\nq = sorted(list(map(int, input().split(' '))))[-y:]\nr = sorted(list(map(int, input().split(' '))))[-x-y:]\n\npidx = 0\nqidx = 0\nfor i in range(x+y):\n ptmp = 0\n qtmp = 0\n valid_p = True\n valid_q = True\n if ... | ['Runtime Error', 'Accepted'] | ['s301497884', 's397505848'] | [22504.0, 22504.0] | [361.0, 251.0] | [760, 246] |
p02727 | u169138653 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x,y,a,b,c=map(int,input().split())\np=list(map(int,input().split()))\nq=list(map(int,input().split()))\nr=list(map(int,input().split()))\nlis=p[:x]+q[:y]+r\nlis.sort(reverse=True)\nans=0\nfor i in range(x+y):\n ans+=lis[i]\nprint(ans)', 'x,y,a,b,c=map(int,input().split())\np=list(map(int,input().split()))\nq=list(ma... | ['Wrong Answer', 'Accepted'] | ['s145664859', 's942482494'] | [23328.0, 23328.0] | [245.0, 254.0] | [226, 269] |
p02727 | u178465329 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['\nx,y,a,b,c = map(int, input().split())\nA = list(map(int, input().split())) \nB = list(map(int, input().split())) \nC = list(map(int, input().split())) \n\nA.sort()\nB.sort()\nC.sort(reverse=True)\n\nX = A[len(A)-x:]\nY = B[len(B)-y:]\n\nprint(X,Y,C)\n\nxi = 0\nyi = 0\nci = 0\nfor ci in range(c):\n if C[ci] <= X[... | ['Runtime Error', 'Accepted'] | ['s949394613', 's533991857'] | [25412.0, 23328.0] | [327.0, 278.0] | [563, 1016] |
p02727 | u188138642 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['import numpy as np\nX, Y, A, B, C = map(int,input().split())\nReds = list(map(int, input().split()))\nGreens = list(map(int, input().split()))\nNs = list(map(int, input().split()))\n\nReds = np.array(Reds)\nGreens = np.array(Greens)\nNs = np.array(Ns)\n\nReds = np.sort(Reds)[:X-1:-1]\nGreens = np.sort(Greens)[:Y-1:-1... | ['Runtime Error', 'Accepted'] | ['s253242308', 's612176554'] | [33172.0, 31320.0] | [320.0, 364.0] | [479, 481] |
p02727 | u199830845 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['import sys\nsys.setrecursionlimit(10 ** 6) \nto_index = lambda x: int(x) - 1 \nprint_list_in_2D = lambda x: print(*x, sep="\\n") \n\n\ndef input_int(): return int(input())\n\ndef map_int_input(): return map(int, input())\n\nMII = map_int_input\n\ndef MII_split(): return map(int, input().split())\n\ndef MII_to_inde... | ['Runtime Error', 'Accepted'] | ['s721953147', 's392037972'] | [23328.0, 23328.0] | [292.0, 252.0] | [1151, 1236] |
p02727 | u201878104 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['p = list(map(int, input().split()))\nq = list(map(int, input().split()))\nr = list(map(int, input().split()))\nIronMan = sorted(p)\nCaptainAmerica = sorted(q)\nfor i in range(X):\n r.append(IronMan.pop())\nfor i in range(Y):\n CaptainAmerica.append(q.pop())\nSpiderMan = sorted(r)[::-1]\nprint(sum(SpiderMan[:X+Y... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s497761344', 's712524735', 's878180861', 's391830551'] | [19360.0, 20144.0, 20144.0, 25460.0] | [104.0, 104.0, 99.0, 299.0] | [312, 266, 266, 354] |
p02727 | u202560873 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['from collections import deque\n\nX, Y, A, B, C = [int(x) for x in input().split()]\np = deque(sorted([int(x) for x in input().split()]))\nq = deque(sorted([int(x) for x in input().split()]))\nr = deque(sorted([int(x) for x in input().split()]))\n\nans = 0\nfor i in range(X):\n if p[0] >= r[0]:\n ans += p.po... | ['Runtime Error', 'Accepted'] | ['s039492144', 's134031393'] | [29652.0, 28372.0] | [189.0, 164.0] | [469, 316] |
p02727 | u218757284 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x, y, a, b, c = map(int, input().split())\n\nra = list(map(int, input().split()))\ngb = list(map(int, input().split()))\nsc = list(map(int, input().split()))\n\nra.sort(reverse=True)\ngb.sort(reverse=True)\nsc.sort(reverse=True)\n\ncurr_red_min_val = ra[x-1]\ncurr_green_min_val = gb[y-1]\ntmp_x = x\ntmp_y = y\n\nfor ... | ['Runtime Error', 'Accepted'] | ['s242580885', 's807257111'] | [3064.0, 23328.0] | [17.0, 277.0] | [799, 799] |
p02727 | u223646582 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X, Y, A, B, C = map(int, input().split())\nP = sorted([int(i) for i in input().split()], reverse=True)\nQ = sorted([int(i) for i in input().split()], reverse=True)\nR = sorted([int(i) for i in input().split()])\n\n\nS = sorted(P[:X]+Q[:Y]+R, reverse=True)\nans = sum(S[:X+Y])\n', 'X, Y, A, B, C = map(int, input().spli... | ['Wrong Answer', 'Accepted'] | ['s797719666', 's720150297'] | [22720.0, 23200.0] | [262.0, 254.0] | [269, 270] |
p02727 | u231229291 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x, y, a, b, c = map(int, input().split())\nlist_of_red = list(map(int, input().split()))\nlist_of_green = list(map(int, input().split()))\nlist_of_colorless = list(map(int, input().split()))\n\nlist_of_green.sort(reverse=True)\nlist_of_red.sort(reverse=True)\nlist_of_colorless.sort(reverse=True)\n\nmax_of_red = list_... | ['Wrong Answer', 'Accepted'] | ['s165971067', 's403007842'] | [23328.0, 23328.0] | [211.0, 264.0] | [427, 461] |
p02727 | u239342230 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X, Y, A, B, C = map(int,input().split())\nP = sorted(list(map(int,input().split())), reverse=True)\nQ = sorted(list(map(int,input().split())), reverse=True)\nR = sorted(list(map(int,input().split())), reverse=True)\nP = P[:X]\nQ = Q[:Y]\nA = P + Q + R\nA.sorted(reverse=True)\nans = sum(A[:X+Y])\nprint(ans)', 'X, Y, A... | ['Runtime Error', 'Accepted'] | ['s796982665', 's007155719'] | [23200.0, 23200.0] | [205.0, 249.0] | [298, 296] |
p02727 | u243714267 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x, y, a, b, c = map(int, input().split())\np = list(map(int, input().split()))\nq = list(map(int, input().split()))\nr = list(map(int, input().split()))\np.sort()\nq.sort()\nr.sort()\n', 'x, y, a, b, c = map(int, input().split())\np = list(map(int, input().split()))\nq = list(map(int, input().split()))\nr = list(map(... | ['Wrong Answer', 'Accepted'] | ['s367413264', 's143438977'] | [23456.0, 23540.0] | [195.0, 229.0] | [177, 264] |
p02727 | u248670337 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x,y,a,b,c=map(int,input().split())\nP=sorted(list(map(int,input().split())))[::-1]\nQ=sorted(list(map(int,input().split())))[::-1]\nR=sorted(list(map(int,input().split())))[::-1]+[0]*(max(x+y-c,0))\nL=sorted(P[:x]+Q[:y])[::-1]\nprint(L)\nprint(R)\nl=r=0\nfor i in range(x+y): \n if r+R[i]<l+L[-i-1]:\n print(... | ['Wrong Answer', 'Accepted'] | ['s585541270', 's532803705'] | [27904.0, 23392.0] | [508.0, 319.0] | [408, 211] |
p02727 | u249218427 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['# -*- coding: utf-8 -*-\n\nfrom collections import deque\n\nX,Y,A,B,C = map(int, input().split())\nP = list(map(int, input().split()))\nQ = list(map(int, input().split()))\nR = list(map(int, input().split()))\n\ndef sort(L):\n if len(L)==1:\n return L\n left = sort(L[:len(L)//2])\n right = sort(L[len(L)//2:])\n... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s043131583', 's530094893', 's460745332'] | [23616.0, 3064.0, 23956.0] | [1903.0, 18.0, 257.0] | [697, 318, 255] |
p02727 | u257162238 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['from pprint import pprint\nfrom bisect import bisect_left\nimport numpy\n\n\ndef read():\n X, Y, A, B, C = list(map(int, input().strip().split()))\n P = list(map(int, input().strip().split()))\n Q = list(map(int, input().strip().split()))\n R = list(map(int, input().strip().split()))\n return X, Y, A, ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s138727021', 's742717700', 's135397510'] | [33828.0, 31484.0, 31484.0] | [433.0, 373.0, 390.0] | [1592, 1419, 1419] |
p02727 | u271934630 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['import sys\nstdin = sys.stdin\nsys.setrecursionlimit(10 ** 7)\n\ni_i = lambda: int(i_s())\ni_l = lambda: list(map(int, stdin.readline().split()))\ni_s = lambda: stdin.readline().rstrip()\n\nX, Y, A, B, C = i_l()\np = i_l()\nq = i_l()\nr = i_l()\n\np = sorted(p, reverse=True)\nq = sorted(q, reverse=True)\nr = sorted(r... | ['Wrong Answer', 'Accepted'] | ['s128327628', 's794840583'] | [23200.0, 23212.0] | [441.0, 254.0] | [1069, 404] |
p02727 | u281796054 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x,y,a,b,c=map(int,input().split())\nred=sorted(list(map(int,input().split())),reverse=True)\ngreen=sorted(list(map(int,input().split())),reverse=True)\nwhite=sorted(list(map(int,input().split())),reverse=True)\neat_list=sorted(red[:x]+green[:y])\nfor i in range(min(len(eat_list),len(white))):\n if eat_list[i]<white[... | ['Wrong Answer', 'Accepted'] | ['s244230258', 's616251765'] | [24764.0, 23200.0] | [266.0, 246.0] | [395, 380] |
p02727 | u289036437 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['def merge(l):\n t = [-1]*len(l)\n if(len(l) == 2):\n if(l[0]<l[1]):\n t[1] = l[0]\n t[0] = l[1]\n else:\n t=l\n elif(len(l) > 2):\n x = merge(l[:len(l)//2])\n y = merge(l[len(l)//2:])\n p,q = 0,0\n for i in range(len(l)):\n ... | ['Runtime Error', 'Accepted'] | ['s533641036', 's858783371'] | [3064.0, 22716.0] | [17.0, 2000.0] | [1696, 1680] |
p02727 | u290886932 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X, Y, A, B, C = map(int, input().split())\np = list(map(int, input().split()))\nq = list(map(int, input().split()))\nr = list(map(int, input().split()))\n\np = p.sort(reverse=True)\nq = q.sort(reverse=True)\nr = r.sort(reverse=True)\np = p[:X]\nq = q[:Y]\nsumlist = list()\nsumlist.extend(p)\nsumlist.extend(q)\nsumlis... | ['Runtime Error', 'Accepted'] | ['s466330096', 's581788330'] | [23328.0, 23328.0] | [200.0, 233.0] | [379, 357] |
p02727 | u307028468 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X, Y, A, B, C = (int(x) for x in input().split())\nR = [int(i) for i in input().split()]\nG = [int(i) for i in input().split()]\nM = [int(i) for i in input().split()]\n\nprint(R, G, M)\n\nR.sort(reverse=True)\nG.sort(reverse=True)\n\nfor i in range(X):\n M.append(R[i])\n\nfor i in range(Y):\n M.append(G[i])\n\nM.so... | ['Wrong Answer', 'Accepted'] | ['s520069102', 's116241915'] | [23340.0, 23340.0] | [428.0, 306.0] | [382, 366] |
p02727 | u308289897 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['import sys\n\nstdin = sys.stdin\n\nns = lambda: stdin.readline().rstrip()\nni = lambda: int(stdin.readline().rstrip())\nnm = lambda: map(int, stdin.readline().split())\nnl = lambda: list(map(int, stdin.readline().split()))\nprint(nl)\nx, y, a, b, c = nm()\np = nl()\nq = nl()\nr = nl()\np.sort()\nq.sort()\nprint(p)\np... | ['Wrong Answer', 'Accepted'] | ['s085173041', 's759173568'] | [23472.0, 23212.0] | [276.0, 245.0] | [449, 421] |
p02727 | u309141201 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x, y, a, b, c = map(int, input().split())\np = sorted(map(int, input().split()))\nq = sorted(map(int, input().split()))\nr = sorted(map(int, input().split()))\nans = 0\nfor i in range(a):\n if len(p) > 0 and len(r) > 0:\n if p[-1] >= r[-1]:\n ans += p[-1]\n p.pop()\n else:\n ... | ['Wrong Answer', 'Accepted'] | ['s540357874', 's673087346'] | [29732.0, 29236.0] | [225.0, 182.0] | [753, 267] |
p02727 | u316464887 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['import sys\nsys.setrecursionlimit(100000)\nclass fact():\n def __init__(self, i, mod):\n self.l = [1] * (i+1)\n for i in range(1, i+1):\n self.l[i] = self.l[i-1] * i\n self.mod = mod\n self.g1 = [1, 1]\n self.g2 = [1, 1]\n inverse = [0, 1]\n for i in rang... | ['Runtime Error', 'Accepted'] | ['s542994390', 's179203338'] | [3188.0, 29856.0] | [19.0, 461.0] | [1376, 891] |
p02727 | u341267151 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x,y,a,b,c=map(int,input().split())\np=[0]+sorted(list(map(int,input().split())))[a-x:]\nq=[0]+sorted(list(map(int,input().split())))[b-y:]\nr=[0]+sorted(list(map(int,input().split())))\npi=-1\nqi=-1\nri=-1\ngs=0\nrs=0\nws=0\ns=0 \nwhile gs+rs+ws!=x+y:\n print(r[ri],p[pi],q[qi])\n if r[ri]>=q[qi]>=p... | ['Wrong Answer', 'Accepted'] | ['s966445382', 's713599002'] | [28200.0, 28372.0] | [648.0, 344.0] | [778, 749] |
p02727 | u347203174 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['import numpy as np\n#inp = input\nfin = open("case_21.txt")\ninp = fin.readline\n\nX, Y, A, B, C = map(int, inp().split())\n\nred = np.array(list(map(int, inp().split())), np.int32)\ngreen = np.array(list(map(int, inp().split())), np.int32)\nwhite = np.array(list(map(int, inp().split())), np.int32)\nfin.close()\n\nre... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s658264485', 's660133629', 's945280991', 's062755277'] | [27076.0, 27132.0, 27004.0, 47172.0] | [114.0, 112.0, 114.0, 333.0] | [1516, 2092, 1896, 1898] |
p02727 | u350412774 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['xyabc = list(map(int,input().rsplit()))\np = list(map(int,input().rsplit()))\nq = list(map(int,input().rsplit()))\nr = list(map(int,input().rsplit()))\nx = xyabc[0]\ny = xyabc[1]\np.sort()\nq.sort()\n\nz =p[:x]+q[:y]\nz = z + r\nz.sort()\nprint(sum(z[:x+y]))\n', 'xyabc = list(map(int,input().rsplit()))\np = list(map(... | ['Wrong Answer', 'Accepted'] | ['s648865670', 's759154181'] | [23996.0, 23216.0] | [238.0, 240.0] | [247, 283] |
p02727 | u370429695 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['from collections import deque\n\nx,y,a,b,c = map(int,input().split())\np = list(map(int,input().split()))\nq = list(map(int,input().split()))\nr = list(map(int,input().split()))\np.sort()\nq.sort()\nr.sort(reverse=True)\nxlis = deque(p[len(p)-x:])\nylis = deque(q[len(q)-y:])\nr = deque(r)\nwhile True:\n xs = xlis.... | ['Runtime Error', 'Accepted'] | ['s151143562', 's415341503'] | [23616.0, 22460.0] | [256.0, 237.0] | [631, 268] |
p02727 | u370721525 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X, Y, A, B, C = map(int, input().split())\np = list(map(int, input().split()))\nq = list(map(int, input().split()))\nr = list(map(int, input().split()))\n\nred = sorted(p, reverse=True)[:X]\ngreen = sorted(q, reverse=True)[:Y]\nwhite = sorted(r, reverse=True)\n\noriginal = sorted(red + green)\nwhile original[0] < whi... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s002120369', 's629226615', 's426514672'] | [22720.0, 23328.0, 29548.0] | [2105.0, 2108.0, 180.0] | [397, 400, 607] |
p02727 | u373047809 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['(x, y, a, b, c), p, q, r = [map(int, o.split()) for o in open(0)]\nprint(sum(sorted(sorted(p)[-x:] + sorted(q)[-y:] + r)[-x-y:]))', '(x, y, a, b, c), p, q, r = [map(int, o.split()) for o in open(0)]\nprint(sum(sorted(sorted(p)[-x:] + sorted(q)[-y:] + list(r))[-x-y:]))'] | ['Runtime Error', 'Accepted'] | ['s186662580', 's213794166'] | [35592.0, 35496.0] | [110.0, 156.0] | [128, 134] |
p02727 | u375941094 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['def main():\n X, Y, A, B, C = map(int, input().split())\n aka_list = sorted([int(t) for t in input().split()],reverse=True)[:X]\n midori_list = sorted([int(t) for t in input().split()],reverse=True)[:Y]\n mu_list = sorted([int(t) for t in input().split()],reverse=True)\n \n sum_list = sorted(aka_list + midori_... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s032023044', 's205048161', 's708592157', 's616897877'] | [3064.0, 22544.0, 3064.0, 22544.0] | [17.0, 254.0, 17.0, 245.0] | [370, 468, 384, 378] |
p02727 | u377989038 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['from collections import deque\n\nx, y, a, b, c = map(int, input().split())\nR = sorted(list(map(int, input().split())))[a - x:]\nG = sorted(list(map(int, input().split())))[b - y:]\nM = deque(sorted(list(map(int, input().split())), reverse=True))\n\nans = sum(R) + sum(G)\nr, g, m = 0, 0, 0\nfor i in range(x + y):\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s138603163', 's242389824', 's246325018'] | [3064.0, 22720.0, 22488.0] | [17.0, 632.0, 242.0] | [1707, 947, 241] |
p02727 | u379720557 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X, Y, A, B, C = map(int, input().split())\nr = list(map(int, input().split()))\ng = list(map(int, input().split()))\nnc = list(map(int, input().split()))\n\nr.sort(reverse=True)\ng.sort(reverse=True)\nnc.sort(reverse=True)\n\nselected = r[:X] + g[:Y]\nselected.sort()\n\nfor i in range(X+Y):\n if selected[i] < nc[i]:... | ['Runtime Error', 'Accepted'] | ['s343686051', 's104557443'] | [22560.0, 23328.0] | [241.0, 265.0] | [355, 450] |
p02727 | u391066416 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X,Y,A,B,C=map(int,input().split())\nP=sorted(list(map(int,input().split())))\nQ=sorted(list(map(int,input().split())))\nR=sorted(list(map(int,input().split())))\nP_=P[A-X:]\nQ_=Q[B-Y:]\nwhile P_[0]<R[-1] or Q_[0]<R[-1]:\n if P_[0]<Q_[0]:\n P_.pop(0)\n P_.append(R.pop(-1))\n else:\n Q_.pop(0... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s291066827', 's704165943', 's950722520', 's964260452', 's106357598'] | [23200.0, 23200.0, 22720.0, 22720.0, 23200.0] | [2104.0, 223.0, 236.0, 229.0, 246.0] | [360, 300, 288, 307, 200] |
p02727 | u395816772 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x,y,a,b,c = map(int, input().split())\n\ns_a = [int(i) for i in list(input().split())]\ns_b = [int(i) for i in list(input().split())]\ns_c = [int(i) for i in list(input().split())]\n\ns_a.sort(reverse = True)\ns_b.sort(reverse = True)\ns_c.sort(reverse = True)\n\nx_a = s_a[0:x]\nx_b = s_b[0:y]\n\n\nx_a.append(x_b)\nx... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s608484410', 's634908776', 's652430967', 's020220231'] | [23296.0, 23296.0, 23296.0, 22592.0] | [218.0, 263.0, 277.0, 260.0] | [375, 355, 740, 375] |
p02727 | u402629484 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ["import sys\nsys.setrecursionlimit(1000000000)\nimport math\nfrom fractions import gcd\ndef lcm(a, b): return a * b // gcd(a, b)\nfrom itertools import count, permutations\nfrom functools import lru_cache\nfrom collections import deque, defaultdict\nfrom pprint import pprint\nii = lambda: int(input())\nmis = lambda: m... | ['Time Limit Exceeded', 'Wrong Answer', 'Accepted'] | ['s003886706', 's361405603', 's463121273'] | [25408.0, 25440.0, 22504.0] | [2105.0, 259.0, 236.0] | [2849, 2231, 261] |
p02727 | u408071652 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['2 2 2 2 2\n8 6\n9 1\n2 1', '2 2 4 4 4\n11 12 13 14\n21 22 23 24\n1 2 3 4', 'X,Y,A,B,C =map(int,input().split())\nP = list(map(int,input().split()))\nQ = list(map(int,input().split()))\nR = list(map(int,input().split()))\n\nP.sort()\nQ.sort()\nR.sort()\n\nP_new = P[-X::]\nQ_new = Q[-Y::]\n\n\nagg = P_new + Q_new +R\na... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s412516735', 's953559686', 's351820642'] | [9012.0, 9000.0, 29540.0] | [26.0, 24.0, 165.0] | [21, 41, 261] |
p02727 | u408620326 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['import sys\nimport numpy as np\nsys.setrecursionlimit(10 ** 6)\ninput = sys.stdin.readline\nX, Y, A, B, C = [int(x) for x in input().strip().split()]\np = np.array(sorted([int(x) for x in input().strip().split()], reverse=True))[:X]\nq = np.array(sorted([int(x) for x in input().strip().split()], reverse=True))[:Y]\nr... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s497306288', 's655359818', 's061112564'] | [24976.0, 26776.0, 24988.0] | [474.0, 501.0, 430.0] | [1037, 540, 462] |
p02727 | u413165887 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x, y, a, b, c = map(int,input().split())\n\np = list(map(int,input().split()))\nq = list(map(int,input().split()))\nr = list(map(int,input().split()))\np.sort(reverse=True)\nq.sort(reverse=True)\nr.sort()\np = p[:x]\nq = q[:y]\n\np.append(10**9+1)\nq.append(10**9+1)\nr.append(10**9+1)\nresult = sum(p+q)-2*(10**4)\nii... | ['Wrong Answer', 'Accepted'] | ['s324847887', 's620073757'] | [23328.0, 32524.0] | [266.0, 313.0] | [569, 444] |
p02727 | u414050834 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x,y,a,b,c=map(int,input().split())\np=list(map(int,input().split()))\nq=list(map(int,input().split()))\nr=list(map(int,input().split()))\nps=sorted(p,reverse=True)\nqs=sorted(q,reverse=True)\nrs=sorted(r,reverse=True)\npn=ps[:x]\nqn=qs[:y]\nmp=pn[-1]\nmq=qn[-1]\ns=0\nt=0\nfor i in range(max(x,y)):\n if mp>rs[i] and ... | ['Runtime Error', 'Accepted'] | ['s128204867', 's066647113'] | [23360.0, 24240.0] | [1005.0, 252.0] | [635, 259] |
p02727 | u432098488 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X, Y, A, B, C = map(int, input().split())\nP = [-1] + sorted(list(map(int, input().split())))\nQ = [-1] + sorted(list(map(int, input().split())))\nR = [-1] + sorted(list(map(int, input().split())))\n\nans = 0\nN = X+Y\nwhile N > 0:\n max_V = max(P[-1], Q[-1], R[-1])\n if P[-1] == max_V:\n P.pop(-1)\n if X < 1... | ['Wrong Answer', 'Accepted'] | ['s911947337', 's278379738'] | [23296.0, 23284.0] | [490.0, 408.0] | [472, 496] |
p02727 | u435480265 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x,y,a,b,c = map(int,input().split())\nlst_r = list(map(int,input().split()))\nlst_g = list(map(int,input().split()))\nlst_n = list(map(lambda x:int(x)*(-1),input().split()))\nfrom heapq import *\n\nheapify(lst_r)\nfor i in range(a-x):\n _ = heappop(lst_r)\n\nheapify(lst_g)\nfor i in range(b-y):\n _ = heappop(ls... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s214010355', 's462673940', 's669988519', 's693592139'] | [23328.0, 23328.0, 23328.0, 23328.0] | [354.0, 240.0, 88.0, 237.0] | [653, 591, 322, 313] |
p02727 | u438662618 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['import heapq\n\nx, y, a, b, c = map(int, input().split())\np = list(map(int, input().split()))\nq = list(map(int, input().split()))\nr = list(map(lambda x :-int(x), input().split()))\n\np.sort(reverse=True)\nq.sort(reverse=True)\n\np = p[:x]\nq = q[:y]\n\npq = p+q\npq.sort(reverse=True)\n\nheapq.heapify(r)\nans = 0\n... | ['Runtime Error', 'Accepted'] | ['s209022623', 's655270045'] | [25192.0, 23456.0] | [660.0, 229.0] | [488, 301] |
p02727 | u459554582 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['def merge(A,B):\n C = []\n \n while len(A)!=0 and len(B) != 0:\n if A[0]>B[0]:\n C.append(A[0])\n del A[0]\n else:\n C.append(B[0])\n del B[0]\n\n if len(A)>len(B):\n C.extend(A)\n else:\n C.extend(B)\n\n return C\n\nif __name__... | ['Wrong Answer', 'Accepted'] | ['s215184375', 's006995458'] | [23328.0, 23328.0] | [2105.0, 379.0] | [777, 763] |
p02727 | u459590249 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x,y,a,b,c=map(int,input().split())\np=sorted(list(map(int, input().split())))[a-x:]\nq=sorted(list(map(int, input().split())))[b-y:]\nr=sorted(list(map(int, input().split())),reverse=True)\nimport heapq\neat=p+q\nheapq.heapify(eat)\nfor i in r:\n\tj=heapq.heappop(eat)\n\tif j<i:\n\t\theapq.heappush(eat,i)\n\telse:\n\... | ['Wrong Answer', 'Accepted'] | ['s512833738', 's635912304'] | [25572.0, 22504.0] | [368.0, 326.0] | [362, 363] |
p02727 | u462329577 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['#!/usr/bin/env python3\nx,y,a,b,c = map(int,input().split())\np = list(map(int,input().split()))\nq = list(map(int,input().split()))\nr = list(map(int,input().split()))\np.sort()\nq.sort()\nz = p[-x:].extend(q[-y:]).extend(r)\nz.sort()\nprint(sum(z[-x-y:]))', '#!/usr/bin/env python3\nx,y,a,b,c = map(int,input().split... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s354706526', 's834107956', 's823035299'] | [23328.0, 23328.0, 23328.0] | [162.0, 164.0, 229.0] | [248, 247, 262] |
p02727 | u471539833 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X,Y,A,B,C=map(int,input().split())\np=list(map(int,input().split()))\nq=list(map(int,input().split()))\nr=list(map(int,input().split()))\np=[:X]\nq=[:Y]\nr=[:max(X,Y)]\np.sort()\nq.sort()\np.reverse()\nq.reverse()\n \na=p[:]\na.extend(q)\na.extend(r)\na.sort()\na.reverse()\nb=q[:]\nb.extend(r)\nb.sort()\nb.reverse()\... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s456405992', 's468880298', 's913628594', 's931535817', 's642675259'] | [2940.0, 3064.0, 24484.0, 24624.0, 23328.0] | [17.0, 17.0, 2105.0, 2105.0, 262.0] | [655, 629, 759, 761, 295] |
p02727 | u479353489 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X,Y,A,B,C = [int(x) for x in input().split()]\nR = [int(x) for x in input().split()]\nG = [int(x) for x in input().split()]\nCL = [int(x) for x in input().split()]\n\ndp = [[0]*(X+1) for d in range(Y+1)]\nfor i in range(X):\n for j in range(Y):\n MAX = max(max(R[j],CL[j]),max(G[i],CL[i]))\n dp[i][j] ... | ['Runtime Error', 'Accepted'] | ['s345241206', 's936970748'] | [1937072.0, 22432.0] | [2224.0, 256.0] | [456, 304] |
p02727 | u479719434 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X, Y, A, B, C = map(int, input().split())\np = map(int, input().split())\nq = map(int, input().split())\nr = map(int, input().split())\n\n# X, Y, A, B, C = 1, 2, 2, 2, 1\n# p = [2, 4]\n\n# r = [3]\n\np.sort()\nq.sort()\nr.sort()\np = p[-X:]\nq = q[-Y:]\n\nd = []\nd += p\nd += q\nd += r\nd.sort()\n\nprint(sum(d[-X-Y:]... | ['Runtime Error', 'Accepted'] | ['s548798773', 's244222382'] | [26844.0, 23328.0] | [49.0, 243.0] | [311, 329] |
p02727 | u485566817 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x, y, a, b, c = map(int, input().split())\np = sorted(list(map(int, input().split())), reverse=True)\nq = sorted(list(map(int, input().split())), reverse=True)\nr = sorted(list(map(int, input().split())), reverse=True)\n\nresult = sum(p[:x]) + sum(q[:y])\ni = 0\nred_min = x-1\nblue_min = y-1\nflag = True\n\nwhile fla... | ['Runtime Error', 'Accepted'] | ['s622758455', 's415989543'] | [22720.0, 22720.0] | [271.0, 277.0] | [652, 724] |
p02727 | u497046426 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X, Y, A, B, C = map(int, input().split())\n*P, = map(int, input().split())\n*Q, = map(int, input().split())\n*R, = map(int, input().split())\nP, Q = sorted(P, reverse=True), sorted(Q, reverse=True)\nP, Q = P[:A], Q[:B]\nans = sum(sorted(P + Q + R, reverse=True)[:A + B])\nprint(ans)', 'X, Y, A, B, C = map(int, input()... | ['Wrong Answer', 'Accepted'] | ['s969693289', 's641092778'] | [23328.0, 22560.0] | [241.0, 237.0] | [275, 275] |
p02727 | u509392332 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X, Y, A, B, C = map(int, input().split())\np = list(map(int, input().split()))\nq = list(map(int, input().split()))\nr = list(map(int, input().split()))\n\np.sort(reverse=True)\nq.sort(reverse=True)\nr.sort(reverse=True)\n\nA_p = p[:X]\nB_q = q[:Y]\nC_r = r\n\nans = A_p + B_q + C_r\nans.sort(reverse=True)\nsum(ans[: ... | ['Wrong Answer', 'Accepted'] | ['s166462471', 's072528116'] | [22720.0, 23328.0] | [240.0, 249.0] | [308, 318] |
p02727 | u512099209 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['import heapq\nfrom collections import deque\n\nX, Y, A, B, C = list(map(int, input().split()))\np = list(map(int, input().split()))\nq = list(map(int, input().split()))\nr = list(map(int, input().split()))\n\np.sort()\nq.sort()\nr.sort()\n\npq = deque((heapq.merge(p[A - X:], q[B - Y:])))\nr = deque(r)\n\nwhile pq[0] ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s059018133', 's693323166', 's853154922', 's934376704'] | [23616.0, 23604.0, 23616.0, 23592.0] | [276.0, 324.0, 286.0, 280.0] | [363, 479, 467, 472] |
p02727 | u512212329 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x, y, a, b, c = map(int, input().split())\nred = [int(x) for x in input().split()]\ngreen = [int(x) for x in input().split()]\nred.sort(reverse=True)\ngreen.sort(reverse=True)\ncandidates = [int(x) for x in input().split()] + red[x:] + green[:y]\ncandidates.sort(reverse=True)\nprint(sum(candidates[:x+y]))', 'x, y, a,... | ['Wrong Answer', 'Accepted'] | ['s048296324', 's474233260'] | [23340.0, 22400.0] | [234.0, 245.0] | [299, 211] |
p02727 | u515740713 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['import sys \nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\nX,Y,A,B,C = map(int,readline().split())\nP = list(map(int,readline().split()))\nQ = list(map(int,readline().split()))\nR = list(map(int,readline().split()))\nP = sorted(P,reverse=True)\nQ = sorted(... | ['Runtime Error', 'Accepted'] | ['s838522622', 's450769601'] | [27448.0, 27384.0] | [186.0, 156.0] | [671, 438] |
p02727 | u518064858 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x,y,a,b,c=map(int,input().split())\np=sorted(list(map(int,input().split())),reverse=True)\nq=sorted(list(map(int,input().split())),reverse=True)\nr=sorted(list(map(int,input().split())),reverse=True)\np2=p[:x]\nq2=q[:y]\nmemop=x-1\nmemoq=y-1\nsp=sum(p2)\nsq=sum(q2)\nk=0\nflagp=0\nflagq=0\nwhile k<c:\n if memop<0:\... | ['Wrong Answer', 'Accepted'] | ['s191463081', 's467189038'] | [22720.0, 22560.0] | [323.0, 318.0] | [1091, 1104] |
p02727 | u521323621 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x,y,a,b,c = map(int, input().split())\np = list(map(int, input().split()))\nq = list(map(int, input().split()))\nr = list(map(int, input().split()))\n\np = sorted(p, reverse=True)\nq = sorted(q, reverse=True)\n\npq = sorted(p[:x] + q[:y])\nr = sorted(r)\nans=0\nj = r.pop()\nfor i in pq:\n if i < j:\n ans+=j\n ... | ['Wrong Answer', 'Accepted'] | ['s662086212', 's915035995'] | [29332.0, 29664.0] | [184.0, 194.0] | [389, 375] |
p02727 | u535236942 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x, y, a, b, c = map(int, input().split())\np = list(map(int, input().split()))\nq = list(map(int, input().split()))\nr = list(map(int, input().split()))\n\nl = p[:x] + q[:y] + r\nl.sort(reverse=True)\n\nprint(sum(l[:x+y]))', 'x, y, a, b, c = map(int, input().split())\np = list(map(int, input().split()))\nq = list(map... | ['Wrong Answer', 'Accepted'] | ['s043566491', 's665521071'] | [23328.0, 23328.0] | [218.0, 278.0] | [214, 257] |
p02727 | u539969758 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X, Y, A, B, C =map(int,input().split())\np = list(map(int, input().split()))\nq = list(map(int, input().split()))\nr = list(map(int, input().split()))\n\np.sort(reverse=True)\nq.sort(reverse=True)\nr.sort(reverse=True)\n\np_ind = X-1\nq_ind = Y-1\nr_ind = 0\n\nwhile 1:\n\n print(p_ind, q_ind, r_ind)\n if p_ind ... | ['Wrong Answer', 'Accepted'] | ['s994259938', 's985645552'] | [22720.0, 23360.0] | [451.0, 273.0] | [862, 832] |
p02727 | u547608423 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X,Y,A,B,C=map(int,input().split())\np=list(map(int,input().split()))\nq=list(map(int,input().split()))\nr=list(map(int,input().split()))\n\np=sorted(p,reverse=True)\nq=sorted(q,reverse=True)\nr=sorted(r,reverse=True)\nanswer=p[:X]+q[:Y]\nsum=0\nanswer=sorted(answer,reverse=True)\ni=0\n\nwhile answer[-i-1]<r[i]:\n ... | ['Runtime Error', 'Accepted'] | ['s655737412', 's944096622'] | [22720.0, 22720.0] | [268.0, 293.0] | [371, 374] |
p02727 | u551056021 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['s = []\nr.extend( [0 for i in range(x+y)])\np.sort()\nq.sort()\nr.sort()\n\n\nfor i in range(x):\n if p[-1]>= r[-1]:\n s.append(p.pop())\n else:\n s.append(r.pop())\n \nfor i in range(y):\n if q[-1]>= r[-1]:\n s.append(q.pop())\n else:\n s.append(r.pop())\n \nprint(... | ['Runtime Error', 'Accepted'] | ['s378130433', 's357913058'] | [3064.0, 23644.0] | [18.0, 243.0] | [306, 296] |
p02727 | u564837886 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x, y, a, b, c = map(int, input().split())\np = list(map(int, input().split()))\nq = list(map(int, input().split()))\nr = list(map(int, input().split()))\n\np.sort(reverse=True)\nq.sort(reverse=True)\nr.sort(reverse=True)\n\nl = p[:x] + q[:y]\nl.sort()\n\ni = 0\nwhile l[i] < r[i] and i < len(l) and i < len(r):\n l[... | ['Runtime Error', 'Accepted'] | ['s854776605', 's636075127'] | [23328.0, 23328.0] | [260.0, 282.0] | [339, 359] |
p02727 | u566159623 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x, y, a, b, c = map(int, input().split())\np =list(map(int, input().split()))\nq = list(map(int, input().split()))\nr = list(map(int, input().split()))\np = sorted(p)\nq = sorted(q)\n\np = p[(len(p)-x):]\nq = q[(len(q)-y):]\nr.append(p)\nr.append(q)\nr = sorted(r)\nprint(sum(r[(len(r)-x-y):]))\n', 'x, y, a, b, c = ma... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s064887502', 's291534530', 's771622974'] | [23328.0, 23328.0, 23328.0] | [195.0, 166.0, 246.0] | [283, 277, 279] |
p02727 | u572343785 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X,Y,A,B,C = map(int,input().split())\n\np = sorted(list(map(int,input().split()))) #A\nq = sorted(list(map(int,input().split()))) #B\nr = sorted(list(map(int,input().split()))) #C\n\nxlist = p[-X:] #X\nylist = q[-Y:] #Y\n\n\nfor i in range(min(X,Y)):\n if xlist[i] < ylist[i] and min(xlist) < max(r):\n xlist... | ['Runtime Error', 'Accepted'] | ['s022931801', 's941104619'] | [23200.0, 23456.0] | [2104.0, 285.0] | [559, 812] |
p02727 | u580404776 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X,Y,A,B,C=map(int,input().split())\nred=sorted(list(map(int,input().split())),reverse=True)\ngreen=sorted(list(map(int,input().split())),reverse=True)\nnocolor=sorted(list(map(int,input().split())),reverse=True)\n\nX_cnt=0\nY_cnt=0\nans=[]\n\nfor i in range(X):\n ans.append(red[i])\n X_cnt+=1\n if X_cnt==X:\... | ['Runtime Error', 'Accepted'] | ['s665013282', 's896136311'] | [23200.0, 22720.0] | [304.0, 250.0] | [628, 259] |
p02727 | u585963734 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ["#from typing import MutableSequence\n\ndef qsort(a: int, left: int, right: int) -> None:\n pl=left\n pr=right\n x=a[(left+right)//2]\n\n while pl<=pr:\n while a[pl]>x: pl+=1 \n while a[pr]<x: pr-=1\n if pl <= pr:\n a[pl],a[pr] = a[pr],a[pl]\n pl+=1\n pr-=1\n \n if left <pr: qsort(a,l... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s172888658', 's625308197', 's625669732', 's222591318'] | [23328.0, 28904.0, 146792.0, 29028.0] | [1151.0, 833.0, 2105.0, 839.0] | [1101, 856, 1099, 856] |
p02727 | u589913372 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['import heapq as hp\nx,y,a,b,c = map(int, input().split())\np = list(map(int, input().split()))\nq = list(map(int, input().split()))\nr = list(map(int, input().split()))\n\nlp = hp.nlargest(x, p)\nlq = hp.nlargest(y, q)\npq = lp + lq\nlpq = hp.nlargest(x+y, pq)\nlr = hp.nlargest(c, r)\nd = min(len(lr),len(lpq))\nfor i... | ['Wrong Answer', 'Accepted'] | ['s484299302', 's981750256'] | [30384.0, 32560.0] | [483.0, 472.0] | [455, 457] |
p02727 | u593855772 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['X,Y,A,B,C = map(int,input().split())\np = list(map(int,input().split()))\nq = list(map(int,input().split()))\nr = list(map(int,input().split()))\np.sort()\nq.sort()\nr.sort()\nr = sorted(r,reverse = True)\np = p[A-X:]\nq = q[B-Y:]\nif X+Y<C:\n r = r[:X+Y+1]\npx = 0\nqx = 0\nfor i in range(X+Y):\n if px == len(p... | ['Runtime Error', 'Accepted'] | ['s634852936', 's431462398'] | [22720.0, 23216.0] | [349.0, 320.0] | [548, 838] |
p02727 | u594803920 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x,y,a,b,c = map(int, input().split())\nli_p = list(map(int, input().split()))\nli_q = list(map(int, input().split()))\nli_r = list(map(int, input().split()))\nli_p.sort(reverse=True)\nli_q.sort(reverse=True)\nli_r.sort(reverse=True)\np,q = [],[]\nfor i in range(x):\n r.append(li_p[i])\nfor i in range(y):\n r.append... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s285972575', 's851933600', 's407918905'] | [29364.0, 40504.0, 29604.0] | [143.0, 248.0, 214.0] | [396, 657, 392] |
p02727 | u602188782 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['# -*- coding: utf-8 -*-\n\ndef mergef(a,b):\n c = []\n h = j = 0\n while j<len(a) and h<len(b):\n if a[j]>b[h]:\n c.append(a[j])\n j+=1\n else:\n c.append(b[h])\n h+=1\n if j==len(a):\n for i in b[h:]:\n c.append(i)\n else:\n ... | ['Runtime Error', 'Accepted'] | ['s812717243', 's578817484'] | [3064.0, 22720.0] | [17.0, 1968.0] | [1123, 1156] |
p02727 | u617718239 | 2,000 | 1,048,576 | You are going to eat X red apples and Y green apples. You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C. Before eating a colorless apple, you can paint it red or green, and it will count as a r... | ['x, y, a, b, c = map(int, input().split())\narrayP = list(map(int, input().split()))\narrayQ = list(map(int, input().split()))\narrayR = list(map(int, input().split()))\narrayP.sort(reverse=True)\narrayQ.sort(reverse=True)\narrayR.sort(reverse=True)\narrayAns = []\nfor i in range(x):\n arrayAns.append(int(arrayP[i]... | ['Runtime Error', 'Accepted'] | ['s243301589', 's973475806'] | [3064.0, 23328.0] | [18.0, 317.0] | [551, 552] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.