AdvancedRating 1800
Assign Workers to Jobs
n workers and n jobs; worker i doing job j costs cᵢⱼ. Give each worker exactly one job (each job to one worker) and print the least total cost.
Input
n (≤ 15); then an n × n cost table.
Output
One integer.
Sample 1
Input
3 9 2 7 6 4 3 5 8 1
Output
9
Sample 2
Input
1 5
Output
5
Output appears here