Wrong answer in Maximum subarray sum

The given input gives the right output but when I submit the code, it says ‘wrong answer’. Pls check my code.