Xor X,Get MAX
**This is an interactive problem.** There’s a hidden array $A$ consisting of $N$ **distinct non-negative** integers. You are allowed to interact with the judge using queries. Each query is of the form: - $X$ $Y$: Given two non-negative integers $X$ and $Y$ $(1 \leq X \leq N,0 \leq Y <2^{30})$ as the query, the hidden array $A$ is updated by setting $A_{X}:=A_{X} \oplus Y$, where $\oplus$ denotes
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start