← All problemsSign in

Gift Queries

It's Holiday time in Mekuseku city! Every year, each person in Mekuseku city gifts a TeduManik bear to their elders i.e. $age_{elder} \geq age_{person}$. Something unique about this gifting festival is that the bear follow a path. Whenever person $A$ wants to give a person $B$ a gift, he gives the gift to any person $X$ such that $age_{A} \leq age_{X} \leq age_B $. Keep in mind that he can also di

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