Just Eat It!
MediumRating 1300Codeforces1-D Dynamic Programming
Approach hintTry it first, then revealHide
Yasser is happy only if every segment other than the whole array has a smaller sum than the total. That holds exactly when every proper prefix and every proper suffix has a positive sum; Kadane's algorithm restricted to proper segments also works.