s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
stringlengths
1
5
memory
stringlengths
1
7
code_size
stringlengths
1
6
code
stringlengths
1
539k
s881031220
p03637
u373047809
1587324912
Python
Python (3.4.3)
py
Runtime Error
17
2940
121
n, *a = map(int, open(0).read().split()) s = [i%4 for a] f, k = s.count(0), s.count(2) print("YNeos"[n-f-k > f+(k>0)::2])
s439460321
p03637
u288430479
1587252846
Python
Python (3.4.3)
py
Runtime Error
63
15020
286
n = int(input()) l = list(map(int,input().split())) c = len([i for i in l if i%4==0]) l1 = [i for i in l if (i%2==0 and i%4!=0)] if len(l1)>=1: a = n-len(l1)+1 a = a-c if a<=c+1: print("Yes") else: print("No") else: if a<=c+1: print("Yes") else: print("No")
s259828577
p03637
u288430479
1587252652
Python
Python (3.4.3)
py
Runtime Error
66
14252
289
n = int(input()) l = list(map(int,input().split())) c = len([i for i in l if i%4==0]) l1 = [i for i in l if not (i%2==0 and i%4!=0)] if len(l1)>=1: a = n-len(l1)+1 a = a-c if a<=c-1: print("Yes") else: print("No") else: if a<=c-1: print("Yes") else: print("No")
s220577330
p03637
u114920558
1587230660
Python
Python (3.4.3)
py
Runtime Error
44
14252
228
N = int(input()) A = list(map(int, input().split())) l1 = 0 l2 = 0 l4 = 0 for i in range(A): if(A[i] % 4 == 0): l4 += 1 elif(A[i] % 2 == 0): l2 += 1 else: l1 += 1 if(l4 < l1): print('No') else: print('Yes')
s805896124
p03637
u686036872
1587185603
Python
Python (3.4.3)
py
Runtime Error
42
15020
209
N = input() A = list(map(int, input().split())) cnt4 = 0 cnt2 = 0 for i in range(N): if A[i]%4 == 0: cnt4 += 1 elif A[i]%2 == 0: cnt2 += 1 print("Yes" if cnt4*2 + cnt2 >= N else "No")
s736727909
p03637
u011062360
1586994003
Python
PyPy3 (2.4.0)
py
Runtime Error
186
38256
337
n, m = map(int, input().split()) list_AB = [ list(map(int,input().split(" "))) for i in range(m)] list_MAP = [0]*(n+1) for l in list_AB: l.sort() if l[0] == 1: list_MAP[l[1]] += 1 if l[1] == n: list_MAP[l[0]] += 1 ans = "IMPOSSIBLE" for num in list_MAP: if num > 1: ans = "POSS...
s465649562
p03637
u038408819
1585988929
Python
Python (3.4.3)
py
Runtime Error
145
14252
1193
N = int(input()) a = list(map(int, input().split())) from collections import deque kisuu = deque([]) bai4 = deque([]) sonota = deque([]) for ai in a: if ai % 4 == 0: bai4.append(ai) elif ai % 2 == 0: sonota.append(ai) else: kisuu.append(ai) ans = deque([]) if kisuu: s = kisuu.po...
s040190205
p03637
u038408819
1585988637
Python
Python (3.4.3)
py
Runtime Error
143
14228
1175
N = int(input()) a = list(map(int, input().split())) from collections import deque kisuu = deque([]) bai4 = deque([]) sonota = deque([]) for ai in a: if ai % 4 == 0: bai4.append(ai) elif ai % 2 == 0: sonota.append(ai) else: kisuu.append(ai) ans = deque([]) if kisuu: s = kisuu.p...
s750203257
p03637
u038408819
1585988399
Python
Python (3.4.3)
py
Runtime Error
131
14380
1174
N = int(input()) a = list(map(int, input().split())) from collections import deque kisuu = deque([]) bai4 = deque([]) sonota = deque([]) for ai in a: if ai % 4 == 0: bai4.append(ai) elif ai % 2 == 0: sonota.append(ai) else: kisuu.append(ai) ans = deque([]) if kisuu: s = kisuu.p...
s524855464
p03637
u547167033
1584946386
Python
Python (3.4.3)
py
Runtime Error
55
14224
179
n=int(input()) a=list(map(int,input().split())) cnt1=0 cnt4=0 for i in a: if i%2==1: cnt1+=1 elif cnt%4==0: cnt4+=1 if cnt4>=cnt1+1: print('Yes') else: print('No')
s435044610
p03637
u029576659
1584577357
Python
PyPy3 (2.4.0)
py
Runtime Error
254
66072
598
n = int(input()) a = list(map(int, input().split())) b = [] c = [] f = a.count(2) a = [i for i in a if i != 2] for i in range(len(a)): if a[i] % 4: b.append(a[i]) else: c.append(a[i]) d = [] while b and c: d.append(b.pop()) d.append(c.pop()) e = d.copy() d.extend(b) d.extend([2] ...
s410531534
p03637
u536642030
1584018903
Python
Python (3.4.3)
py
Runtime Error
17
2940
292
fuga = input() hoge = list(map(int,input().split())) count_even = 0 count_divisibleBy4 = 0 for i in hoge: if i % 2 == 0: count_even += 1 if i % 4 == 0: count_divisibleBy4 += 1 if count_even == len(hoge) or count_divisibleBy4 >= len(hoge) // 2: print('Yes') else: print('No')
s322372863
p03637
u536642030
1584018707
Python
Python (3.4.3)
py
Runtime Error
18
3064
301
fuga = input() hoge = list(map(int,input().split())) count_even = 0 count_divisibleBy4 = 0 for i in hoge: if i % 2 == 0: count_even += 1 if i % 4 == 0: count_divisibleBy4 += 1 if count_even == len(hoge) or count_divisibleBy4 >= len(hoge) // 2: print('Yes') else: print('No')
s341160483
p03637
u536642030
1584018472
Python
Python (3.4.3)
py
Runtime Error
18
2940
291
_ = input() hoge = map(int,input().split()) count_even = 0 count_divisibleBy4 = 0 for i in hoge: if i % 2 == 0: count_even += 1 if i % 4 == 0: count_divisibleBy4 += 1 if count_even == len(hoge) or count_divisibleBy4 >= len(hoge) // 2: print('Yes') else: print('No')
s308967746
p03637
u711539583
1583932178
Python
Python (3.4.3)
py
Runtime Error
63
14252
227
n = int(input()) a = list(map(int, input().split())) n2 = 0 n4 = 0 for ai in a: if ai % 4 == 2: n2 += 1 if ai % 4 == 0: n4 += 1 if not n2 and n4: n2 += l if n2 + n4 * 2 >= n: print('Yes') else: print('No')
s306957653
p03637
u698919163
1583463643
Python
Python (3.4.3)
py
Runtime Error
17
3064
502
N = int(input()) a = list(map(int,input().split())) one_list = [] two_list = [] four_list = [] for i in range(N): if a[i]%2 == 0: if a[i]%4 == 0: four_list.append(a[i]) else: two_list.append(a[i]) else: one_list.append(a[i]) if len(two_list) > 0: if...
s382449846
p03637
u375695365
1582134368
Python
Python (3.4.3)
py
Runtime Error
74
14252
935
n=int(input()) a=list(map(int,input().split())) count4=0#4の倍数 count2=0#2の倍数だが4の倍数じゃない count1=0 for i in range(n): if a[i]%4==0: count+=1 elif a[i]%2==0: count2+=1 else: count1+=1 if count2==0: if count1<=count4+1: print("Yes") else: print("No") else: if co...
s537604576
p03637
u375695365
1582130610
Python
Python (3.4.3)
py
Runtime Error
19
5024
165
n=int(input()) a=list(map(int,input(),split())) count=0 for i in range(n): if a[i]%4==0: count+=1 if n//2<=count: print("Yes") else: print("No")
s223155745
p03637
u268792407
1580701815
Python
Python (3.4.3)
py
Runtime Error
228
20136
292
from numpy import log def f(k): c=0 while k % 2 == 0: k //= 2 c+=1 if c==2: break return c def g(k): return f(int(k)) n=int(input()) a=list(map(g,input().split())) a.sort() ct0=a.count(0) ct1=a.count(1) ct2-a.count(2) if ct0 > ct2: print("No") else: print("Yes")
s896552362
p03637
u117193815
1580671955
Python
Python (3.4.3)
py
Runtime Error
17
3064
436
n = int(input()) l=list(map(int ,input().split())) four=0 two=0 one=0 for i in range(n): if l[i]%2==0: if l[i]==2: two+=1 else: four+=1 elif l[i]==1: one+=1 if four>=n//2: print('Yes') elif one>=1 and two==0: if one//2>=four and n-one//2<=four-(one//2): print('Yes') elif one==0 and two>=1: if two==1...
s861164321
p03637
u117193815
1580671801
Python
Python (3.4.3)
py
Runtime Error
17
3064
432
n = int(input()) l=list(map(int ,input().split())) four=0 two=0 one=0 for i in range(n): if l[i]%2==0: if l[i]==2: two+=1 else: four+=1 elif l[i]==1: one+=1 if four>=n//2: print('Yes') elif one>=1 and two==0: if one//2>=four and n-one//2<=four-(one//2): print('Yes') elif one==0 and two>=1: if two==1...
s384954883
p03637
u123745130
1580196117
Python
Python (3.4.3)
py
Runtime Error
17
2940
144
n=int(input()) l=list(map(int,input().split())) l_4=0 for i in l: i%4=0: l_4+=1 if n%2==0 and l_4>=l%2: print("Yes") else: print("No")
s157904048
p03637
u121921603
1578760285
Python
PyPy3 (2.4.0)
py
Runtime Error
228
58736
294
import sys input = sys.stdin.readline n=int(input()) a=list(map(int,input().split())) cnt2=0 cnt4=0 for i in range(n): if a[i]%4==0: cnt4+=1 elif a[i]%2==0: cnt2+=1 if cnt2>1: ans=len(a)-cnt4*3-cnt2 if cnt2==1: ans=len(a)-cnt4*3 print("Yes" if ans<=0 else "No")
s878806856
p03637
u374051158
1577383532
Python
Python (3.4.3)
py
Runtime Error
23
5024
293
n = int(input()) odd = 0 two = 0 four = 0 for i in range(n): a = int(input()) if(a%2): odd += 1 else: if(a%4==0):four+=1 else: two += 1 if(two): if(odd<=four): print("Yes") else: print("No") else: if(odd-1<=four): print("Yes") else: print("No")
s572090084
p03637
u622045059
1576729808
Python
Python (3.4.3)
py
Runtime Error
69
14252
455
N = int(input()) a = list(map(int, input().split())) cnt_of_4 = 0 cnt_of_2 = 0 cnt_of_1 = 0 for i in range(N): if a[i] % 4 == 0: cnt_of_4 += 1 elif a[i] == 2: cnt_of_2 += 1 else: cnt_of_1 += 1 if cnt_of_4 == N//2: print('Yes') else: if cnt_of_1 < cnt_of_4: cnt_of_2 ...
s815297098
p03637
u984276646
1576625425
Python
Python (3.4.3)
py
Runtime Error
42
14252
232
N = input() A = list(map(int, input().split())) odd, four = 0, 0 for i in range(N): if A[i] % 4 == 0: four += 1 else: if A[i] % 2 == 1: odd += 1 if four < odd and four + odd < N: print('No') else: print('Yes')
s828627491
p03637
u984276646
1576625379
Python
Python (3.4.3)
py
Runtime Error
46
14252
235
N = input() A = list(map(int, input().split())) odd, four = 0, 0, 0 for i in range(N): if A[i] % 4 == 0: four += 1 else: if A[i] % 2 == 1: odd += 1 if four < odd and four + odd < N: print('No') else: print('Yes')
s607909658
p03637
u984276646
1576625333
Python
Python (3.4.3)
py
Runtime Error
19
5028
226
N = input() A = list(map(int, input())) odd, four = 0, 0, 0 for i in range(N): if A[i] % 4 == 0: four += 1 else: if A[i] % 2 == 1: odd += 1 if four < odd and four + odd < N: print('No') else: print('Yes')
s636737896
p03637
u452015170
1575186276
Python
Python (3.4.3)
py
Runtime Error
27
11096
221
n = int(input()) a = map(int, input().split()) mod4 = 0 for i in a : if a % 4 == 0 : mod4 += 1 odd = 0 for i in a : if a % 2 == 1 : odd += 1 if mod4 >= odd : print("Yes") else : print("No")
s018137139
p03637
u409373192
1574278740
Python
Python (3.4.3)
py
Runtime Error
18
3064
208
n = int(input()) a = list(map(int, input().split())) c4 = sum(1 for x in a if x % 4 == 0) c1 = sum(1 for x in a if x % 2 == 1) if c4 >= c1 or (c4 >= c1 - 1 and c4 + c1 == n): print("Yes") else print("No")
s247744967
p03637
u239342230
1572909635
Python
Python (3.4.3)
py
Runtime Error
19
5028
107
N=int(input());A=input();v=[int(i)%4for i in A[::2]];print('Yes'if v.count(0)+v.count(2)//2>=N//2 else'No')
s094034619
p03637
u239342230
1572909471
Python
Python (3.4.3)
py
Runtime Error
20
5024
102
N=int(input());A=input();v=[int(i)%4for i in A];print('Yes'if v.count(0)+v.count(2)//2>=N//2 else'No')
s947895288
p03637
u494058663
1571433377
Python
Python (3.4.3)
py
Runtime Error
2104
16684
938
import math import collections N = int(input()) A = [int(i) for i in input().split()] def trial_division(n): Num = n #素因数を格納するリスト factor = [] #2から√n以下の数字で割っていく tmp = int(math.sqrt(n)) + 1 for num in range(2,tmp): while n % num == 0: n //= num factor.append(num) ...
s160480827
p03637
u494058663
1571433345
Python
Python (3.4.3)
py
Runtime Error
2104
14636
938
import math import collections N = int(input()) A = [int(i) for i in input().split()] def trial_division(n): Num = n #素因数を格納するリスト factor = [] #2から√n以下の数字で割っていく tmp = int(math.sqrt(n)) + 1 for num in range(2,tmp): while n % num == 0: n //= num factor.append(num) ...
s761370447
p03637
u094191970
1570216028
Python
Python (3.4.3)
py
Runtime Error
17
2940
47
n,m=map(int,input().split()) print((n-1)*(m-1))
s047924514
p03637
u311379832
1569901161
Python
Python (3.4.3)
py
Runtime Error
17
2940
355
N = int(input()) a = list(map(int, input().split())) cnt = 0 cnt2 = 0 cnt3 = 0 for i in a: if i % 2 != 0: cnt3 += 1 elif i % 4 == 0: cnt += 1 else: cnt2 += 1 if cnt2 == 0: if cnt3 <= cnt + 1: print('Yes') else: print('No') else: if cnt3 <= cnt: print('...
s253797549
p03637
u617515020
1568557536
Python
Python (3.4.3)
py
Runtime Error
17
2940
222
N=int(input()) a=list(map(int,input().split())) o = 0 f = 0 t = 0 for i in a: if i % 2 == 1: o += 1 if i % 4 == 0: f += 1 if i % 4 == 2: t += 1 if f >=0 o-1 and t == 0: print('Yes') else: print('No')
s390681497
p03637
u787456042
1568202931
Python
Python (3.4.3)
py
Runtime Error
26
11052
100
N,A=map(int,open(0).read().split());l=[0]*4 for a in A:l[a&3]+=1 print("YNeos"[d[1]+d[3]>1+d[0]::2])
s961537243
p03637
u518987899
1567885394
Python
Python (3.4.3)
py
Runtime Error
42
14252
210
_ = input() A = list(map(int, input().strip().split(' '))) a_4,a_2,a_1 = 0,0 for a in A: if a%4 == 0: a_4 += 1 elif a%2 == 0: a_2 = 1 else: a_1 += 1 print('Yes' if a_4 >= a_1+a_2 else 'No')
s376874671
p03637
u598229387
1567878770
Python
Python (3.4.3)
py
Runtime Error
17
2940
213
n=int(input()) a=[int(i) for i in input().split()] check=0 check2=0 for i in a: if i%4==0: check+=1 elif i%2==0: check2+=1 n=n-check2+1 else: print('Yes' if n//2<=check else 'No')
s661647329
p03637
u927534107
1564065212
Python
Python (3.4.3)
py
Runtime Error
17
2940
218
n=int(input()) l=list(map(int,input().split())) n4=sum([i%4==0 for i in l]) n2=sum([i%2==0 for i in l])-n4 if n4>=max(n//2,1): print("Yes") else: if (n//2)*2-n4*2<=n2: print("Yes"): else:print("No")
s854342638
p03637
u223646582
1561561405
Python
Python (3.4.3)
py
Runtime Error
26
11096
165
N=int(input()) d4=0 d2=0 for a in input().split(): if a%4==0: d4+=1 elif a%2==0: d2+=1 if 2*d4+d2>=N: print('Yes') else: print('No')
s741063968
p03637
u865741247
1559946275
Python
Python (3.4.3)
py
Runtime Error
113
15148
1142
import itertools import math N = int(input()) As =list(map(int,input().split(" "))) odds = 0 two = 0 four = 0 nums = [] for a in As: if a % 2 == 1: odds += 1 elif a % 4 == 0: four += 1 else: two += 1 if odds > 0: nums.append(1) odds -= 1 elif two > 0: nums.append(2) t...
s633396204
p03637
u103902792
1556086885
Python
Python (3.4.3)
py
Runtime Error
93
18576
282
n = int(input()) an = list(map(int,input().split())) odd = filter((lambda x:x%2==1),an) div4 = filter((lambda x:x%4 ==0),an) div2 = set(an).difference(set(odd)).difference(set(div4)) if len(div2) == 0: div4.append(0) if len(odd) <= len(div4)+1: print('Yes') else: print('No')
s232848432
p03637
u013629972
1555191199
Python
Python (3.4.3)
py
Runtime Error
62
7384
935
import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools sys.setrecursionlimit(10**7) inf = 10 ** 20 eps = 1.0 / 10**10 mod = 10**9+7 dd = [(-1, 0), (0, 1), (1, 0), (0, -1)] ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)] def LI()...
s074088112
p03637
u623819879
1554509368
Python
PyPy3 (2.4.0)
py
Runtime Error
203
87920
316
a1,a2,a4=0,0,0 for i in range(1): # Start Input code --------------------------------------- n=int(input()) for i in range(n): x=int(input()) if x%4==0: a4+=1 elif x%2==0: a2=1 else: a1+=1 ans='Yes' if a1+a2<=a4+1 else 'No' print(ans)
s582974219
p03637
u013408661
1554245469
Python
Python (3.4.3)
py
Runtime Error
42
15020
196
n=int(input()) a=list(map(int,input().split())) not_two=0 yes_four=0 for i in a: if a%2!=0: not_two+=1 if a%4==0: yes_four+=1 if yes_four-not_two>=1: print('Yes') else: print('No')
s013659459
p03637
u282228874
1552924585
Python
Python (3.4.3)
py
Runtime Error
65
15020
354
n = int(input()) A =list(map(int,input().split())) num4 = 0 num2 = 0 num1 = 0 for a in A: if a%4 == 0: nu+= 1 elif a%2 == 0: num2 += 1 else: num1 += 1 if num2 == 0: if num4 >= num1-1: print("Yes") else: print("No") else: if num4 >= num1: print("Ye...
s763907322
p03637
u634461820
1552416768
Python
Python (3.4.3)
py
Runtime Error
18
2940
213
N = int(input()) l = [int(input()) for i in range(N)] cnt_t = 0 cnt_f = 0 for i in l: if i%4=0: cnt_f += 1 else: cnt_t += 1 num = N-cnt_t-cnt_f if num <= cnt_f+1: print("Yes") else: print("No")
s624813112
p03637
u020604402
1551560908
Python
Python (3.4.3)
py
Runtime Error
18
3060
349
N = int(input()) L = list(map(int,input().split())) one = list(filter(lambda x:x%2!=0,L)) two = list(filter(lambda x:x%4!=0 and x%2==0,L)) four = list(filter(lambda x:x%4==0,L)) if len(one) - len(four) == 1 : if len(two) >=1 : print("No") else: print("Yes") elif len(one) =< len(four): print(...
s782847448
p03637
u367130284
1550571924
Python
Python (3.4.3)
py
Runtime Error
17
2940
104
n=int(input()) a=[1 for i in list(map(int,input().split())) if i%4==0] print("Yes" if len(a)>=n//2 "No")
s562369714
p03637
u785578220
1548364757
Python
Python (3.4.3)
py
Runtime Error
45
14252
227
a = int(input()) c = list(map(int,input().split())) c1=c2=c4=0 for i in c: if c%2==1: c1+=1 elif c%4==0: c4+=1 else:c2+=1 if c1+1>c4:print("No") elif c1+c2-c4==1:print("Yes") elif c1<=c4:print("Yes")
s394725844
p03637
u785578220
1548364699
Python
Python (3.4.3)
py
Runtime Error
45
15020
251
a = int(input()) c = list(map(int,input().split())) c1=c2=c34=0 for i in c: if c%2==1: c1+=1 elif c%4==0: c4+=1 else:c2+=1 if c1+1>c4:print("No") elif c1+c2-c4==1:print("Yes") elif c1<=c4:print("Yes")
s681764230
p03637
u785578220
1548364660
Python
Python (3.4.3)
py
Runtime Error
43
15020
257
a = int(input()) c = list(map(int,input().split())) for i in c: if c%2==1: c1+=1 elif c%4==0: c4+=1 else:c2+=1 if c1+1>c4:print("No") elif c1+c2-c4==1:print("Yes") elif c1<=c4:print("Yes")
s769501095
p03637
u853900545
1538949993
Python
Python (3.4.3)
py
Runtime Error
17
2940
315
n=int(input()) a=list(map(int,input().split())) a.sort() c4=0 c2=0 for i in range(n): if a[i]%4==0: c4+=1 for i in range(n): if a[i]%4!=0 and a[i]%2==0: c2+=1 if c4==0: if all(for a[i]%2==0 i in range(n)): print('Yes') elif n<=2*c4 + c2: print('Yes') else: print('No')
s706857098
p03637
u853900545
1538949830
Python
Python (3.4.3)
py
Runtime Error
17
2940
311
n=int(input()) a=list(map(int,input().split())) a.sort() c4=0 c2=0 for i in range(n): if a[i]%4==0: c4+=1 for i in range(n): if a[i]%4!=0 and a[i]%2==0: c2+=1 if c4==0: if all(a[i]%2==0 i in range(n)): print('Yes') elif n<=2*c4 + c2: print('Yes') else: print('No')
s532669377
p03637
u853900545
1538949037
Python
Python (3.4.3)
py
Runtime Error
17
2940
240
n=int(input()) a=list(map(int,input().split())) a.sort() c4=0 c2=0 for i in range(n): if a[i]%4==0: c4+=1 for i in range(n): if a[i]%4!=0 and a[i]%2==0: c2+=1 if n<=2*c4 + c2 print('Yes') else: print('No')
s695772077
p03637
u807772568
1534197860
Python
Python (3.4.3)
py
Runtime Error
17
2940
338
b = int(input()) a = list(map(int,input().split())) co = 0 s = 0 ss = 0 for i in range(len(a)): while a[i] % 2 == 0: co += 1 a[i] //= 2 if co == 1: s += 1 elif co >= 2: ss += 1 b -= s if b % 2 == 1 && s > 0: b += 1 elif b % 2 == 1 && s == 0: b -= 1 b //= 2 if ss >= b: print("Yes") el...
s326098751
p03637
u140251125
1529694097
Python
Python (3.4.3)
py
Runtime Error
23
5024
252
# input N = int(input()) a = [int(input()) for _ in range(N)] # 4の倍数, 奇数の数 i, j = 0, 0 for i in range(N): if a[i] % 4 == 0: i += 1 elif a[i] % 2 == 1: j += 1 if j >= i + 2: print('No') else: print('Yes')
s163931457
p03637
u761320129
1529664343
Python
Python (3.4.3)
py
Runtime Error
17
2940
254
N = int(input()) src = list(map(int,input().split())) odd = two = four = 0 for a in src: if a%2: odd += 1 elif a%4==0: four += 1 else: two += 1 if two: print('Yes' if odd <= four else 'No) else: print('Yes' if odd <= four+1 else 'No')
s540648854
p03637
u787562674
1528930350
Python
Python (3.4.3)
py
Runtime Error
17
2940
682
# when input length is odd, n-1 / 2 # when input length is even, n / 2 # 6 # 2 7 1 8 2 8 # 1 8 7 8 2 2 # # # # # # # 3個(len/2)4の倍数がYesを出力できる # 4の倍数の個数がlen/2以下になるときその個数分*2個分2があれば、Yesを出力できる N = int(input()) input_list = [int(i) for i in input().split()] four_count = 0 two_count = 0 for i in input_list: if i % 4 == 0...
s493197833
p03637
u503901534
1525983104
Python
Python (3.4.3)
py
Runtime Error
17
3060
715
n = int(input()) a = list(map(int,input().split())) zero = 0 two = 0 odd = 0 for i in range(len(a)): if a[i] % 4 == 1 or a[i] % 4 == 3: odd = odd + 1 elif a[i] % 4 == 0: zero = zero + 1 else: two = two + 1 if zero >= odd -1 and two =n = int(input()) a = list(map(int,input(...
s112933530
p03637
u503901534
1525983084
Python
Python (3.4.3)
py
Runtime Error
18
2940
357
n = int(input()) a = list(map(int,input().split())) zero = 0 two = 0 odd = 0 for i in range(len(a)): if a[i] % 4 == 1 or a[i] % 4 == 3: odd = odd + 1 elif a[i] % 4 == 0: zero = zero + 1 else: two = two + 1 if zero >= odd -1 and two = 0: print('Yes') elif zero >= odd: ...
s880808894
p03637
u064408584
1524535890
Python
Python (3.4.3)
py
Runtime Error
17
2940
233
n=int(input()) a=list(map(int, input().split())) b=len(a) c=len([i for i in a if i%2==0]) a2=len([i for i in a if i%4==0]) a1,a0=c-a2,b-c if a0>0 and a2>=a0-1 and a2+a1>=2: print('Yes') elif: a2+a1>=2: print('Yes') else: print('No')
s943876816
p03637
u562016607
1517508542
Python
Python (3.4.3)
py
Runtime Error
94
11100
303
N = int(input()) R = [0 for i in range(2)] st = input().split() for i in range(N): k = int(st[i]) m = 0 if k % 4 == 1 or k % 4 == 3: m = 0 elif k % 4 == 2: m = 1 else: m = 2 R[m] += 1 if R[1]+R[2]*2 < 2*(N-1): print("No") else: print("Yes")
s108977738
p03637
u787988531
1513969195
Python
Python (2.7.6)
py
Runtime Error
19
9192
280
N = int(raw_input()) a = map(int, raw_input().split(" ")[-2:]) c1 = 0 c2 = 0 for ai in a: if ai % 2 != 0: c1 += 1 elif ai % 4 == 0: c2 += 1 if c1 <= c2: print "Yes" elif c1 - 1 == c2 and N == c1 + c2: print "Yes" else: b = 4/0 print "No"
s925077360
p03637
u787988531
1513969136
Python
Python (2.7.6)
py
Runtime Error
10
2568
293
N = int(raw_input()) a = map(int, raw_input().split(" ")[-2:]) c1 = 0 c2 = 0 for ai in a: if ai % 2 != 0: c1 += 1 elif ai % 4 == 0: c2 += 1 if c1 <= c2: print "Yes" if(c1 <= c2) elif c1 - 1 == c2 and N == c1 + c2: print "Yes" else: b = 4/0 print "No"
s606057519
p03637
u787988531
1513969088
Python
Python (2.7.6)
py
Runtime Error
11
2692
292
N = int(raw_input()) a = map(int, raw_input().split(" ")[-2:]) c1 = 0 c2 = 0 for ai in a: if ai % 2 != 0: c1 += 1 elif ai % 4 == 0: c2 += 1 if c1 <= c2: print "Yes" if(c1 <= c2) elif c1 - 1 == c2 and N == c1 + c2 print "Yes" else: b = 4/0 print "No"
s643240139
p03637
u787988531
1513968671
Python
Python (2.7.6)
py
Runtime Error
10
2568
234
N = int(raw_input()) a = map(int, raw_input().split(" ")[-2:]) c1 = 0 c2 = 0 for ai in a: if ai % 2 != 0: c1 += 1 if ai % 4 == 0: c2 += 1 print "Yes" if(c1 <= c2 || (c1 - 1 == c2 and N == c1 + c2))else "No"
s344382147
p03637
u239375815
1509409043
Python
Python (3.4.3)
py
Runtime Error
18
2940
129
if c[1] + c[3] < c[0] + 1: print('Yes') elif (c[1] + c[3] == c[0] + 1)and(c[2] == 0): print('Yes') else: print('No')
s994693115
p03637
u239375815
1509408320
Python
Python (3.4.3)
py
Runtime Error
18
3060
289
n = int(input()) a = list(map(int,input().split())) a_n4 = a_4 = [x for x in a if x%4!=0] a_4 = [x for x in a if x%4==0] a_2 = [x for x in a if x%4!=0 and x%2==0] if (len(a_n4)<=1+len(a_4) and len(a_2)<=1) or (len(a_n4)<=len(a_4) and len(a_2)>1) ): print("Yes") else: print("No")
s616147093
p03637
u735154525
1503333527
Python
Python (2.7.6)
py
Runtime Error
63
11320
187
n = input() a = map(int, raw_input().split()) n4 = 0 n2 = 0 for i in a: if i % 4 == 0: n4 += 1 else: n2 += 1 if n2 / n4 > 2: print "No" else: print "Yes"
s405884444
p03637
u533679935
1502934549
Python
Python (3.4.3)
py
Runtime Error
54
15020
123
a=int(input()) lst=list(map(int,input().split())) for i in lst: if i%4==0: ret= "yes" else: pass print(ret)
s872644608
p03637
u124762318
1502843883
Python
Python (3.4.3)
py
Runtime Error
74
14252
308
N = int(input()) al = [int(an) for an in input().split()] a = [ "4" if al[i]%4==0 else "k" if al[i]%2!=0 else "g" for i in range(N)] print(a) if a.count("k") == a.count("4") or len(a) == a.count(g): print("Yes") elif (a.count("k") - 1) == a.count("4") and a.count("g")==0: print("Yes") else: print("No")
s188334235
p03637
u343437894
1502463556
Python
Python (3.4.3)
py
Runtime Error
17
2940
255
n= int(input()) a= list(map(int, input().split(" "))) k = len(filter(lambda(x, x%4), a)) j = len(filter(lambda(x, x%2), a))-k i = len(a)-j-k if (j > 0) and (i+1 <= k): print("Yes") if (j == 0) and (i-1 <= k): print("Yes") else: print("No")
s917686673
p03637
u301823349
1502338405
Python
Python (2.7.6)
py
Runtime Error
10
2568
372
num = input() list = map(int, raw_input().split()) count1 = 0 count4 = 0 for x in list: if x % 2 == 1: count1 = count1 + 1 if x % 4 == 0: count4 = count4 + 1 if count1 > count4 and num > 3: print("No") elif num = = 2 and count4 - count1 >= 0 print("Yes") elif num == 3 and count4 > 0 or c...
s371820274
p03637
u814171899
1502295535
Python
Python (3.4.3)
py
Runtime Error
17
3060
362
n = int(input()) a = list(map(int, input().split())) p=0 f=0 for ai in a: if ai%2!=0: p+=1 else: if ai/2%2==0: f+=1 if f==0: print('No') elif f==1: if n>3: print('No') else: print('Yes') elif p>f: if p%2=1 and 2*p-1==n: print('Yes') else: ...
s085024540
p03637
u796424048
1502196686
Python
Python (3.4.3)
py
Runtime Error
17
2940
270
N = int(input()) a = list(map(int,input().split())) one = 0 four = 0 two = 0 for j in range(N): if a[j]%2 == 1: one += 1 elif a[j]%4 == 0: four += 1 else : two +=1 if one =< four or (two == 0 and four == one-1): print('Yes') else: print('No')
s899397586
p03637
u796424048
1502196583
Python
Python (3.4.3)
py
Runtime Error
17
2940
302
N = int(input()) a = list(map(int,input().split())) one = 0 four = 0 two = 0 for j in range(N): if a[j]%2 == 1: one += 1 elif a[j]%4 == 0: four += 1 else : two +=1 if one =< four: print('Yes') else : if two == 0 and four == one -1: print('Yes') else: print('No')
s631030174
p03637
u796424048
1502196550
Python
Python (3.4.3)
py
Runtime Error
17
2940
303
N = int(input()) a = list(map(int,input().split())) one = 0 four = 0 two = 0 for j in range(N): if a[j]%2 == 1: one += 1 elif a[j]%4 == 0: four += 1 else : two +=1 if one =< four: print('Yes') else : if (two == 0 and four == one -1): print('Yes') else: print('No')
s455755398
p03637
u796424048
1502195918
Python
Python (3.4.3)
py
Runtime Error
17
2940
301
N = int(input()) a = list(map(int,input().split())) one = 0 four = 0 two = 0 for j in range(N): if a[j]%2 == 1: one += 1 elif a[j]%4 == 0: four += 1 else : two +=1 if one =< four: print('Yes') else : if two == 0 and four == one -1: print('Yes') else: print('No')
s128778337
p03637
u796424048
1502195702
Python
Python (3.4.3)
py
Runtime Error
17
2940
333
N = int(input()) a = list(map(int,input().split())) one = 0 four = 0 two = 0 for j in range(N): if a[j]%2 == 1: one += 1 elif a[j]%4 == 0: four += 1 else : two +=1 if one =< four: print('Yes') else : if two == 0: if four == one-1: print('Yes') else: print('No') else: ...
s813405215
p03637
u796424048
1502195638
Python
Python (3.4.3)
py
Runtime Error
17
2940
333
N = int(input()) a = list(map(int,input().split())) one = 0 four = 0 two = 0 for j in range(N): if a[j]%2 == 1: one += 1 elif a[j]%4 == 0: four += 1 else : two +=1 if one =< four: print('Yes') else : if two == 0: if four == one-1: print('Yes') else: print("No") else: ...
s003020901
p03637
u796424048
1502195364
Python
Python (3.4.3)
py
Runtime Error
16
2940
305
N = int(input()) a = list(map(int,input().split())) one = 0 four = 0 two = 0 for j in range(N): if a[j]%2 == 1: one += 1 elif a[j]%4 == 0: four += 1 else : two +=1 if one =< four: print('Yes') else : if two == 0: if four == one-1: print('Yes') else: print('No')
s840279178
p03637
u796424048
1502194795
Python
Python (3.4.3)
py
Runtime Error
17
2940
325
N = int(input()) a = list(map(int,input().split())) one = 0 four = 0 two = 0 for j in range(N): if a[j]%2 == 1: one += 1 elif a[j]%4 == 0: four += 1 else : two +=1 if one <= four: print('Yes') else : if two == 0: if four >= (one+1): print('Yes') else: print(...
s147396659
p03637
u796424048
1502194732
Python
Python (3.4.3)
py
Runtime Error
17
3064
301
N = int(input()) a = list(map(int,input().split())) one = 0 four = 0 two = 0 for j in range(N): if a[j]%2 == 1: one += 1 elif a[j]%4 == 0: four += 1 else : two +=1 if one <= four: print('Yes') else : if two == 0: if four >= (one+1): print('Yes') else: print('No')
s185190271
p03637
u796424048
1502194673
Python
Python (3.4.3)
py
Runtime Error
17
2940
295
N = int(input()) a = list(map(int,input().split())) one = 0 four = 0 two = 0 for j in range(N): if a[j]%2 == 1: one += 1 elif a[j]%4 == 0: four += 1 else : two +=1 if one <= four: print('Yes') else : if two == 0: if four >= (one+1): print('Yes') else: print('No')
s722760737
p03637
u796424048
1502191938
Python
Python (3.4.3)
py
Runtime Error
71
14224
353
N = int(input()) a = list(map(int,input().split())) Kisuu = 0 YonBaisuu = 0 NiBaisuu = 0 for j in range(N): if a[j]%2 == 1: Kisuu += 1 elif a[j]%4 == 0: YonBaisuu += 1 else : NiBaisuu +=1 if Kisuu <= YonBaisuu: print('Yes') else : if NiBaisuu == 0: if Kissuu+1 == YonBaisuu: pri...
s601742374
p03637
u796424048
1502191509
Python
Python (3.4.3)
py
Runtime Error
138
14252
375
N = int(input()) a = list(map(int,input().split())) Kisuu = 0 YonBaisuu = 0 NiBaisuu = 0 for j in range(N): print(j) if a[j]%2 == 1: Kisuu += 1 elif a[j]%4 == 0: YonBaisuu += 1 else : NiBaisuu +=1 if Kisuu <= YonBaisuu: print('Yes') else : if NIBaisuu == 0: print('Yes') else: prin...
s127730201
p03637
u595633284
1502073914
Python
Python (3.4.3)
py
Runtime Error
55
11100
746
import sys def main(): args = sys.stdin.readline().split() N = int(args[0]) A = map(int, input().split()) non_factor_cnt = 0 factor_of_two_cnt = 0 factor_of_four_cnt = 0 for num in A: remainder = num % 4 if remainder != 0: if remainder == 2: fac...
s520473252
p03637
u792547805
1502073110
Python
Python (3.4.3)
py
Runtime Error
88
11100
365
number = int(input()) list = map(int,input().split()) yon_num = 0 ni_num = 0 odd_num = 0 for num in list: if num%4 == 0: yon_num += 1 elif num%2 == 0: ni_num +=1 else: odd_num += 1 if ni_num != 0: nibai = ni_num//2 + ni_num%2 if yon_num >= (odd_num + nibai + yon_num) /...
s178673444
p03637
u439009525
1502072467
Python
Python (3.4.3)
py
Runtime Error
17
2940
312
N=int(input()) a_list = list(map(int, input().split())) multi4 = lambda a: a % 4 == 0 multi4_count = sum(map(multi4, a_list)) multi2 = lambda a: a % 2 == 0 multi2_count = sum(map(multi2, a_list)) - multi4_count max_N = multi4_count*2 + (multi4_count>0)) + multi2_count//2 print("No" if (N > max_N) else "Yes")
s764068636
p03637
u796424048
1502072223
Python
Python (3.4.3)
py
Runtime Error
74
14252
317
N = int(input()) a=[int(x) for x in input().split()] Kisuu = 0 YonBaisuu = 0 NiBaisuu = 0 for j in range(N): if a[j]%2 == 1: Kisuu += 1 elif a[j]%4 == 0: YonBaisuu += 1 else : NiBaisuu +=1 if Kisuu == YonBaisuu: print('Yes') else : if NIBaisuu == 0: print('Yes') else: print('No')
s587493862
p03637
u462626125
1502072129
Python
Python (3.4.3)
py
Runtime Error
86
14252
594
# coding: utf-8 N = int(input()) nums = [int(x) for x in input().split()] if set([num% 2 for num in nums]) == {0}: print("Yes") exit(1) a,b,c = 0,0,0 for elem in nums: if elem % 4 == 0 : a += 1 # 4の倍数 else: b += 1 # 4の倍数じゃない # あとづけ # 2の倍数かつnot4の倍数についても考える必要がある c = 0 for elem in nums: ...
s898308612
p03637
u796424048
1502071897
Python
Python (3.4.3)
py
Runtime Error
1547
14252
355
N = int(input()) a=[int(x) for x in input().split()] Kisuu = 0 YonBaisuu = 0 NiBaisuu = 0 for j in range(N): if a[0]%2 == 1: Kisuu += 1 a.pop(0) elif a[0]%4 == 0: YonBaisuu += 1 a.pop(0) else : a.pop(0) NiBaisuu += 1 if Kisuu == YonBaisuu: print('Yes') else : if NIBaisuu == 0: pr...
s960445164
p03637
u218984487
1502070279
Python
Python (3.4.3)
py
Runtime Error
2104
14252
673
n = int(input()) a = list(map(int, input().split())) for i in range(1, len(a)): ans = a[i-1] * a[i] if ans % 4 == 0: if i + 1 == len(a): print("Yes") else: continue else: if i != len(a)-1: for j in range(0, len(a)-1): kari = a[i]...
s140769468
p03637
u218984487
1502070163
Python
Python (3.4.3)
py
Runtime Error
2104
14252
673
n = int(input()) a = list(map(int, input().split())) for i in range(1, len(a)): ans = a[i-1] * a[i] if ans % 4 == 0: if i + 1 == len(a): print("YES") else: continue else: if i != len(a)-1: for j in range(0, len(a)-1): kari = a[i]...
s951144580
p03637
u062864034
1502069229
Python
Python (3.4.3)
py
Runtime Error
17
2940
561
#include <cstdio> #include <algorithm> #include <vector> #include <iostream> #include <numeric> #include <cmath> #include <set> int main(){ int n; scanf("%d",&n); int foge = n/2; int counter4 = 0; int counter2 = 0; for(int i=0;i<n;i++){ int x; scanf("%d",&x); if(x%4 == ...
s381660365
p03637
u845674689
1502068532
Python
Python (3.4.3)
py
Runtime Error
17
2940
439
N = int(input()) a_arr = input().split(' ') for i in range(len(a_arr)): a_arr[i] = int(a_arr) counter = { 2n: 0, 4n: 0, n: 0 } for j in range(len(a_arr)) if a_arr[j] % 4 == 0: counter['4n'] += 1 elif a_arr[j] % 2 == 0: counter['2n'] += 1 else: counter['...
s465242414
p03638
u875769753
1601153642
Python
PyPy3 (7.3.0)
py
Runtime Error
93
68680
434
import numpy as np H,W = map(int,input().split()) N = int(input()) lsa = list(map(int,input().split())) ls2 = [] for i in range(N): ls2 += [i+1]*lsa[i] arr = np.array(ls2) arr = arr.reshape(H,W).tolist() arr2 = [] for i in range(H): if i % 2 == 0: arr2.append(arr[i]) else: arr[i].reverse() ...