結果

問題 No.433 ICPC国内予選の選抜ルールがこんな感じだったらうれしい
ユーザー ciel
提出日時 2016-10-18 00:43:06
言語 Ruby
(3.4.1)
結果
AC  
実行時間 1,506 ms / 4,000 ms
コード長 178 bytes
コンパイル時間 64 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 27,392 KB
最終ジャッジ日時 2024-11-22 13:49:30
合計ジャッジ時間 51,336 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 48
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:3: warning: `*' interpreted as argument prefix
Syntax OK

ソースコード

diff #

h=Hash.new 0
n,k=gets.split.map &:to_i
p *n.times.map{|i|s,t,u=gets.split.map &:to_i;[-s,u,t,i]
}.sort.map{
#|s,u,t,i|[s,h[u]+=1,t,i]
|e|e[1]=h[e[1]]+=1;e
}.sort.map(&:last)[0,k]
0