ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1509. Domino Recognition

I read input using
while (scanf("%d", &n) != EOF)
{
...
}
to be able to run multiple tests. I had TLE 51 with such code.
But when i deleted this cycle, i got accepted. Please check test 51.
Test 51 is correct. You have got TLE 51 because of bug in your code.