結果
| 問題 |
No.45 回転寿司
|
| ユーザー |
|
| 提出日時 | 2023-12-12 23:43:36 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 153 bytes |
| コンパイル時間 | 192 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-09-27 05:05:49 |
| 合計ジャッジ時間 | 2,417 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 RE * 1 |
| other | AC * 2 WA * 28 |
ソースコード
N=int(input())
V=list(map(int,input().split()))
A=[0 for i in range(N+1)]
A[1]=V[1]
for i in range(2,N+1):
A[i]=max(A[i-1],A[i-2]+V[i-1])
print(A[N])