This is the hard version of the problem. The only difference is that in this version
There are
You start with
What is the largest number of potions you can drink?
The first line contains a single integer
The next line contains
Output a single integer, the maximum number of potions you can drink without your health becoming negative.
6 4 -4 1 -3 1 -3
5
For the sample, you can drink
Copyright (c) 2020 insureinsurancelife All Right Reseved
Social Plugin