luogu#P2053. [SCOI2007] 修车

[SCOI2007] 修车

Problem Description

At time 00, NN customers arrive at an auto repair center with their cars.

There are MM technicians in the center, and the time required by different technicians to repair different cars may differ.

Arrange which cars each of the MM 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 M,NM, N, the number of technicians and the number of customers.

The next NN lines each contain MM integers. In row i+1i+1, the jj-th number denotes the time Ti,jT_{i, j} needed for technician jj to repair car ii.

Output Format

Output the minimum average waiting time, accurate to 22 decimal places.

2 2
3 2
1 4
1.50

Hint

Constraints: For 100%100\% of the testdata, 2M92 \le M \le 9, 1N601 \le N \le 60, 1T1031 \le T \le 10^3.

Translated by ChatGPT 5