t 
	Time
(ms)	Mem
(MB)	Lang 
	Submit Time
dorpoush
D
 Submit Failed
C++
8 hr ago
mostafarastegar
B
 Submit Failed
C++
8 hr ago
dorpoush
C
 Submit Failed
C++
8 hr ago
Mohmmd_jfz
D
 Submit Failed
C++
8 hr ago
Mohmmd_jfz
C
 Submit Failed
C++
8 hr ago
mahdivp
C
 Submit Failed
C++
8 hr ago
AZARKASB
C
 Submit Failed
C++
8 hr ago
alirezakermani
C
 Submit Failed
C++
8 hr ago
behnood78
A
 Submit Failed
C++
8 hr ago
mostafarastegar
B
 Submit Failed
C++
8 hr ago
saleh_p
B
 Submit Failed
C++
8 hr ago
mahdivp
B
 Submit Failed
C++
8 hr ago
mostafarastegar
B
 Submit Failed
C++
8 hr ago
erfan_tamimi
C
 Submit Failed
C++
9 hr ago
saleh_p
B
 Submit Failed
C++
9 hr ago
aarr
B
 Submit Failed
C++
9 hr ago
aarr
B
 Submit Failed
C++
9 hr ago
amir_mrd
D
 Submit Failed
C++
9 hr ago
saleh_p
D
 Submit Failed
C++
9 hr ago
saleh_p
C
 Submit Failed
C++
9 hr ago
           
All Copyright Reserved ©2018 Xu Han
Server Time: 2019-02-12 19:59:39 UTC+3.5

#18205611 | saleh_p's solution for [AtCoder-2686] [Problem C]
Status
Submit Failed 
Length
497
Lang
C++14 (GCC 5.3.0)
Submitted
2019-02-12 11:14:08
Shared

Select Code
#include <bits/stdc++.h>

using namespace std;
typedef pair <int, int> pii;

const int maxn = 100001;

int n,a,q,w,e,s;

void input();
void solve();

int main(){
	input();
	solve();
	
	return 0;
}
void input(){
	cin>>n;
	for (int i=0;i<n;i++){
		cin>>a;
		if (a%4==0){
			q++;
		}
		else{
			if (a%2==0){
				w++;
			}
			else{
				e++;
			}
		}
		s++;
	}
	
}
void solve(){
	if (w>0){
		e++;
	}
	while(q>=2 and e>=2){
		q-=2;
		e-=2;
	}
	e--;
	if (e>q){
		cout<<"No";
	}
	else{
		cout<<"Yes";
	}
}