結果
| 問題 |
No.447 ゆきこーだーの雨と雪 (2)
|
| ユーザー |
|
| 提出日時 | 2016-11-22 01:17:35 |
| 言語 | Ruby (3.4.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 326 bytes |
| コンパイル時間 | 465 ms |
| コンパイル使用メモリ | 7,296 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-11-27 09:34:40 |
| 合計ジャッジ時間 | 4,432 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 25 |
コンパイルメッセージ
Syntax OK
ソースコード
n=gets.to_i
a=gets.split.map(&:to_i)
h=Hash.new([0,0])
ac=Hash.new(0)
perprob=Hash.new{|h,k|h[k]=[0]*n}
gets.to_i.times{|i|
x,y=gets.split
idx=y.ord-65
score=f.(a[idx],ac[idx]+=1)
perprob[x][idx]=score
h[x]=[h[x][0]-score,i]
}
h.sort_by{|k,v|v}.each.with_index{|(k,v),i|
puts '%d %s %s %d'%[i+1,k,perprob[k]*' ',-v[0]]
}