Please help me out. I have checked a lot of test cases (including edge cases), the answer for all are same as the accepted solution. Why was my solution not accepted (WA)?
if m == 1 and n == 1: if y < x: print(y)
Why? There is only one cell. And even if y < x, you can keep x candies in that cell. It does not violate sum of adjacent cells constraint.
Thank you so much…