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.