結果

問題 No.433 ICPC国内予選の選抜ルールがこんな感じだったらうれしい
ユーザー titiatitia
提出日時 2023-04-20 01:24:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 742 ms / 4,000 ms
コード長 484 bytes
コンパイル時間 160 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 38,940 KB
最終ジャッジ日時 2024-04-23 04:35:39
合計ジャッジ時間 27,753 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 722 ms
38,820 KB
testcase_01 AC 704 ms
38,816 KB
testcase_02 AC 672 ms
38,800 KB
testcase_03 AC 705 ms
38,756 KB
testcase_04 AC 708 ms
38,744 KB
testcase_05 AC 694 ms
38,808 KB
testcase_06 AC 717 ms
38,940 KB
testcase_07 AC 690 ms
38,820 KB
testcase_08 AC 647 ms
38,876 KB
testcase_09 AC 670 ms
38,772 KB
testcase_10 AC 701 ms
35,756 KB
testcase_11 AC 710 ms
35,924 KB
testcase_12 AC 742 ms
35,692 KB
testcase_13 AC 697 ms
35,816 KB
testcase_14 AC 731 ms
35,692 KB
testcase_15 AC 663 ms
35,816 KB
testcase_16 AC 733 ms
35,936 KB
testcase_17 AC 731 ms
35,816 KB
testcase_18 AC 733 ms
35,940 KB
testcase_19 AC 681 ms
35,752 KB
testcase_20 AC 716 ms
35,816 KB
testcase_21 AC 698 ms
35,760 KB
testcase_22 AC 726 ms
35,756 KB
testcase_23 AC 692 ms
35,756 KB
testcase_24 AC 680 ms
35,820 KB
testcase_25 AC 709 ms
35,820 KB
testcase_26 AC 677 ms
35,752 KB
testcase_27 AC 699 ms
35,756 KB
testcase_28 AC 680 ms
35,816 KB
testcase_29 AC 702 ms
35,940 KB
testcase_30 AC 31 ms
11,520 KB
testcase_31 AC 31 ms
11,520 KB
testcase_32 AC 721 ms
36,692 KB
testcase_33 AC 697 ms
37,000 KB
testcase_34 AC 664 ms
38,892 KB
testcase_35 AC 31 ms
11,520 KB
testcase_36 AC 31 ms
11,520 KB
testcase_37 AC 34 ms
11,520 KB
testcase_38 AC 32 ms
11,520 KB
testcase_39 AC 36 ms
11,776 KB
testcase_40 AC 36 ms
11,904 KB
testcase_41 AC 84 ms
13,952 KB
testcase_42 AC 81 ms
14,080 KB
testcase_43 AC 82 ms
14,080 KB
testcase_44 AC 83 ms
13,952 KB
testcase_45 AC 37 ms
11,904 KB
testcase_46 AC 93 ms
13,952 KB
testcase_47 AC 92 ms
14,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from operator import itemgetter

N,K=map(int,input().split())
LIST=[]
for i in range(N):
    S,P,U=map(int,input().split())
    LIST.append([S,P,U,i])

RANK=[0]*(10**5+5)

LIST.sort(key=itemgetter(1))
LIST.sort(key=itemgetter(0),reverse=True)

#print(LIST)

for i in range(N):
    LIST[i].append(RANK[LIST[i][-2]])
    RANK[LIST[i][-3]]+=1

LIST.sort(key=itemgetter(1))
LIST.sort(key=itemgetter(4))
LIST.sort(key=itemgetter(0),reverse=True)

for i in range(K):
    print(LIST[i][-2])
0