結果

問題 No.433 ICPC国内予選の選抜ルールがこんな感じだったらうれしい
ユーザー pluto77pluto77
提出日時 2016-10-17 14:34:22
言語 Python2
(2.7.18)
結果
AC  
実行時間 939 ms / 4,000 ms
コード長 498 bytes
コンパイル時間 1,067 ms
コンパイル使用メモリ 7,076 KB
実行使用メモリ 48,320 KB
最終ジャッジ日時 2023-08-14 14:59:38
合計ジャッジ時間 34,288 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 897 ms
48,004 KB
testcase_01 AC 910 ms
48,024 KB
testcase_02 AC 889 ms
47,992 KB
testcase_03 AC 927 ms
46,576 KB
testcase_04 AC 918 ms
46,912 KB
testcase_05 AC 892 ms
48,080 KB
testcase_06 AC 922 ms
48,320 KB
testcase_07 AC 891 ms
48,156 KB
testcase_08 AC 892 ms
48,048 KB
testcase_09 AC 909 ms
47,284 KB
testcase_10 AC 902 ms
47,020 KB
testcase_11 AC 919 ms
47,132 KB
testcase_12 AC 923 ms
46,948 KB
testcase_13 AC 907 ms
47,020 KB
testcase_14 AC 891 ms
47,132 KB
testcase_15 AC 851 ms
47,148 KB
testcase_16 AC 921 ms
47,560 KB
testcase_17 AC 896 ms
46,864 KB
testcase_18 AC 922 ms
47,224 KB
testcase_19 AC 903 ms
46,948 KB
testcase_20 AC 896 ms
46,624 KB
testcase_21 AC 869 ms
46,748 KB
testcase_22 AC 888 ms
46,996 KB
testcase_23 AC 909 ms
46,876 KB
testcase_24 AC 864 ms
46,764 KB
testcase_25 AC 892 ms
46,824 KB
testcase_26 AC 905 ms
47,224 KB
testcase_27 AC 910 ms
47,260 KB
testcase_28 AC 895 ms
46,732 KB
testcase_29 AC 908 ms
47,552 KB
testcase_30 AC 11 ms
5,884 KB
testcase_31 AC 11 ms
6,032 KB
testcase_32 AC 910 ms
45,948 KB
testcase_33 AC 939 ms
46,088 KB
testcase_34 AC 913 ms
46,672 KB
testcase_35 AC 11 ms
5,780 KB
testcase_36 AC 11 ms
5,856 KB
testcase_37 AC 11 ms
6,044 KB
testcase_38 AC 11 ms
5,964 KB
testcase_39 AC 17 ms
6,240 KB
testcase_40 AC 17 ms
6,216 KB
testcase_41 AC 76 ms
9,888 KB
testcase_42 AC 76 ms
10,048 KB
testcase_43 AC 72 ms
9,924 KB
testcase_44 AC 73 ms
9,928 KB
testcase_45 AC 18 ms
6,196 KB
testcase_46 AC 82 ms
9,840 KB
testcase_47 AC 81 ms
9,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki_433

n,k=map(int,raw_input().split())
s=[[0 for i in xrange(5)] for j in xrange(n)]
for i in xrange(n):
 s[i][0],s[i][1],s[i][2]=map(int,raw_input().split())
 s[i][3]=0
 s[i][4]=i
#print s
t=sorted(s,key=lambda x:(x[0],-x[1]),reverse=True)
u_cnt={}
for i in xrange(n):
 u_cnt[t[i][2]]=0
#print u_cnt
for i in xrange(n):
 u_cnt[t[i][2]]+=1
 t[i][3]=u_cnt[t[i][2]]
#print t
u=sorted(t,key=lambda x:(x[0],-x[3],-x[1]),reverse=True)
#print u
res=u[:k]
for i in xrange(len(res)):
 print res[i][4]
0