In Problem D of yesterday's contest, I'm getting WA on test case 3. The checker log says "wrong output format Unexpected end of file — int32 expected", This is an interactive problem and I'm not really able to understand the meaning of the verdict. My logic is correct but if someone wants to have a look at the code here is the submission link: 119374235 .
This was happening to me as well. Your code is most probably not printing n-1 pairs as it should. It must be printing less than that.