結果
問題 |
No.45 回転寿司
|
ユーザー |
![]() |
提出日時 | 2015-09-20 21:34:47 |
言語 | Python2 (2.7.18) |
結果 |
TLE
|
実行時間 | - |
コード長 | 271 bytes |
コンパイル時間 | 197 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 17,152 KB |
最終ジャッジ日時 | 2024-11-24 10:35:09 |
合計ジャッジ時間 | 175,564 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 2 TLE * 28 |
ソースコード
# -*- coding: utf-8 -*- N, = map(int, raw_input().split()) V = map(int, raw_input().split()) # 動的計画法 # i番目以降で一番高いポイントを返す def maxv(i): if i >= len(V): return 0 return max(V[i] + maxv(i + 2), maxv(i + 1)) print maxv(0)