結果

問題 No.1091 Range Xor Query
ユーザー tonnnura172tonnnura172
提出日時 2020-06-24 03:50:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 461 ms / 2,000 ms
コード長 935 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 10,808 KB
実行使用メモリ 38,804 KB
最終ジャッジ日時 2023-09-16 20:40:42
合計ジャッジ時間 10,408 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
9,536 KB
testcase_01 AC 32 ms
9,576 KB
testcase_02 AC 32 ms
9,584 KB
testcase_03 AC 105 ms
23,516 KB
testcase_04 AC 246 ms
19,832 KB
testcase_05 AC 329 ms
32,544 KB
testcase_06 AC 44 ms
13,260 KB
testcase_07 AC 309 ms
25,564 KB
testcase_08 AC 437 ms
31,324 KB
testcase_09 AC 215 ms
18,540 KB
testcase_10 AC 313 ms
28,796 KB
testcase_11 AC 386 ms
32,784 KB
testcase_12 AC 249 ms
32,308 KB
testcase_13 AC 430 ms
30,876 KB
testcase_14 AC 329 ms
29,288 KB
testcase_15 AC 362 ms
32,448 KB
testcase_16 AC 302 ms
22,296 KB
testcase_17 AC 461 ms
34,816 KB
testcase_18 AC 86 ms
13,124 KB
testcase_19 AC 122 ms
22,940 KB
testcase_20 AC 431 ms
29,816 KB
testcase_21 AC 196 ms
17,148 KB
testcase_22 AC 416 ms
32,432 KB
testcase_23 AC 438 ms
38,804 KB
testcase_24 AC 417 ms
38,704 KB
testcase_25 AC 424 ms
38,716 KB
testcase_26 AC 411 ms
38,680 KB
testcase_27 AC 414 ms
38,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd, log2
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul, add
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce, lru_cache
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, Q = MAP()
a = [0]+LIST()
xor = lambda x,y:x^y
acc = list(accumulate(a, xor))
ans = [0]*Q
for i in range(Q):
    l, r = MAP()
    ans[i] = acc[r]^acc[l-1]

print(*ans, sep="\n")
0