結果

問題 No.2445 奇行列式
ユーザー tailstails
提出日時 2023-08-25 22:44:27
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 286 bytes
コンパイル時間 2,387 ms
コンパイル使用メモリ 173,780 KB
実行使用メモリ 11,812 KB
最終ジャッジ日時 2023-08-25 22:44:33
合計ジャッジ時間 5,145 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,@b;
modint().setmod(b);
modint@a[n][n],d[1<<n][2];
d[0][0]=1;
d[0][1]=0;
rep(i,1<<n){
	ll c=__builtin_popcount(i);
	rep(j,n){
		if(!(i&1<<j)){
			ll p=__builtin_parity(i&-(1<<j));
			d[i|1<<j][0^p]+=d[i][0]*a[c][j];
			d[i|1<<j][1^p]+=d[i][1]*a[c][j];
		}
	}
}
wt(d[(1<<n)-1][1]);
0