Submission #4865171


Source Code Expand

Copy
x,y,z,k = map(int,input().split())
lisa = list(map(int,input().split()))
lisb = list(map(int,input().split()))
lisc = list(map(int,input().split()))
lisa.sort(reverse=True)
lisb.sort(reverse=True)
lisc.sort(reverse=True)
an = []
ans = []
for num in lisb:
    for nu in lisa:
        an.append(num+nu)
an.sort(reverse=True)
an = an[:min(3001,x*y*z+1)]
for num in lisc:
    for nu in an:
        ans.append(num+nu)
ans.sort(reverse=True)
for i in range(k):
    print(ans[i])

Submission Info

Submission Time
Task D - Cake 123
User showyou41
Language Python3 (3.4.3)
Score 400
Code Size 493 Byte
Status
Exec Time 2000 ms
Memory 160584 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 s1.txt, s2.txt, s3.txt
All 400 / 400 in01.txt, in02.txt, in03.txt, in04.txt, in05.txt, in06.txt, in07.txt, in08.txt, in09.txt, in10.txt, in11.txt, in12.txt, in13.txt, in14.txt, in15.txt, in16.txt, in17.txt, in18.txt, in19.txt, in20.txt, in21.txt, in22.txt, in23.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
in01.txt 1510 ms 154132 KB
in02.txt 1566 ms 159312 KB
in03.txt 1616 ms 159992 KB
in04.txt 1566 ms 160584 KB
in05.txt 1548 ms 159828 KB
in06.txt 1538 ms 155056 KB
in07.txt 901 ms 136312 KB
in08.txt 842 ms 136356 KB
in09.txt 1380 ms 133680 KB
in10.txt 677 ms 159616 KB
in11.txt 680 ms 160104 KB
in12.txt 655 ms 159828 KB
in13.txt 743 ms 159552 KB
in14.txt 722 ms 159192 KB
in15.txt 691 ms 145544 KB
in16.txt 17 ms 3064 KB
in17.txt 17 ms 3064 KB
in18.txt 718 ms 159868 KB
in19.txt 955 ms 159940 KB
in20.txt 1552 ms 160404 KB
in21.txt 1035 ms 159268 KB
in22.txt 1163 ms 159304 KB
in23.txt 2000 ms 159480 KB
s1.txt 17 ms 3064 KB
s2.txt 17 ms 3060 KB
s3.txt 17 ms 3064 KB