Please read the new rule regarding the restriction on the use of AI tools. ×

VB22's blog

By VB22, history, 14 months ago, In English

Given an array A which denotes scores of various tasks, B denoting decay/sec in score of tasks and C denoting time taken to complete the tasks determine the maximum score achievable if tasks are done one by one in any order but you need to complete 1 task before moving on to other. Also, score decay stops when score for the task reaches 0.

eg. A [10,10,10]

B [1,2,3]

C [2,2,2]

Ans->12

I know how to do it if scores were allowed to go negative using the exchange theorem but how to do it if decay stops when the score reaches 0?

  • Vote: I like it
  • 0
  • Vote: I do not like it