当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2554:Fixed Partition Contest Management

Special Judge 特殊评判
题目描述
A technique used in early programming contest strategies involved partitioning the available intellectual capacity of a team into a number of members with each member having a fixed amount of intelligence, different members potentially having different amounts. The sum of the brightness of all members equals the total intellectual capacity of the team.

Given a set of problems, it was the task of the team to assign the problems to different team members, so that they could be solved concurrently. This was made difficult due to the fact that the solution time of a problem might depend on the amount of intelligence available to it. Every problem has a minimum intelligence requirement, but if assigned to a brighter member its solution time might increase or decrease.

In this task, you have to determine optimal assignments of problems to team members. Your program is given the intellectual capacities of the team members available for the solution of problems, and for each problem a description of how its solution time depends on the amount of intelligence available to it. Your program has to find the solution schedule of the problems that minimizes the average solution time for the problems. A solution schedule is an assignment of problems to team members and times, such that no two problems use the same member at the same time, and no problem is assigned to a team member with less brightness than its minimum requirement. The solution time of the problem is the difference between the time when the problem was submitted to be solved (which is the start of the contest at time zero for all problems in this task), and the time that the problem is solved.
输入解释
The input data will contain multiple test cases. Each test case begins with a line containing a pair of integers m and n. The number m specifies the number of team members (1 <= m <= 3), and n specifies the number of problems to be solved (1 <= n <= 10).
The next line contains m positive integers giving the intelligence amounts of the m team members. Following this are n lines, describing the time-brightness tradeoffs for each of the n problems. Each line starts with a positive integer k (k <= 10), followed by k pairs of positive integers s1,t1,s2,t2,...,sk,tk that satisfy si < si+1 for 1 <= i < k. The minimum intelligence requirement of the problem is s1, i.e. it cannot be solved by a member with less intellectual capacity than this number. If the problem is solved by a team member with brightness s, where si <= s < si+1 for some i, then its solution time will be ti. Finally, if the problem is solved by a team member with intellectual capacity sk or more, then its execution time will be tk.
A pair of zeroes will follow the input for the last test case.

You may assume that each problem will be solved in exactly the time specified for the given brightness, regardless of the number of other problems being solved by other team members at the same time. No problem will have an intelligence requirement larger than that of the brightest team member.
输出解释
For each test case, first display the case number (starting with 1 and increasing sequentially). Then print the minimum average solution time for the set of problems with two digits to the right of the decimal point. Follow this by the description of a solution schedule that achieves this average solution time. Display one line for each problem, in the order they were given in the input, that identifies the problem number, the member used to solve it (numbered in the order given in the input), the time when the member started to solve the problem, and the time when the problem was solved. Follow the format shown in the sample output, and print a blank line after each test case.
输入样例
2 4
40 60
1 35 4
1 20 3
1 40 10
1 60 7
3 5
10 20 30
2 10 50 12 30
2 10 100 20 25
1 25 19
1 19 41
2 10 18 30 42
0 0
输出样例
Case 1
Average solution time = 7.75
Problem 1 is solved by member 2 from 0 to 4
Problem 2 is solved by member 1 from 0 to 3
Problem 3 is solved by member 1 from 3 to 13
Problem 4 is solved by member 2 from 4 to 11

Case 2
Average solution time = 35.40
Problem 1 is solved by member 3 from 19 to 49
Problem 2 is solved by member 2 from 0 to 25
Problem 3 is solved by member 3 from 0 to 19
Problem 4 is solved by member 2 from 25 to 66
Problem 5 is solved by member 1 from 0 to 18

该题目是Virtual Judge题目,来自 北京大学POJ

题目来源 Ulm Local 2003

源链接: POJ-2554

最后修改于 2020-10-29T06:35:44+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 65536