結果

問題 No.433 ICPC国内予選の選抜ルールがこんな感じだったらうれしい
ユーザー nebukuro09nebukuro09
提出日時 2016-10-15 01:13:48
言語 Python2
(2.7.18)
結果
AC  
実行時間 878 ms / 4,000 ms
コード長 356 bytes
コンパイル時間 340 ms
コンパイル使用メモリ 6,672 KB
実行使用メモリ 40,036 KB
最終ジャッジ日時 2023-08-14 12:46:07
合計ジャッジ時間 31,654 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 803 ms
39,904 KB
testcase_01 AC 812 ms
39,768 KB
testcase_02 AC 793 ms
39,904 KB
testcase_03 AC 803 ms
39,804 KB
testcase_04 AC 780 ms
39,736 KB
testcase_05 AC 773 ms
39,924 KB
testcase_06 AC 809 ms
39,956 KB
testcase_07 AC 772 ms
39,852 KB
testcase_08 AC 781 ms
40,036 KB
testcase_09 AC 794 ms
39,804 KB
testcase_10 AC 830 ms
39,256 KB
testcase_11 AC 825 ms
39,360 KB
testcase_12 AC 865 ms
39,144 KB
testcase_13 AC 818 ms
39,412 KB
testcase_14 AC 865 ms
39,216 KB
testcase_15 AC 816 ms
39,588 KB
testcase_16 AC 875 ms
39,624 KB
testcase_17 AC 878 ms
39,212 KB
testcase_18 AC 870 ms
39,484 KB
testcase_19 AC 831 ms
39,392 KB
testcase_20 AC 824 ms
39,036 KB
testcase_21 AC 837 ms
39,060 KB
testcase_22 AC 863 ms
39,084 KB
testcase_23 AC 822 ms
39,192 KB
testcase_24 AC 821 ms
39,248 KB
testcase_25 AC 842 ms
39,152 KB
testcase_26 AC 831 ms
39,720 KB
testcase_27 AC 866 ms
39,580 KB
testcase_28 AC 817 ms
39,144 KB
testcase_29 AC 853 ms
39,784 KB
testcase_30 AC 16 ms
6,536 KB
testcase_31 AC 16 ms
6,620 KB
testcase_32 AC 818 ms
38,060 KB
testcase_33 AC 860 ms
38,476 KB
testcase_34 AC 837 ms
39,960 KB
testcase_35 AC 15 ms
6,448 KB
testcase_36 AC 16 ms
6,624 KB
testcase_37 AC 16 ms
6,552 KB
testcase_38 AC 16 ms
6,488 KB
testcase_39 AC 22 ms
6,904 KB
testcase_40 AC 22 ms
7,036 KB
testcase_41 AC 74 ms
9,812 KB
testcase_42 AC 74 ms
9,828 KB
testcase_43 AC 68 ms
9,792 KB
testcase_44 AC 68 ms
9,840 KB
testcase_45 AC 23 ms
6,904 KB
testcase_46 AC 74 ms
9,856 KB
testcase_47 AC 76 ms
9,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, raw_input().split())
spuri = [map(int, raw_input().split()) + [0, i] for i in xrange(N)]
u_rank = [0 for _ in xrange(10**5+1)]

spuri.sort(key=lambda x:(-x[0], x[1]))
for i in xrange(N):
    spuri[i][3] = u_rank[spuri[i][2]]
    u_rank[spuri[i][2]] += 1
spuri.sort(key=lambda x:(-x[0], x[3], x[1]))
for i in xrange(K):
    print spuri[i][4]
0