Problem:


Score: 200 points

Problem Statement

M-kun has the following three cards:

A red card with the integer A.

A green card with the integer B.

A blue card with the integer C.

He is a genius magician who can do the following operation at most K times:

Choose one of the three cards and multiply the written integer by 2.

His magic is successful if both of the following conditions are satisfied after the operations:

The integer on the green card is strictly greater than the integer on the red card.

The integer on the blue card is strictly greater than the integer on the green card.

Determine whether the magic can be successful.

Constraints

1 \leq A, B, C \leq 7

1 \leq K \leq 7

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B C
K

Output

If the magic can be successful, print Yes; otherwise, print No.

Sample Input 1

7 2 5
3

Sample Output 1

Yes

The magic will be successful if, for example, he does the following operations:

First, choose the blue card. The integers on the red, green, and blue cards are now 7, 2, and 10, respectively.

Second, choose the green card. The integers on the red, green, and blue cards are now 7, 4, and 10, respectively.

Third, choose the green card. The integers on the red, green, and blue cards are now 7, 8, and 10, respectively.

Sample Input 2

7 4 2
3

Sample Output 2

No

He has no way to succeed in the magic with at most three operations.



Sample input:
7 2 5
3


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())
K=int(input())

for i in range(K):
    if A>B:
        B=2*B
    elif B>C:
        C=2*C
    if A<B and B<C:
        print('Yes')
        break
else:
    print('No')

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
x = [0,0,0]
K = int(input())
flag = 0
for i in range(K+1):
    for j in range(K+1-i):
        a = A*(2**i)
        b = B*(2**j)
        c = C*(2**(K-i-j))
        if c>b>a:
            print("Yes")
            flag = 1
            break
if flag == 0:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
k = int(input())
d = 0
for i in range(k+1):
    if b < a:
        b *= 2
    elif c < b:
        c *= 2
    else:
        d = 1
if d == 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
def magic(a,b,c,k):
	for i in range(k):
		if(a >= c and b >= c):
			c*=2
		elif(a >= b):
			b*=2
	if(a < b and b < c and a < c):
		print("Yes")
	else:
		print("No")
d,e,f = map(int,input().split())
j = int(input())
magic(d,e,f,j)

Submission status: Wrong Answer

Solution code:
def magic(a,b,c,k):
	for i in range(k):
		if(a > c and b > c):
			c*=2
		elif(a > b):
			b*=2
	if(a < b and b < c and a < c):
		print("Yes")
	else:
		print("No")
d,e,f = map(int,input().split())
j = int(input())
magic(d,e,f,j)

Submission status: Wrong Answer

Solution code:
def magic(a,b,c,k):
	for i in range(k):
		if(a > c and b > c):
			c*=2
		elif(a > b):
			b*=2
	if(a < b and b < c):
		print("Yes")
	else:
		print("No")
d,e,f = map(int,input().split())
j = int(input())
magic(d,e,f,j)

Submission status: Wrong Answer

Solution code:
lin = list(map(int,input().split()))
n = int(input())
ans = "No"
if lin[1] > lin[0]:
  if lin[2] > lin[1]:
    ans = "Yes"
  else:
    for i in range(n):
      lin[2] = 2*lin[2]
      
      if lin[2] > lin[1]:
        ans = "Yes"
        break
else:
  maxi = n
  for i in range(n):
    lin[1] = 2*lin[1]
    maxi -= 1
    if lin[1] > lin[0]:
      if lin[2] > lin[1]:
      	ans = "Yes" 
      else:
        for i in range(maxi):
          lin[2] = 2*lin[2]
          if lin[2] > lin[1]:
          	ans = "Yes"
          break
print(ans)

Submission status: Wrong Answer

Solution code:
lin = list(map(int,input().split()))
n = int(input())
ans = "No"

if lin[1] > lin[0]:
  if lin[2] > lin[1]:
    ans = "Yes"
  else:
    for i in range(n):
      lin[2] = 2*lin[2]
      if lin[2] > lin[1]:
        ans = "Yes"
        break
        
