I have a probelm in understanding the question
https://codeforces.com/contest/1526/problem/C1
here in the output even if he takes 5 poitions still its negative,
how come the output is 5???
I have a probelm in understanding the question
https://codeforces.com/contest/1526/problem/C1
here in the output even if he takes 5 poitions still its negative,
how come the output is 5???
4 -4 1 -3 1 -3
1 2 3 4 5 6
Health = 0
drink 1, health = 4
dont drink 2
drink 3, health = 5
drink 4, health = 2
drink 5, health = 3
drink 6, health = 0
What is the problem here?
If the person drinks drink 2 then health becomes 0 and then he wont be able to drink #4 and #6
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.