結果

問題 No.2733 Just K-times TSP
ユーザー tailstails
提出日時 2024-04-19 23:05:47
言語 cLay
(20240104-1)
結果
TLE  
実行時間 -
コード長 572 bytes
コンパイル時間 3,066 ms
コンパイル使用メモリ 187,692 KB
実行使用メモリ 212,252 KB
最終ジャッジ日時 2024-04-19 23:06:07
合計ジャッジ時間 15,451 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
13,756 KB
testcase_01 AC 1 ms
6,944 KB
testcase_02 AC 1 ms
6,944 KB
testcase_03 AC 1 ms
6,944 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 1 ms
6,944 KB
testcase_07 AC 1 ms
6,940 KB
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 1 ms
6,944 KB
testcase_10 AC 1 ms
6,944 KB
testcase_11 AC 1 ms
6,940 KB
testcase_12 AC 1 ms
6,944 KB
testcase_13 AC 1 ms
6,940 KB
testcase_14 AC 3 ms
6,940 KB
testcase_15 AC 15 ms
6,944 KB
testcase_16 AC 2 ms
6,940 KB
testcase_17 AC 71 ms
13,952 KB
testcase_18 AC 136 ms
20,736 KB
testcase_19 AC 297 ms
30,848 KB
testcase_20 AC 1 ms
6,944 KB
testcase_21 AC 18 ms
6,940 KB
testcase_22 AC 1,042 ms
111,104 KB
testcase_23 AC 74 ms
12,672 KB
testcase_24 AC 1,547 ms
120,320 KB
testcase_25 AC 1,431 ms
112,256 KB
testcase_26 AC 2 ms
6,940 KB
testcase_27 AC 3 ms
6,940 KB
testcase_28 AC 17 ms
6,940 KB
testcase_29 AC 77 ms
11,520 KB
testcase_30 AC 291 ms
28,544 KB
testcase_31 AC 908 ms
68,736 KB
testcase_32 TLE -
testcase_33 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#define MD 998244353
char e[7][6];
Mint f(ll p,ll a0,ll a1,ll a2,ll a3,ll a4,ll a5 :Memoize){
	if(a0+a1+a2+a3+a4+a5==0)return 1;
	Mint z;
	if(a0&&e[p][0])z+=f(0,a0-1,a1,a2,a3,a4,a5);
	if(a1&&e[p][1])z+=f(1,a0,a1-1,a2,a3,a4,a5);
	if(a2&&e[p][2])z+=f(2,a0,a1,a2-1,a3,a4,a5);
	if(a3&&e[p][3])z+=f(3,a0,a1,a2,a3-1,a4,a5);
	if(a4&&e[p][4])z+=f(4,a0,a1,a2,a3,a4-1,a5);
	if(a5&&e[p][5])z+=f(5,a0,a1,a2,a3,a4,a5-1);
	return z;
}
{
	ll@n,@m,@k;
	rep(m){
		ll@u--,@v--;
		e[u][v]=e[v][u]=1;
	}
	rep(i,n){
		e[6][i]=1;
	}
	wt(f(6,n<1?0:k,n<2?0:k,n<3?0:k,n<4?0:k,n<5?0:k,n<6?0:k));
}
0