結果

問題 No.1937 Various Tournament
ユーザー tailstails
提出日時 2022-05-13 22:24:09
言語 cLay
(20240104-1)
結果
AC  
実行時間 267 ms / 2,000 ms
コード長 391 bytes
コンパイル時間 2,082 ms
コンパイル使用メモリ 162,812 KB
実行使用メモリ 11,808 KB
最終ジャッジ日時 2023-09-29 07:51:04
合計ジャッジ時間 12,291 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 265 ms
11,596 KB
testcase_02 AC 265 ms
11,564 KB
testcase_03 AC 265 ms
11,548 KB
testcase_04 AC 265 ms
11,548 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 265 ms
11,532 KB
testcase_07 AC 265 ms
11,604 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 265 ms
11,620 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 265 ms
11,616 KB
testcase_12 AC 266 ms
11,748 KB
testcase_13 AC 264 ms
11,548 KB
testcase_14 AC 264 ms
11,624 KB
testcase_15 AC 267 ms
11,600 KB
testcase_16 AC 265 ms
11,548 KB
testcase_17 AC 264 ms
11,548 KB
testcase_18 AC 265 ms
11,600 KB
testcase_19 AC 266 ms
11,548 KB
testcase_20 AC 1 ms
4,380 KB
testcase_21 AC 1 ms
4,376 KB
testcase_22 AC 265 ms
11,752 KB
testcase_23 AC 265 ms
11,808 KB
testcase_24 AC 264 ms
11,664 KB
testcase_25 AC 2 ms
4,380 KB
testcase_26 AC 265 ms
11,564 KB
testcase_27 AC 1 ms
4,380 KB
testcase_28 AC 265 ms
11,548 KB
testcase_29 AC 1 ms
4,376 KB
testcase_30 AC 265 ms
11,620 KB
testcase_31 AC 265 ms
11,752 KB
testcase_32 AC 265 ms
11,548 KB
testcase_33 AC 265 ms
11,536 KB
testcase_34 AC 265 ms
11,548 KB
testcase_35 AC 265 ms
11,560 KB
testcase_36 AC 265 ms
11,600 KB
testcase_37 AC 1 ms
4,376 KB
testcase_38 AC 1 ms
4,380 KB
testcase_39 AC 266 ms
11,600 KB
testcase_40 AC 1 ms
4,376 KB
testcase_41 AC 2 ms
4,376 KB
testcase_42 AC 264 ms
11,748 KB
testcase_43 AC 2 ms
4,376 KB
testcase_44 AC 1 ms
4,380 KB
testcase_45 AC 265 ms
11,688 KB
testcase_46 AC 1 ms
4,376 KB
testcase_47 AC 2 ms
4,500 KB
testcase_48 AC 2 ms
4,376 KB
testcase_49 AC 2 ms
4,380 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