{"problem":{"name":"Xor Query","description":{"content":"Given is a sequence of $N$ positive integers $A = (A_1, \\dots, A_N)$. Process $Q$ queries. In the $i$\\-th query $(1 \\leq i \\leq Q)$, determine whether it is possible to choose one or more elements fro","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":3000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc223_h"},"statements":[{"statement_type":"Markdown","content":"Given is a sequence of $N$ positive integers $A = (A_1, \\dots, A_N)$.\nProcess $Q$ queries. In the $i$\\-th query $(1 \\leq i \\leq Q)$, determine whether it is possible to choose one or more elements from $A_{L_i}, A_{L_i + 1}, \\dots, A_{R_i}$ so that their $\\mathrm{XOR}$ is $X_i$.\nWhat is $\\mathrm{XOR}$?The bitwise $\\mathrm{XOR}$ of integers $A$ and $B$, $A\\ \\mathrm{XOR}\\ B$, is defined as follows:\n\n*   When $A\\ \\mathrm{XOR}\\ B$ is written in base two, the digit in the $2^k$'s place ($k \\geq 0$) is $1$ if exactly one of $A$ and $B$ is $1$, and $0$ otherwise.\n\nFor example, we have $3\\ \\mathrm{XOR}\\ 5 = 6$ (in base two: $011\\ \\mathrm{XOR}\\ 101 = 110$).\n\n## Constraints\n\n*   $1 \\leq N \\leq 4 \\times 10^5$\n*   $1 \\leq Q \\leq 2 \\times 10^5$\n*   $1 \\leq A_i \\lt 2^{60}$\n*   $1 \\leq L_i \\leq R_i \\leq N$\n*   $1 \\leq X_i \\lt 2^{60}$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $Q$\n$A_1$ $\\ldots$ $A_N$\n$L_1$ $R_1$ $X_1$\n$\\vdots$\n$L_Q$ $R_Q$ $X_Q$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc223_h","tags":[],"sample_group":[["5 2\n3 1 4 1 5\n1 3 7\n2 5 7","Yes\nNo\n\nIn the first query, you can choose $A_1$ and $A_3$, whose $\\mathrm{XOR}$ is $7$.\nIn the second query, there is no way to choose elements so that their $\\mathrm{XOR}$ is $7$."],["10 10\n8 45 56 9 38 28 33 5 15 19\n10 10 53\n3 8 60\n1 10 29\n5 7 62\n3 7 51\n8 8 52\n1 4 60\n6 8 32\n4 8 58\n5 9 2","No\nNo\nYes\nNo\nYes\nNo\nNo\nNo\nYes\nYes"]],"created_at":"2026-03-03 11:01:13"}}