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.
Question Link : https://www.codechef.com/ACMIND16/problems/ICPC16F
Solution Link : http://ideone.com/nV20zD
Random Input Generator Link : http://ideone.com/lZZlbt
Checker Link : http://ideone.com/wm8EzY