#include<iostream>
#include<cstdio>
#include<cstring>
#include<queue>
#include<cmath>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<ctime>
#pragma warning(disable:4996)
#define EPS 1e-8
#define INF 2000000000
#define PI acos(-1.0)
const int N = 30;
const int M = 30;
using namespace std;
double X, Y;
class Point
{
public:
double x, y;
bool isIn()
{
if (x > -EPS&&x<EPS + X&&y>-EPS&&y < EPS + Y)
{
return true;
}
return false;
}
};
double dist(const Point &p1,const Point &p2)
{
return sqrt((p1.x - p2.x)*(p1.x - p2.x) + (p1.y - p2.y)*(p1.y - p2.y));
}
double getMinDist(const Point &p,const vector<Point>&point)
{
double ans = INF;
for (size_t i = 0; i < point.size(); i++)
{
ans = min(ans, dist(point[i], p));
}
return ans;
}
poj_1379_run away
最新推荐文章于 2019-01-18 17:04:05 发布