Facing MLE in this code

I m facing MLE with this code. Cant dind the reason
#include
#include
using namespace std;

int main() {
long long t,n;
long long a[10000];
cin>>t;
while(t–){
cin>>n;
for(long long i=0;i<n;i++){
cin>>a[i];
}
long long currsum=0;
long long max_so_far=INT_MIN;
for(long long i=0;i<n;i++){
currsum=currsum+a[i];
if(currsum>max_so_far){
max_so_far=currsum;
}
if(currsum<0){
currsum=0;
}

	}
	cout<<max_so_far<<endl;
}
return 0;

}

hi @riagoel3999 i can see u got 100 points hope its done…