Maximum sum of subarray problem

why all the test cases are failed while submitting the code although its is giving right output please help.
#include
using namespace std;
int main()
{
int n;
cin>>n;
int ms;
long int m;
int cs;
long long int ar[10000000000];
while(n–)
{
cin>>m;
for(int i=0;i<m;i++)
{
cin>>ar[i];
}
cs=0;
ms=0;
for(int i=0;i<m;i++)
{

        cs=cs+ar[i];
        if(ar[i]<0)
        {
            cs=0;
        }
        ms=max(cs,ms);
        
    }
    cout<<ms<<endl;
}

}

Please save your code on ide.codingblocks.com and then share its link.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.