Hidden test case issue hostel visit

https://ide.codingblocks.com/s/107016 please check why the hidden test cases are not working

hi samriddhi
i have replied on your previous doubt for the same question.
you can refer there

Thank you ma’am. I did check that. Still the hidden test cases are not working. https://ide.codingblocks.com/s/107141

if i provide around 1000 or 10000 inputs in your code it is giving wrong answer

First of all use long long int. Second your else condition when the case is t==2 is wrong. Don’t pop and decrease the counter.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.