結果

問題 No.999 てん vs. ほむ
ユーザー _matumo__matumo_
提出日時 2020-07-19 23:41:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 148 bytes
コンパイル時間 124 ms
コンパイル使用メモリ 10,500 KB
実行使用メモリ 29,976 KB
最終ジャッジ日時 2023-08-22 18:06:10
合計ジャッジ時間 3,973 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,752 KB
testcase_01 AC 16 ms
7,808 KB
testcase_02 AC 16 ms
7,868 KB
testcase_03 AC 15 ms
7,812 KB
testcase_04 AC 16 ms
7,748 KB
testcase_05 AC 16 ms
7,812 KB
testcase_06 AC 16 ms
7,752 KB
testcase_07 AC 16 ms
7,792 KB
testcase_08 AC 18 ms
8,688 KB
testcase_09 AC 111 ms
27,980 KB
testcase_10 AC 44 ms
14,136 KB
testcase_11 AC 35 ms
12,552 KB
testcase_12 AC 57 ms
16,944 KB
testcase_13 AC 121 ms
29,976 KB
testcase_14 AC 122 ms
29,816 KB
testcase_15 AC 122 ms
29,972 KB
testcase_16 AC 123 ms
29,820 KB
testcase_17 WA -
testcase_18 AC 108 ms
29,128 KB
testcase_19 WA -
testcase_20 AC 108 ms
29,312 KB
testcase_21 AC 112 ms
29,540 KB
testcase_22 AC 109 ms
28,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=[int(s) for s in input().split()]
B=[a-b for a,b in zip(A[::2],A[1::2])]
for i in range(N-1):    B[i+1]+=B[i]
print(max(B)*2-B[-1])
0