The last problem “Chef and His Two Friends” states 2 <= R, C <= 50.
But after randomly trying everything I finally found out that C = 1 is a testcase too.
I wasted a ton of time for this bullshit.
This happens in every other contest. This is as bad as the whole cheater situation on this site. But this problem can easily be avoided.
-1