Skip to content

Instantly share code, notes, and snippets.

@souradeep99
Created July 14, 2020 11:20
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/fb31d76cc7a88425ad9589191bb59319 to your computer and use it in GitHub Desktop.
Save souradeep99/fb31d76cc7a88425ad9589191bb59319 to your computer and use it in GitHub Desktop.
#include<bits/stdc++.h>
using namespace std;
const int MAXN = 1e3 + 5;
int n;
int arr[MAXN];
void solve(){
int i = 0;
for(i = 0; i < n; i++){
if(!(arr[i] % 2)){
cout << "NO\n";
return;
}
}
cout << "YES\n";
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin >> t;
while(t--){
cin >> n;
int i = 0;
for(i = 0; i < n; i++)
cin >> arr[i];
solve();
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment