結果

問題 No.875 Range Mindex Query
ユーザー tailstails
提出日時 2019-09-06 22:34:55
言語 cLay
(20240104-1)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 275 bytes
コンパイル時間 3,654 ms
コンパイル使用メモリ 182,896 KB
実行使用メモリ 15,648 KB
最終ジャッジ日時 2023-09-19 00:26:07
合計ジャッジ時間 5,515 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,464 KB
testcase_01 AC 2 ms
5,600 KB
testcase_02 AC 2 ms
5,360 KB
testcase_03 AC 2 ms
5,484 KB
testcase_04 AC 2 ms
5,360 KB
testcase_05 AC 2 ms
5,516 KB
testcase_06 AC 2 ms
5,392 KB
testcase_07 AC 2 ms
5,400 KB
testcase_08 AC 2 ms
5,380 KB
testcase_09 AC 2 ms
5,380 KB
testcase_10 AC 2 ms
5,464 KB
testcase_11 AC 71 ms
15,008 KB
testcase_12 AC 57 ms
10,776 KB
testcase_13 AC 50 ms
15,108 KB
testcase_14 AC 49 ms
14,964 KB
testcase_15 AC 68 ms
15,112 KB
testcase_16 AC 43 ms
15,560 KB
testcase_17 AC 46 ms
15,404 KB
testcase_18 AC 44 ms
15,648 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(1ll+t.getMinInd(l,r+1));
		}
	}
}
0