Advertisement
Promi_38

cf 1542A

Oct 3rd, 2021
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include<bits\stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int t;
  8.     cin >> t;
  9.    
  10.     while(t--)
  11.     {
  12.         int n;
  13.         cin >> n;
  14.        
  15.         int a[2*n], i, cnt = 0;
  16.         for(i = 0; i < 2*n; i++)
  17.         {
  18.             cin >> a[i];
  19.             if(a[i] % 2 == 1) cnt++;
  20.         }
  21.         //cout << "cnt " << cnt << endl;
  22.         if(cnt == n) printf("Yes\n");
  23.         else printf("No\n");
  24.     }
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement