Submission #1091518
Source Code Expand
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define mp make_pair #define inf 1000000005 #define all(a) (a).begin(), (a).end() #define ms(a,x) memset(a, x, sizeof(a)) #define mod 1000000007 #define sz(a) ((int)(a).size()) template<class T> int getbit(T s, int i) { return (s >> i) & 1; } template<class T> T onbit(T s, int i) { return s | (T(1) << i); } template<class T> T offbit(T s, int i) { return s & (~(T(1) << i)); } template<class T> int cntbit(T s) { return __builtin_popcount(s);} #define Rep(i,n) for(int i = 0; i < (n); ++i) #define Repd(i,n) for(int i = (n)-1; i >= 0; --i) #define For(i,a,b) for(int i = (a); i <= (b); ++i) #define Ford(i,a,b) for(int i = (a); i >= (b); --i) typedef unsigned long long ull; typedef long long ll; typedef double ld; #define eps 1e-12 typedef pair<int, int> II; typedef pair<ll, ll> LL; template<class T> T gcd(T a, T b){ T r; while (b != 0) { r = a % b; a = b; b = r; } return a;} template<class T> T lcm(T a, T b) { return a / gcd(a, b) * b; } #define PI (2 * acos(0)) #define linf (1ll << 60) #define maxn 1000005 int n, a; int main(){ // freopen("in.txt", "r", stdin); ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> n; int res = 0; Rep(i, n){ cin >> a; if(a & 1) res++; } if(res % 2 == 0) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Addition |
User | Zero_sharp |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 1474 Byte |
Status | AC |
Exec Time | 13 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt |
All | sample1.txt, sample2.txt, in1.txt, in10.txt, in11.txt, in12.txt, in2.txt, in3.txt, in4.txt, in5.txt, in6.txt, in7.txt, in8.txt, in9.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in1.txt | AC | 13 ms | 256 KB |
in10.txt | AC | 13 ms | 256 KB |
in11.txt | AC | 3 ms | 256 KB |
in12.txt | AC | 2 ms | 256 KB |
in2.txt | AC | 13 ms | 256 KB |
in3.txt | AC | 13 ms | 256 KB |
in4.txt | AC | 13 ms | 256 KB |
in5.txt | AC | 13 ms | 256 KB |
in6.txt | AC | 13 ms | 256 KB |
in7.txt | AC | 13 ms | 256 KB |
in8.txt | AC | 13 ms | 256 KB |
in9.txt | AC | 13 ms | 256 KB |
sample1.txt | AC | 3 ms | 256 KB |
sample2.txt | AC | 2 ms | 256 KB |