Created
March 19, 2023 17:10
-
-
Save qjatn0120/966db7df6d7772671d5bc902525200fe 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; | |
int main(){ | |
cin.tie(nullptr), ios::sync_with_stdio(false); | |
int t; | |
cin >> t; | |
while(t--){ | |
int n; | |
cin >> n; | |
int a, sum1 = 0, sum2 = 0; | |
while(n--){ | |
cin >> a; | |
if(a & 1) sum2 += a; | |
else sum1 += a; | |
} | |
cout << (sum1 > sum2 ? "Yes\n" : "No\n"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment