Runtime Error on Uva 12874
Hi, I've been trying to solve the following problem Blanket
but my code just get RTE and I don't know why, could someone help me to find my bug?
Here is my code Code
Codeforces Round 943 Solution Discussion