CHECHOC - Editorial

Oh, okay. However, I feel like the question could have been a bit more clear on the conditions for this particular case.

for 1*1 matrix answer is x but your code prints y

Thanks a lot for pointing mistake, if there is only one block then it should contain x.

That’s why its a tricky corner case…

Thanks, is there even a brute force implementation anywhere? i can’t seem to get it right.

Can anybody plz tell what’s wrong in my code?
https://www.codechef.com/viewsolution/35979286

Try breaking down the problem like x > y and x < y.
You should find the logic if you do that.

1 1 4 1?

Codechef just want the people NOT to understand the question and spend 2 hours of brain cracking just to decide whether 1x1 will have min(x,y) or not :slightly_smiling_face:.

Since n was small dp worked. but will the tester’s (@rajarshi_basu) solution work for n upto 10^5 ? (If yes, why was n not 10^5 ? )

Let’s say you were in doubt whether to print x or y when n=1 and m=1, (even though the question was quite clear), it would take you two tries to get AC at max, Assuming the rest of your code was right. So, don’t blame them because you are stupid.

1 Like

Can you please suggest. What I am doing wrong in my code.
https://www.codechef.com/viewsolution/36022880
Thanks

1 1 4 1

1 Like

Got the logic at the first attempt but haven’t seen the constraint which cost me 100 points :no_mouth:.
But learning is still there. :slightly_smiling_face:

Thanks

Check for 1 1 6 5. It should give 6 your code gives 5.

I never doubted that I am not a stupid,it’s just that I didn’t expect them to be stupid too :slightly_smiling_face: .

Thanks bud. Just needed to check if my ā€œremā€ was going negative. Foolish me. AC

1 Like

The most costly edge case I’ve ever suffered

1 Like

They weren’t. 1500+ people figured it out, so must be just you :slight_smile:

1 Like