結果
| 問題 |
No.45 回転寿司
|
| ユーザー |
|
| 提出日時 | 2017-01-11 19:00:09 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 32 ms / 5,000 ms |
| コード長 | 184 bytes |
| コンパイル時間 | 198 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-12-27 15:45:10 |
| 合計ジャッジ時間 | 2,292 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 30 |
ソースコード
N = int(input())
V = list(map(int,input().split()))
p0 = 0
p1 = 0
q0 = 0
q1 = 0
for i in range(len(V)):
p1 = V[i] + q0
q1 = max(p0,q0)
p0 = p1
q0 = q1
print(max(p1,q1))