Getting TLE in kadane algo

my code
#include
using namespace std;
int main() {
int t;
int cs=0,ms=0;
cin>>t;
while(t>0){
int n;
cin>>n;
int arr[n];
for(int i=0;i<n;i++){
cin>>arr[i];
cs=cs + arr[i];
if(cs<0){
cs=0;
}
ms=max(cs,ms);

}
cout<<ms;
}
return 0;

}
what to do

You are not decrementing the value of t which is for the test case. So it is leading to an infinite loop.