码迷,mamicode.com
首页 >  
搜索关键字:road constructions    ( 669个结果
HDU 1598 find the most comfortable road (并查集||最短路)
find the most comfortable roadTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3720Accepted Submiss...
分类:其他好文   时间:2014-08-12 12:42:44    阅读次数:227
HDU 1598 find the most comfortable road (枚举+Kruskal) 最短路
(枚举+Kruskal) 最短路...
分类:其他好文   时间:2014-08-12 10:25:33    阅读次数:204
HDU 1598 find the most comfortable road(并查集+枚举)
先把每条边的权值从大到小排序,在一个个枚举,利用并查集判断是否在一个集合中。。。#include #include #include #include #include #include using namespace std; const int maxn=205; const int maxm=1005; const int inf=(0x7f7f7f7f); #define min(a,b)...
分类:其他好文   时间:2014-08-12 10:23:43    阅读次数:161
HDU 1598 find the most comfortable road (最小生成树) >>
Problem Description XX星有许多城市,城市之间通过一种奇怪的高速公路SARS(Super Air Roam Structure---超级空中漫游结构)进行交流,每条SARS都对行驶在上面的Flycar限制了固定的Speed,同时XX星人对 Flycar的“舒适度”有特殊要求,即乘坐过程中最高速度与最低速度的差越小乘坐越舒服 ,(理解为SARS的限速要求,flycar必须瞬间提...
分类:其他好文   时间:2014-08-12 00:44:43    阅读次数:272
HDU4081 Qin Shi Huang's National Road System 【次小生成树】
Qin Shi Huang's National Road System Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3395    Accepted Submission(s): 1189 Problem De...
分类:其他好文   时间:2014-08-11 21:31:42    阅读次数:426
HDU 1598 find the most comfortable road
对于中文题,直接讲思路吧! 思路:一看题目,兴奋啊,貌似是求最大流相关的问题,但是仔细审题一看,发现是要你去求最大速度与最小速度之差最小的路!最大最小之差最小,那么我们就可以联想到贪心的问题了,这题还有个地方在于能到达目的地,那么就是说明要连通给定的起点与终点了,所以我们可以考虑并查集的思想了! 所以本题的大致的思路可以确定为,我们可以对所有边的权值就行排序,然后从0开始对所有的点进行枚举,连...
分类:其他好文   时间:2014-08-11 12:04:02    阅读次数:267
贪心 --- hdu : Road Trip
RoadTripTime Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:65536KBTotal submit users: 29, Accepted users: 29Problem 12882 : No special judgem...
分类:其他好文   时间:2014-08-10 01:30:49    阅读次数:331
HDU1598 find the most comfortable road 【并查集】+【枚举】
find the most comfortable road Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3686    Accepted Submission(s): 1565 Problem Descript...
分类:其他好文   时间:2014-08-09 18:51:08    阅读次数:229
POJ3352Road Construction(边的双连通+强连通缩点)
Road Construction Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 8673   Accepted: 4330 Description It's almost summer time, and that means that it's almost ...
分类:其他好文   时间:2014-08-08 02:03:45    阅读次数:210
POJ 3352 Road Construction(图论-tarjan)
POJ 3352 Road Construction(图论-tarjan) 题目大意: 给定n个点m条边的无向连通图,问你至少添加多少条边,使得这个图去掉任意一条边依然连通。 解题思路: 首先环中的边去掉依然连通,所以环缩成点,然后将度数为1的点肯定要两两相连,否则去掉这个点所在的边就肯定不连通了。 因此,答案就是:(度数为1的点的个数+1)/ 2...
分类:其他好文   时间:2014-08-05 22:43:00    阅读次数:339
669条   上一页 1 ... 62 63 64 65 66 67 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!