結果
| 問題 | No.45 回転寿司 |
| ユーザー |
|
| 提出日時 | 2022-11-04 14:08:40 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 5,000 ms |
| コード長 | 263 bytes |
| 記録 | |
| コンパイル時間 | 281 ms |
| コンパイル使用メモリ | 85,480 KB |
| 実行使用メモリ | 143,872 KB |
| 最終ジャッジ日時 | 2026-04-02 07:04:41 |
| 合計ジャッジ時間 | 2,854 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 30 |
ソースコード
#int(input())
#map(int, input().split())
#list(map(int, input().split()))
N = int(input())
V = list(map(int, input().split()))
dp = [0, 0]
for i in range(N):
ndp = [0, 0]
ndp[0] = max(dp)
ndp[1] = dp[0] + V[i]
dp = list(ndp)
print(max(dp))