else:
  maxi = n
  for i in range(n):
    lin[1] = 2*lin[1]
    maxi -= 1
    if lin[1] > lin[0]:
      break
      
    if lin[2] > lin[1]:
      ans = "Yes"
    else:
      for i in range(maxi):
        lin[2] = 2*lin[2]
        if lin[2] > lin[1]:
          ans = "Yes"
          break
        
print(ans)

Submission status: Wrong Answer

Solution code:
lin = list(map(int,input().split()))
n = int(input())
ans = "No"
if lin[1] > lin[0]:
  if lin[2] > lin[1]:
    ans = "Yes"
  else:
    for i in range(n):
      lin[2] = 2*lin[2]
      
      if lin[2] > lin[1]:
        ans = "Yes"
        break
else:
  maxi = n
  for i in range(n):
    lin[1] = 2*lin[1]
    maxi -= 1
    
    if lin[1] > lin[0]:
      if lin[2] > lin[1]:
        ans = "Yes"
      else:
        for i in range(maxi):
          lin[2] = 2*lin[2]
          if lin[2] > lin[1]:
            ans = "Yes"
            break
        
print(ans)

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
k = int(input())
ans = 0

while a > b:
    b = b*2
    ans += 1

while b > c:
    c = c*2
    ans += 1

if ans > k:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
#b = list(map(int,input().split()))
b=int(input())

for i in range(b):
    if a[2]<=a[1]:
        a[2]=2*a[2]
    elif a[1]<=a[0]:
        a[1]=2*a[1]
if a[0]<a[1]<a[2]:
    print("Yes")
else:
    print("No") 
print(a)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
#b = list(map(int,input().split()))
b=int(input())

for i in range(b):
    if a[0]<=a[1]<=a[2] or a[0]<=a[2]<=a[1] or a[2]<=a[1]<=a[0] or a[1]<=a[2]<=a[0] or a[2]<=a[0]<=a[1]:
        a[2]=2*a[2]
    elif a[1]<=a[0]<=a[2]:
        a[1]=2*a[1]
if a[0]<a[1]<a[2]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
#b = list(map(int,input().split()))
b=int(input())

for i in range(b):
    if a[0]<=a[1]<=a[2] or a[0]<=a[2]<=a[1] or a[2]<=a[1]<=a[0] or a[1]<=a[2]<=a[0] or a[2]<=a[0]<=a[1]:
        a[2]=2*a[2]
    elif a[1]<=a[0]<=a[2]:
        a[1]=2*a[1]
if a[0]<a[1]<a[2]:
    print("Yes")
else:
    print("No") 
print(a)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
#b = list(map(int,input().split()))
b=int(input())

for i in range(b):
    if a[0]<=a[1]<=a[2] or a[0]<=a[2]<=a[1] or a[2]<=a[1]<=a[0] or a[1]<=a[2]<=a[0] or a[2]<=a[0]<=a[1]:
        a[2]=2*a[2]
    if a[1]<=a[0]<=a[2]:
        a[1]=2*a[1]
if a[0]<a[1]<a[2]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
#b = list(map(int,input().split()))
b=int(input())

for i in range(b):
    if a[0]<a[1]<a[2] and a[0]<a[2]<a[1] and a[2]<a[1]<a[0] and a[1]<a[2]<a[0] and a[2]<a[0]<a[1]:
        a[2]=2*a[2]
    if a[1]<a[0]<a[2]:
        a[1]=2*a[1]
if a[0]<a[1]<a[2]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
#b = list(map(int,input().split()))
b=int(input())
for i in range(b):
    a[a.index(min(a))]= 2*(a[a.index(min(a))])
if a[0]<a[1]<a[2]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
#b = list(map(int,input().split()))
b=int(input())
for i in range(b):
    a[a.index(min(a))]= 2*(a[a.index(min(a))])
print(a)
if a[0]<a[1]<a[2]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
r, g, b = [int(x) for x in input().split()]
times = int(input())

def check(r, g, b, times):
    while times < 0:
        if b > g > r:
            return 'Yes'
        elif b <= g:
            times -= 1
            b *= 2
        elif g <= r:
            times -= 1
            g *= 2
    return 'No'

print(check(r, g, b, times))

Submission status: Wrong Answer

Solution code:
r, g, b = [int(x) for x in input().split()]
times = int(input())

