結果
| 問題 |
No.999 てん vs. ほむ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-02-13 18:52:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 292 bytes |
| コンパイル時間 | 161 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 33,388 KB |
| 最終ジャッジ日時 | 2024-06-29 05:45:06 |
| 合計ジャッジ時間 | 4,229 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 3 |
ソースコード
N = int(input()) A = list(map(int,input().split())) from itertools import accumulate L = list(accumulate([A[i] - A[i+1] for i in range(0,2*N,2) ], initial = 0)) R = list(accumulate([A[-1-i] - A[-2-i] for i in range(0,2*N,2)], initial = 0)) ans = max(L[i]+R[-1-i] for i in range(N)) print(ans)