Teamwork(NOIOPJENGLISH21)

Teamwork

https://acs.jxnu.edu.cn/problem/NOIOPJENGLISH21

 1000ms  65536K

描述:

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.

有n位候选人,每个候选人有一个合作值和一个工作值,在候选人队伍中挑选一个子集,使他们的合作值为正,工作值最大

输入:

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.

第一行:一个正整数表示n

接下来n行:第i行包含两个整数,表示第i个候选人的合作值和工作值

输出:

One line contains several integers, indicating the indexes of selected candidates.

一行包含数个数表示候选人的序号

样例输入:

4
2 -1
4 -2
1 1

样例输出:

2 3 4


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部