Saleh127

codeforces 1363A.cpp

May 31st, 2020
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define pi acos(-1)
  6. int main()
  7. {
  8. test
  9. {
  10. ll a,c,d,e=0,o=0,f,i,j,k,l;
  11. cin>>c>>d;
  12. for(i=0; i<c; i++)
  13. {
  14. cin>>a;
  15. if(a%2==1) o++;
  16. else e++;
  17. }
  18. if(o%2==0 && c==d) printf("No\n");
  19. else if(o==0 || (e==0 && d%2==0)) printf("No\n");
  20. else printf("Yes\n");
  21. }
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment