Algorithms for bipartite matching
Sample Input-Ouput:
Input 1:
4
1 1001
2 1002
5 1004
4 1005
Output 1:
4
Input 2:
4
1 1001
2 1001
3 1002
3 1002
Output 2:
2
Assumption: The max number of nodes in all is 2000.
Number of nodes in one set of bipartite graph: 1 - 1000.
Number of nodes in another set of bipartite graph: 1001 - 2000.