結果

問題 No.2171 OR Assignment
ユーザー tailstails
提出日時 2022-12-23 15:04:52
言語 cLay
(20240104-1)
結果
AC  
実行時間 2,385 ms / 3,500 ms
コード長 341 bytes
コンパイル時間 2,397 ms
コンパイル使用メモリ 184,964 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-29 06:00:37
合計ジャッジ時間 28,352 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 91 ms
5,376 KB
testcase_13 AC 95 ms
5,376 KB
testcase_14 AC 103 ms
5,376 KB
testcase_15 AC 12 ms
5,376 KB
testcase_16 AC 19 ms
5,376 KB
testcase_17 AC 14 ms
5,376 KB
testcase_18 AC 762 ms
5,376 KB
testcase_19 AC 727 ms
5,376 KB
testcase_20 AC 1,631 ms
5,376 KB
testcase_21 AC 1,659 ms
5,376 KB
testcase_22 AC 2,048 ms
5,376 KB
testcase_23 AC 1,276 ms
5,376 KB
testcase_24 AC 2,372 ms
5,376 KB
testcase_25 AC 2,385 ms
5,376 KB
testcase_26 AC 2,260 ms
5,376 KB
testcase_27 AC 2,133 ms
5,376 KB
testcase_28 AC 2,152 ms
5,376 KB
testcase_29 AC 1,809 ms
5,376 KB
testcase_30 AC 1,260 ms
5,376 KB
testcase_31 AC 1,942 ms
5,376 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