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())


def main():
    if a < b < c:
        return print("Yes")

    x = 0
    y = 0
    for i in range(1, 20):
        if b * (2 ** i) > a:
            break
        x += 1
        y += 1

    for i in range(1, 20):
        if c * (2 ** i) > b * (2 ** x):
            break
        y += 1

    if k < y:
        return print("No")

    if c * 2 ** (y - x) > b * (2 ** x) > a:
        return print("Yes")

    print("No")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

while k:
    k -= 1
    b = b * 2
    if b > a:
        break

while k:
    k -= 1
    c = c * 2
    if c > b:
        break

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

Submission status: Wrong Answer

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

        elif c < a or c < b:
            c = c * 2

        elif b < a:
            b = b * 2

main()

Submission status: Wrong Answer

Solution code:
x = input().split()
x = [int(s) for s in x]
y = int(input())
z = 0
w = 0
if x[1] > x[0]:
    if x[2] > x[1]:
        w = 1
    else:
        for i in range(y):
            if x[2] > x[1]:
                w = 1
                break
            else:
                x[2] = x[2] * 2
elif x[2] > x[1]:
    for i in range(y):
        if x[1] > x[0]:
            w = 1
            break
        else:
            x[1] = x[1] * 2
else:
    for i in range(y):
        if x[1] > x[0]:
            z = int(i)
            for i in range(y - z):
                if x[2] > x[1]:
                    w = 1
                    break
                else:
                    x[2] = x[2] * 2
        else:
            x[1] = x[1] * 2
if w == 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
A,B,C = map(int, input().split())
K = int(input())
count = 0
a = 0
while K >= 0:

    if (A < B * 2 ** K) and (B * 2 ** K < C * 2 ** a):
        count +=1
    K -=1
    a +=1

if count == 1:
    print("Yes")
else: print("No")

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
K = int(input())
sum = 0
sum1 = 0
sum2 = 0
for i in range(K):
  if (C):
    sum2+=C*2
  elif(B):
    sum1+=B*2
  elif(A):
    sum+=A*2
if (sum1>sum):
  print('Yes')
elif(sum2>sum1):
  print('Yes')
elif(sum1>sum and sum2>sum1):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

ans = 'No'
if B > A and C > B :
    ans = 'Yes'
else:
    for i in range(K+1):
        for j in range(K+1-i):
            for h in range(K+1-i-j) :
                if i > 0 :
                    R = A*2*i
                else:
                    R = A
                if j > 0 :
                    G = B*2*j
                else :
                    G = B
                if h > 0 :           
                    Bl = C*2*h
                else:
                    Bl = C
                if G > R and Bl > G and Bl > R:
                    ans = 'Yes'
                    break


print(ans)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
re=0
re1=0
for i in range (k):
    re=re+b*2
    if (re > a ):
        re1 = re1 + c*2
        if (re1 > re):
            print("Yes")
            quit()
        else:
            print("No")
            quit()

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=b*2
    else:
        if b>=c:
            c=c*2
            print(a,b,c)
        else:
            break

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

Submission status: Wrong Answer

Solution code:
A,B,C = map(int, input().split())
K = int(input())
count = 0
a = 0
while K > 0:

    if (A < B * 2 ** K) and (B * 2 ** K < C * 2 ** a):
        count +=1
    K -=1
    a +=1

if count == 1:
    print("Yes")
else: print("No")

Submission status: Wrong Answer

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


def main():
    if a < b < c:
        return print("Yes")

    x = 0
    y = 0
    for i in range(1, 20):
        if b * (2 ** i) > a:
            break
        x += 1
        y += 1

    for i in range(1, 20):
        if c > b * (2 ** x):
            break
        if c * (2 ** i) > b * (2 ** x) > a:
            break
        y += 1

    if k < y:
        return print("No")

    if c * (2 ** y) - x > b * (2 ** x) > a:
        return print("Yes")

    print("No")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from itertools import combinations_with_replacement
from collections import Counter

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

lsts = []
lst = list(map(Counter, combinations_with_replacement([a,b,c], k)))
result = False
for l in lst:
    al, bl, cl = a*(2**l[a]) ,b*(2**l[b]) , c*(2**l[c])
    if (bl > al) and (cl > bl):
        result = True
