- 博客(3)
- 收藏
- 关注
原创 无向图的最小生成树之Kruskal算法
N个点M条边的无向连通图,每条边有一个权值,求该图的最小生成树。 Input第1行:2个数N,M中间用空格分隔,N为点的数量,M为边的数量。(2 <= N <= 1000, 1 <= M <= 50000) 第2 - M + 1行:每行3个数S E W,分别表示M条边的2个顶点及权值。(1 <= S, E <= N,1 <= W <= 10000...
2018-02-25 21:27:11 1695
原创 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 pairs of socks. In the morning of each day Vasya ha...
2018-02-14 09:50:22 176
原创 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 number line and the cow is at a point K (0 ≤ K ≤ 100,0...
2018-02-08 12:10:12 110
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人