結果
| 問題 |
No.45 回転寿司
|
| ユーザー |
tomiyance
|
| 提出日時 | 2019-11-19 21:13:57 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 335 bytes |
| コンパイル時間 | 108 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 824,740 KB |
| 最終ジャッジ日時 | 2024-10-04 08:14:03 |
| 合計ジャッジ時間 | 12,721 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | MLE * 1 -- * 29 |
ソースコード
from collections import deque
N = int(input())
V = list(map(int,input().split()))
pq = deque()
pq.append([0,V[0]])
if N > 1:
pq.append([1,V[1]])
max = V[0]
while len(pq):
n = pq.popleft()
for i in range(n[0]+2,N):
c = n[1] + V[i]
if i + 2 < N:
pq.append([i,c])
else:
if max < c:
max = c
print(max)
tomiyance