結果

問題 No.999 てん vs. ほむ
ユーザー cielciel
提出日時 2020-03-07 19:06:12
言語 Ruby
(3.3.0)
結果
AC  
実行時間 210 ms / 2,000 ms
コード長 123 bytes
コンパイル時間 310 ms
コンパイル使用メモリ 11,236 KB
実行使用メモリ 32,792 KB
最終ジャッジ日時 2023-08-05 17:10:06
合計ジャッジ時間 5,078 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
外部呼び出し有り
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,128 KB
testcase_01 AC 74 ms
15,056 KB
testcase_02 AC 75 ms
15,336 KB
testcase_03 AC 74 ms
15,236 KB
testcase_04 AC 72 ms
15,100 KB
testcase_05 AC 70 ms
15,304 KB
testcase_06 AC 70 ms
15,092 KB
testcase_07 AC 75 ms
15,300 KB
testcase_08 AC 77 ms
15,412 KB
testcase_09 AC 196 ms
31,104 KB
testcase_10 AC 122 ms
19,748 KB
testcase_11 AC 104 ms
18,160 KB
testcase_12 AC 123 ms
22,264 KB
testcase_13 AC 201 ms
32,620 KB
testcase_14 AC 199 ms
32,792 KB
testcase_15 AC 205 ms
32,600 KB
testcase_16 AC 210 ms
32,540 KB
testcase_17 AC 184 ms
30,656 KB
testcase_18 AC 185 ms
30,252 KB
testcase_19 AC 190 ms
30,648 KB
testcase_20 AC 190 ms
30,664 KB
testcase_21 AC 202 ms
32,320 KB
testcase_22 AC 196 ms
31,608 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N,*A=`dd`.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