if result:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys
r,g,b = map(int,input().split())
k = int(input())
#青＞緑＞赤
count = 0
if g*(2**k)>r:
    while g<r:
        g*=2
        count += 1
else:
    print("No")
    sys.exit(0)

if b*(2**(k-count))>g:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
re=0
re1=0
for i in range (k):
    re=re+b*2
    if (re > a ):
        re1 = re1 + c*2
        if (re1 > re):
            print("Yes")
            quit()
        else:
            print("NO")
            quit()

Submission status: Wrong Answer

Solution code:
import sys
r,g,b = map(int,input().split())
k = int(input())
#青＞緑＞赤
count = 0
if g*(2**k)>r:
    while g<r:
        g*=2
        count += 1
else:
    print("No")
    sys.exit(0)

if b*(2**(k-count))>g and k<=count:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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


def combinations(k):
    result = []
    for a in range(k + 1):
        for b in range(k + 1):
            for c in range(k + 1):
                if a + b + c == k:
                    result.append([a, b, c])

    return result


def magic(A, B, C, K):
    for l in combinations(K):
        a, b, c = A, B, C
        a_count, b_count, c_count = l
        if a_count > 0:
            a = A * 2 * a_count
        if b_count > 0:
            b = B * 2 * b_count
        if c_count > 0:
            c = C * 2 * c_count

        if a < b < c:
            return True

    return False


if (magic(A, B, C, K)):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

ans = 'No'
for i in range(K+1):
    for j in range(K+1-i):
        for h in range(K+1-i-j) :
            if i > 0 :
                R = A*2*i
            else:
                R = A
            if j > 0 :
                G = B*2*j
            else :
                G = B
            if h > 0 :           
                Bl = C*2*h
            else:
                Bl = C
            if G > R and Bl > G and Bl > R:
                ans = 'Yes'
                break


print(ans)

Submission status: Wrong Answer

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

n=0

  
while k>n and b<=a:
    b=b*2
    n=n+1
    
else:
    while k>n and c<=b:
      c=c*2
      n=n+1
      
if c<b<a:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import math
A,B,C=(int(x) for x in input().split())
k=int(input())
e=math.ceil(A/B)
f=math.ceil(B/C)
y=math.ceil(A/C)
if y>=f:
    z=y
else:
    z=f

g=0
if e>2:
    g+=2
elif e==2:
    g+=1

if z>2:
    g+=2
elif z==2:
    g+=1
if A==B==C:
    g+=3
elif A==B:
    g+=1
elif A==C:
    g+=1
elif B==C:
    g+=1

if g<=k:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

for i in range(K):
    if list[0]<list[1]<list[2]:
        break
    if list[1]>list[2]:
        list[2]=2*list[2]
        continue
    elif list[0]>list[1]:
        list[1]=2*list[1]

if list[0]<list[1]<list[2]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import math

A ,B, C = map(int, input().split())
N = int(input())

count = 0

if A > B:
  temp = math.log(A/B) / math.log(2)
  temp = math.ceil(temp)
  count += temp
  B = 2**temp * B
else:
  count += 0
  
if B > C:
  temp = math.log(B/C) / math.log(2)
  temp = math.ceil(temp)
  count += temp
  C = 2**temp * C
else:
  count += 0
  
if  C > B and count <= N:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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


def main():
    if a < b < c:
        return print("Yes")

    x = 0
    y = 0
    for i in range(1, 20):
        if b * (2 ** i) > a:
            break
        x += 1
        y += 1

    for i in range(1, 20):
        if c > b * (2 ** x):
            break
        y += 1
        if c * (2 ** i) > b * (2 ** x) > a:
            break

    if k < y:
        return print("No")

    if c * (2 ** y - 1) - x > b * (2 ** x) > a:
        return print("Yes")

    print("No")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
K = int(input())
sum = 0
sum1 = 0
sum2 = 0
for i in range(K):
  if (C):
    sum2+=C*2
  elif(B):
    sum1+=B*2
  elif(A):
    sum+=A*2
if (sum1>sum):
  print('Yes')
elif(sum2>sum1):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
def main():
    R, G, B = map(int, input().split())
    K = int(input())

    for i in range(K):
        if R > G:
            G = G * 2
        else:
            if G > B:
                B = B * 2
        if B > G > R:
            print("Yes")
            exit()
    print("No")
