题目链接:http://poj.org/problem?id=2253 Frogger Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 31114   Accepted: 10027 Description Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on a…
The Tourist Guide Mr. G. works as a tourist guide. His current assignment is to take some tourists from one city to another. Some two-way roads connect the cities. For each pair of neighboring cities there is a bus service that runs only between thos…
题意 ​ 题目主要说的是,有两只青蛙,在两个石头上,他们之间也有一些石头,一只青蛙要想到达另一只青蛙所在地方,必须跳在石头上.题目中给出了两只青蛙的初始位置,以及剩余石头的位置,问一只青蛙到达另一只青蛙所在地的所有路径中的"the frog distance"中的最小值. ​ 解释一下"the frog distance": 题目中给出了一段解释"The frog distance (humans also call it minimax distance…
题意 给你n个点,1为起点,2为终点,要求所有1到2所有路径中每条路径上最大值的最小值. 思路 不想打最短路 跑一边最小生成树,再扫一遍1到2的路径,取最大值即可 注意g++要用%f输出!!! 常数巨大的丑陋代码 # include <stdio.h> # include <stdlib.h> # include <iostream> # include <string.h> # include <math.h> # include <al…
题目链接:https://vjudge.net/problem/POJ-2253 思路: 从一号到二号石头的所有路线中,每条路线中都个子选出该路线中两点通路的最长距离,并在这些选出的最长距离选出最短路的那个距离X, 就是青蛙距离,即青蛙至少能跳X米,才能安全的到达二号,因为什么,再看看第一句话. 再想,我们知道,djikstra中的价值数组存的是从u点到其他所有点的最短距离,way[ 1 ] 是u到1的最短距离, way[ x ] 是u到x的最短距离, 我们知道djikstra的时间复杂度是O(…
  Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 28802   Accepted: 9353 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 si…
题目传送门 /* 最短路:Floyd算法模板题 */ #include <cstdio> #include <iostream> #include <algorithm> #include <cmath> #include <cstring> #include <string> #include <vector> using namespace std; + ; const int INF = 0x3f3f3f3f; do…
POJ 2253 Frogger题目意思就是求所有路径中最大路径中的最小值. #include<iostream> #include<cstdio> #include<string.h> #include <utility>//make_pair的头文件 #include<math.h> using namespace std; ; double map[maxn][maxn]; int n; typedef struct pair<int…
链接:poj 2253 题意:给出青蛙A,B和若干石头的坐标,现青蛙A想到青蛙B那,A可通过随意石头到达B, 问从A到B多条路径中的最长边中的最短距离 分析:这题是最短路的变形,曾经求的是路径总长的最小值,而此题是通路中最长边的最小值,每条边的权值能够通过坐标算出,由于是单源起点,直接用SPFA算法或dijkstra算法就能够了 SPFA 16MS #include<cstdio> #include<queue> #include<cmath> #include<…
Frogger Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submit Status Practice 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…