1979

Problem ID: 1979

The judge solution is wrong. You only need to check the connected component which includes participant's ID #1. Otherwise you get WA 10%.