I've tried submitting a solution to problem 1146C — Tree Diameter Submission
But I get Idleness limit exceeded on test 1, I tested my code using Custom Test, but it seems to be working Okay, how can I fix this?
I've tried submitting a solution to problem 1146C — Tree Diameter Submission
But I get Idleness limit exceeded on test 1, I tested my code using Custom Test, but it seems to be working Okay, how can I fix this?
After printing a query do not forget to output end of line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use:
Thanks, I got the mistake. By mistake I printed new line after flushing which caused the error.