Chef and Covid
CodeChefOpen on judge ↗
In chef's city, COVID-19 is spreading rapidly. The government has hired chef to make an app that tracks human interactions. There are $N$ people in the city named from $1$ to $N$. People can interact with each other and can form subgroups of infected people. A human interaction is denoted by an integer pair $(u,v)$ means that both are infected after the interaction. It is not clear who infect
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