描述:
There are N candidates. Each candidate has a cooperation value and a working value. Select a subset of candidates to form a team, such that the sum of cooperation values is positive and the sum of working values is maximum.
输入:
First line: one positive integer N (N <= 100).
Next N lines: the i-th line contains two integers (between -100 and 100), indicating the cooperation value and the working value of the i-th candidate.
输出:
One line contains several integers, indicating the indexes of selected candidates.
样例输入:
4 2 -1 4 -2 1 1
样例输出:
2 3 4
描述:
这有n个候选,每个候选人都有他的合作价值和工作价值. 从一组候选人中选择一个团体,使其合作价值大于0,工作价值最大
输入:
第一行一个正整数 N (N <= 100).
接下来N行: 第i行包含俩个整数 ( -100 ~100),分别代表第i个候选人的合作价值和工作价值。
输出:
一行包含几个整数, 表示被选中候选人的序号.