码迷,mamicode.com
首页 >  
搜索关键字:on road    ( 665个结果
Road constructions (hdu 3917 最大权闭合图)
题意:N个城市,m条道路需要建设,每条道路由某个公司负责并花费一定的费用,每个公司会向国家纳税,若公司A造1到2的路,B造2到3的路,那么就说A和B有联系。求国家能得到的钱的最大值。ans=纳税之和-建路花费之和。 思路:做最大权闭合图的题就是要找到有相互依赖关系的两个集合。题目中告诉了公司之间有依赖关系,那么就以公司为节点,源点和每个公司连边权为纳税,公司和会点连边权为花费,公司与公司之间有联系的连边权为INF。...
分类:其他好文   时间:2015-05-03 09:24:03    阅读次数:120
Out of Hay.(POJ-2395)
最小生成树kruskal算法。 首先必须形成一棵最小生成树,然后找出最长的路。 #include #include #include #include #include #include #include using namespace std; int n,m,a,b,c,par[1005],rankk[1005], max_road; struct edge { int u,v,c...
分类:其他好文   时间:2015-05-01 12:08:49    阅读次数:147
JD IPO address by liuqiangdong
Ladies and gentlemen, Good evening.I'd rather use english, not mandarin.Because during the road show, I felt so sorry.When I opened my mouth I have to...
分类:其他好文   时间:2015-05-01 10:33:26    阅读次数:168
hdu 3018 Ant Trip 算是一道欧拉通路的题目吧~
Problem Description Ant Country consist of N towns.There are M roads connecting the towns. Ant Tony,together with his friends,wants to go through every part of the country. They intend to visit every road , and every road must be visited for exact one t...
分类:其他好文   时间:2015-04-27 13:22:54    阅读次数:148
内核编程学习小结
The road to success was trial and error development, recompilation, and lots of crashes.寒假过去一个月,计划很多时候也没法跟上。不过总体上来说,还是学习和收获了一些东西的。过去的事情不能改变,所以也不必过于纠结和...
分类:其他好文   时间:2015-04-27 01:54:21    阅读次数:175
POJ 3352 Road Construction(添最少边构造边双连通图的结论)
题意:已知无向图,问添加最少的边使之成为边双连通图 思路:显然先缩点成一棵树,添加最少边使一棵树的边双连通 此处有结论:对于一棵树添加(1+leaf)>>1 条无向边就能构造成一个双连通图,构造方法显然(脑补一下 //216K 63MS C++ 1754B #include #include #include #include ...
分类:其他好文   时间:2015-04-24 09:09:05    阅读次数:118
Poj 3352 Road Construction & Poj 3177 Redundant Paths(边双连通分量+缩点)
Road Construction Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9465   Accepted: 4699 Description It's almost summer time, and that means that it's almost ...
分类:其他好文   时间:2015-04-23 17:31:27    阅读次数:134
【BZOJ 2752】 [HAOI2012]高速公路(road)
计数问题+线段树~...
分类:其他好文   时间:2015-04-20 09:26:48    阅读次数:138
hdu 1598 find the most comfortable road
题意:给出一幅无向图,每次询问给出起点和终点,求起点到终点权值差最小的一条路,输出权值差;思路:边按权值排序,利用并查集枚举每次能使起点终点联通的情况下权值差,并每次更新最小值;#include#include#includeusing namespace std;#define INF 0x3f3...
分类:其他好文   时间:2015-04-11 20:36:34    阅读次数:133
优美的英文句子
1.One is always on a strange road, watching strange scenery and listening to strange music. Then one day, you will find that the things you try hard t...
分类:其他好文   时间:2015-04-10 13:02:27    阅读次数:123
665条   上一页 1 ... 50 51 52 53 54 ... 67 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!