Getting wrong answer

Hii…
I am doing this question from codeforces…
This is the question…
https://codeforces.com/problemset/problem/934/A
This is my solution…
https://codeforces.com/contest/934/submission/96227761
It is showing wrong answer on test case - 14.
I am not able to understand where my code is failing… Please see this

Hey @ashishnnnnn
Giving WA for a simple tc like this :
2 3
6 1
-8 -4 10

Please check the editorial :slight_smile: