OR queries
CodeChefOpen on judge ↗
Raza loves playing with cards. He has $N$ cards each with a number written on it. The number can be any number from $1$ to $10^7$. Raza's mom doesnt like it when Raza will keep on playing with cards all day. So she decides to ask Raza a few questions. If Raza answers them correctly, he gets to keep on playing with the cards. Her mom can ask him 2 types of questions. - $1$ $l$ $r$ $x$ - That is
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