結果

問題 No.999 てん vs. ほむ
ユーザー cielciel
提出日時 2020-03-07 19:06:46
言語 Ruby
(3.3.0)
結果
AC  
実行時間 203 ms / 2,000 ms
コード長 128 bytes
コンパイル時間 38 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 30,464 KB
最終ジャッジ日時 2024-04-23 14:07:58
合計ジャッジ時間 4,449 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
12,288 KB
testcase_01 AC 89 ms
12,160 KB
testcase_02 AC 89 ms
12,160 KB
testcase_03 AC 88 ms
12,160 KB
testcase_04 AC 87 ms
12,160 KB
testcase_05 AC 86 ms
12,160 KB
testcase_06 AC 90 ms
12,288 KB
testcase_07 AC 90 ms
12,288 KB
testcase_08 AC 95 ms
12,288 KB
testcase_09 AC 196 ms
29,056 KB
testcase_10 AC 120 ms
16,896 KB
testcase_11 AC 109 ms
15,360 KB
testcase_12 AC 139 ms
19,712 KB
testcase_13 AC 203 ms
30,464 KB
testcase_14 AC 203 ms
30,208 KB
testcase_15 AC 203 ms
30,208 KB
testcase_16 AC 202 ms
30,464 KB
testcase_17 AC 192 ms
28,416 KB
testcase_18 AC 192 ms
28,288 KB
testcase_19 AC 192 ms
28,544 KB
testcase_20 AC 193 ms
28,544 KB
testcase_21 AC 201 ms
29,952 KB
testcase_22 AC 199 ms
29,440 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N,*A=ARGF.read.split.map &:to_i
a=*0;b=*0
A.each_slice(2){|x,y|a<<a[-1]+x;b<<b[-1]+y}
p b[N]-a[N]+2*(0..N).map{|i|a[i]-b[i]}.max
0