Wont able to understand this TLE output

#include
using namespace std;

int main() {
int T;
cin >> T;
if(T > 20 || T < 1)
return 0;
while(T–)
{
int N;
cin >> N;
int arr[N];
long int sum = 0, cmax = 0;
for(int i=0; i<N; i++)
cin >> arr[i];

    for(int i=0; i<N-1; i++)
    {
        sum = arr[i];
        for(int j=i+1; j<N; j++)
        {   
            sum = sum + arr[j];
            if(sum > cmax)
                cmax = sum;  
        }
    }
    cout << cmax << endl;
}
return 0;

}

Please share your code using ide.codingblocks.com
Else I won’t be able to debug it.

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.