For what test case this code is wrong?

ques link-Problem - C - Codeforces

sol–Submission #71576477 - Codeforces

2 10
8 -8 7
16 -10 -5