In the problem statement, there is a description of how the students are moved in the queue.
"The way he shifts them is that he tells a student to step out of the queue and go back in queue after another student or to go to the front of the queue."
My initial interpretation was that it was only possible to move the students to one of the two ends of the queue (by either positioning them in the back or the front). This interpretation is wrong.
The correct interpretation is that any student can be re-positioned arbitrarily. The phrase "go back in queue" simply means "return to the queue", and not "go to the back of the queue".
This isn't to call out the problem statement for being ambiguous. I don't think there are any issues with the statement at all. I am just angry at myself for spending over an hour on a problem for misinterpreting its description.
kcits970 10달 전
In the problem statement, there is a description of how the students are moved in the queue.
"The way he shifts them is that he tells a student to step out of the queue and go back in queue after another student or to go to the front of the queue."
My initial interpretation was that it was only possible to move the students to one of the two ends of the queue (by either positioning them in the back or the front). This interpretation is wrong.
The correct interpretation is that any student can be re-positioned arbitrarily. The phrase "go back in queue" simply means "return to the queue", and not "go to the back of the queue".
This isn't to call out the problem statement for being ambiguous. I don't think there are any issues with the statement at all. I am just angry at myself for spending over an hour on a problem for misinterpreting its description.