Submission #1091697
Source Code Expand
#include <iostream> #include <vector> #include <cmath> #include <cstdio> #include <queue> #include <set> #include <map> #include <climits> #include <string> #include <string.h> #include <algorithm> using namespace std; #define fast ios::sync_with_stdio(false);cin.tie(0); cout.tie(0) #define pb push_back #define sz(s) (int)s.size() #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define forn(i, n) for (int i = 0; i < (int)(n); ++i) #define for1(i, n) for (int i = 1; i <= (int)(n); ++i) typedef long long ll; typedef pair<ll, ll> pii; const ll N = (ll)1e6 + 7; ll mpow(ll a, ll b, ll m){ ll ans=1; while(b){ if(b&1) ans=ans*a%m; a=a*a%m; b/=2; } return ans; } ll modinv(ll a, ll m){ return mpow(a,m-2,m); } int main() { fast; int n,a[100100],x=0; cin>>n; forn(i,n){ cin>>a[i]; if(a[i]&1) x++; } if(x%2==0) cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Addition |
User | gtpan77 |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 1042 Byte |
Status | AC |
Exec Time | 14 ms |
Memory | 640 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 | 14 ms | 640 KB |
in10.txt | AC | 13 ms | 640 KB |
in11.txt | AC | 3 ms | 256 KB |
in12.txt | AC | 3 ms | 256 KB |
in2.txt | AC | 13 ms | 640 KB |
in3.txt | AC | 13 ms | 640 KB |
in4.txt | AC | 13 ms | 640 KB |
in5.txt | AC | 13 ms | 640 KB |
in6.txt | AC | 13 ms | 640 KB |
in7.txt | AC | 13 ms | 640 KB |
in8.txt | AC | 13 ms | 640 KB |
in9.txt | AC | 13 ms | 640 KB |
sample1.txt | AC | 3 ms | 256 KB |
sample2.txt | AC | 3 ms | 256 KB |