Maximum Subarray sum

There is a compilation error in my code

hello @aastha2711
due to too much memory allocation it is giving segmentation fault

image
declare ur array inside first for loop after reading m.
like->
cin>>m;
long long arr[m];

But still all the test cases are failing. It is showing Run error

it is working.
image

pls submit again.

Thanks for the help. It is working.