結果
問題 |
No.1091 Range Xor Query
|
ユーザー |
|
提出日時 | 2023-09-02 08:44:30 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 384 ms / 2,000 ms |
コード長 | 372 bytes |
コンパイル時間 | 4,784 ms |
コンパイル使用メモリ | 309,248 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-11 15:37:44 |
合計ジャッジ時間 | 15,429 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 27 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; int op(int a, int b) { return a ^ b; } int e() { return 0; } int main() { int n, q; cin >> n >> q; segtree<int, op, e> seg(n); for (int i = 0; i < n; i++) { int a; cin >> a; seg.set(i, a); } int l, r; while (cin >> l >> r) cout << seg.prod(l - 1, r) << '\n'; }