結果
| 問題 | No.216 FAC |
| コンテスト | |
| ユーザー |
neko_the_shadow
|
| 提出日時 | 2016-09-19 21:37:27 |
| 言語 | Ruby (4.0.2) |
| 結果 |
AC
|
| 実行時間 | 90 ms / 1,000 ms |
| コード長 | 258 bytes |
| 記録 | |
| コンパイル時間 | 58 ms |
| コンパイル使用メモリ | 9,088 KB |
| 実行使用メモリ | 14,976 KB |
| 最終ジャッジ日時 | 2026-05-12 08:11:11 |
| 合計ジャッジ時間 | 3,890 ms |
|
ジャッジサーバーID (参考情報) |
tmp-judge_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
コンパイルメッセージ
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