Yet Another Delivery Problem
CodeChefOpen on judge ↗
Consider a country with $N$ cities which has no roads initially. Initially, each city in this country has a distinct food truck with id $F_i$ which lies between 1 and $N$. Roads are added to this country at different times. The $i$th road is constructed at time $t_i$ between cities $u_i$ and $v_i$. Unfortunately, city $i$ cannot consume food of any food truck except food truck $i$. Since we do 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