码迷,mamicode.com
首页 >  
搜索关键字:jungle roads    ( 729个结果
Codeforces Round #Pi (Div. 2) E. President and Roads (最短路+强连通求割边)
题目地址:codeforces #pi (DIV2) E 题目很水。。就是先求两边最短路,然后把可能为最短路的边挑出来,然后判断是否yes只需要转化成无向图跑一遍tarjan,找出割边,割边就是yes,然后剩下的边就让它的值为最短路-1就行了,如果-1后变成了非正数,就是no. 但是!!!居然卡spfa!!那是不是说cf以后就不能用可以卡的算法了。。完全可以出组数据来卡这些算法。。。比如spfa...
分类:其他好文   时间:2015-08-07 20:19:51    阅读次数:145
CodeForces 567E President and Roads(最短路 + tarjan)
CodeForces 567E President and RoadsDescriptionBerland has n cities, the capital is located in city s, and the historic home town of the President is in city t (s?≠?t). The cities are connected by one-...
分类:其他好文   时间:2015-08-07 20:05:20    阅读次数:144
Codeforces Round #Pi (Div. 2) E. President and Roads tarjan+最短路
#include#include#include#include#include#include#include#include#include#include#include#include#include#include#define ll long long#define REP(i,a,b)...
分类:其他好文   时间:2015-08-07 13:11:50    阅读次数:87
hdu 2586 How far away?
A - How far away ? Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Description There are n houses in the village and some bidirectional roads...
分类:其他好文   时间:2015-08-06 00:33:07    阅读次数:147
POJ 3411 Paid Roads(DFS)
题意  你要从第1个城市到第N个城市去   有m条路  每条路用a, b, c, p, r 表示  你从第a个城市到第b个城市时  若之前经过或现在位于第c个城市  过路费就是p元  否则就是r元   求你到达第N个城市最少用多少过路费 由于最多只有10个城市  10条路  这个题就变得很简单了  直接暴力dfs就行  可以用状态压缩来存储已经走过了哪些城市  由于最多只有10条路  从某个城市...
分类:其他好文   时间:2015-08-03 16:55:29    阅读次数:79
杭电1102--Constructing Roads(简单并查集)
Constructing RoadsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16938Accepted Submission(s): 643...
分类:其他好文   时间:2015-08-03 16:30:33    阅读次数:88
Constructing Roads----poj2421
题目链接:http://poj.org/problem?id=2421想把n个村庄连接在一起;求最小生成树,不同的是已经有了m条线段链接在一起了,求剩下的;感觉用Kruskal会简单一点#include#include#include#include#include#include#define N...
分类:其他好文   时间:2015-07-27 18:25:19    阅读次数:84
在matlab中实现遥感影像和shp文件的结合显示
clc;close all;clear;road=shaperead('boston_roads.shp'); %读取shape文件figure,mapshow('boston.tif'); %读取tif遥感影像并显示axis image manual off; %关闭本地坐标系统surveyF.....
分类:其他好文   时间:2015-07-27 01:53:41    阅读次数:367
Rescue zoj1649 优先队列
Description 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 GUARDs in the prison.Angel’s friends...
分类:其他好文   时间:2015-07-26 15:47:49    阅读次数:86
D - Constructing Roads - 2421
题意:有一些村庄需要修一些道路是所有村庄都可以连接,不过有些道路已经修好了,问题最少还需要修建的道路长度是多少。输入的第一行是一个N代表N个村庄,下面是一个N*N的矩阵,代表着q->j的距离,然后输出一个Q,接着有Q行,表示AB已经修建的村庄分析:为了增加麻烦他们设定了一些已经修建的村庄,不过可以使...
分类:其他好文   时间:2015-07-24 22:06:23    阅读次数:137
729条   上一页 1 ... 46 47 48 49 50 ... 73 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!