Skip to content

Instantly share code, notes, and snippets.

@souradeep99
Last active July 14, 2020 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save souradeep99/fc4b6cc175e9bb5732a9f9ef23325e27 to your computer and use it in GitHub Desktop.
Save souradeep99/fc4b6cc175e9bb5732a9f9ef23325e27 to your computer and use it in GitHub Desktop.
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
class Solution {
public static void main(String[] args) throws Exception {
Scanner in=new Scanner(System.in);
int i,j;
int t=in.nextInt();
while(t-->0){
int n=in.nextInt();
int arr[]=new int[n];
int f=0;
for(i=0;i<n;i++){
arr[i]=in.nextInt();
if(arr[i]%2==0)
f=1;
}
if(f==0)
System.out.println("YES");
else
System.out.println("NO");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment