Submission #11296788


Source Code Expand

Copy
#!/usr/bin/ python3.8
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

X, Y, A, B, C = map(int, readline().split())
P = sorted(map(int, readline().split()), reverse=True)
Q = sorted(map(int, readline().split()), reverse=True)
R = sorted(map(int, readline().split()), reverse=True)

P = P[:X]
Q = Q[:Y]
nums = P + Q + R
nums.sort(reverse=True)
answer = sum(nums[:X + Y])
print(answer)

Submission Info

Submission Time
Task E - Red and Green Apples
User maspy
Language Python3 (3.4.3)
Score 500
Code Size 469 Byte
Status
Exec Time 246 ms
Memory 21088 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 Sample_01.txt, Sample_02.txt, Sample_03.txt
All 500 / 500 Sample_01.txt, Sample_02.txt, Sample_03.txt, case_01.txt, case_03.txt, case_05.txt, case_07.txt, case_09.txt, case_10.txt, case_11.txt, case_12.txt, case_13.txt, case_15.txt, case_16.txt, case_17.txt, case_18.txt, case_19.txt, case_20.txt, case_21.txt, case_22.txt, case_23.txt, case_24.txt, case_25.txt, case_26.txt, case_27.txt
Case Name Status Exec Time Memory
Sample_01.txt 17 ms 3064 KB
Sample_02.txt 17 ms 3064 KB
Sample_03.txt 17 ms 3064 KB
case_01.txt 246 ms 20804 KB
case_03.txt 246 ms 20800 KB
case_05.txt 245 ms 20800 KB
case_07.txt 208 ms 20904 KB
case_09.txt 208 ms 20904 KB
case_10.txt 210 ms 20904 KB
case_11.txt 229 ms 20896 KB
case_12.txt 230 ms 20772 KB
case_13.txt 233 ms 20744 KB
case_15.txt 229 ms 20772 KB
case_16.txt 197 ms 20828 KB
case_17.txt 195 ms 20820 KB
case_18.txt 17 ms 3064 KB
case_19.txt 17 ms 3064 KB
case_20.txt 93 ms 21088 KB
case_21.txt 136 ms 13668 KB
case_22.txt 164 ms 16236 KB
case_23.txt 85 ms 11576 KB
case_24.txt 146 ms 14288 KB
case_25.txt 153 ms 16080 KB
case_26.txt 121 ms 12432 KB
case_27.txt 142 ms 15132 KB