結果
問題 |
No.999 てん vs. ほむ
|
ユーザー |
|
提出日時 | 2021-12-05 18:03:50 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 197 ms / 2,000 ms |
コード長 | 242 bytes |
コンパイル時間 | 201 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 32,508 KB |
最終ジャッジ日時 | 2024-07-07 08:25:03 |
合計ジャッジ時間 | 4,284 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
N = int(input()) A = list(map(int,input().split())) _max = 0 for i in range(N): _max += -A[i * 2] + A[i * 2 + 1] now = _max for i in range(0,N): now += 2 * A[i * 2] - 2 * A[i * 2 + 1] if now > _max: _max = now print(_max)