Why is this carvan problem failing?

// A fast IO program
#include <bits/stdc++.h>
#include
using namespace std;
int main()
{
int T,*arr,n,i,cars;
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin>>T;
while((T–)>0)
{
cin>>n;
arr=new int[n];

for(i=0;i<n;i++)
cin>>arr[i];
cars=1;
for(i=0;i<n-1;i++)
{
if(arr[i]>=arr[i+1])
{
cars++;
}
}
delete(arr);
cout<<cars<<"\n";
}
return 0;
}