Looking for a general solution to a retroactive bugaboo.

Revision en3, by Codeforcer, 2021-06-10 17:11:21

Recently I solved this problem. Upon first reading this and before solving it, I thought of many other possible approaches like which would either TLE/MLE. One of them being to maintain a dp; Until I finally realized the retroactiveness the question demands. If you look at it closely it is the same as this task. Now I have a few "questions" on how to solve a more general version of it if...

1 The A was variable i.e. we are also given an array each having some A[i] with atmost one drink per day.

2 Instead of atmost 1 drink per day, We are allowed to choose any number of drinks per day with given A[i]'s

If you have any thoughts or ideas on this one please make sure to share. As for me, it is the first time I have seen such variations in such a problem with these constraints. Also can we even solve it in some efficient complexity ? I am very eager to know.

P.S I have used bugaboo, task, problem and question so that no one feels hurt!

Thanks for reading !

Tags variation, new, problem

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Codeforcer 2021-06-10 17:11:21 111 Tiny change: 'ave a few questions on how to' -> 'ave a few "questions" on how to'
en2 English Codeforcer 2021-06-10 17:05:11 34 (published)
en1 English Codeforcer 2021-06-10 17:02:27 1088 Initial revision (saved to drafts)