if __name__  == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
K = int(input())
for i in range(0,K+1):
    A = A*(2*i)
    for j in range(0,K+1):
        B = B*(2*j)
        for h in range(0,K+1):
            C = C*(2*h)
            if (i+j+h) <= K and C>B>A:
                print("Yes")
                exit()
print("No")

Submission status: Wrong Answer

Solution code:
import sys
r,g,b = map(int,input().split())
k = int(input())
#青＞緑＞赤
count = 0
if g*(2**k)>r:
    while g<r:
        g*=2
        count += 1
else:
    print("No")
    sys.exit(0)

if b*(2**(k-count))>g and k<count:
    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(0,K+1):
    for j in range(0,K+1-i):
        for k in range(0,K+1-i-j):
            #print('{},{},{}'.format(i,j,k))
            if(A*2**i < B*2**j and B*2**j < C*2**k):
                if(i==j==k==0):
                    break
                print('Yes')
                exit()

print('No')

Submission status: Wrong Answer

Solution code:
X = list(map(int,input().split()))
A = X[0]
B = X[1]
C = X[2]
K = int(input())
cnt = 0
if A >= B:
  for i in range(K):
   B = B*2
   cnt = cnt + 1
   if A < B:
    break
if B >= C:
  for j in range(K):
   C = C*2
   cnt = cnt + 1
   if B < C:
    break
if cnt <= K:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
"""
b > g > r

"""

r, g, b = list(map(int, input().split()))
k = int(input())
flag = False
for i in range(k):
    if r > b and b > 2 * g :
        g *= 2
    elif r > g:
        g *= 2
    else:
        b *= 2

if r < g < b:
    flag = True
print("Yes") if flag else print("No")

Submission status: Wrong Answer

Solution code:
A, B, C = input().split()
A = int(A)
B = int(B)
C = int(C)
K = input()
K = int(K)
z = 0
while B <= A:
    B = B * 2
    z = z + 1
while C <= B:
    C = C * 2
    z = z + 1
if K < z:
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
A, B, C = input().split()
A = int(A)
B = int(B)
C = int(C)
K = input()
K = int(K)
z = 0
while B <= A:
    B = B * 2
    z = z + 1
while C <= B:
    C = C * 2
    z = z + 1
if K < z:
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

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

a = int(a)
b = int(b)
c = int(c)
l = []

if k == 1:
    if a < 2*b < c or a < b < 2*c:
        l.append('Yes')
    else:
        l.append('No')
elif a < b*(2**k) < c or a < b < c*(2**k):
    l.append('Yes')
else:
    for i in range(1, k):
        b = b*(2**(k-i))
        c = c*(2**i)
        if a < b < c:
            l.append('Yes')
            break
        else:
            b = int(b)
            c = int(c)
            l.append('No')

d = len(l)
print(l[d-1])

Submission status: Wrong Answer

Solution code:
import math

A ,B, C = map(int, input().split())
N = int(input())

count = 0
if A > B:
  temp = math.log(A/B) / math.log(2)
  temp = math.ceil(temp)
  count += temp
  B = count * B
else:
  count = 0
  
if B > C:
  temp = math.log(B/C) / math.log(2)
  temp = math.ceil(temp)
  count += temp
  C = count * C
  
if  C > B and count <= N:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import math
A, B, C = list(map(int, input().split()))
K = int(input())
#A, B, C = [7, 2, 5]
#K = 3

def f(A,B,C,K):
    aa = A
    bb = B
    cc = C
    kk = K
    i = math.ceil(math.log2((A+1)/B))
    K -= i
    B = B * (2 ** i)
    j = math.ceil(math.log2((B+1)/C))
    K -= j
    C = C * (2 ** j)
    if K >= 0:
        print("Yes")
    else:
        print("No")

    v0 = K >= 0
    v1 = A < B and B < C
    if not v1:
        print(v0,v1)

#f(4,2,1,6)
f(A,B,C,K)

for i in range(1,8):
    for j in range(1,8):
        for k in range(1,8):
            for l in range(1,8):
                pass
