Maximum SubArray

I checked my code on Cb ide and it works fine and shows no runtime error
but while submitting it show run-error.
here is the link to the question
https://hack.codingblocks.com/contests/c/537/1259

code
https://ide.codingblocks.com/s/43842

why it is showing run-error

Hey Ankit, check the constraints given for the problem, 1 <= N <= 100000 and 0 <= A[i] <= 100000000 but you are taking int array so change int to long long int.

1 Like