結果
| 問題 |
No.45 回転寿司
|
| ユーザー |
NiER_Replicant6
|
| 提出日時 | 2017-12-26 23:54:42 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 281 bytes |
| コンパイル時間 | 96 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-18 00:40:15 |
| 合計ジャッジ時間 | 2,532 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 RE * 1 |
| other | AC * 1 WA * 29 |
ソースコード
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[1]=max(list1[0],m[1])
print(list1[1])
NiER_Replicant6