def check(r, g, b, times):
    while True:
        if b > g > r:
            return 'Yes'
        elif b < g:
            times -= 1
            b *= 2
        elif g < r:
            times -= 1
            g *= 2
        if times > -1:
            return 'No'

print(check(r, g, b, times))

Submission status: Wrong Answer

Solution code:
abc=list(map(int ,input().split()))
k=int(input())
a=abc[0]
b=abc[1]
c=abc[2]
# x=b>a and c>a
count=0
num_1=len(abc)-3
for i in range(0,num_1):
    i=0
    if(element*2 > abc[i+1] and element > abc[i+2]):
        count+=1
        
    else:   
        count+=0
    
      
if(count > 1):
    print("Yes")
    element=abc[i]
elif(count==0):
    print("No")

Submission status: Wrong Answer

Solution code:
# M-SOLUTIONS プロコンオープン 2020: B – Magic 2
A, B, C = [int(i) for i in input().split()]
K = int(input())

is_success = 'No'

for i in range(K):
    for j in range(K):
        for k in range(K):
            if i + j + k <= K and A * 2 ** i < B * 2 ** j < C * 2 ** k:
                is_success = 'Yes'

print(is_success)

Submission status: Wrong Answer

Solution code:
# M-SOLUTIONS プロコンオープン 2020: B – Magic 2
A, B, C = [int(i) for i in input().split()]
K = int(input())

is_success = 'No'

for i in range(K):
    if A < B * 2 ** (K - i) < C * 2 ** i:
        is_success = 'Yes'
        break

print(is_success)

Submission status: Wrong Answer

Solution code:
clr = list(map(int, input().split()))
k = int(input())

for i in range(k):
    if max(clr) != clr[2]:
        clr[2] *= 2
    
    elif clr[1] < clr[0]:
        clr[1] *= 2
    
    else:
        break
    
if clr[2] > clr[1] > clr[0] :
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
A,B,C = list(map(int,input().split()))
K = int(input())

ans = 0

for i in range(K):
    if A < B * (2*i) < C * (2*(K-i)):
        ans += 1
    else:
        pass

if ans > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# B>G>R
R,G,B = map(int,input().split())
K = int(input())

cnt = 0

while G<R:
    G *= 2
    cnt += 1

while not B>G:
    B *= 2
    cnt += 1
    
if cnt<=K:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# B>G>R
R,G,B = map(int,input().split())
K = int(input())

cnt = 0

while G<R:
    G *= 2
    cnt += 1

while not B>G:
    B *= 2
    cnt += 1
    
print(cnt)    
if cnt<=K:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
K = int(input())
count =0
for i in range(K+1):
  for j in range(K+1):
    X = B
    Y = C
    X = X*(2**i)
    Y = Y*(2**j)
    if  i+j <= 3 and A < X and X < Y:
      count +=1
      
if count ==0:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
K = int(input())
count =0
for i in range(K+1):
  for j in range(K+1):
    X = B
    Y = C
    X = X*(2**i)
    Y = Y*(2**j)
    if  i+j <= 3 and A < X and X < Y:
      count +=1
      print(A,X,Y)
if count ==0:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
K = int(input())
count =0
for i in range(K+1):
  for j in range(K+1):
    X = B*(2**i)
    Y = C*(2**j)
    if  i+j <= 3 and A < X and X < Y:
      count +=1
      print(A,X,Y)
if count ==0:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
K = int(input())
count =0
for i in range(K+1):
  X = B
  Y = C
  for j in range(K+1):
    X = B*(2**i)
    Y = C*(2**j)
    if  i+j <=3 and A<X and X <Y:
      count +=1
      
if count ==0:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
K = int(input())
count =0
for i in range(K+1):
  X = B
  Y = C
  for j in range(K+1):
    X = B*(2**i)
    Y = C*(2**j)
    if i+j<=3 and A<B and B <C:
      count +=1
      
if count ==0:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
K = int(input())
count =0
for i in range(K):
  X = B
  Y = C
  for j in range(K):
    X = B*(2**i)
    Y = C*(2**j)
    if i+j<=3 and A<B and B <C:
      count +=1
      
if count ==0:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
for n in range(k):
  if b>c:
    c=c*2
  elif a>b:
    b=b*2
  n=n+1
