結果

問題 No.1937 Various Tournament
ユーザー tailstails
提出日時 2022-05-13 22:24:09
言語 cLay
(20220312-1)
結果
AC  
実行時間 267 ms / 2,000 ms
コード長 391 bytes
コンパイル時間 1,797 ms
使用メモリ 11,720 KB
最終ジャッジ日時 2023-02-21 15:19:38
合計ジャッジ時間 11,903 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 2 ms
6,176 KB
testcase_01 AC 267 ms
11,648 KB
testcase_02 AC 265 ms
11,672 KB
testcase_03 AC 266 ms
11,564 KB
testcase_04 AC 265 ms
11,568 KB
testcase_05 AC 1 ms
6,176 KB
testcase_06 AC 265 ms
11,632 KB
testcase_07 AC 266 ms
11,568 KB
testcase_08 AC 2 ms
6,204 KB
testcase_09 AC 265 ms
11,564 KB
testcase_10 AC 1 ms
6,172 KB
testcase_11 AC 265 ms
11,560 KB
testcase_12 AC 266 ms
11,568 KB
testcase_13 AC 266 ms
11,568 KB
testcase_14 AC 266 ms
11,612 KB
testcase_15 AC 267 ms
11,576 KB
testcase_16 AC 266 ms
11,632 KB
testcase_17 AC 266 ms
11,640 KB
testcase_18 AC 266 ms
11,616 KB
testcase_19 AC 266 ms
11,636 KB
testcase_20 AC 1 ms
6,252 KB
testcase_21 AC 2 ms
6,248 KB
testcase_22 AC 266 ms
11,572 KB
testcase_23 AC 266 ms
11,568 KB
testcase_24 AC 266 ms
11,612 KB
testcase_25 AC 1 ms
6,192 KB
testcase_26 AC 267 ms
11,676 KB
testcase_27 AC 2 ms
6,268 KB
testcase_28 AC 265 ms
11,600 KB
testcase_29 AC 2 ms
6,316 KB
testcase_30 AC 265 ms
11,720 KB
testcase_31 AC 266 ms
11,636 KB
testcase_32 AC 266 ms
11,672 KB
testcase_33 AC 266 ms
11,616 KB
testcase_34 AC 265 ms
11,568 KB
testcase_35 AC 267 ms
11,564 KB
testcase_36 AC 265 ms
11,628 KB
testcase_37 AC 1 ms
6,200 KB
testcase_38 AC 1 ms
6,280 KB
testcase_39 AC 265 ms
11,700 KB
testcase_40 AC 2 ms
6,256 KB
testcase_41 AC 1 ms
6,196 KB
testcase_42 AC 266 ms
11,616 KB
testcase_43 AC 2 ms
6,280 KB
testcase_44 AC 1 ms
6,248 KB
testcase_45 AC 267 ms
11,600 KB
testcase_46 AC 1 ms
6,264 KB
testcase_47 AC 2 ms
6,284 KB
testcase_48 AC 1 ms
6,188 KB
testcase_49 AC 2 ms
6,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,@s[n][n];
ll d[1<<n][n]{};

rep(i,n) d[1<<i][i]=1;

rep(j,2,1<<n){
	ll c=__builtin_popcount(j);
	if(c==2||c==4||c==8||c==16){
		for(ll k=j;k=k-1&j;){
			if(__builtin_popcount(k)*2==c){
				ll l=j^k;
				rep(m,n){
					if(k&1<<m){
						rep(o,n){
							if(l&1<<o){
								d[j][s[m][o]?m:o]+=d[k][m]*d[l][o];
							}
						}
					}
				}
			}
		}
	}
}

rep(m,n){
	wt(d[(1<<n)-1][m]);
}
0