結果
| 問題 |
No.216 FAC
|
| コンテスト | |
| ユーザー |
neko_the_shadow
|
| 提出日時 | 2016-09-19 21:35:21 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 259 bytes |
| コンパイル時間 | 362 ms |
| コンパイル使用メモリ | 7,296 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-11-17 09:57:30 |
| 合計ジャッジ時間 | 3,797 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 WA * 1 |
コンパイルメッセージ
Syntax OK
ソースコード
n = gets.to_i
scores = gets.split("\s").map(&:to_i)
answerers = gets.split("\s").map(&:to_i)
hash = Hash.new(0)
(0...n).each{|i| hash[answerers[i]] += scores[i]}
winner = (0...100).inject(0){|t, i| hash[t] < hash[i] ? i : t}
puts winner.zero? ? "YES" : "NO"
neko_the_shadow