I m getting a run error. what does this mean ?also when I run the code on my terminal it works perfectly fine .what to do?

#include
#include
using namespace std;

int main(int argc, char const *argv[])
{
int T;
cin>>T;

while(T--){
	int N;
	cin>>N;

	int a[1000];

	for(int i=0;i<N;i++){
		cin>>a[i];
	}
	int max_sum=INT_MIN;
    int sum; 
	for(int i=0;i<N;i++){
		

		for(int j=i;j<N;j++){
			int sum=0;
			for(int k=i;k<=j;k++){
				sum=sum+a[k];
			}
			if(sum>max_sum){
			    max_sum=sum;
		    }
		}
		
	}
	cout<<max_sum<<endl;
	
}

return 0;

}

I m getting a run error what does this mean
also when I run the code on my terminal it works perfectly fine

@somesh.ps please save your code on ide.codingblocks.com and share the link. Run error means that you are probably trying to access a memory location that is not there

@somesh.ps what is the issue that you are facing now?

@somesh.ps i have made some changes to your code it is now passing all test cases