結果
| 問題 |
No.45 回転寿司
|
| ユーザー |
over110
|
| 提出日時 | 2019-12-26 18:49:40 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 292 bytes |
| コンパイル時間 | 151 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 11,264 KB |
| 最終ジャッジ日時 | 2024-10-04 17:37:26 |
| 合計ジャッジ時間 | 2,971 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 4 |
| other | RE * 30 |
ソースコード
N = int(input())
V = [int(i) for i in input().split()]
def sushi(ith, isSucce):
if ith == N:
return sushi(ith, True)
if isSucce:
return sushi(ith + 1, False)
else:
return max(sushi(ith + 1, True) + V[ith], sushi(ith + 1, False))
print(sushi(0, False))
over110