码迷,mamicode.com
首页 >  
搜索关键字:constructing roads    ( 767个结果
[图论][最短路]ROADS
Description N cities named with numbers 1 ... N are connected with one-way roads. Each road has two parameters associated with it : the road length an ...
分类:其他好文   时间:2018-08-19 20:56:13    阅读次数:183
POJ - 1251 Jungle Roads(最小生成树)
题意:有一个村庄网络(图),求该图的最小生成树 首先输入n代表n个村庄,接下来的n-1行,每行首先输入一个大写字母表示一个村庄,接着输入一个数字num, 表示和村庄连接的点的个数 接下来输入num对大写字母和数字,表示该村庄到另一个村庄的距离。比如:题目的第二组数组 表示:有三个村庄 A村庄有两个连 ...
分类:其他好文   时间:2018-08-16 19:41:50    阅读次数:206
题解 Roads-roads
可能是正式做过的第一个搜索吧(感谢pojQ_Q) 发个博客纪念一下 ...
分类:其他好文   时间:2018-08-16 01:05:18    阅读次数:171
CF567E President and Roads
题目大意 给出一个有向图,给出起点和终点,问每条边,是否图中存在的每一条起点到终点的最短路径都经过它(条件YES),如果存在不经过它的最短路径,可以减小它的多少边权(减少量不得超过该边原来的边权)使得该边满足条件YES。 题解 我们规定图中起点到终点的所有最短路径所经过的点、边构成的子图叫做最短路径 ...
分类:其他好文   时间:2018-08-10 23:24:11    阅读次数:202
c++ class as sort function
// constructing sets #include #include #include bool fncomp (int lhs, int rhs) {return lhs first; // empty set of ints int myints[]= {10,20,30,40,50};... ...
分类:编程语言   时间:2018-08-09 13:52:33    阅读次数:214
Codeforces543 B. Destroying Roads
传送门:>Here< 题意:给出一张无向图(边权为1),并给出两对起点和终点以及距离:s1,t1,l1; s2,t2,l2; 要求删除尽量多的边,使得dis(s1,t1)<=l1, dis(s2,r2)<=l2 解题思路 首先我们会发现,由于边权都为1,删去一些边,某两点间的最短路肯定会随着删的边越 ...
分类:其他好文   时间:2018-08-02 11:25:42    阅读次数:144
POJ 1724 ROADS(使用邻接表和优先队列的BFS求解最短路问题)
题目链接: https://cn.vjudge.net/problem/POJ-1724 N cities named with numbers 1 ... N are connected with one-way roads. Each road has two parameters associ ...
分类:其他好文   时间:2018-07-28 20:33:11    阅读次数:208
CF546E Soldier and Traveling
题目描述 In the country there are n n n cities and m m m bidirectional roads between them. Each city has an army. Army of the i i i -th city consists of a ...
分类:其他好文   时间:2018-07-23 20:22:06    阅读次数:223
Rescue(BFS时间最短)
Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and ...
分类:其他好文   时间:2018-07-23 17:23:50    阅读次数:108
CF 1003B Binary String Constructing 【构造/找规律/分类讨论】
``` You are given three integers a, b and x. Your task is to construct a binary string s of length n=a+b such that there are exactly a zeroes, exactly ...
分类:其他好文   时间:2018-07-22 00:10:00    阅读次数:235
767条   上一页 1 ... 10 11 12 13 14 ... 77 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!