-->
当前位置:首页 > 题库

PROGRAMMING:Assignment problem

Luz5年前 (2021-05-10)题库357
There are n jobs assigned to n people. The cost of assigning work I to the j-th person is CIJ. Design an algorithm, for a given cost of work, for each person to allocate a different job, and make the total cost to the minimum.
###Input format:
The first line of input data has a positive integer n (1 ≤ n ≤ 20). The next N lines, n numbers per line, represent the work cost.
###Output format:
Output the calculated minimum total cost to the screen.
###Input example:
Here is a set of inputs. For example:
```in
three
10 2 3
2 3 4
3 4 5
```
###Output example:
The corresponding output is given here. For example:
```out
nine
```







answer:If there is no answer, please comment