← All problemsSign in

Xor Queries

CodeChefRating 2513Open on judge ↗

Given an initially empty integer array (1-indexed) and some queries: - Type 0: Add the integer number x at the end of the array. - Type 1: On the interval L..R find a number y, to maximize (x xor y). - Type 2: Delete last k numbers in the array - Type 3: On the interval L..R, count the number of integers less than or equal to x. - Type 4: On the interval L..R, find the kth smallest integer (k

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start