Can you please tell me where I made mistake?
I submitted it five times with minor modifications but got WA in all. I was able to solve rest of the problems without any problem. Please help with this one
Can you please tell me where I made mistake?
I submitted it five times with minor modifications but got WA in all. I was able to solve rest of the problems without any problem. Please help with this one
Brother when you are setting flag=1, then afterwards if any row with more no of 1s is present, the flag is not set to 0.
So inside if
block add flag=0
It will work.
https://www.codechef.com/viewsolution/7718345
See this solution, it is yours. I just added “flag=0;” and it got AC
Hope you can understand.