Get Time
Search | Watch Thread  |  My Post History  |  My Watches  |  User Settings
View: Flat (newest first)  | Threaded  | Tree
Previous Thread  |  Next Thread
RookAttack - Maximum Bipartite Matching | Reply
I'm having trouble solving this problem. How would you solve this using the pseudo code given in the tutorial for max flow (the one with 2D array and BFS).

I added a super source which has an edge to each row and a super sink which has an edge from each column. The capacity of each edge is set to 1.
Running this, I'm getting wrong answer for the third example (its the example shown in the tutorial). I'm getting 2 instead of 3.

What's wrong with my approach ?
I also gave each column a unique number.
Column j will have value (rows + j). Rows are numbered from 0 to rows - 1.
Re: RookAttack - Maximum Bipartite Matching (response to post by rohit89) | Reply
Never mind. It was a problem with the way I built the graph.