結果
問題 | No.216 FAC |
ユーザー |
![]() |
提出日時 | 2016-09-19 21:37:27 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 94 ms / 1,000 ms |
コード長 | 258 bytes |
コンパイル時間 | 211 ms |
コンパイル使用メモリ | 7,296 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-11-17 09:57:42 |
合計ジャッジ時間 | 3,547 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
コンパイルメッセージ
Syntax OK
ソースコード
n = gets.to_iscores = 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"