← All problemsSign in

FUNCTION QUERIES

$Chef$ and his $friend$ are playing $PUBG$. Chef is $knocked$ $Out$ by enemies. His friend is about $30$ $m$ away from him. The game is in its closing minutes. Chef's friend do not want to risk his life for Chef. So, Chef's friend asks a query to Chef. If he answers it, his friend will try to $revive$ him. $A,B,X,Y,i$ are integers. Function $F$ is defined as, ``` if i = 0 : F(i) = X

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