I have tried to submit the solution to the problem which is shown below. I tried a lot but still get idleness limit exceeded.
This is my solution link.
http://codeforces.net/contest/916/submission/35832727
Can somebody help me how to overcome this??
Thank you in advance.
The mentioned problem is an interactive problem. Every interactive problem on CF will contain the following text (or some variation of it) in the bottom of the statement. Here it says:
If the operation is a query, you should output the result of the query and flush the output stream before proceeding to the next operation. Otherwise, you may get the verdict Idleness Limit Exceed.
What you did in your code is solving the queries offline; you took all the queries and processed them together. In interactive problems you're not allowed to do that; you must output whenever the statement says it is necessary, and then flush the output (which is also explained in the problem statement), otherwise you get the verdict "Idleness limit exceeded".
Thank you very much Noam527
what if its not a interactive problem still after being stuck on a test gave for 5-8 odd minutes it gave me this... please have a look at my submission ..
Can somebody help me how to overcome this??
Thank you in advance.
Have you learnt the reason for this? I also faced with this issue: 89464032
me too sir 211711676