diff options
Diffstat (limited to 'codechef/AjdacentSumParity/main.cpp')
| -rw-r--r-- | codechef/AjdacentSumParity/main.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/codechef/AjdacentSumParity/main.cpp b/codechef/AjdacentSumParity/main.cpp new file mode 100644 index 0000000..899003a --- /dev/null +++ b/codechef/AjdacentSumParity/main.cpp @@ -0,0 +1,26 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--){ + int n; + cin >> n; + vector<int> v(n); + int sum = 0; + for(int &x : v) { + cin >> x; + sum += x; + } + if(sum % 2 == 0) { + cout << "YES" << endl; + } else { + cout << "NO" << endl; + } + + } +} |
