初始化的时候double类型数转化成int。。。。。wdnmd
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<vector>
const int maxn = 1e3+10;
using namespace std;
int tot,head[maxn],num;
struct Edge{
int to,nxt;
}e[maxn*maxn];
int vis[maxn],link[maxn];
struct Node{
double x,y;
Node(double x,double y):x(x),y(y){}
};
vector<Node> gopher, pole;
void add(int from,int to)
{
e[tot].nxt = head[from], e[tot].to = to;
head[from] = tot++;
}
bool dfs(int fa)
{
for(int i = head[fa]; ~i; i = e[i].nxt)
{
if(!vis[e[i].to])
{
vis[e[i].to] = 1;
if(!link[e[i].to] || dfs(link[e[i].to]))
{
link[e[i].to] = fa;
return true;
}
}
}
return false;
}
double dis(Node a,Node b)
{
double dis = sqrt((b.y - a.y)*(b.y-a.y)+(b.x-a.x)*(b.x-a.x));
return dis;
}
int main()
{
int n,m,s,v;
while(~scanf("%d%d%d%d",&n,&m,&s,&v))
{
memset(