結果
| 問題 |
No.216 FAC
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-04 20:10:03 |
| 言語 | Ruby (3.4.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 193 bytes |
| コンパイル時間 | 85 ms |
| コンパイル使用メモリ | 7,680 KB |
| 実行使用メモリ | 12,672 KB |
| 最終ジャッジ日時 | 2024-10-04 00:52:23 |
| 合計ジャッジ時間 | 3,152 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 RE * 5 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
n = gets.to_i
a, b = 2.times.map{ gets.chomp!.split.map(&:to_i) }
h = a.group_by.with_index{|_, i| b[i] }
s = {}
h.each{|i, a| s[i] = a.inject(:+) }
puts (s.values.max <= s[0]) ? 'YES' : 'NO'