#P2053. [SCOI2007] 修车
[SCOI2007] 修车
Description
At time , customers arrive at an auto repair center with their cars.
There are technicians in the center, and the time required by different technicians to repair different cars may differ.
Arrange which cars each of the technicians repairs and in what order, so that the average waiting time of the customers is minimized.
Explanation: A customer's waiting time is the time from when they deliver the car to the repair center until the repair is completed.
Input Format
The first line contains two integers , the number of technicians and the number of customers.
The next lines each contain integers. In row , the -th number denotes the time needed for technician to repair car .
Output Format
Output the minimum average waiting time, accurate to decimal places.
2 2
3 2
1 4
1.50
Hint
Constraints: For of the testdata, , , .
Translated by ChatGPT 5
京公网安备 11011102002149号