This is my solution link for ANCOIMP

http://www.codechef.com/viewsolution/7228793

can anyone please tell me which test case is failing

my approach was :

Initalize zero=0;one=0 and the resultant array to -1;

1)start from 1st row and start searching i=1;j=1;

2)if value=1,search down that entire column

3)where ever on that column is 1,mark that row

suppose matrix is

010

101

010

so row 1 and row 3 will be marked

the resultant array[1]=array[3]=!array[2];

if array[2] is already initailzed then array[1]=array[3]=!array[2]

4)

but if not initialized then if zero<one

then array[2]=1;

and initialize other values according