Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

Any hints regarding this problem ?

Revision en1, by aknov711, 2022-10-07 11:31:33

Given N tasks in a game which need to be performed in any order. Initially, we have a power of 1 unit and speed of 1 unit. The $$$i^{th}$$$ task requires a minimum of $$$A_{i}$$$ power or $$$B_{i}$$$ speed. On completing the ith task we get $$$C_{i}$$$ points which can be used to increase speed or power. 1 point can be used to increase 1 power or 1 speed. Find the maximum number of tasks that can be completed.

1<=N<=100

1<=A[i],B[i],C[i]<=1000

Example:

Input:

A=[1,1,2,7]

B=[1,3,4,4]

C=[2,3,1,1]

Output: 4

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English aknov711 2022-10-07 11:31:33 561 Initial revision (published)