PROGRAMMING:Single queue multi window service for bank queuing problem
Suppose that the bank has $$k $$windows to provide services, a yellow line is set in front of the window, and all customers form a long line at the back of the yellow line according to the arrival time. When a window is free, the next customer will go to the window to process the transaction. When there are multiple windows to choose from, it is assumed that customers always choose the window with the smallest number.
This problem requires the output of the average waiting time, the longest waiting time and the final completion time of the $$n customers waiting for service, and the statistics of how many customers are served in each window.
###Input format:
Enter the first line to give a positive integer $$n $$($$Le 1000 $$), which is the total number of customers; Next, $$n $$line, each line gives a customer's arrival time't 'and transaction processing time' p ', and assumes that the input data has been arranged in the order of arrival time; The last line gives a positive integer, $$k $$($$Le 10 $$), which is the number of business windows opened. Here, it is assumed that the longest time for each customer transaction to be processed is 60 minutes.
###Output format:
In the first line, output the average waiting time (output to 1 decimal place), the longest waiting time and the final completion time, separated by a space, and there should be no extra space at the end of the line.
In the second line, output the number of customers served in each window according to the number increasing order. The numbers are separated by a space, and there should be no extra space at the end of the line.
###Input example:
```in
nine
0 20
1 15
1 61
2 10
10 5
10 3
30 18
31 25
31 2
three
```
###Output example:
```out
6.2 17 61
5 3 1
```
###Thanks to Wang Ruizhou and Zhou Zhentao of Zhejiang University of Finance and economics for revising the test data< br>
answer:If there is no answer, please comment
This problem requires the output of the average waiting time, the longest waiting time and the final completion time of the $$n customers waiting for service, and the statistics of how many customers are served in each window.
###Input format:
Enter the first line to give a positive integer $$n $$($$Le 1000 $$), which is the total number of customers; Next, $$n $$line, each line gives a customer's arrival time't 'and transaction processing time' p ', and assumes that the input data has been arranged in the order of arrival time; The last line gives a positive integer, $$k $$($$Le 10 $$), which is the number of business windows opened. Here, it is assumed that the longest time for each customer transaction to be processed is 60 minutes.
###Output format:
In the first line, output the average waiting time (output to 1 decimal place), the longest waiting time and the final completion time, separated by a space, and there should be no extra space at the end of the line.
In the second line, output the number of customers served in each window according to the number increasing order. The numbers are separated by a space, and there should be no extra space at the end of the line.
###Input example:
```in
nine
0 20
1 15
1 61
2 10
10 5
10 3
30 18
31 25
31 2
three
```
###Output example:
```out
6.2 17 61
5 3 1
```
###Thanks to Wang Ruizhou and Zhou Zhentao of Zhejiang University of Finance and economics for revising the test data< br>
answer:If there is no answer, please comment