結果

問題 No.1091 Range Xor Query
ユーザー kotatsugamekotatsugame
提出日時 2020-06-24 07:09:09
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 404 ms / 2,000 ms
コード長 251 bytes
コンパイル時間 419 ms
コンパイル使用メモリ 63,400 KB
実行使用メモリ 4,452 KB
最終ジャッジ日時 2023-09-16 20:47:15
合計ジャッジ時間 10,024 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 53 ms
4,376 KB
testcase_04 AC 235 ms
4,380 KB
testcase_05 AC 243 ms
4,376 KB
testcase_06 AC 10 ms
4,376 KB
testcase_07 AC 247 ms
4,376 KB
testcase_08 AC 368 ms
4,376 KB
testcase_09 AC 178 ms
4,376 KB
testcase_10 AC 249 ms
4,376 KB
testcase_11 AC 315 ms
4,380 KB
testcase_12 AC 188 ms
4,376 KB
testcase_13 AC 361 ms
4,376 KB
testcase_14 AC 258 ms
4,380 KB
testcase_15 AC 282 ms
4,380 KB
testcase_16 AC 272 ms
4,380 KB
testcase_17 AC 378 ms
4,376 KB
testcase_18 AC 59 ms
4,380 KB
testcase_19 AC 74 ms
4,376 KB
testcase_20 AC 377 ms
4,376 KB
testcase_21 AC 180 ms
4,380 KB
testcase_22 AC 355 ms
4,376 KB
testcase_23 AC 398 ms
4,380 KB
testcase_24 AC 393 ms
4,452 KB
testcase_25 AC 404 ms
4,380 KB
testcase_26 AC 392 ms
4,380 KB
testcase_27 AC 398 ms
4,384 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:4:1: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type]
    4 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
using namespace std;
int N,Q,A[2<<17];
main()
{
    cin>>N>>Q;
    for(int i=1;i<=N;i++)
    {
        cin>>A[i];
        A[i]^=A[i-1];
    }
    for(;Q--;)
    {
        int l,r;cin>>l>>r;
        cout<<(A[r]^A[l-1])<<endl;
    }
}
0