「UVA1411」Ants-巨人与鬼
//题没输出玩,再来一张
翻译成中文就是:
思路(考虑到这道题比较难,就上个思路吧)
分治代码:
下面展示一些 内联代码片
。
#include<iostream>
#include<cstdio>
#include<cmath>
#include<queue>
#include<cstring>
using namespace std;
const int maxn=505;
#define inf 999999999
int n,ax[maxn],ay[maxn],bx[maxn],by[maxn];
int S,T,h[maxn*2],edgenum=1,maxflow;
int flow[maxn*2],vis[maxn*2],pre[maxn*2],last[maxn*2];
double dis[maxn*2];
queue<int>q;
struct node
{
int end,nxt,v;
double s;
}e[200005];
void add(int a,int b,int v,double s)
{
e[++edgenum].end=b;
e[edgenum].v=v;
e