結果
問題 | No.433 ICPC国内予選の選抜ルールがこんな感じだったらうれしい |
ユーザー |
|
提出日時 | 2016-10-15 00:01:11 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 888 ms / 4,000 ms |
コード長 | 504 bytes |
コンパイル時間 | 120 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 40,852 KB |
最終ジャッジ日時 | 2024-11-22 07:58:13 |
合計ジャッジ時間 | 31,573 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 48 |
ソースコード
N, K = tuple(int(i) for i in input().split())team_lst = []school_dic = {}for i in range(N):sn, pn, un = tuple(int(i) for i in input().split())team_lst += [(sn, -pn, un, i)]team_lst = sorted(team_lst, reverse=True)team_lst2 = []for r in team_lst:sn, pn, un, idx = rsum_un = school_dic.get(un, 0) + 1school_dic[un] = sum_unteam_lst2 += [(sn, -sum_un, pn, idx)]team_lst2 = sorted(team_lst2, reverse=True)for r in team_lst2[:K]:_, _, _, idx = rprint(r[3])