結果

問題 No.833 かっこいい電車
ユーザー tailstails
提出日時 2021-12-15 15:06:44
言語 cLay
(20231016-1)
結果
AC  
実行時間 57 ms / 2,000 ms
コード長 239 bytes
コンパイル時間 4,474 ms
コンパイル使用メモリ 178,364 KB
実行使用メモリ 9,704 KB
最終ジャッジ日時 2023-10-01 02:27:43
合計ジャッジ時間 8,592 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
7,608 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 39 ms
7,692 KB
testcase_11 AC 57 ms
9,228 KB
testcase_12 AC 16 ms
5,704 KB
testcase_13 AC 9 ms
4,460 KB
testcase_14 AC 48 ms
9,212 KB
testcase_15 AC 22 ms
6,648 KB
testcase_16 AC 22 ms
7,500 KB
testcase_17 AC 9 ms
4,380 KB
testcase_18 AC 46 ms
7,768 KB
testcase_19 AC 20 ms
7,068 KB
testcase_20 AC 6 ms
4,756 KB
testcase_21 AC 29 ms
6,088 KB
testcase_22 AC 36 ms
9,400 KB
testcase_23 AC 24 ms
7,548 KB
testcase_24 AC 37 ms
9,136 KB
testcase_25 AC 43 ms
7,304 KB
testcase_26 AC 25 ms
7,740 KB
testcase_27 AC 32 ms
7,428 KB
testcase_28 AC 19 ms
5,448 KB
testcase_29 AC 26 ms
6,528 KB
testcase_30 AC 39 ms
9,704 KB
testcase_31 AC 20 ms
7,452 KB
権限があれば一括ダウンロードができます

ソースコード

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