Ankit_132

A

Aug 7th, 2023
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. #define ll     long long
  6. #define _test   int _TEST; cin>>_TEST; while(_TEST--)
  7. #define pb     push_back
  8.  
  9. int main()
  10. {
  11.     _test
  12.     {
  13.         int n;
  14.         cin>>n;
  15.        
  16.         vector<int> a(n);
  17.         for(auto &e: a)
  18.             cin>>e;
  19.        
  20.         int cntOdd = 0;
  21.        
  22.         for(auto e: a)
  23.             cntOdd += (e%2);
  24.        
  25.         if(cntOdd%2)cout<<"NO\n";
  26.         else        cout<<"YES\n";
  27.     }
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment