Infection (Challenge)
CodeChefOpen on judge ↗
In Chef’s World, there are a total of $N$ countries (numbered $1$ through $N$). Each $i^{th}$ $(1 \leq i \leq N)$ country has a population of $P_i$ people. Countries are interconnected by $M$ bidirectional Flight routes (numbered $1$ through $M$). Each Flight route has a Flight cost associated with it. For simplicity, let’s denote $j^{th}$ Flight route that connects countries $U$ and $V$ and has f
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