if b>a and c>b:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
for n in range(k):
  if b>c:
    c=c*2
  elif a>b:
    b=b*2
if b>a and c>b:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
d=b
e=c
while a>b:
  b=b*2
while b>c:
  c=c*2
f=b/d
g=c/e
h=f//2
i=g//2
if k>=h+i:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
d=b
e=c
while a>b:
  b=b*2
while b>c:
  c=c*2
f=b/d
g=c/e
h=f//2
i=g//2
if k<=h+i:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
for n in range(k):
  if a>b:
    b=b*2
  elif b>c:
    c=c*2
if b>a and c>b:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())

while(k>0):
  if a>=b:
    b=b*2
  elif b>c:
    c=c*2
  k-=1
if a<b and b<=c:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())

while(k>0):
  if a>b:
    b=b*2
  elif b>c:
    c=c*2
  k-=1
if a<b and b<c:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
k=int(input())
flag=0

for i in range(1,k+1):
  if(a<b<c):
    print("Yes")
    flag=1
    break
  if(a>b):
    b=b*2
    continue
  if(b>c):
    c=c*2
    continue

if(((a<b)and(b<c))and(i==k)):
  flag=1
  print("Yes")
if(flag==0):
  print("No")

Submission status: Wrong Answer

Solution code:
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
k=int(input())
flag=0

for i in range(k):
  if(a<b<c):
    print("Yes")
    flag=1
    break
  if(a>b):
    b=b*2
    continue
  if(b>c):
    c=c*2
    continue

if((a<b)and(b<c)):
  flag=1
  print("Yes")    
if(flag==0):
  print("No")

Submission status: Wrong Answer

Solution code:
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
k=int(input())
flag=0
i=0
while(i<=k):
  i+=1
  if((a<b)and(b<c)):
    flag=1
    print("Yes")
    break
  if(a>b):
    b=b*2
    continue
  if(b>c):
    c=c*2
    continue
if((a<b)and(b<c)):
  flag=1
  print("Yes")    
if(flag==0):
  print("No")

Submission status: Wrong Answer

Solution code:
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
k=int(input())
flag=0
i=1
while(i<=k):
  if((a<b)and(b<c)):
    flag=1
    print("Yes")
    break
  if(a>b):
    b=b*2
    i+=1
    continue
  if(b>c):
    c=c*2
    i+=1
    continue
if((a<b)and(b<c)):
  flag=1
  print("Yes")    
if(flag==0):
  print("No")

Submission status: Wrong Answer

Solution code:
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
k=int(input())
flag=0
for i in range(k+1):
  if((a<b)and(b<c)):
    print("Yes")
    flag=1
    break
  elif(a>b):
    b=b*2
  elif(b>c):
    c=c*2
 
if(flag==0):
  print("No")

Submission status: Wrong Answer

Solution code:
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
k=int(input())
flag=0
for i in range(k):
  if((a<b)and(b<c)):
    print("Yes")
    flag=1
    break
  elif(a<b):
    b=b*2
  elif(b<c):
    c=c*2
 
if(flag==0):
  print("No")

Submission status: Wrong Answer

Solution code:
# 
#  author Sidratul Munather
#  time 18 Aug 2020
#

n = list(map(int, input().split(' ')))
Red = n[0]
Green = n[1]
Blue = n[2]
for i in range(int(input())):
        if Blue < Green:
             Blue = Blue *2
             
        elif Green < Red:
             Green = Green *2
             

if Red < Green and Green < Blue:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import itertools
l = list(map(int,input().split()))
k = int(input())
p = list(itertools.combinations_with_replacement([0,1,2], k))
f = False

ans = 0
for i in p:
  a = (l[0] * 2 * i.count(0) if i.count(0) else l[0])
  b = (l[1] * 2 * i.count(1) if i.count(1) else l[1])
  c = (l[2] * 2 * i.count(2) if i.count(2) else l[2])
  if a<b<c:
    f = True

if f == False:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
import itertools
l = list(map(int,input().split()))
k = int(input())
p = list(itertools.combinations_with_replacement([0,1,2], k))
f = False

