Submission #1091705
Source Code Expand
// #includes {{{ #include <bits/stdc++.h> using namespace std; // }}} // pre-written code {{{ #define REP(i,n) for(int i=0;i<(int)(n);++i) #define RREP(i,a,b) for(int i=(int)(a);i<(int)(b);++i) #define FOR(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();++i) #define LET(x,a) __typeof(a) x(a) //#define IFOR(i,it,c) for(__typeof((c).begin())it=(c).begin();it!=(c).end();++it,++i) #define ALL(c) (c).begin(), (c).end() #define MP make_pair #define EXIST(e,s) ((s).find(e)!=(s).end()) #define RESET(a) memset((a),0,sizeof(a)) #define SET(a) memset((a),-1,sizeof(a)) #define PB push_back #define DEC(it,command) __typeof(command) it=command //debug #define dump(x) cerr << #x << " = " << (x) << endl; #define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl; #define debug2(x) cerr << #x << " = [";REP(__ind,(x).size()){cerr << (x)[__ind] << ", ";}cerr << "] (L" << __LINE__ << ")" << endl; const int INF=0x3f3f3f3f; typedef long long Int; typedef unsigned long long uInt; typedef long double rn; typedef pair<int,int> pii; /* #ifdef MYDEBUG #include"debug.h" #include"print.h" #endif */ // }}} int N; int A[100010]; int main(){ cin>>N; REP(i,N)cin>>A[i]; int o=0,e=0; REP(i,N){ if(A[i]%2==1)o++; else e++; } if(o%2==1){ cout<<"NO"<<endl; }else{ e+=o/2; if(e%2==1)cout<<"NO"<<endl; else cout<<"YES"<<endl; } }
Submission Info
Submission Time | |
---|---|
Task | A - Addition |
User | chaemon |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1451 Byte |
Status | WA |
Exec Time | 53 ms |
Memory | 768 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 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 | WA | 53 ms | 768 KB |
in10.txt | AC | 48 ms | 640 KB |
in11.txt | WA | 3 ms | 256 KB |
in12.txt | AC | 3 ms | 256 KB |
in2.txt | AC | 47 ms | 640 KB |
in3.txt | WA | 47 ms | 640 KB |
in4.txt | AC | 47 ms | 640 KB |
in5.txt | AC | 47 ms | 640 KB |
in6.txt | AC | 47 ms | 640 KB |
in7.txt | AC | 47 ms | 640 KB |
in8.txt | AC | 47 ms | 768 KB |
in9.txt | AC | 47 ms | 640 KB |
sample1.txt | AC | 3 ms | 256 KB |
sample2.txt | AC | 3 ms | 256 KB |