結果
| 問題 | No.45 回転寿司 |
| ユーザー |
tachyon777
|
| 提出日時 | 2020-02-13 13:38:38 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 190 bytes |
| 記録 | |
| コンパイル時間 | 74 ms |
| コンパイル使用メモリ | 80,768 KB |
| 実行使用メモリ | 72,192 KB |
| 最終ジャッジ日時 | 2026-09-10 18:33:22 |
| 合計ジャッジ時間 | 2,855 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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