結果
| 問題 | No.45 回転寿司 |
| ユーザー |
tachyon777
|
| 提出日時 | 2020-02-13 13:38:38 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 190 bytes |
| 記録 | |
| コンパイル時間 | 464 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 65,152 KB |
| 最終ジャッジ日時 | 2026-04-21 05:00:43 |
| 合計ジャッジ時間 | 2,536 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 RE * 1 |
| other | AC * 29 WA * 1 |
ソースコード
n = int(input())
lst1 = list(map(int,input().split()))
dp = [0]*n
dp[0] = lst1[0]
dp[1] = max(lst1[0],lst1[1])
for i in range(1,n):
dp[i] = max(dp[i-1],dp[i-2]+lst1[i])
print(dp[-1])
tachyon777