← All problemsSign in

Maximum Flow in a Special Graph

In this problem you are a given an un-directed graph containing N nodes numbered from 1 to N and M edges. Capacity of each edge will be given. For each (unordered) pair of nodes u and v, you need to find the maximum flow value from node u to v. Sum the answers for each pair u and v and print the sum. Note that the edges are undirected which means that fluid is allowed to flow in either direction b

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start