Preparing NOJ

Teamwork

1000ms 65536K

Description:

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.

Input:

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.

Output:

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

Sample Input:

4
2 -1
4 -2
1 1

Sample Output:

2 3 4

Info

NOIOPEN

Provider NOIOPEN

Origin 简单英文题

Code NOIOPJENGLISH21

Tags

Submitted 0

Passed 0

AC Rate 0%

Date 08/15/2021 18:56:23

Related

Nothing Yet