import java.util.*;
class codechef
{
public static void main(String args[])
{
try{
int T,N,i,j,flag=0,anti=0;
Scanner sc = new Scanner(System.in);
// System.out.println(“enter number of test cases”);
T=sc.nextInt();
//int a[]=new int[T];
int b[];
String result[]=new String[T];
for(i=0;i<T;i++)
{
//System.out.print(“enter no. of elements present in array”);
N=sc.nextInt();
b=new int[N];
for(j=0;j<N;j++)
{
//System.out.print("enter element ");
b[j]=sc.nextInt();
}
anti=N-1;
for(j=0;j<N/2;j++)
{
if(b[j]==b[anti--])
flag++;
else
break;
}
if((flag==N/2) && (b[N/2]==7))
result[i]="yes";
else
result[i]="no";
}
for(i=0;i<T;i++)
System.out.println(result[i]);
}
catch(Exception e){
return;
}
}
}
when i submit,it’s showing wrong answer