結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,288 KB
testcase_01 AC 80 ms
15,172 KB
testcase_02 AC 80 ms
15,128 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 AC 79 ms
15,164 KB
testcase_08 AC 79 ms
15,184 KB
testcase_09 AC 80 ms
15,100 KB
testcase_10 AC 79 ms
15,048 KB
testcase_11 AC 79 ms
15,300 KB
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 AC 79 ms
15,268 KB
testcase_17 RE -
testcase_18 AC 80 ms
15,132 KB
testcase_19 RE -
testcase_20 RE -
testcase_21 AC 79 ms
15,136 KB
testcase_22 RE -
testcase_23 AC 81 ms
15,252 KB
testcase_24 RE -
testcase_25 RE -
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,0)
(0..N-1).each{|i|r[b[i]]+=a[i]}

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