Backtracking https://codeforces.com/problemset/problem/812/B

https://codeforces.com/problemset/problem/812/B
its passing the example cases but giving WA when submitting
my code is:-
https://ide.codingblocks.com/#/s/24458

3 2
0000
0100
0100

Your code gives 6 but the answer should be 4. You need to print the optimal answer.

done https://ide.codingblocks.com/#/s/24591
:slight_smile: thanks

1 Like