https://ide.codingblocks.com/s/372731 All test cases show run error though the sample test case passes. Why is this happening ?
Run Error On Subarray Sum
hello @diganta_7777
its becuase of array size . 100 is not enough size.u may have elements more than 100(check constraints )
declare ur array like this(inside first loop) and then try
int n;
cin>>n;
int a[n]; // this will always allocate the required amount of memory so no chances of array.
I had already tried that…it was showing the same error
Yes! Now it’s working! Thank You