結果

問題 No.1091 Range Xor Query
ユーザー SeiyaTSeiyaT
提出日時 2021-09-10 12:15:15
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 423 ms / 2,000 ms
コード長 438 bytes
コンパイル時間 3,912 ms
コンパイル使用メモリ 227,700 KB
実行使用メモリ 6,116 KB
最終ジャッジ日時 2023-08-30 23:12:14
合計ジャッジ時間 16,835 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 59 ms
4,632 KB
testcase_04 AC 253 ms
4,380 KB
testcase_05 AC 268 ms
6,048 KB
testcase_06 AC 11 ms
4,380 KB
testcase_07 AC 280 ms
4,396 KB
testcase_08 AC 388 ms
4,724 KB
testcase_09 AC 194 ms
4,380 KB
testcase_10 AC 271 ms
5,720 KB
testcase_11 AC 355 ms
5,732 KB
testcase_12 AC 204 ms
6,108 KB
testcase_13 AC 423 ms
4,400 KB
testcase_14 AC 298 ms
5,740 KB
testcase_15 AC 323 ms
5,740 KB
testcase_16 AC 320 ms
4,376 KB
testcase_17 AC 420 ms
5,840 KB
testcase_18 AC 65 ms
4,380 KB
testcase_19 AC 79 ms
4,740 KB
testcase_20 AC 402 ms
4,464 KB
testcase_21 AC 194 ms
4,380 KB
testcase_22 AC 379 ms
5,780 KB
testcase_23 AC 413 ms
6,100 KB
testcase_24 AC 409 ms
6,116 KB
testcase_25 AC 407 ms
5,932 KB
testcase_26 AC 400 ms
5,936 KB
testcase_27 AC 411 ms
5,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include<atcoder/all>
using namespace std;
using namespace atcoder;

using ll=long long;
ll mod=1000000007;
ll INF=1LL<<60;

int op(int a, int b) {
    return a^b;
}

int e() {
    return 0;
}

int main() {
	int N,Q;
	cin >> N >> Q;
	vector<int> A(N);
	for(int i=0;i<N;i++){
		cin >> A[i];
	}
	segtree<int, op, e> seg(A);
	for(int i=0;i<Q;i++){
		int L,R;
		cin >> L >> R;
		cout << seg.prod(L-1,R) << endl;
	}
}
0