結果

問題 No.411 昇順昇順ソート
ユーザー _KingdomOfMoray_KingdomOfMoray
提出日時 2020-01-11 23:21:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 593 bytes
コンパイル時間 117 ms
コンパイル使用メモリ 10,900 KB
実行使用メモリ 56,524 KB
最終ジャッジ日時 2023-08-17 12:17:31
合計ジャッジ時間 5,153 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
12,628 KB
testcase_01 AC 17 ms
8,148 KB
testcase_02 AC 16 ms
8,180 KB
testcase_03 AC 16 ms
8,144 KB
testcase_04 AC 16 ms
8,224 KB
testcase_05 AC 16 ms
8,148 KB
testcase_06 AC 16 ms
8,228 KB
testcase_07 AC 16 ms
8,216 KB
testcase_08 AC 16 ms
8,312 KB
testcase_09 AC 16 ms
8,308 KB
testcase_10 AC 16 ms
8,256 KB
testcase_11 AC 16 ms
8,104 KB
testcase_12 AC 16 ms
8,132 KB
testcase_13 AC 16 ms
8,180 KB
testcase_14 AC 16 ms
8,212 KB
testcase_15 AC 16 ms
8,100 KB
testcase_16 AC 16 ms
8,172 KB
testcase_17 AC 16 ms
8,268 KB
testcase_18 AC 16 ms
8,148 KB
testcase_19 AC 16 ms
8,168 KB
testcase_20 AC 16 ms
8,180 KB
testcase_21 AC 16 ms
8,120 KB
testcase_22 AC 16 ms
8,280 KB
testcase_23 AC 16 ms
8,172 KB
testcase_24 AC 16 ms
8,100 KB
testcase_25 AC 16 ms
8,160 KB
testcase_26 AC 16 ms
8,124 KB
testcase_27 AC 61 ms
9,856 KB
testcase_28 TLE -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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