Data Structures & AlgorithmsVery hardCodeforces Div 2 D · ICPC regional

A flow network has source S and sink T, with directed arcs and capacities in brackets: S→E (8), S→T (3), B→E (6), B→T (7), E→T (9), C→E (2), C→T (3). What is the maximum flow from S to T?

  1. A. 8
  2. B. 11
  3. C. 12
  4. D. 2

Correct answer: B. 11

Edmonds–Karp (augmenting paths with residual capacities) gives maximum flow 11, which equals the minimum cut capacity. Sending along a single best path only carries 8; the total out of S is 11; and minimising the number of cut arcs (ignoring capacity) gives 2.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic