题意 你要从第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
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
题目链接:http://poj.org/problem?id=2421想把n个村庄连接在一起;求最小生成树,不同的是已经有了m条线段链接在一起了,求剩下的;感觉用Kruskal会简单一点#include#include#include#include#include#include#define N...
分类:
其他好文 时间:
2015-07-27 18:25:19
阅读次数:
84
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
二叉树遍历问题DescriptionTree RecoveryLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary ...
分类:
其他好文 时间:
2015-07-26 22:24:53
阅读次数:
162
原题:DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capita...
分类:
其他好文 时间:
2015-07-26 20:33:31
阅读次数:
118
DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital l...
分类:
其他好文 时间:
2015-07-26 20:27:27
阅读次数:
110
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
题目:DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capita...
分类:
其他好文 时间:
2015-07-24 22:17:25
阅读次数:
133
DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital l...
分类:
其他好文 时间:
2015-07-24 22:15:40
阅读次数:
124