ans = 0
for i in p:
  a = (l[0] * 2 * i.count(0) if i.count(0) else 1)
  b = (l[1] * 2 * i.count(1) if i.count(1) else 1)
  c = (l[2] * 2 * i.count(2) if i.count(2) else 1)
  if a<b<c:
    f = True

if f == False:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
import itertools
l = list(map(int,input().split()))
k = int(input())
p = list(itertools.combinations_with_replacement([0,1,2], k))
f = False

ans = 0
for i in p:
  if l[0] * 2 * i.count(0) < l[1] * 2 * i.count(1) < l[2] * 2 * i.count(2):
    f = True

if f == False:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
from math import log2
from math import ceil
a,b,c = map(int,input().split())
k = int(input())
s1 = max(ceil(log2(a/b)),0)
s2 = max(ceil(log2(b*2**s1/c)),0)
if s1+s2 <= k:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
from math import log2
from math import ceil
a,b,c = map(int,input().split())
k = int(input())
s1 = max(int(a/b),0)
s2 = max(int(b*2**s1/c),0)
if s1+s2 <= k:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
from math import log2
from math import ceil
a,b,c = map(int,input().split())
k = int(input())
s1 = ceil(log2(b/a))
s2 = ceil(log2(c/(b*2**s1)))
if s1+s2 <= k:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
x,y,z=map(int,input().split())
k=int(input())
if(x<y<z):
    print("Yes")
else:
    while(1):
        if(k==0):
            break
        else:
            y=y*2
            k-=1
            if(y>x):
                break
    while(1):
        if(k==0):
            break
        else:
            z=z*2
            k-=1
            if(z>y):
                break
    if(k>=0):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
x,y,z=map(int,input().split())
k=int(input())
if(x<y<z):
    print("Yes")
else:
    while(1):
        if(k==0):
            break
        else:
            y=y*2
            k-=1
            if(y>x):
                break
    while(1):
        if(k==0):
            break
        else:
            z=z*2
            k-=1
            if(z>y):
                break
    if(x<y<z):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
x,y,z=map(int,input().split())
k=int(input())
while(1):
    if(k==0):
        break
    else:
        y=y*2
        k-=1
        if(y>x):
            break
while(1):
    if(k==0):
        break
    else:
        z=z*2
        k-=1
        if(z>y):
            break
if(x<y<z):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a, b, c = input().split()
k = int(input())

for _ in range(k):
  if int(a) >= int(b):
    b = int(b) * 2
  c = int(c) * 2
    
if int(a) < int(b) and int(b) < int(c):
  print("Yes")
print("No")

Submission status: Wrong Answer

Solution code:
a, b, c = input().split()
k = int(input())

for _ in range(k):
  if int(a) > int(b):
    b = int(b) * 2
  else:
    c = int(c) * 2
    
if int(a) < int(b) and int(b) < int(c):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
while k>=0:
  if a>=b:
    b**=2
    k-=1
  elif b>c:
    c**=2
    k-=1
  else:
    break
if c>b>a:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
A,B,C = map(int, input().split())
K = int(input())

for i in range(K):
  if max(A,B,C) != C:
    C *= 2
  else:
    if A > B:
      B *= 2
if C > B and B > A:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
A,B,C = map(int, input().split())
K = int(input())

for i in range(K):
  if max(A,B,C) != C:
    C *= 2
  elif max(A,B,C):
    if A > B:
      B *= 2
  if C > B and B > A:
    print("Yes")
    exit()
print("No")

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
k = int(input())
for i in range(k):
    if a > b:
        b *= 2
    elif b > c:
        c *= 2
print('Yes') if a < b < c else print('No')

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
k = int(input())

cnt = 0
while a > b:
    b *= 2
    cnt += 1
while b > c:
    c *= 2
    cnt += 1

print('Yes' if cnt <= k else 'No')

Submission status: Wrong Answer

Solution code:
red, green, blue = map(int, input().split())
k = int(input())
success = 0
for cnt in range(k+1):
    if red > green:
        green *= 2
    elif red > blue:
        blue *= 2
    elif green >= blue:
        blue *= 2
    else:
        success = 1
        break
if success == 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
n = int(input())

while 1:
  if n == 0:
    print("No")
    break
  n -= 1
  if a[0] >= a[1]:
    a[1] *= 2
  elif a[1] >= a[2]:
    a[2] *= 2
  if a[0] < a[1] < a[2]:
    print("Yse")
    break

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
n = int(input())

