結果

問題 No.433 ICPC国内予選の選抜ルールがこんな感じだったらうれしい
ユーザー t8m8⛄️t8m8⛄️
提出日時 2016-10-31 23:00:00
言語 Nim
(2.0.2)
結果
AC  
実行時間 235 ms / 4,000 ms
コード長 561 bytes
コンパイル時間 3,475 ms
コンパイル使用メモリ 69,756 KB
実行使用メモリ 29,408 KB
最終ジャッジ日時 2023-09-12 06:52:17
合計ジャッジ時間 13,109 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 226 ms
28,044 KB
testcase_01 AC 208 ms
28,220 KB
testcase_02 AC 167 ms
24,900 KB
testcase_03 AC 193 ms
26,184 KB
testcase_04 AC 190 ms
24,932 KB
testcase_05 AC 183 ms
25,168 KB
testcase_06 AC 235 ms
29,212 KB
testcase_07 AC 182 ms
28,208 KB
testcase_08 AC 168 ms
25,616 KB
testcase_09 AC 168 ms
24,212 KB
testcase_10 AC 165 ms
26,004 KB
testcase_11 AC 183 ms
26,984 KB
testcase_12 AC 173 ms
26,464 KB
testcase_13 AC 139 ms
27,952 KB
testcase_14 AC 154 ms
25,992 KB
testcase_15 AC 130 ms
26,096 KB
testcase_16 AC 188 ms
27,012 KB
testcase_17 AC 187 ms
26,944 KB
testcase_18 AC 190 ms
27,060 KB
testcase_19 AC 141 ms
29,408 KB
testcase_20 AC 150 ms
26,732 KB
testcase_21 AC 148 ms
26,588 KB
testcase_22 AC 176 ms
26,172 KB
testcase_23 AC 157 ms
26,764 KB
testcase_24 AC 140 ms
28,540 KB
testcase_25 AC 170 ms
27,404 KB
testcase_26 AC 146 ms
25,176 KB
testcase_27 AC 166 ms
27,204 KB
testcase_28 AC 140 ms
26,908 KB
testcase_29 AC 176 ms
28,828 KB
testcase_30 AC 7 ms
7,012 KB
testcase_31 AC 7 ms
7,016 KB
testcase_32 AC 192 ms
27,760 KB
testcase_33 AC 195 ms
26,580 KB
testcase_34 AC 165 ms
25,052 KB
testcase_35 AC 7 ms
6,944 KB
testcase_36 AC 7 ms
7,016 KB
testcase_37 AC 7 ms
7,060 KB
testcase_38 AC 7 ms
7,064 KB
testcase_39 AC 9 ms
7,140 KB
testcase_40 AC 9 ms
7,160 KB
testcase_41 AC 24 ms
10,312 KB
testcase_42 AC 23 ms
9,752 KB
testcase_43 AC 24 ms
10,340 KB
testcase_44 AC 24 ms
10,388 KB
testcase_45 AC 10 ms
7,168 KB
testcase_46 AC 36 ms
9,764 KB
testcase_47 AC 36 ms
10,344 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 39) Warning: imported and not used: 'tables' [UnusedImport]

ソースコード

diff #

import strutils, sequtils, algorithm, tables

var
  tmp = stdin.readline.split.map(parseint)
  (n, k) = (tmp[0], tmp[1])
  a: seq[(int, int, int, int)] = @[]
  u = newSeqWith(100000, newSeq[(int, int, int)]())

for i in 0..n-1:
  var tmp = stdin.readline.split.map(parseint)
  u[tmp[2]].add((tmp[0], -tmp[1], i))

for i in 0..u.len-1:
  if u[i].len == 0: continue
  u[i].sort(system.cmp, SortOrder.Descending)
  for j in 0..u[i].len-1:
    a.add((u[i][j][0], -j, u[i][j][1], u[i][j][2]))

a.sort(system.cmp, SortOrder.Descending)
for i in 0..k-1:
  echo a[i][3]
0