結果
問題 |
No.1091 Range Xor Query
|
ユーザー |
|
提出日時 | 2020-07-05 13:23:31 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 422 ms / 2,000 ms |
コード長 | 317 bytes |
コンパイル時間 | 603 ms |
コンパイル使用メモリ | 65,288 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 09:32:42 |
合計ジャッジ時間 | 11,265 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 27 |
ソースコード
#include<iostream> using namespace std; int main(){ int n, q; cin >> n >> q; int a[n+1]; a[0] = 0; for(int i = 1; i <= n; i++){ cin >> a[i]; a[i] ^= a[i-1]; } while(q--){ int l, r; cin >> l >> r; cout << (a[r]^a[l-1]) << endl; } return 0; }