while 1:
  if n == 0:
    print("No")
    break
  n -= 1
  if a[0] >= a[1]:
    a[1] *= 2
  elif a[1] >= a[2]:
    a[2] *= 2
  if a[0] < a[1] < a[2]:
    print("Yse")
    break

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
n = int(input())

while 1:
  if a[0] >= a[1]:
    a[1] *= 2
  elif a[1] >= a[2]:
    a[2] *= 2
  elif a[0] < a[1] < a[2]:
    print("Yse")
    break
  if n == 0:
    print("No")
    break
  n -= 1

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
n = int(input())

while 1:
  if n == 0:
    print("No")
    break
  elif a[0] >= a[1]:
    a[1] *= 2
    n -= 1
  elif a[1] >= a[2]:
    a[2] *= 2
    n -= 1
  else:
    print("Yse")
    break

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
k = int(input())

cnt = 0
while a>b:
  b *= 2
  cnt += 1
  
while b>c:
  c *= 2
  cnt += 1
  
if cnt <= k:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
k = int(input())

cnt = 0
while a >= b:
  b *= 2
  
while b >= c:
  c *= 2
  
if cnt <= k:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
k = int(input())

cnt = 0
while b >= a:
  b *= 2
  
while c >= b:
  c *= 2
  
if cnt <= k:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
a, b,c = map(int, input().split())
K=int(input())

for i in range(K):
    if b<a:
        b=b*2

    elif c<b:
        c=c*2

    if a<b and b<c:
        print('Yes')
        exit()
print('No')

Submission status: Wrong Answer

Solution code:
R, G, B = map(int, input().split())
K = int(input())
for _ in range(K):
    if G < R:
        G *= 2
    elif B < G:
        B *= 2
print('Yes' if R < G < B else 'No')

Submission status: Wrong Answer

Solution code:
a,b,c = map(int , input().split())
k = int(input())
while(k>=1):
    if b<c or a == b:
        b = b*2
    else:
        c = c*2
    k-=1
