why my answer is wrong.On my computer it shows correct answer.Where my code is wrong ?
import java.util.Scanner;
class CarRace {
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
int t = s.nextInt();
int car =1,MAX=0;
while(t–>0)
{
int n = s.nextInt();
MAX = s.nextInt();
for(int i=1; i<n; i++)
{
int car1 = s.nextInt();
if(car1<=MAX)
{
car++;
MAX = car1;
}
}
System.out.println(car);
}
}
}