Not passing hiden tcs

#include
#include
using namespace std;
int main() {
int t;
cin>>t;
while(t!=0)
{
t–;
int n;
cin>>n;
int *arr=new int[n];

for(int i=0;i<n;++i)
cin>>arr[i];

int cnt=1,m=arr[0];

for(int i=1;i<n;++i)
{
	if(arr[i]>m)
	{
		m=arr[i];
		cnt++;
	}
}
cout<<cnt<<endl;
}
return 0;

}

Have debugged your code for the same, you just forgot >= sign, rest your logic is correct. NOw it will pass all test cases.

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.