結果

問題 No.433 ICPC国内予選の選抜ルールがこんな感じだったらうれしい
ユーザー H3PO4H3PO4
提出日時 2020-08-07 09:32:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 792 ms / 4,000 ms
コード長 374 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 11,980 KB
実行使用メモリ 40,988 KB
最終ジャッジ日時 2023-10-24 01:03:03
合計ジャッジ時間 30,374 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 773 ms
40,628 KB
testcase_01 AC 726 ms
40,628 KB
testcase_02 AC 727 ms
40,420 KB
testcase_03 AC 762 ms
40,564 KB
testcase_04 AC 757 ms
40,548 KB
testcase_05 AC 745 ms
40,428 KB
testcase_06 AC 779 ms
40,764 KB
testcase_07 AC 742 ms
40,628 KB
testcase_08 AC 737 ms
40,828 KB
testcase_09 AC 752 ms
40,988 KB
testcase_10 AC 776 ms
40,020 KB
testcase_11 AC 784 ms
40,280 KB
testcase_12 AC 774 ms
39,876 KB
testcase_13 AC 772 ms
40,364 KB
testcase_14 AC 745 ms
40,472 KB
testcase_15 AC 753 ms
40,544 KB
testcase_16 AC 791 ms
40,608 KB
testcase_17 AC 763 ms
40,012 KB
testcase_18 AC 792 ms
40,280 KB
testcase_19 AC 730 ms
40,280 KB
testcase_20 AC 734 ms
39,956 KB
testcase_21 AC 758 ms
40,016 KB
testcase_22 AC 774 ms
40,236 KB
testcase_23 AC 755 ms
40,096 KB
testcase_24 AC 718 ms
40,008 KB
testcase_25 AC 767 ms
40,276 KB
testcase_26 AC 718 ms
40,536 KB
testcase_27 AC 736 ms
40,600 KB
testcase_28 AC 724 ms
40,016 KB
testcase_29 AC 734 ms
40,544 KB
testcase_30 AC 28 ms
10,732 KB
testcase_31 AC 28 ms
10,732 KB
testcase_32 AC 725 ms
38,716 KB
testcase_33 AC 721 ms
38,900 KB
testcase_34 AC 703 ms
40,976 KB
testcase_35 AC 28 ms
10,732 KB
testcase_36 AC 28 ms
10,732 KB
testcase_37 AC 28 ms
10,732 KB
testcase_38 AC 28 ms
10,732 KB
testcase_39 AC 33 ms
10,996 KB
testcase_40 AC 34 ms
10,996 KB
testcase_41 AC 82 ms
13,836 KB
testcase_42 AC 84 ms
13,876 KB
testcase_43 AC 79 ms
13,912 KB
testcase_44 AC 79 ms
13,900 KB
testcase_45 AC 34 ms
10,996 KB
testcase_46 AC 89 ms
13,568 KB
testcase_47 AC 90 ms
13,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())

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

Teams.sort(key=lambda x: (-x[0], x[1]))

Univ = [1] * (10 ** 5)
for i in range(N):
    Teams[i][4] = Univ[Teams[i][2]]
    Univ[Teams[i][2]] += 1

Teams.sort(key=lambda x: (-x[0], x[4], x[1]))
for i in range(K):
    print(Teams[i][3])
0