#include
using namespace std;
int main() {
int t;
cin>>t;int max,count=1,n,num;
while(t–)
{
cin>>n>>max;
while(--n)
{
cin>>num;
if(max>=num){
max=num;++count;}
}
cout<<count;
}
return 0;
}
#include
using namespace std;
int main() {
int t;
cin>>t;int max,count=1,n,num;
while(t–)
{
cin>>n>>max;
while(--n)
{
cin>>num;
if(max>=num){
max=num;++count;}
}
cout<<count;
}
return 0;
}
Hi @abhishek818
Here is your fixed code -
[1].
Hope this helped :)
[1]: https://www.codechef.com/viewsolution/23604919