摘要:
赤裸裸的Ford-Fulkerson算法求最大流。#include <iostream>#include <cstring>#include <queue>using namespace std;const int MAX = 1003;int map[MAX][MAX],pre[MAX],n,m,ans;bool vis[MAX];int Maxflow() // 采用BFS找增广路径{ while(true) { queue<int> que; memset(pre,0,sizeof(pre)); memset(vis,0,sizeof(vi 阅读全文