#                f(i,j,k,l)
#print("done")

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
K = int(input())
a=0
for i in range(K+1):
  for j in range(K-i+1):
    for k in range(K-i-j+1):
      if i+j+k==K:
        A_, B_, C_ = A, B, C
        A_ = A*(2**i)
        B_ = B*(2**j)
        C_ = C*(2**k)
        print(A,B,C,i,j,k)
        if C_>B_>A_:
          print('Yes')
          a=1
          break
    if a==1:
      break
  if a==1:
    break

if a==0:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(K):
    if list[0]<list[1]<list[2]:
        break
    if list[1]>list[2]:
        list[2]=2*list[2]
    elif list[0]>list[1]:
        list[1]=2*list[1]
    
    
    


if list[0]<list[1]<list[2]:
    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 C < B:
        C *= 2
        break
    if B < A:
        B *= 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())
a=0
for i in range(K+1):
  for j in range(K-i+1):
    for k in range(K-i-j+1):
      if i+j+k==K:
        A_, B_, C_ = A, B, C
        A_ = A*(2**i)
        B_ = B*(2**j)
        C_ = C*(2**k)
        print(A,B,C,i,j,k)
        if C_>B_>A_:
          print('Yes:',A_,B_,C_,i,j,k)
          a=1
          break
    if a==1:
      break
  if a==1:
    break

if a==0:
  print('No')

Submission status: Wrong Answer

Solution code:
import math
A,B,C=(int(x) for x in input().split())
k=int(input())
e=math.ceil(A/B)
f=math.ceil(B/C)
y=math.ceil(A/C)
if y>=f:
    z=y
else:
    z=f

g=0
if e>= 3:
    g+=2
elif e>=2:
    g+=1

if z<= 4:
    g+=2
elif z<=2:
    g+=1
if A==B==C:
    g+=3
elif A==B:
    g+=1
elif A==C:
    g+=1
elif B==C:
    g+=1
if g<=k:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

n=0

  
while k<n or b<=a:
    b=b*2
    n=n+1
    
else:
    while k>n or c<=b:
      c=c*2
      n=n+1
      
if c<b<a:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

for i in range(k):
    if card[0] >= card[1]:
        card[1] *= 2
    elif card[1] >= card[2]:
        card[2] *= 2
    else:
        card[2] *= 2

print(card)

print("Yes") if card[0] < card[1] < card[2] else print("No")

Submission status: Wrong Answer

Solution code:
A, B, C = [int(n) for n in input().split()]
K = int(input())
ans = 'No'
for i in range(1, K):
    B *= 2
    for j in range(1, K):
        C *= 2
        if A<B<C and i+j<=K:
            ans = 'Yes'
            break
print(ans)

Submission status: Wrong Answer

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

c = 0
while A >= B:
    B *= 2
    c += 1
    while B >= C:
        C *= 2
        c += 1

if c > K:
    ans = "No"
else:
    ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
import math
A,B,C=(int(x) for x in input().split())
k=int(input())
e=math.ceil(A/B)
f=math.ceil(B/C)
y=math.ceil(A/C)
if y>=f:
    z=y
else:
    z=f

g=0
if e<= 3:
    g+=2
elif e<=2:
    g+=1

if z<= 4:
    g+=2
elif z<=2:
    g+=1

if g<=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 C < B:
        C *= 2
        continue
    if B < A:
        B *= 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())

if a >= c:
  while k >= 1:
    c *= 2
    k -= 1
    if c > a:
      break

if a >= b:
  while k >= 1:
    b *= 2
    k -= 1
    if b > a:
      break

if c > b > a and k >= 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

c = 0
while A >= B:
    B *= 2
    c += 1
    # if c >= K:
    #     break
    while B >= C:
        C *= 2
        c += 1
        # if c >= K:
        #     break

print(A)
print(B)
print(C)

if c > K:
    ans = "No"
else:
    ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
def main():
    R, G, B = map(int, input().split())
    K = int(input())

    for i in range(K):
        if R > G:
            G = G * 2
        else:
            B = B * 2
        if B > G > R:
            print("Yes")
            exit()
    print("No")
if __name__  == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
X = list(map(int,input().split()))
A = X[0]
B = X[1]
C = X[2]
K = int(input())
cnt = 0
if A > B:
  for i in range(K):
   B = B*2
   cnt = cnt + 1
   if A < B:
    break
if B > C:
  for j in range(K):
   C = C*2
   cnt = cnt + 1
   if B < C:
    break
