結果

問題 No.2195 AND Set
ユーザー tailstails
提出日時 2023-01-20 23:23:52
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 398 bytes
コンパイル時間 2,514 ms
コンパイル使用メモリ 161,112 KB
実行使用メモリ 133,684 KB
最終ジャッジ日時 2023-09-05 15:53:01
合計ジャッジ時間 5,184 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 22 ms
8,704 KB
testcase_03 AC 20 ms
6,724 KB
testcase_04 AC 16 ms
5,336 KB
testcase_05 AC 21 ms
6,864 KB
testcase_06 AC 20 ms
6,708 KB
testcase_07 AC 17 ms
4,888 KB
testcase_08 WA -
testcase_09 AC 17 ms
4,888 KB
testcase_10 WA -
testcase_11 AC 192 ms
133,020 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

ull s[1<<24];
ll@q,a[30]{},n=0;
rep(q){
	ll@t;
	if(t==1){
		ull@x;
		if(!(s[x>>6]&1ull<<x)){
			s[x>>6]|=1ull<<x;
			rep(i,30){
				a[i]+=!(x&1);
				x>>=1;
			}
			++n;
		}
	}
	if(t==2){
		ull@x;
		if(s[x>>6]&1ull<<x){
			s[x>>6]^=1ull<<x;
			rep(i,30){
				a[i]-=!(x&1);
				x>>=1;
			}
			--n;
		}
	}
	if(t==3){
		ll z=-1;
		if(n){
			z=0;
			rrep(i,30){
				z=z*2+!a[i];
			}
		}
		wt(z);
	}
}
0