(Solved) Still getting WA on Chef and Bipartite Graphs ICPC16F after rejudge

I checked my solution of Chef and Bipartite Graphs against many randomly generated test cases using below attached files and the solution seems correct, but codechef judge is giving WA for the particular solution even after rejudge. Can anybody please help me to figure out the problem with my code, or the checker.

Solution Link : http://ideone.com/nV20zD

Random Input Generator Link : http://ideone.com/lZZlbt

Checker Link : http://ideone.com/wm8EzY

1 Like

Look at line 84 of your code buddy , its inR[cur.ss] not inR[i].
You could have Implemented the same in a much simpler way by Augmenting Edges with increasing offsets till ‘m’ is zero.
Eg:
1 - 1 ,
2 - 2 ,
3 - 3 ,
… ,
n - n ,
1 - 2 ,
2 - 3 ,
… ,
n - 1 ,
1 - 3 ,
2 - 4 ,
… ,
n - 2 and so on …

1 Like

Thanks for pointing it out.

//