-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test case 4_3 #376
Comments
Hi! I've had this issue, which I realised was because I removed a customer from the queue immediately at done event. If you dequeue too early, customers that come in during the rest time may join the queue instead of leaving. |
Yup this was my issue too, one way of doing it is to create another event that helps to delay the removal of the next customer of the queue until the server has finish resting. |
The issue stems from the server accepting a customer when it is resting. Hence, the problem lies with the queueing of customers for the server itself. |
I got this issue as well. In my case that is because I do not mark the Server currently Serving as unavailable, so the queue is messed up and when customer 14 comes he goes to Server 1, in which the queue should be full. If you want to construct the input for this particular test case, you can retrieve the info you needed from sample test case 3 of level 5 in the problem statement and try it using Main4. My friend told me this and although I do not guarantee the hidden test use the exact same input, after passing that constructed input I passes the hidden test. Good luck! |
I had this problem too. Mine was reducing the queue length when the server is done even though it was resting. I addressed it by creating another event for server resting, where it will only dequeue after the rest time is completed. |
i also encounter this issue, this is because the queue can take in new customer regardless of whether the server is at rest. However, the server can only serve the next customer once it done resting. So I think you need to check which queue still got place |
Summary
I am unable to pass test case 4_3 because customer waits at the wrong server which leads to subsequent errors.
Description
As mentioned above, customer waits at wrong server number despite code passing level 3. Is there any thing that i should take note of?
Screenshots (if any):
The text was updated successfully, but these errors were encountered: