Careless Chef Solution || Codechef Starters - 26

     

Careless Chef Solution 

Codechef Starters - 26
Problem Code : 

Solution :

#include <bits/stdc++.h>
#define ll long long int
#define ull unsigned long long int
using namespace std;

void solve()
{
    ll n;
    cin >> n;
    ll s = 0;
    for (ll i = 0; i < 2 * n; i++)
    {
        ll temp;
        cin >> temp;
        s += temp;
    }
    if (s % 2 == 0)
    {
        cout << "YES\n";
    }
    else
    {
        cout << "NO\n";
    }
}

int main()
{
    ll t;
    cin >> t;
    while (t--)
    {
        solve();
    }
}

Comments