poj 2421
Constructing Roads
Constructing Roads
Time Limit: 2000MS | Memory Limit: 65536K | |
Total Submissions: 23522 | Accepted: 10085 |
Description
There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected, if and only if there is a road between A and B, or there exists a village C such that there is a road between A and C, and C and B are connected.
We know that there are already some roads between some villages and your job is the build some roads such that all the villages are connec
We know that there are already some roads between some villages and your job is the build some roads such that all the villages are connec