結果

問題 No.433 ICPC国内予選の選抜ルールがこんな感じだったらうれしい
ユーザー rlangevinrlangevin
提出日時 2023-12-06 00:44:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 543 ms / 4,000 ms
コード長 417 bytes
コンパイル時間 429 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 111,492 KB
最終ジャッジ日時 2023-12-06 00:44:59
合計ジャッジ時間 21,046 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 539 ms
105,836 KB
testcase_01 AC 511 ms
105,524 KB
testcase_02 AC 539 ms
107,324 KB
testcase_03 AC 502 ms
111,164 KB
testcase_04 AC 498 ms
111,036 KB
testcase_05 AC 540 ms
105,916 KB
testcase_06 AC 543 ms
111,492 KB
testcase_07 AC 535 ms
105,828 KB
testcase_08 AC 514 ms
105,916 KB
testcase_09 AC 520 ms
110,780 KB
testcase_10 AC 410 ms
110,388 KB
testcase_11 AC 408 ms
110,388 KB
testcase_12 AC 431 ms
110,516 KB
testcase_13 AC 389 ms
110,388 KB
testcase_14 AC 379 ms
110,388 KB
testcase_15 AC 404 ms
110,900 KB
testcase_16 AC 389 ms
110,772 KB
testcase_17 AC 410 ms
110,388 KB
testcase_18 AC 438 ms
110,644 KB
testcase_19 AC 401 ms
110,516 KB
testcase_20 AC 399 ms
110,516 KB
testcase_21 AC 433 ms
110,516 KB
testcase_22 AC 409 ms
110,516 KB
testcase_23 AC 403 ms
110,644 KB
testcase_24 AC 431 ms
110,644 KB
testcase_25 AC 401 ms
110,388 KB
testcase_26 AC 383 ms
110,772 KB
testcase_27 AC 394 ms
110,772 KB
testcase_28 AC 433 ms
110,388 KB
testcase_29 AC 393 ms
110,772 KB
testcase_30 AC 45 ms
62,720 KB
testcase_31 AC 46 ms
62,720 KB
testcase_32 AC 461 ms
110,516 KB
testcase_33 AC 427 ms
110,516 KB
testcase_34 AC 518 ms
111,164 KB
testcase_35 AC 46 ms
62,720 KB
testcase_36 AC 52 ms
62,720 KB
testcase_37 AC 47 ms
62,720 KB
testcase_38 AC 47 ms
62,720 KB
testcase_39 AC 54 ms
64,768 KB
testcase_40 AC 53 ms
64,768 KB
testcase_41 AC 96 ms
82,000 KB
testcase_42 AC 99 ms
82,000 KB
testcase_43 AC 102 ms
82,000 KB
testcase_44 AC 99 ms
82,000 KB
testcase_45 AC 56 ms
66,964 KB
testcase_46 AC 104 ms
82,256 KB
testcase_47 AC 120 ms
82,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N, K = map(int, input().split())
M = 10 ** 5 + 5
D = [[] for _ in range(M)]
for i in range(N):
    s, p, u = map(int, input().split())
    D[u].append((-s, p, i))
    
ans = []
for i in range(M):
    now = 0
    D[i].sort()
    for j in range(len(D[i])):
        s, p, ind = D[i][j]
        ans.append((s, j, p, ind))
        
ans.sort()
for i in range(K):
    print(ans[i][-1])
0