A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a progra
转载 2020-06-15 16:15:00
92阅读
题目题意:给定n个城市以及之间的m条路、每条路的长度以及费用,从开始城市到目的城
原创 2023-06-27 10:18:09
78阅读
A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a progra
转载 2018-03-10 09:44:00
31阅读
#include<iostream>#include<stdio.h>#include<stdlib.h>#include<math.h>#include<string.h>#include<algorithm> #include<map>#include<vector>#inclu...
原创 2022-07-14 10:19:19
16阅读
水~。 题意 有N个城市(编号为0~N-1)、M条道路(无向边),并给出M条道路的距离属性与花费属性。现在给定起点S与终点D,求从起点到终点的最短路径、最短距离及花费。注意:如果有多条最短路径,则选择花费最小的那条。 const int N=510; struct Node { int v,dis,
转载 2021-03-01 11:43:00
61阅读
N(编号0-N-1的城市) M(高速路) S(起始点) D(目的地) 城市A 城市B 距离 过路费
原创 2022-11-25 14:28:40
97阅读
PAT A1030 Travel Plandijkstra 优先队列实现 + dfs#include<iostream>#include<qu
原创 2023-06-09 14:19:33
74阅读
返回目录 题意
原创 2022-07-14 17:46:38
40阅读
1030 Travel Plan (30 point(s))A traveler's map gives the distances between cities along the highways, together wavel...
原创 2022-09-15 10:52:18
40阅读
A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a progra
转载 2018-06-03 23:50:00
91阅读
1030Trav
原创 2022-09-19 15:41:19
50阅读
400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue A traveler's map gives the distances between c
原创 2022-11-09 19:41:23
48阅读
1 题目1030 Travel Plan (30分)A traveler’s map gives the distances between cities alo
原创 2022-05-26 02:14:03
81阅读
题目链接A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a program to help a traveler to decide the shortest ...
原创 2021-07-12 10:19:30
63阅读
1,题目描述Sample Input:4 5 0 30 1 1 201 3 2 300 3 4
原创 2022-10-27 15:52:07
88阅读
DescriptionSolution一开始我的DP方程f[i][j]的j设的是代价是多少,但是代价非常的打
原创 2022-12-26 18:40:29
78阅读
题意: 给出一个无向图。求出起点到终点的最优路,并输出所经过的点。 最优: 距离最短,若距离相等则权重最短。 思路: 1.注意这是个无向图!! 2.用vector存储经过的点。记得起点也要存储。 //628K 94MS #include #include #include #include #include #include #include #include #include
原创 2022-09-26 10:01:59
50阅读
传送门 题目大意 给定一个 \(n\) 个点和 \(m\) 条边的无向图,每条边都有一个 \([l,r]\) 的限制,请计算出从 \(1\) 到 \(en\) 的限制范围是多少(即路径上 \(l\) 尽量小,\(r\) 尽量大)。 \(100\%\) 的数据 \(2 <= N <= 1000, 0 ...
转载 2021-10-04 14:38:00
105阅读
2评论
Travel Problem Description One day, Tom traveled to a country named BGM. BGM is a small country, but there are N (N <= 100) towns in it. Each town pro
转载 2017-02-14 01:17:00
59阅读
2评论
时间限制: 5 Sec 内存限制: 512 MB题目描述小R开车去C国旅行。C国所有n座城市构成一棵树,且树上的每条边的长度L_i满足1≤L_i≤2。小R打算白天开车,晚上到达一个城市后在该城市休息并为他的车加油。有m个询问,每次询问小R开车从u到v,每天最多开p公里,至少需要多少天可以到达?注意,小R晚上必须到达某座城市,而不能将他的车停在某两座城市之间。输入第一行一个正整数n,表示...
原创 2022-11-23 00:01:06
148阅读
  • 1
  • 2
  • 3
  • 4
  • 5