← All problemsSign in

Zikara and the paid dinner

It was Friday afternoon when Zikara heard about the paid dinner in the hostel mess. Each room in the hostel is numbered from 1 to n and has some coins a[i] (1 $\leqslant$ i $\leqslant$ n) in it, which Zikara could use to pay in the mess. But Zikara is only allowed to enter rooms which follow the following condition: start $\leqslant$ room number $\leqslant$ end . You will be given q queries and e

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