Submission #60744055


Source Code Expand

Copy
l=list(map(int,input().split()))
s=["A","B","C","D","E"]
cur_name=""
cur_score=0
ans=[]
for i in range(1,2**5):
for j in range(5):
if i>>j&1:
cur_name+=s[j]
cur_score+=l[j]
ans.append([cur_name,cur_score])
cur_name=""
cur_score=0
ans.sort()
ans=sorted(ans,key=lambda x:x[1],reverse=True)
for i in range(len(ans)):
print(ans[i][0])
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
l=list(map(int,input().split()))
s=["A","B","C","D","E"]
cur_name=""
cur_score=0
ans=[]
for i in range(1,2**5):
    for j in range(5):
        if i>>j&1:
            cur_name+=s[j]
            cur_score+=l[j]
    ans.append([cur_name,cur_score])
    cur_name=""
    cur_score=0

ans.sort()
ans=sorted(ans,key=lambda x:x[1],reverse=True)
for i in range(len(ans)):
    print(ans[i][0])

Submission Info

Submission Time
Task C - Perfect Standings
User keisankatei
Language Python (PyPy 3.10-v7.3.12)
Score 300
Code Size 400 Byte
Status AC
Exec Time 57 ms
Memory 76660 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 34
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt, 01_random_22.txt, 01_random_23.txt, 01_random_24.txt, 01_random_25.txt, 01_random_26.txt, 01_random_27.txt, 01_random_28.txt, 01_random_29.txt, 01_random_30.txt, 01_random_31.txt, 01_random_32.txt, 01_random_33.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 56 ms 76388 KB
00_sample_01.txt AC 56 ms 76236 KB
00_sample_02.txt AC 56 ms 76428 KB
01_random_03.txt AC 55 ms 76588 KB
01_random_04.txt AC 56 ms 76592 KB
01_random_05.txt AC 56 ms 76488 KB
01_random_06.txt AC 56 ms 76452 KB
01_random_07.txt AC 56 ms 76588 KB
01_random_08.txt AC 57 ms 76284 KB
01_random_09.txt AC 56 ms 76324 KB
01_random_10.txt AC 56 ms 76428 KB
01_random_11.txt AC 56 ms 76328 KB
01_random_12.txt AC 55 ms 76308 KB
01_random_13.txt AC 56 ms 76596 KB
01_random_14.txt AC 56 ms 76176 KB
01_random_15.txt AC 56 ms 76468 KB
01_random_16.txt AC 56 ms 76392 KB
01_random_17.txt AC 56 ms 76368 KB
01_random_18.txt AC 56 ms 76576 KB
01_random_19.txt AC 56 ms 76660 KB
01_random_20.txt AC 55 ms 76444 KB
01_random_21.txt AC 55 ms 76436 KB
01_random_22.txt AC 56 ms 76624 KB
01_random_23.txt AC 56 ms 76612 KB
01_random_24.txt AC 56 ms 76352 KB
01_random_25.txt AC 56 ms 76512 KB
01_random_26.txt AC 56 ms 76300 KB
01_random_27.txt AC 56 ms 76432 KB
01_random_28.txt AC 56 ms 76312 KB
01_random_29.txt AC 56 ms 76488 KB
01_random_30.txt AC 55 ms 76376 KB
01_random_31.txt AC 56 ms 76360 KB
01_random_32.txt AC 56 ms 76292 KB
01_random_33.txt AC 56 ms 76340 KB


2025-03-05 (Wed)
03:26:55 +00:00