Submission #1091505
Source Code Expand
#include <iostream> #include <cmath> #include <vector> #include <map> #include <set> #include <string> #include <cstring> #include <queue> #include <ctime> #include <cassert> #include <cstdio> #include <algorithm> #include <unordered_set> #include <unordered_map> #include <bitset> using namespace std; #define F first #define S second #define mp make_pair #define pb push_back #define epr(...) fprintf(stderr, __VA_ARGS__) #define db(x) cerr << #x << " = " << x << endl #define db2(x, y) cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")\n"; #define db3(x, y, z) cerr << "(" << #x << ", " << #y << ", " << #z << ") = (" << x << ", " << y << ", " << z << ")\n" #define all(a) (a).begin(), (a).end() #define sz(a) (int)a.size() #define pw(n) (1ll << (n)) #define equal equalll #define less lesss const int N = -1; const long long INF = 1e9 + 19; typedef long long ll; typedef vector<int> vi; typedef pair<int,int> pi; int n; void read() { cin >> n; int sum = 0; for (int i = 0; i < n; i++) { int y; cin >> y; sum = (sum + y) % 2; } if (sum == 0) puts("YES"); else puts("NO"); } void solve() { } void stress() { } int main(){ #ifdef HOME freopen("in", "r", stdin); #endif if (1) { read(); solve(); } else { stress(); } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Addition |
User | Belonogov |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 1453 Byte |
Status | AC |
Exec Time | 54 ms |
Memory | 764 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 | 54 ms | 764 KB |
in10.txt | AC | 46 ms | 256 KB |
in11.txt | AC | 2 ms | 256 KB |
in12.txt | AC | 2 ms | 256 KB |
in2.txt | AC | 46 ms | 256 KB |
in3.txt | AC | 46 ms | 256 KB |
in4.txt | AC | 46 ms | 256 KB |
in5.txt | AC | 46 ms | 256 KB |
in6.txt | AC | 46 ms | 256 KB |
in7.txt | AC | 46 ms | 256 KB |
in8.txt | AC | 46 ms | 256 KB |
in9.txt | AC | 46 ms | 256 KB |
sample1.txt | AC | 2 ms | 256 KB |
sample2.txt | AC | 2 ms | 256 KB |