結果
| 問題 | No.999 てん vs. ほむ |
| コンテスト | |
| ユーザー |
maguchi_p_q
|
| 提出日時 | 2020-02-28 21:34:50 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 116 ms / 2,000 ms |
| + 890µs | |
| コード長 | 302 bytes |
| 記録 | |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 15,232 KB |
| 実行使用メモリ | 32,872 KB |
| 最終ジャッジ日時 | 2026-09-15 21:11:45 |
| 合計ジャッジ時間 | 3,629 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
from itertools import accumulate
N = int(input())
A = [int(zz) for zz in input().split()]
A = [A[2*i]-A[2*i+1] for i in range(N)]
li_left = [0] + list(accumulate(A))
li_right = list(accumulate(A[::-1]))[::-1] + [0]
ans = 0
for i in range(N+1):
ans = max(ans,li_left[i]-li_right[i])
print(ans)
maguchi_p_q