public int maxFlow(int src, int dest) {
			int flow = 0;
			int[] dist = new int[V];
			while (dinicBfs(src, dest, dist)) {
				int[] ptr = new int[V];
				while (true) {
					int df = dinicDfs(ptr, dist, dest, src, Integer.MAX_VALUE);
					if (df == 0)
						break;
					flow += df;
				}
			}
			return flow;
		}