SP684 ASSIGN4 - Another Assignment Problem
Description
Assume that you are a manager and there are m types of worker (numbered from 1 to m) and n types of task (numbered from 1 to n). There are a(i) workers of type #i and b(j) postitions for task #j. C(i, j) is the cost of hiring a worker of type #i to do the task of type #j. Your job is to minimize the cost of hiring workers to fill all the positions given that the total number of workers is equal to the total number of positions.
Input Format
The first line of input contains the number of test cases nTest (1
Output Format
For each test case write the minimum cost in a separate line (it will fit in a signed 32-bit integer).