if cnt <= K:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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


def main():
    if a < b < c:
        return print("Yes")

    x = 0
    y = 0
    for i in range(1, 20):
        x += 1
        y += 1
        if b * (2 ** i) > a:
            break

    for i in range(1, 20):
        if c > b * (2 ** x):
            break
        if c * (2 ** i) > b * (2 ** x) > a:
            break
        y += 1

    if k < y:
        return print("No")

    if c * (2 ** y - 1) - x > b * (2 ** x) > a:
        return print("Yes")

    print("No")


if __name__ == "__main__":
    main

Submission status: Wrong Answer

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


def combinations(k):
    result = []
    for a in range(k + 1):
        for b in range(k + 1):
            for c in range(k + 1):
                if a + b + c == k:
                    result.append([a, b, c])

    return result


def magic(A, B, C, K):
    for l in combinations(K):
        if A * 2 * l[0] < B * 2 * l[1] < C * 2 * l[2]:
            return True

    return False


if (magic(A, B, C, K)):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

for i in range(K):
    if list[0]<list[1]<list[2]:
        break
    mini=min(list)
    for n in range(3):
        if mini==list[n]:
            list[n]=2*list[n]
    
    


if list[0]<list[1]<list[2]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
r,g,b = map(int,input().split())
k = int(input())
#青＞緑＞赤
count = 0
if g*(2**k)>r:
    while g<r:
        g*=2
        count += 1
else:
    print("No")
    # sys.exit()

if b*(2**(k-count))>g:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

ans = 'No'
for i in range(K+1):
    for j in range(K+1-i):
        for h in range(K+1-i-j) :
            if i > 0 :
                R = A*2*i
            else:
                R = A
            if j > 0 :
                G = B*2*j
            else :
                G = B
            if h >0 :           
                Bl = C*2*h
            else:
                Bl = C
            if G > R and Bl > G :
                ans = 'Yes'


print(ans)

Submission status: Wrong Answer

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

n=0

  
while k<n and b<=a:
    b=b*2
    n=n+1
    
else:
    while k>n and c<=b:
      c=c*2
      n=n+1
      
if c<b<a:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:

def Msol_B():
    a,b,c = list(map(int,input().split()))
    K = int(input())

    #a,b,c=[7,2,5]
    #K = 3

    if a==0 or b==0 or c==0:
        print("No")
        exit()

    import math

    if a > b:
        b_a = abs(math.log2(b/a))+1
        #まずは切りさげ
        b *= math.pow(2,math.floor(b_a))
        if b > c:
            c_b = abs(math.log2(c/b))+1
            if math.floor(b_a)+math.floor(c_b) <= K:
                print("Yes")
            else:
                print("No")
        else:
            print("Yes")
    else:
        print("Yes")




Msol_B()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
A,B,C=(int(x) for x in input().split())
k=int(input())
d=2**k
e=math.ceil(A/B)
f=math.ceil(B/C)
y=math.ceil(A/C)
if y>=f:
    z=y
else:
    z=f

g=0
if e<= 3:
    g+=2
elif e<=2:
    g+=1

if z<= 4:
    g+=2
elif z<=2:
    g+=1
if A==B==C:
    g+=3
elif A==B:
    g+=1
elif A==C:
    g+=1
elif B==C:
    g+=1
if g<=k:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

ans = 'No'
for i in range(K+1):
    for j in range(K+1-i):
        for h in range(K+1-i-j) :
            if i > 0 :
                R = A*2*i
            else:
                R = A
            if j > 0 :
                G = B*2*j
            else :
                G = B
            if h >0 :           
                Bl = C*2*h
            else:
                Bl = C
            if G > R and Bl > G :
                ans = 'Yes'
                break

print(ans)

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:
        b=b*2
    else:
        if b>c:
            c=c*2
        else:
            break

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

Submission status: Wrong Answer

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

for i in range(K):
    for j in range(K):
        if C**(K-i-j) > B**j > A**i:
            print("Yes")
            sys.exit()
        else: continue
print("No")

Submission status: Wrong Answer

Solution code:
r,g,b=input().split()
k=int(input())
r=int(r)
g=int(g)
b=int(b)
if (r<g and g<b):
    print('Yes')
