結果

問題 No.411 昇順昇順ソート
ユーザー matriematrie
提出日時 2021-01-19 20:53:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 164 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 10,652 KB
実行使用メモリ 12,664 KB
最終ジャッジ日時 2023-08-22 17:09:58
合計ジャッジ時間 5,438 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
12,664 KB
testcase_01 AC 18 ms
8,084 KB
testcase_02 AC 17 ms
8,176 KB
testcase_03 AC 18 ms
8,136 KB
testcase_04 AC 17 ms
8,048 KB
testcase_05 AC 18 ms
8,148 KB
testcase_06 AC 18 ms
8,196 KB
testcase_07 AC 17 ms
8,184 KB
testcase_08 AC 18 ms
8,160 KB
testcase_09 AC 18 ms
8,064 KB
testcase_10 AC 18 ms
7,988 KB
testcase_11 AC 18 ms
8,032 KB
testcase_12 AC 18 ms
8,068 KB
testcase_13 AC 18 ms
8,036 KB
testcase_14 AC 17 ms
8,060 KB
testcase_15 AC 17 ms
8,080 KB
testcase_16 AC 17 ms
8,060 KB
testcase_17 AC 18 ms
8,180 KB
testcase_18 AC 17 ms
8,148 KB
testcase_19 AC 18 ms
8,016 KB
testcase_20 AC 16 ms
8,032 KB
testcase_21 AC 16 ms
7,992 KB
testcase_22 AC 15 ms
8,036 KB
testcase_23 AC 16 ms
8,108 KB
testcase_24 AC 16 ms
8,120 KB
testcase_25 AC 16 ms
8,084 KB
testcase_26 AC 16 ms
8,176 KB
testcase_27 TLE -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import*
n,k=map(int,input().split())
c=0
for P in permutations(range(1,n+1)):
	if P[0]!=k:continue
	c+=sum([i>j for i,j in zip(P,P[1:])])==1
print(c)
0