Bob wants Cookies
CodeChefOpen on judge ↗
Bob was getting bored at home, hence Alice decided to give Bob a puzzle. Alice takes $N$ containers numbered $1...N$. $Kth$ jar has cookies, and all other jars are empty. Alice places the jars on the floor and connects a few of them. Connections are made such that $AB \neq BA$, for any two Jar $A$ and $B$. She also assigns some weights to the connections. Bob has to begin his journey at Jar n
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