結果

問題 No.216 FAC
ユーザー yamaghyamagh
提出日時 2015-08-17 22:29:03
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 149 bytes
コンパイル時間 60 ms
コンパイル使用メモリ 11,576 KB
実行使用メモリ 15,556 KB
最終ジャッジ日時 2023-09-25 12:39:30
合計ジャッジ時間 3,382 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,100 KB
testcase_01 AC 80 ms
15,152 KB
testcase_02 AC 81 ms
15,132 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 AC 81 ms
15,292 KB
testcase_07 AC 81 ms
15,028 KB
testcase_08 AC 80 ms
15,164 KB
testcase_09 AC 80 ms
15,252 KB
testcase_10 AC 80 ms
15,216 KB
testcase_11 AC 79 ms
15,284 KB
testcase_12 RE -
testcase_13 RE -
testcase_14 AC 81 ms
15,296 KB
testcase_15 RE -
testcase_16 AC 81 ms
15,292 KB
testcase_17 AC 81 ms
15,104 KB
testcase_18 AC 81 ms
15,272 KB
testcase_19 AC 81 ms
15,288 KB
testcase_20 AC 80 ms
15,176 KB
testcase_21 AC 80 ms
15,140 KB
testcase_22 AC 81 ms
15,248 KB
testcase_23 AC 80 ms
15,096 KB
testcase_24 AC 80 ms
15,100 KB
testcase_25 AC 79 ms
15,220 KB
testcase_26 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N=gets.to_i
a=gets.split.map(&:to_i)
b=gets.split.map(&:to_i)

r=Array.new(N+1,0)
(0..N-1).each{|i|r[b[i]]+=a[i]}

puts r.max == r[0] ? "YES" : "NO"
0