結果

問題 No.875 Range Mindex Query
ユーザー tailstails
提出日時 2019-09-06 22:33:30
言語 cLay
(20231016-1)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 272 bytes
コンパイル時間 4,072 ms
コンパイル使用メモリ 185,824 KB
実行使用メモリ 15,396 KB
最終ジャッジ日時 2023-09-19 00:26:01
合計ジャッジ時間 7,496 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,432 KB
testcase_01 AC 2 ms
5,388 KB
testcase_02 AC 2 ms
5,340 KB
testcase_03 AC 2 ms
5,316 KB
testcase_04 AC 2 ms
5,460 KB
testcase_05 AC 2 ms
5,452 KB
testcase_06 AC 3 ms
5,368 KB
testcase_07 AC 2 ms
5,548 KB
testcase_08 AC 2 ms
5,424 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,488 KB
testcase_11 AC 85 ms
14,960 KB
testcase_12 AC 62 ms
10,660 KB
testcase_13 AC 57 ms
14,968 KB
testcase_14 AC 57 ms
14,928 KB
testcase_15 AC 78 ms
15,088 KB
testcase_16 AC 48 ms
15,344 KB
testcase_17 AC 52 ms
15,396 KB
testcase_18 AC 49 ms
15,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

segtree<ll> t;
ll n,q,a[1d5];
ll b,l,r,vl,vr;
{
	rd(n,q,a(n));
	t.walloc(n,1);
	t[0..n-1]=a[0..];
	t.build();
	rep(q){
		rd(b,l,r);
		--l; --r;
		if(b==1){
			vl=t[l];
			vr=t[r];
			t.change(l,l+1,vr);
			t.change(r,r+1,vl);
		}else{
			wt(1+t.getMinInd(l,r+1));
		}
	}
}
0