if (a<b and b<c):
    print ("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b,c = map(int , input().split())
k = int(input())
while(k>=1):
    if c<b:
        c = c*2
    elif b<a:
        b = b*2
    else:
        a = a*2
    k-=1
if (a<b and b<c):
    print ("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b,c = map(int , input().split())
k = int(input())
while(k>=1):
    if c<b:
        c = c*2
    else:
        b = b*2
    k-=1
if (a<b and b<c):
    print ("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b,c = map(int , input().split())
k = int(input())
while(k>=1):
    if b<c:
        b = b*2
    else:
        c = c*2
    k-=1
if (a<b and b<c):
    print ("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


def main():
    a,b,c = map(int, input().split())
    k = int(input())
    flag = False
    if a < b < c:
        print("Yes")
        sys.exit()

    for i in range(k):
        if a > b:
            if b > c:
                c *= 2
            else:
                b *= 2
        else:
            if b > c:
                c *= 2
            else:
                b *= 2

    if a < b < c:
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


def main():
    a,b,c = map(int, input().split())
    k = int(input())
    flag = False
    if a < b < c:
        print("Yes")
        sys.exit()

    for i in range(k):
        if a >= b:
            if b >= c:
                c *= 2
            else:
                b *= 2
        else:
            if b >= c:
                c *= 2
            else:
                b *= 2

    if a < b < c:
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
from sys import stdin, stdout
import math,sys,heapq
from itertools import permutations, combinations
from collections import defaultdict,deque,OrderedDict
from os import path
import bisect as bi
def yes():print('YES')
def no():print('NO')
if (path.exists('input.txt')): 
    #------------------Sublime--------------------------------------#
    sys.stdin=open('input.txt','r');sys.stdout=open('output.txt','w');
    def I():return (int(input()))
    def In():return(map(int,input().split()))
else:
    #------------------PYPY FAst I/o--------------------------------#
    def I():return (int(stdin.readline()))
    def In():return(map(int,stdin.readline().split()))

def dict(a):
    d={}
    for x in a:
        if d.get(x,-1)!=-1:
            d[x]+=1
        else:
            d[x]=1
    return d

def find_gt(a, x):
    'Find leftmost value greater than x'
    i = bi.bisect_right(a, x)
    if i != len(a):
        return i
    else:            
        return -1

def main():
    try:
        a,b,c=In()
        k=I()
        t1,t2=0,0
        if a>b:
            t1=math.ceil((a/b)/2)
            b=t1*2*b
        if b>c:
            t2=math.ceil((b/c)/2)
            c=t2*2*c
        if a<b and b<c:
            if t1+t2<=k:
                print('Yes')
            else:
                print('No')
        else:
            print('No')

    except:
        pass
        
M = 998244353
P = 1000000007
 
if __name__ == '__main__':
    #for _ in range(I()):main()
    for _ in range(1):main()

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
k = int(input())
ans = 0
for i in range(k+1):
    if a > c:
        c = c * 2
    elif a > b:
        b = b * 2
    elif b > c:
        c = c * 2
    elif c > b > a:
        ans = 1
        break

if ans == 0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
n , m , l = map(int , input().split())
k=int(input())
for a in range(k+1):
  for b in range(k+1):
    for c in range(k+1):
      a1 = (n*(2*a))
      b1 = (m*(2*b))
      c1 = (l*(2*c))
      if a+b+c <= k and a1 < b1 and b1 < c1:
        print("Yes")
        exit()
        
print('No')

Submission status: Wrong Answer

Solution code:
a,b,c=[int(x) for x in input().split(" ")]
k=int(input())
count=0
while b<=a:
    count+=1
    b*=2
while b<=c:
    count+=1
    c*=2
if count<=k:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())
K=int(input())
result='No'
count=K*(K-1)*(K-2)/6

for i in range(K+1):
  for j in range(K+1):
    for l in range(K+1):
      if i==0:
        aa=A
      else:
        aa=A*(2**i)
      if j==0:
        bb=B
      else:
        bb=B*(2**j)
      if l==0:
          cc=C
      else:
          cc=C*(2*l)
      if (i+j+l)<=K and bb>aa and cc>bb:
        result='Yes'

print(result)

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
k = int(input())
for i in range(k):
    if a < b and b < c:
        print("Yes")
        exit()
    elif a > b:
        b *= 2
    elif b > c:
        c *= 2
if a < b and b < c:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
k = int(input())

cnt = 0
while a>=b:
    b *= 2
    cnt += 1
while b>=c:
    c *= 2
    cnt += 1

if(cnt <= k):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:

a,b,c=map(int,input().split())
K=int(input())

isCheck = None
for i in range(K):
    for j in range(K):
        for k in range(K):
            x = a*2**(i)
            y = b*2**(j)
            z = c*2**(k)
            if i+j+k <= K and x < y and y < z:
                isCheck = True

if isCheck:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())
K=int(input())
D=B
E=C
while A<B:
  B*=2
while B<C:
  C*=2
B//=D
C//=E
X=B+C
while X%2==0:
  X//=2
if X>K:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
k = int(input())
if a * 2 < b < c or a < b * 2 < c or a < b < c * 2:
     print("Yes")
else:
     print("No")

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
while True:
    count=1
    if a>=b:
        b*=2
        count+=1
    else:
        break
k-=count
if b< c*k:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
k = int(input())
for i in range(k+1):
    if a < b and b < c:
        print("Yes")
        exit()
    elif b > c:
        c *= 2
    elif a > b:
        b *= 2
print("No")

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
k = int(input())
for i in range(k+1):
    if a < b and b < c:
        print("Yes")
        exit()
    elif a > b:
        b *= 2
    elif b > c:
        c *= 2
print("No")

Submission status: Wrong Answer

Solution code:
abc=list(map(int, input().split()))
k=int(input())
a=abc[0]
b=abc[1]
c=abc[2]

num=0
if(a < b):
  if(b < c):
    print("Yes")
  else:
    while num<k:
      c=2*c
      num=num+1
      if(b<c):
        print("Yes")
        break
    print("No")
else:
  while num<k:
    b=2*b
    num=num+1
    if(a<b):
      while num<k:
        c=2*c
        num=num+1
        if(b<c):
          print("Yes")
          break
      print("No")
  print("No")