Protect Computers
CodeChefOpen on judge ↗
In a computer lab there are N computers. Computers are interconnected with each other through M wires. Each wire gives a two-way path. Two computers are said to be in network if there is simple path from one computer to another computer through these wires. You need to install antivirus to each computer. If one antivirus is installed on one computer then it will automatically get installed on all
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