結果
| 問題 |
No.45 回転寿司
|
| ユーザー |
NiER_Replicant6
|
| 提出日時 | 2017-12-27 00:00:36 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 277 bytes |
| コンパイル時間 | 198 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-12-18 00:40:20 |
| 合計ジャッジ時間 | 2,147 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 29 WA * 1 |
ソースコード
n=int(input())
m=list(map(int,input().split()))
list1=[0]*n
list1[0]=m[0]
if n>2:
list1[1]=max(list1[0],m[1])
for i in range(n-2):
list1[i+2]=max(list1[i]+m[i+2],list1[i+1])
print(max(list1))
elif n==1:
list1[0]=max(list1[0],m[0])
print(list1[0])
NiER_Replicant6