#include
using namespace std;
int main(){
int t;
cin>>t;
for(int z=1;z<=t;z++){
int cs=0,ms=0,cs1=0,ms1=0,ms2=0;
int n;
cin>>n;
int arr1[n];
int arr2[n];
for(int i=1;i<=n;i++)
{
cin>>arr1[i];
}
for(int i=1;i<=n;i++){
cs=cs+arr1[i];
cs = cs<=0?0:cs;
ms=max(ms,cs);
}
int cad1;
cad1=ms;
for(int i=1;i<=n;i++)
{
arr2[i]=-arr1[i];
}
for(int i=1;i<=n;i++){
cs1=cs1+arr2[i];
cs1 = cs1<=0?0:cs1;
ms1=max(ms1,cs1);
}
int cad2=0;
cad2=(cs-(-ms1)) ;
ms2=max(cad1,cad2);
cout<<(ms2);
return 0;}}
what is wrong in this code testcases are not passing