結果

問題 No.999 てん vs. ほむ
ユーザー _matumo__matumo_
提出日時 2020-07-19 23:37:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 151 bytes
コンパイル時間 109 ms
コンパイル使用メモリ 10,724 KB
実行使用メモリ 29,996 KB
最終ジャッジ日時 2023-08-22 17:58:42
合計ジャッジ時間 2,749 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,856 KB
testcase_01 AC 15 ms
7,936 KB
testcase_02 AC 14 ms
7,852 KB
testcase_03 AC 14 ms
7,896 KB
testcase_04 AC 14 ms
7,856 KB
testcase_05 AC 14 ms
7,852 KB
testcase_06 AC 14 ms
7,856 KB
testcase_07 AC 14 ms
7,916 KB
testcase_08 AC 17 ms
8,708 KB
testcase_09 AC 106 ms
28,056 KB
testcase_10 AC 40 ms
14,040 KB
testcase_11 AC 31 ms
12,536 KB
testcase_12 AC 52 ms
17,172 KB
testcase_13 AC 109 ms
29,948 KB
testcase_14 AC 110 ms
29,964 KB
testcase_15 AC 110 ms
29,912 KB
testcase_16 AC 110 ms
29,996 KB
testcase_17 WA -
testcase_18 AC 96 ms
29,160 KB
testcase_19 WA -
testcase_20 AC 100 ms
29,500 KB
testcase_21 AC 102 ms
29,576 KB
testcase_22 AC 98 ms
28,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
B=list([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