結果
| 問題 | No.45 回転寿司 |
| ユーザー |
|
| 提出日時 | 2017-12-17 10:52:24 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 264 bytes |
| 記録 | |
| コンパイル時間 | 369 ms |
| コンパイル使用メモリ | 20,956 KB |
| 実行使用メモリ | 20,744 KB |
| 最終ジャッジ日時 | 2026-05-25 19:34:04 |
| 合計ジャッジ時間 | 9,717 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 RE * 3 |
| other | RE * 30 |
ソースコード
n=int(input())
v=[int(i) for i in input().split()]
if 1<len(v):
for i in range(0,n):
d.append([])
d[0]=v[0]
d[1]=max(v[0],v[1])
for i in range(2,n):
d[i]=max(d[i-1],d[i-2]+v[i])
ans=d.pop()
print(ans)
else:
print(v[0])