克鲁斯卡尔算法 有大坑 hdu 1102

The first line is an integer N (3 <= N <= 100), which is the number of villages. Then come N lines, the i-th of which contains N integers, and the j-th of these N integers is the distance (the distance should be an integer within [1, 1000]) between village i and village j.Then there is an integer Q (0 <= Q <= N * (N + 1) / 2). Then come Q lines, each line contains two integers a and b (1 <= a < b <= N), which means the road between village a and village b has been built.

,你在会议中吵架时,尼泊尔的背包客一起端起酒杯坐在火堆旁。

克鲁斯卡尔算法 有大坑 hdu 1102

相关文章:

你感兴趣的文章:

标签云: