Help me in solving RATINGINPRAC problem

My issue

why the code is gi ving error?
the output is ok

My code

import java.util.*;
import java.lang.*;
import java.io.*;

class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while(t>0){
		    boolean flag = false;
		    int d = sc.nextInt();
		    int[] arr = new int[d];
		    for(int i = 0;i<d;i++){
		        arr[i] = sc.nextInt();
		   }
		    for(int k=1; k<d;k++){
		        if(arr[k]<arr[k-1]){
		        flag = true;
		        break;
		    }
		    }
		    System.out.println(flag==false?"Yes":"No");
		}
		

	}
}

Learning course: Arrays using Java
Problem Link: Difficulty Rating Order Practice Problem in - CodeChef

@avijit015
u have to do t–>0 instead of t>0