-
-
Save souradeep99/fb31d76cc7a88425ad9589191bb59319 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
#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