結果

問題 No.999 てん vs. ほむ
ユーザー NoneNone
提出日時 2021-05-05 02:48:36
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 240 bytes
コンパイル時間 435 ms
コンパイル使用メモリ 86,968 KB
実行使用メモリ 112,716 KB
最終ジャッジ日時 2023-10-01 04:48:06
合計ジャッジ時間 4,482 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
71,348 KB
testcase_01 AC 86 ms
71,340 KB
testcase_02 AC 81 ms
71,164 KB
testcase_03 AC 81 ms
71,352 KB
testcase_04 AC 80 ms
71,388 KB
testcase_05 WA -
testcase_06 AC 76 ms
70,968 KB
testcase_07 AC 78 ms
71,240 KB
testcase_08 AC 86 ms
76,408 KB
testcase_09 AC 145 ms
108,448 KB
testcase_10 AC 98 ms
85,436 KB
testcase_11 AC 93 ms
81,188 KB
testcase_12 AC 104 ms
91,376 KB
testcase_13 AC 150 ms
112,524 KB
testcase_14 AC 151 ms
112,648 KB
testcase_15 AC 152 ms
112,716 KB
testcase_16 AC 150 ms
112,620 KB
testcase_17 AC 127 ms
103,440 KB
testcase_18 WA -
testcase_19 AC 127 ms
103,584 KB
testcase_20 WA -
testcase_21 AC 148 ms
112,288 KB
testcase_22 AC 146 ms
112,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int, input().split()))
B=[0]
C=[0]
for i in range(N):
    B.append(A[2*i]-A[2*i+1]+B[-1])
    C.append(A[2*N-1-2*i]-A[2*N-1-(2*i+1)]+C[-1])
C.reverse()
res=0
for i in range(N):
    res=max(B[i]+C[i],res)
print(res)
0