結果
| 問題 |
No.999 てん vs. ほむ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-07 03:45:19 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 226 bytes |
| コンパイル時間 | 87 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 32,648 KB |
| 最終ジャッジ日時 | 2024-10-14 11:08:34 |
| 合計ジャッジ時間 | 2,934 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 2 |
ソースコード
from itertools import accumulate N = int(input()) A = list(map(int, input().split())) ae = list(accumulate(A[0::2])) ao = list(accumulate(A[1::2])) ans = ao[-1] - ae[-1] + 2 * max(ae[i] - ao[i] for i in range(N)) print(ans)