pat甲级(dijikstra)
qq_41698081
这个作者很懒,什么都没留下…
展开
-
1003. Emergency(Dijkstra算法)
返回 1003 Emergency (25 分) As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue t...原创 2019-05-27 13:39:20 · 191 阅读 · 0 评论 -
1018. Public Bike Management (Dijkstra + DFS)
1018 Public Bike Management (30 分) There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any station and ret...原创 2019-05-29 22:11:08 · 229 阅读 · 0 评论 -
PAT甲级 1111 Online Map(dijkstra算法)
1111 Online Map (30 分) Input our current position and a destination, an online map can recommend several paths. Now your job is to recommend two paths to your user: one is the shortest, and the other...原创 2019-06-03 15:20:23 · 228 阅读 · 0 评论 -
1030 Travel Plan(dijkstra 双边权 + 输出最短路径)
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 path b...原创 2019-06-04 11:06:13 · 287 阅读 · 0 评论 -
dijkstra总结:
此题属于dijkstra双边权问题,直接使用dijkstra算法找到满足题意条件的边长 1. 对于边权问题的处理方法: 设定w[ k ] = weight[ u ][k] + w[u]; //求出满足题意要求的边权值 2. 对于点权问题的处理方法: w[ k ] = weight[k]+ w[ u ] //求出满足题意要求点权值 ...原创 2019-06-04 11:07:33 · 246 阅读 · 0 评论 -
1087 All Roads Lead to Rome(dijikstra, 结点,最短路径数目,最短路径(边权)点权(快乐值))
1087 All Roads Lead to Rome (30 分) Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most hap...原创 2019-06-04 11:45:14 · 244 阅读 · 0 评论 -
1072 Gas Station (dijkstra(无start与end 多次使用dijkstra))
1072 Gas Station (30 分) A gas station has to be built at such a location that the minimum distance between the station and any of the residential housing is as far away as possible. However it must g...原创 2019-06-04 19:11:16 · 178 阅读 · 0 评论