Segment Tree
CodeChefOpen on judge ↗
You have given an array of $N$ integers as $A$ = { $A_1, A_2, A_3, .......A_N$ } You need to process Q queries Each query consist of 3 integers L,R,K and described below **L R K**: Find Largest K numbers between L and R . Lets call it as ${ B_1 , B_2, B_3,...... B_K }$ Find Value of below equation $B_1$ ^ $B_2$ ^ $B_3$ ^...... ^$B_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.
Sign in to chat with the tutor and save your progress.
Sign in to start