結果
| 問題 | No.45 回転寿司 |
| ユーザー |
amtgjw
|
| 提出日時 | 2018-05-02 22:29:04 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 298 bytes |
| 記録 | |
| コンパイル時間 | 1,096 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 36,156 KB |
| 最終ジャッジ日時 | 2026-03-16 07:52:34 |
| 合計ジャッジ時間 | 171,595 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 2 RE * 1 TLE * 27 |
ソースコード
# coding : utf-8 #import numpy as np N = int(input()) K = [int(i) for i in input().split()] #DP = [[0 for i in range(N)] for j in range(N)] def bfs(lt,cost): if lt == N: return cost + K[lt-1] if lt > N: return cost return max(bfs(lt+1,cost),bfs(lt+2,cost+K[lt-1])) print(bfs(1,0))
amtgjw