Need help in CHEFRES



In the problem,, I solved it using offline method but this submission gave wrong answer for subtask 2 while gives AC.
Can someone clarify me, @vijju123, why the first solution is failing and suggest some test case for the same.
Thanks in advance.


Same thing is happening with my code.

It is giving wrong answer on subtask 2 on this submission

link text

when I have decreased the value of end point of each interval by 1 as it is exact closing time of restaurant, so any person coming on this particular time has to wait.

But by not decreasing the value of end point of each interval by 1, and not considering that point, is giving AC.

Link of the AC code

link text

So please, can someone clarify us, where the first solution is failing. Thanks…