結果

問題 No.833 かっこいい電車
ユーザー tails
提出日時 2021-12-15 15:06:44
言語 cLay
(20241019-1)
結果
AC  
実行時間 55 ms / 2,000 ms
コード長 239 bytes
コンパイル時間 4,223 ms
コンパイル使用メモリ 180,396 KB
実行使用メモリ 11,076 KB
最終ジャッジ日時 2024-07-23 19:56:16
合計ジャッジ時間 7,141 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

set<ll>s;
fenwick<ll>f;
ll@n,@q;
s.insert(0..n+1);
f.walloc(n+1,1);
f.add((1..n),rd_int());
REP(q){
	ll@q,@x;
	if(q==1) s.erase(x);
	if(q==2) s.insert(x);
	if(q==3) f.add(x,1);
	if(q==4) {auto t=s.lower_bound(x);wt(f.range(*--t+1,*t));}
}
0