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

建议使用的浏览器:

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

3706:System Test

题目描述

A semi-final competition was just over. There are n players. Each player had an SEED number from 1 to n. The competition had m problems in coding phase and challenge phase. The final rank was decided by the total score of the m problems and challenge scores. The higher the total score was, the higher a player ranked. If two players got the same total score, the one with the smaller SEED number got a higher rank. We know that for each problem, how much score each player might get if his solution is correct (if not, the player got 0 in the problem). And we also know how much score each player get during the challenge phase.

After the system-tests, the c1 highest ranked players will advance to the final round, the next c2 highest scoring players will advanced to wildcard round.

Before the system-tests, you need to count how many different combinations of advancers (including finalist and wildcard participants) are possible. Two ranks with same set of finalist and wildcard participants are consider same here. Note that, the players with negative scores can also advance to the final round or wildcard round, because the challenge scores may be smaller than 0.

输入解释

The first line of input four integers n, m, c1, c2, denote the number of players, the number of problems, the number of finalist and the number of player will advanced to wildcard round. 3 ≤ n ≤ 40, 1 ≤ m ≤ 40, c1 ≥ 1, c2 ≥ 1, n-c1-c2 ≥ 1
Following n lines, the i-th line contains m+2 integers Si, Ai1, Ai2, ……Aim, Ci denote the SEED number, the scores of the m problems and the score during the challenge phase for player i. All Si will be distinct. 1 ≤ Sin, 0 ≤ Aij ≤ 1000, -2000 ≤ Ci ≤ 2000

输出解释

The first line of output contains one integer denoting the number of different advancers.  

输入样例
Sample Input 1
3 1 1 1
1 10 0
2 10 0
3 10 0
Sample Input 2
6 1 2 2
1 10 0
2 10 0
3 10 0
4 10 0
5 10 0
6 10 0
输出样例
Sample Output 1
5
Sample Output 2
43
来自北京大学POJ的附加信息
Case time limit(单组数据时间限制) 3000MS

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

源链接: POJ-3706

最后修改于 2020-10-29T07:08:38+00:00 由爬虫自动更新

共提交 0

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