1540_JobAssignmen

2022-5-16 18:17| 发布者: Hocassian| 查看: 46| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-2-89503901290300-Problem List-采集的数据-后羿采集器.html

Pro.ID

1540

Title

Job Assignment

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=1540

AC

2

Submit

2

Ratio

100.00%

时间&空间限制

  • Time Limit: 3000/1000 MS (Java/Others)     Memory Limit: 65536/32768 K (Java/Others)
  • 描述

    One problem comes up when we are trying to assign jobs about GDCPC to staffs. Because some of them complain that the tasks assigned to them are so bother. This emotion will lead to very bad effect in sequence. So we try to satisfy every staff as possible as we can. At first, we make an investigation to get the information about staffs’ attitude towards every task. And then we evaluate each attitude as a point (a positive integer number not larger than 100). The higher the point is, the more the staff is satisfied. Because the staffs are very busy, they have only a little leisure time to finish the task. So we just assign one task to one person, of course, one task can not be assigned to different persons. Now we give you all the points and hope you can help us to assign the tasks to make the sum of the points which correspond the assignment is maximum.

    输入

    Input will contain several test cases. The first line of each test case only contains one integer number N ( 0 ≤ N ≤ 100 ). N is the number of staffs, also is the number of tasks. And then, the following N lines describe staffs’ attitude. Each line contains n positive integer numbers. The jth number in the ith line describes ith staff‘s attitude to the jth task.

    N=0 indicates the end of input file.

    输出

    Description
    One problem comes up when we are trying to assign jobs about GDCPC to staffs. Because some of them complain that the tasks assigned to them are so bother. This emotion will lead to very bad effect in sequence. So we try to satisfy every staff as possible as we can. At first, we make an investigation to get the information about staffs’ attitude towards every task. And then we evaluate each attitude as a point (a positive integer number not larger than 100). The higher the point is, the more the staff is satisfied. Because the staffs are very busy, they have only a little leisure time to finish the task. So we just assign one task to one person, of course, one task can not be assigned to different persons. Now we give you all the points and hope you can help us to assign the tasks to make the sum of the points which correspond the assignment is maximum.
    Input

    Input will contain several test cases. The first line of each test case only contains one integer number N ( 0 ≤ N ≤ 100 ). N is the number of staffs, also is the number of tasks. And then, the following N lines describe staffs’ attitude. Each line contains n positive integer numbers. The jth number in the ith line describes ith staff‘s attitude to the jth task.

    N=0 indicates the end of input file.

    Output
    For each test case you should output one line, and just one number in this line. The number is the maximum.
    Sample Input
    2
    10 90
    80 100
    3
    50 60 70
    70 75 80
    80 90 100
    0
    Sample Output
    170
    230

    样例输入

    2
    10 90
    80 100
    3
    50 60 70
    70 75 80
    80 90 100
    0

    样例输出

    170
    230

    提示

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部