else:
    while k>0:
        while (g<r):
            g=g*2
            k-=1
        while(b<g or b<r):
            b=b*2
            k-=1
        if (r<g and g<b):
            print('Yes')
            break
                
    else:
        print('No')

Submission status: Wrong Answer

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

if R < G < B:
  print("Yes")
  
for i in range(K):
  if R > G:
    G*=2
  elif G > B:
    B*=2
  elif R > B:
    B*=2
  elif R == G == B:
    B *= 2
  elif R == G:
    G *= 2
  elif G == B:
    B *= 2
  else:
    pass
if R < G < B:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

    #a,b,c=[7,2,5]
    #K = 3

    import math

    if a > b:
        b_a = abs(math.log2(b/a))+1
        #まずは切りさげ
        b *= math.pow(2,math.floor(b_a))
        if b > c:
            c_b = abs(math.log2(c/b))+1
            if math.floor(b_a)+math.floor(c_b) <= K:
                print("Yes")
            else:
                print("No")
        else:
            print("Yes")
    else:
        print("Yes")




Msol_B()

Submission status: Wrong Answer

Solution code:
import math
A,B,C=(int(x) for x in input().split())
k=int(input())
d=2**k
e=math.ceil(A/B)
f=math.ceil(B/C)
y=math.ceil(A/C)
if y>=f:
    z=y
else:
    z=f

g=0
if e<= 3:
    g+=2
elif e<=2:
    g+=1

if z<= 4:
    g+=2
elif z<=2:
    g+=1
if A==B==C:
    g+=3
elif A==B:
    g+=1
elif A==C:
    g+=1
elif B==C:
    g+=1
if g<=k:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

if K==0:
    if B > A and C > B:
        print('Yes')
        flag = 1
    else:
        pass
elif K>0:
    if B<=A:
        for k in range(K):
            if B*(k+1)*2>A:
                Bnew=B*(k+1)*2
                newK = K - k - 1
                for newk in range(newK):
                    if C * (newk + 1) * 2 > Bnew:
                        print('Yes')
                        flag=1
                        break
                break
    else:
        for k in range(K):
            if C * (k + 1) * 2 > B:
                print('Yes')
                flag = 1
                break

if flag == 0:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys
r,g,b = map(int,input().split())
k = int(input())
#青＞緑＞赤
count = 0
if g*(2**k)>r:
    while g<r:
        g*=2
        count += 1
else:
    print("No")
    sys.exit()

if b*(2**(k-count))>g:
    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 a>b:
        b=b*2
    else:
        if b>c:
            c=c*2
        else:
            break

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

Submission status: Wrong Answer

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

if K==0:
    if B > A and C > B:
        print('Yes')
        flag = 1
    else:
        pass
elif K>0:
    if B<=A:
        for k in range(K):
            if B*(k+1)*2>A:
                Bnew=B*(k+1)*2
                print(f'k:{k}')
                print(f'A:{A}')
                print(f'newB:{Bnew}')
                newK = K - k - 1
                print(f'newK:{newK}')
                for newk in range(newK):
                    if C * (newk + 1) * 2 > Bnew:
                        print('Yes')
                        flag=1
                        break
                break
    else:
        for k in range(K):
            if C * (k + 1) * 2 > B:
                print('Yes')
                flag = 1
                break

if flag == 0:
    print('No')

Submission status: Wrong Answer

Solution code:

def Msol_B():
    #a,b,c = np.array(list(map(int,input().split())))
    #K = int(input())

    a,b,c=[7,2,5]
    K = 3

    import math

    if a > b:
        b_a = abs(math.log2(b/a))+1
        #まずは切りさげ
        b *= math.pow(2,math.floor(b_a))
        if b > c:
            c_b = abs(math.log2(c/b))+1
            if math.floor(b_a)+math.floor(c_b) <= K:
                print("Yes")
            else:
                print("No")
        else:
            print("Yes")
    else:
        print("Yes")




Msol_B()

Submission status: Wrong Answer

Solution code:
import sys

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

for i in range(x + 1):
    for j in range(x + 1 - i):
        for k in range(x + 1 - i - j):
            ta = max(a, a * 2 * i)
            tb = max(b, b * 2 * j)
            tc = max(c, c * 2 * k)
            if ta < tb and tb < tc:
                print("Yes")
                sys.exit()

print("No")