結果

問題 No.2733 Just K-times TSP
ユーザー tailstails
提出日時 2024-04-19 23:05:17
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 551 bytes
コンパイル時間 3,735 ms
コンパイル使用メモリ 188,908 KB
実行使用メモリ 223,904 KB
最終ジャッジ日時 2024-04-19 23:05:40
合計ジャッジ時間 16,354 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 2 ms
6,816 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 1 ms
6,944 KB
testcase_04 AC 1 ms
6,944 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 2 ms
6,944 KB
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 2 ms
6,944 KB
testcase_10 AC 1 ms
6,944 KB
testcase_11 AC 2 ms
6,940 KB
testcase_12 AC 2 ms
6,940 KB
testcase_13 AC 2 ms
6,940 KB
testcase_14 AC 3 ms
6,940 KB
testcase_15 WA -
testcase_16 AC 1 ms
6,944 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 2 ms
6,940 KB
testcase_21 AC 19 ms
6,940 KB
testcase_22 WA -
testcase_23 AC 76 ms
12,800 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 2 ms
6,944 KB
testcase_27 AC 4 ms
6,944 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 TLE -
testcase_33 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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