結果

問題 No.411 昇順昇順ソート
コンテスト
ユーザー _KingdomOfMoray
提出日時 2020-01-11 23:21:59
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
TLE  
実行時間 -
コード長 593 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 59 ms
コンパイル使用メモリ 14,848 KB
実行使用メモリ 65,520 KB
最終ジャッジ日時 2026-09-30 06:50:04
合計ジャッジ時間 18,629 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 25 TLE * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import itertools

n, k = map(int,input().split())

num_list = list(range(1, n + 1))
split_list = []
res = 0

for i in range(1, n // 2 + 1):
    split_list.append([i, n - i])
    if i != n - i:
        split_list.append([n - i, i])

for i in range(len(split_list)):
    cur_list = list(itertools.combinations(num_list, split_list[i][0]))

    for j in range(len(cur_list)):
        one_list = cur_list[j]
        another_list = [e for e in num_list if e not in cur_list[j]]
        
        if one_list[0] == k and max(one_list) > min(another_list):
            res += 1
            
print(res)
0