結果

問題 No.999 てん vs. ほむ
ユーザー _matumo__matumo_
提出日時 2020-07-19 16:16:24
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 145 bytes
コンパイル時間 545 ms
コンパイル使用メモリ 10,672 KB
実行使用メモリ 30,008 KB
最終ジャッジ日時 2023-08-22 10:02:34
合計ジャッジ時間 4,764 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,784 KB
testcase_01 AC 16 ms
7,820 KB
testcase_02 AC 15 ms
7,744 KB
testcase_03 AC 15 ms
7,812 KB
testcase_04 AC 15 ms
7,832 KB
testcase_05 AC 15 ms
7,844 KB
testcase_06 AC 15 ms
7,808 KB
testcase_07 AC 16 ms
7,872 KB
testcase_08 AC 19 ms
8,808 KB
testcase_09 AC 107 ms
28,064 KB
testcase_10 AC 42 ms
14,012 KB
testcase_11 AC 33 ms
12,616 KB
testcase_12 AC 55 ms
17,048 KB
testcase_13 AC 115 ms
29,852 KB
testcase_14 AC 116 ms
29,936 KB
testcase_15 AC 115 ms
30,008 KB
testcase_16 AC 116 ms
30,004 KB
testcase_17 WA -
testcase_18 AC 103 ms
29,224 KB
testcase_19 WA -
testcase_20 AC 105 ms
29,452 KB
testcase_21 AC 108 ms
29,596 KB
testcase_22 AC 104 ms
29,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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