結果
問題 |
No.216 FAC
|
ユーザー |
![]() |
提出日時 | 2019-02-01 19:32:49 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 183 bytes |
コンパイル時間 | 63 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-11-23 23:17:18 |
合計ジャッジ時間 | 3,491 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 WA * 7 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
n=gets.to_i a=gets.split.map(&:to_i) b=gets.split.map(&:to_i) t=a.zip(b).inject([0,0]){|s,e|e[1]==0 ? [s[0]+e[0],s[1]] : [s[0],s[1]<e[0] ? e[0] : s[0]]} puts t[0]>=t[1] ? "YES" : "NO"