結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,072 KB
testcase_01 AC 79 ms
15,048 KB
testcase_02 AC 80 ms
15,096 KB
testcase_03 AC 78 ms
15,120 KB
testcase_04 AC 78 ms
15,284 KB
testcase_05 AC 83 ms
15,272 KB
testcase_06 AC 78 ms
15,164 KB
testcase_07 AC 79 ms
15,288 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 79 ms
15,136 KB
testcase_12 WA -
testcase_13 AC 79 ms
15,100 KB
testcase_14 WA -
testcase_15 AC 80 ms
15,104 KB
testcase_16 AC 80 ms
15,072 KB
testcase_17 AC 80 ms
15,136 KB
testcase_18 WA -
testcase_19 AC 79 ms
15,188 KB
testcase_20 WA -
testcase_21 AC 80 ms
15,172 KB
testcase_22 AC 80 ms
15,116 KB
testcase_23 AC 80 ms
15,132 KB
testcase_24 WA -
testcase_25 AC 79 ms
15,256 KB
testcase_26 AC 78 ms
15,300 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N=gets.to_i
a=gets.split.map(&:to_i)
b=gets.split.map(&:to_i)
k_score=[b,a].transpose.select{|s|s[0]==0}.inject(0){|s,m|s+m[1]}
e_score=[b,a].transpose.select{|s|s[0]!=0}.inject(0){|s,m|s+m[1]}
puts e_score <= k_score ? "YES" : "NO"
0