結果
| 問題 |
No.45 回転寿司
|
| ユーザー |
|
| 提出日時 | 2022-06-15 15:00:17 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 303 bytes |
| コンパイル時間 | 84 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 44,704 KB |
| 最終ジャッジ日時 | 2024-10-04 05:23:40 |
| 合計ジャッジ時間 | 19,331 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | WA * 30 |
ソースコード
import sys
import numpy as np
lines = []
for l in sys.stdin:
lines.append(l.rstrip('\r\n'))
N = int(lines[0])
V = np.array([0]+[int(i) for i in lines[0].split(" ")]+[0,0])
V_MAX = np.zeros_like(V)
for i in range(V.shape[0]-4,-1,-1):
V_MAX[i] = V[i]+max(V_MAX[i+2],V_MAX[i+3])
print(V_MAX[0])