Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <iostream>#include <cstring>#include <deque>#include <vector>#include <limits.h>using namespace std;#define MAX_SIZE 200000int head[MAX_SIZE];struct edge{int to;int next;int f;//left flow} e[MAX_SIZE];int level[MAX_SIZE];//head[i] point to the first edge whose tail is vertex ivoid addEdge(int u,int v,int f){static int p=0;e[p].to=v,e[p].f=f,e[p].next=head[u],head[u]=p;p++;e[p].to=u,e[p].f=0,e[p].next=head[v],head[v]=p;p++;}bool bfs(int s,int t){memset(level,0,sizeof(level));deque<int> q;q.push_back(s);level[s]=1;while(!q.empty()){