結果

問題 No.45 回転寿司
ユーザー cm-arai
提出日時 2020-11-26 14:37:09
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
OLE  
実行時間 -
コード長 367 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 306 ms
コンパイル使用メモリ 21,540 KB
実行使用メモリ 7,852 KB
最終ジャッジ日時 2026-08-24 08:05:45
合計ジャッジ時間 13,397 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 4
other OLE * 1 -- * 29
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(input())
V = list(map(int, input().split()))

result = V[0]

def get_best_combination(v, v_list):
    print(v, v_list)
    for i in range(len(v_list)):
        tmp_result = get_best_combination(v+v_list[i],v_list[i+2:])
        global result
        if tmp_result > result:
            result = tmp_result
    return v

get_best_combination(0,V)
print(result)
0