I am stuck on this following problem for a pretty long time.
Given a connected undirected graph with n nodes and m edges and the capacity of each edge is 1. maxFlow(u,v) defines the maximum flow from node u to node v. You have to find out how many pair of nodes (u,v) are there where u<v and maxFlow(u,v)=2 . You can assume that the graph won’t have any self-loop.
Constraints:1<=n<=105,n−1<=m<=7∗105
You can find the problem here. It will be really helpful if you can provide me with a solution.