Submission #2213127
Source Code Expand
#include<bits/stdc++.h> using namespace std; #define inf 1e9 #define ll long long #define M 1000000007 #define P pair<int,int> #define FOR(i,m,n) for(int i=m;i<n;i++) #define rep(i,n) FOR(i,0,n) const int vx[4] = {0,1,0,-1}; const int vy[4] = {1,0,-1,0}; #define PI 3.14159265 int n; int a,b; bool ans; bool f(int c){ while(c%2==0) c/=2; if(c==1) return false; return true; } int main(){ cin>>n; rep(i,n){ int c; cin>>c; if(c%2) a++; else b++; } if(a%2){ cout<<"NO"<<endl; return 0; } b+=a/2; if(f(b)) cout<<"NO"<<endl; else cout<<"YES"<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Addition |
User | mint |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 672 Byte |
Status | WA |
Exec Time | 54 ms |
Memory | 256 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, sample1.txt, sample2.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in1.txt | WA | 53 ms | 256 KB |
in10.txt | WA | 54 ms | 256 KB |
in11.txt | AC | 1 ms | 256 KB |
in12.txt | AC | 1 ms | 256 KB |
in2.txt | WA | 53 ms | 256 KB |
in3.txt | WA | 54 ms | 256 KB |
in4.txt | AC | 53 ms | 256 KB |
in5.txt | AC | 54 ms | 256 KB |
in6.txt | AC | 53 ms | 256 KB |
in7.txt | AC | 54 ms | 256 KB |
in8.txt | AC | 53 ms | 256 KB |
in9.txt | WA | 53 ms | 256 KB |
sample1.txt | AC | 1 ms | 256 KB |
sample2.txt | AC | 1 ms | 256 KB |