結果

問題 No.2171 OR Assignment
ユーザー tailstails
提出日時 2022-12-23 15:04:52
言語 cLay
(20231016-1)
結果
AC  
実行時間 3,191 ms / 3,500 ms
コード長 341 bytes
コンパイル時間 2,934 ms
コンパイル使用メモリ 181,948 KB
実行使用メモリ 4,624 KB
最終ジャッジ日時 2023-08-11 13:38:55
合計ジャッジ時間 36,962 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 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,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 105 ms
4,384 KB
testcase_13 AC 105 ms
4,380 KB
testcase_14 AC 105 ms
4,448 KB
testcase_15 AC 12 ms
4,376 KB
testcase_16 AC 20 ms
4,376 KB
testcase_17 AC 16 ms
4,388 KB
testcase_18 AC 893 ms
4,388 KB
testcase_19 AC 873 ms
4,376 KB
testcase_20 AC 1,948 ms
4,380 KB
testcase_21 AC 2,072 ms
4,376 KB
testcase_22 AC 2,651 ms
4,380 KB
testcase_23 AC 1,709 ms
4,396 KB
testcase_24 AC 3,182 ms
4,624 KB
testcase_25 AC 3,191 ms
4,380 KB
testcase_26 AC 3,057 ms
4,376 KB
testcase_27 AC 2,907 ms
4,376 KB
testcase_28 AC 2,914 ms
4,380 KB
testcase_29 AC 2,478 ms
4,580 KB
testcase_30 AC 1,623 ms
4,380 KB
testcase_31 AC 2,538 ms
4,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define MD 998244353
map<ll,Mint>m1;
m1[0]=1;
ll@n;
rep(n){
	map<ll,Mint>m2;
	m2.clear();
	ll@a;
	for(auto x:m1){
		ll b=a;
		m2[b]+=x.second;
		for(auto y:m1){
			if((x.first|y.first)!=x.first){
				break;
			}
			if((b|y.first)!=b){
				b|=y.first;
				m2[b]+=x.second;
			}
		}
	}
	m1=m2;
}
Mint z;
for(auto x:m1){
	z+=x.second;
}
wt(z);
0