-
-
Save souradeep99/fc4b6cc175e9bb5732a9f9ef23325e27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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