結果

問題 No.999 てん vs. ほむ
ユーザー cielciel
提出日時 2020-03-07 19:06:46
言語 Ruby
(3.2.2)
結果
AC  
実行時間 189 ms / 2,000 ms
コード長 128 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 11,304 KB
実行使用メモリ 32,604 KB
最終ジャッジ日時 2023-08-05 17:11:36
合計ジャッジ時間 4,372 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
15,052 KB
testcase_01 AC 79 ms
15,052 KB
testcase_02 AC 78 ms
15,140 KB
testcase_03 AC 78 ms
15,088 KB
testcase_04 AC 78 ms
15,148 KB
testcase_05 AC 78 ms
15,184 KB
testcase_06 AC 78 ms
15,140 KB
testcase_07 AC 74 ms
15,300 KB
testcase_08 AC 77 ms
15,552 KB
testcase_09 AC 177 ms
31,208 KB
testcase_10 AC 105 ms
19,948 KB
testcase_11 AC 102 ms
18,148 KB
testcase_12 AC 115 ms
22,264 KB
testcase_13 AC 183 ms
32,400 KB
testcase_14 AC 188 ms
32,572 KB
testcase_15 AC 188 ms
32,604 KB
testcase_16 AC 186 ms
32,496 KB
testcase_17 AC 168 ms
30,840 KB
testcase_18 AC 169 ms
30,432 KB
testcase_19 AC 172 ms
30,696 KB
testcase_20 AC 170 ms
30,608 KB
testcase_21 AC 189 ms
32,344 KB
testcase_22 AC 177 ms
32,116 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