I am currently trying to solve the problem https://www.spoj.com/problems/SELLPHN2/.
This is my first max flow problem. I am not able to find why SPOJ is showing the wrong answer.
My idea - Take source as node 0, the factories as nodes from 1 to m, shops from m+1 to m+n, and m+n+1 node as the sink.Then adjacency list is stored in v. The standard code for finding maxflow in graph is taken from
https://cp-algorithms.com/graph/edmonds_karp.html. Can someone please help?
I found my mistake.