In this question my code is running fine according to the sample input and I can’t find where is the problem at my code . It’s showing wrong answer while submitting .
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--){
int n;
cin>>n;
int arr[n];
for(int i=0; i<n; i++){
cin>>arr[i];
}
int ans=1;
for(int i=1; i<n; i++){
if(arr[i-1]>=arr[i]){
ans++;
}
}
cout<<ans<<"\n";
}
return 0;
}