首页 > TAG信息列表 > 2253

POJ-2253 Frogger

题意:青蛙想从一个点跳到另一个点,中途可以经过其他点。求起点到终点间所有路径中相邻两点最大距离的最小值。 解:所有最短路算法都可以,这里练了一下Floyd。将两点间最短路改成走到这一点上长度最小的最大值(好绕哦)。先计算出有直接边的距离,然后枚举每个点进行松弛,由于过程中要求最大

POJ-2253 Frogger(floyd)

Frogger Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 83767   Accepted: 25363 Description Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to vis

POJ-2253 Frogger

题目:https://vjudge.net/problem/POJ-2253 这题先是要看懂题目,题目的大致意思就是给你n个点的坐标,其中第一个点是起点,第二个点是终点,从起点到终点肯定有很多条路径,而每一条路径中又有许多小线段组成(两个点之间的线段),让你求所有路径中最长线段的最小值。 这题可以分别用最短路径算

POJ - 2253 Frogger

POJ - 2253 题目链接 最短路的最大值问题 本来一开始用Dijkstra来写的,后来代码乱了。然后想一想还能用什么方法来写,好像kruskal好像也能处理, 每次加完边判断 0,1这两个点在不在同一颗树上,如果在的话直接跳出for循环,不在的话继续加边。 思路好像行得通,但是我在这种思路下wa了好几次,

POJ 2253-Frogger(Floyd变形)

Frogger Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 78072 Accepted: 23723 Description Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but

POJ 2253 Frogger

题目链接:POJ 2253 Description Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists' sunscreen, he wants to avo

POJ【2253】Frogger(最小最大值)

题目链接:http://poj.org/problem?id=2253 #include<iostream> #include<cstdio> #include<cstring> #include<queue> #include<cmath> using namespace std; #define INF 0x3f3f3f3f const int N = 200 + 10; int n; double a[N][N],d[N],inq[N];

B - Frogger POJ - 2253(进阶最短路,青蛙跳跳跳)

B - Frogger POJ - 2253 Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists’ sunscreen, he wants to avoid s