码迷,mamicode.com
首页 >  
搜索关键字:jungle roads    ( 729个结果
POJ - 1251 Jungle Roads(最小生成树)
题意:求连通所有路需要修的最短路径。 和上次的hdu1233差不多的题目,只不过这里要把输入的字母转换成数字,这样会方便很多。 ...
分类:其他好文   时间:2017-03-31 20:07:07    阅读次数:206
北大 2012 Jungle Roads
题目:输入边的两端点和边值,求最小生成树(最小支撑树)的值。 思路: 过程:本题调试问题出在如下几处:1.用%c会读入回车符(用getchar()有的平台又会出问题),所以以后读字符都直接用%s,然后在取字符串第一个字符即可。char c[4];scanf("%s",c);printf("%c",c ...
分类:其他好文   时间:2017-03-31 10:20:15    阅读次数:200
CodeForces 76A Gift - 最小生成树
The kingdom of Olympia consists of N cities and M bidirectional roads. Each road connects exactly two cities and two cities can be connected with more ...
分类:其他好文   时间:2017-03-27 22:58:10    阅读次数:616
BZOJ 1116: [POI2008]CLO [连通分量]
Byteotia城市有n个 towns m条双向roads. 每条 road 连接 两个不同的 towns ,没有重复的road. 你要把其中一些road变成单向边使得:每个town都有且只有一个入度 和上题一样... ...
分类:其他好文   时间:2017-03-21 12:26:57    阅读次数:138
hdu1301 Jungle Roads 最小生成树
The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ag ...
分类:其他好文   时间:2017-03-19 10:57:55    阅读次数:178
Codeforces 629 E. Famil Door and Roads
题目链接:http://codeforces.com/problemset/problem/629/E 询问这个简单环的期望。考虑将这个环拆成两部分。 令${deep[x]>=deep[y]}$,${size[x]}$表示以$x$为根的子树大小,${sdown[x]}$示以$x$为根的子树的所有节点 ...
分类:其他好文   时间:2017-03-15 12:32:07    阅读次数:216
UVALive-2926 Japan 【树状数组】
Description Japan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the ...
分类:编程语言   时间:2017-03-09 20:15:55    阅读次数:281
hdu 1102 Constructing Roads (Prim算法)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=1102 Constructing Roads Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others ...
分类:编程语言   时间:2017-03-05 20:42:46    阅读次数:170
AC日记——[USACO11DEC]牧草种植Grass Planting 洛谷 P3038
题目描述 Farmer John has N barren pastures (2 <= N <= 100,000) connected by N-1 bidirectional roads, such that there is exactly one path between any two p ...
分类:其他好文   时间:2017-02-26 20:56:30    阅读次数:192
Building roads
Building roads Problem Description Farmer John's farm has N barns, and there are some cows that live in each barn. The cows like to drop around, so Jo ...
分类:其他好文   时间:2017-02-24 19:08:33    阅读次数:261
729条   上一页 1 ... 26 27 28 29 30 ... 73 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!