(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 : nV20zD - Online C++0x Compiler & Debugging Tool - Ideone.com

Random Input Generator Link : lZZlbt - Online C++0x Compiler & Debugging Tool - Ideone.com

Checker Link : wm8EzY - Online C++0x Compiler & Debugging Tool - Ideone.com

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.