Abu and the Apples
CodeChefOpen on judge ↗
Ankita has a pet monkey named Abu who has a really bad habit of stealing apples from their neighbour's tree. But as Abu is really young he's only able to steal apples which is at most $2$ branches away from the apple he started stealing with. Suppose, there are $A$ number of apples in their neighbour's tree marking from $1,2,3,....A$, and $B$ number of branches which connects any two of these app
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