无向图的最小生成树之Kruskal算法

N个点M条边的无向连通图,每条边有一个权值,求该图的最小生成树。 Input第1行:2个数N,M中间用空格分隔,N为点的数量,M为边的数量。(2 <= N <= 1000, 1 <= M <= 50000) ...

2018-02-25 21:27:11

阅读数:94

评论数:0

CodeForce 460A :Vasya and Socks

A. Vasya and Socks time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya has n ...

2018-02-14 09:50:22

阅读数:42

评论数:0

POJ3278 Catch That Cow

Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a num...

2018-02-08 12:10:12

阅读数:31

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