A Leisurely Journey
Chef recently accepted a teaching fellowship at a prestigious culinary institution. The fellowship does not begin for a while yet, so Chef wants to use the remaining free time for a nice vacation. There are $N$ cities (numbered $1$ through $N$) connected by $M$ roads. For each valid $i$, there are $L_i$ tourist attractions in city $i$. Chef is initially in city $1$ and he will teach in city $N$. O
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