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: Accepted

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

    if isSucess(R, G, B):
        print('Yes')
        return

    for _ in range(K):

        if B <= G or B <= R:
            B *= 2
        elif G <= R:
            G *= 2

    if isSucess(R, G, B):
        print('Yes')
    else:
        print('No')


def isSucess(R, G, B):
    if B > G > R:
        return True
    else:
        return False


def main():
    magic_2()


if __name__ == '__main__':
    main()

Submission status: Accepted

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

    for i in range(K):
        if A < B < C:
            print("Yes")
            exit()

        if A >= B:
            B *= 2
        elif B >= C:
            C *= 2

    if A < B < C:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
red, green, blue = map(int, input().split())
k = int(input())
for i in range(k):
    if red >= green:
        green *= 2
    else:
        blue *= 2
if red < green and green < blue:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

ans = 'No'
if A < B < C:
    ans = 'Yes'

res = 0
while A >= B:
    B *= 2
    res += 1

if B < C and res <= K:
    ans = 'Yes'

while B >= C:
    C *= 2
    res += 1

if res <= K:
    ans = 'Yes'

print(ans)

Submission status: Accepted

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

while(A>=B and K > 0):
    B *=2
    K -=1

while(B>=C and K > 0 ):
    C *=2
    K -=1

if A<B and B<C:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
import numpy as np
input = sys.stdin.readline


def log(*args):
    print(*args, file=sys.stderr)


def main():
    np.set_printoptions(threshold=20)
    A, B, C = map(int, input().rstrip().split())
    K = int(input())
    # A < B < C
    while A >= B:
        B *= 2
        K -= 1
    while B >= C:
        C *= 2
        K -= 1
    if K >= 0:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

def Ss():
  return sys.stdin.readline().rstrip().split(' ')

def Is():
  ss = Ss()
  return map(int, ss) if len(ss) > 1 else int(ss[0])

a, b, c = Is()
k = Is()

while b <= a:
    b = b * 2
    k = k - 1
    
while c <= b:
    c = c * 2
    k = k - 1

print('Yes' if k >= 0 else 'No')

Submission status: Accepted

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

for i in range(l+1):
    a2=a*2**i
    for j in range(l+1):
        b2=b*2**j
        for k in range(l+1):
            c2=c*2**k
            if i+j+k==l and b2>a2 and c2>b2:
                print("Yes")
#                print(a2,b2,c2)
#                print(i,j,k)
                exit()
print("No")
#print(a2,b2,c2)
#print(i,j,k)

Submission status: Accepted

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

for i in range(k + 1):
    for j in range(k + 1 - i):
        for l in range(k + 1 - i - j):
            if c * 2 ** l > b * 2 ** j > a * 2 ** i:
                print('Yes')
                exit()

print('No')

Submission status: Accepted

Solution code:

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

ans = 'No'

for i in range(k):

    if c <= b : 
        c = c * 2
    else :
        if b <= a :
            b = b * 2

    # print("A : {0}".format(a))
    # print("B : {0}".format(b))
    # print("C : {0}".format(c))

    if a < b < c :
        ans = 'Yes'
        break

print(ans)

Submission status: Accepted

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

flag=0
for i in range(0, k+1):
  bb = b * (2**i)
  j = k-i
  cc = c * (2**j)
  if (a < bb) and (bb < cc):
    print('Yes')
    flag=1
    break

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

Submission status: Accepted

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

# if a < c:
#     if c > b:
#         print('Yes')

#     elif b > c:
#         while k >0 :
#             c *= 2
#             k -= 1

#         if c > b:
#             print('Yes')
#         else:
#             print('No')

if c > b and b > a:
    print('Yes')

else:
    while b <= a and k > 0:
        b *= 2
        k -= 1

    if k < 0 and not(c > b and b > a):
        print('No')

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

    else:
        while c <= b and k > 0:
            c *= 2
            k -= 1

        if k < 0 and not(c > b and b > a):
            print('No')

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

        else:
            print('No')

Submission status: Accepted

Solution code:
def INT():
    return int(input())

def MI():
    return map(int, input().split())

def LI():
    return list(map(int, input().split()))

A, B, C = MI()
K = INT()

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

Submission status: Accepted

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

count = 0
while not A < B:
  B *= 2
  count += 1
while not B < C:
  C *= 2
  count += 1

if count <= K and A < B < C:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
def main():
    A,B,C=map(int,input().split())
    K=int(input())
    cnt = 0
    for b in range(10):
        if A >= B:
            cnt += 1
            B *= 2
    for c in range(10):
        if B >= C:
            cnt += 1
            C *= 2
    if cnt <= K:
        print('Yes')
    else:
        print('No')
main()

Submission status: Accepted

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

ans = "No"

def ABC(int1, int2, int3):
    if int1 < int2 < int3:
        return True
    else:
        return False

if ABC(A, B, C):
    ans = "Yes"
else:
    for k in range(K):
        if B <= A:
            B = B * 2
        elif C <= B:
            C = C * 2
        
        if ABC(A, B, C):
            ans = "Yes"
            break

print(ans)

Submission status: Accepted

Solution code:
from itertools import combinations_with_replacement
A, B, C = map(int, input().split())
K = int(input())
ans = 0
for comb in combinations_with_replacement([0, 1, 2], K):
  judge = [A, B, C]
  for i in comb:
    judge[i] *= 2
  # print(judge)
  if judge[2] > judge[1] and judge[1] > judge[0]:
    print('Yes')
    ans += 1
    break
if ans == 0:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

cnt = 0
for _ in range(K):
    if A >= B:
        B *= 2
        cnt += 1
    elif B >= C:
        C *= 2
        cnt += 1

if A < B < C:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
from itertools import product

RGB0 = [*map(int, input().split())]
K = int(input())

for K_cards in product(range(3), repeat=K):
  RGB = RGB0[:]
  if RGB[2] > RGB[1] > RGB[0]:
    print("Yes")
    exit()
  for i in range(K):
    RGB[K_cards[i]] *= 2
    if RGB[2] > RGB[1] > RGB[0]:
      print("Yes")
      exit()
print("No")

Submission status: Accepted

Solution code:
def main():
    import sys
    def input():
        return sys.stdin.readline()[:-1]
    X=list(map(int,input().split()))
    A=X[0]
    B=X[1]
    C=X[2]
    K=int(input())
    for i in range(K):
        if A<B and B<C:
            print("Yes")
            sys.exit()
        if C<=A or C<=B:
            C=2*C
        else:
            B=2*B
    if A<B and B<C:
        print("Yes")
        sys.exit()                
    print("No")
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import math
from collections import defaultdict,deque
from itertools import permutations
ml=lambda:map(int,input().split())
ll=lambda:list(map(int,input().split()))
ii=lambda:int(input())
ip=lambda:list(input())
ips=lambda:input().split()
sys.setrecursionlimit(10**6)
"""========main code==============="""

t=1
for _ in range(t):
    a,b,c=ml()
    k=ii()
    ans="No"
    while(k and b<=a):
        b*=2
        k-=1
    while(k and c<=b):
        c*=2
        k-=1
    if(c>b and b>a):
        ans="Yes"
    print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

A,B,C=map(int,input().split())
K=int(input())
while A>=B:
    B*=2
    K-=1
while B>=C:
    C*=2
    K-=1
YesNo(K>=0)

Submission status: Accepted

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

K = int(input())

cnt=0

while cnt<K and ((C<=B) or (B<=A)):
  if ((C<=B) or (C<=A)):
    C = C*2
    cnt+=1
  if (B<=A):
    B = B*2
    cnt+=1
  
if cnt<=K and ((C>B) and (B>A)):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

count = 0
while A >= B:
    B *= 2
    count += 1
while B >= C:
    C *= 2
    count += 1
print('Yes' if count <= K else 'No')

Submission status: Accepted

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

k=int(input())
i=1

c>b>a #青，緑，赤
ans='No'
if c>b and b>a:
    ans='Yes'
else:
    while b<=a and i<=k:
        b=b*2
        i+=1

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

Submission status: Accepted

Solution code:
import sys
readline=sys.stdin.readline

A,B,C=map(int,readline().split())
K=int(readline())

cnt = 0
while B <= A:
  B *= 2
  cnt += 1
  
while C <= B:
  C *= 2
  cnt += 1
  
if cnt <= K:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = int(input())
flag = 0
for trial in range(0, k+1):
    for red in range(0, trial+1):
        for green in range(0, trial+1-red):
            for blue in range(0, trial+1-red-green):
                new_num = [a * 2**red, b * 2**green, c * 2**blue]
                if new_num[1] > new_num[0] and new_num[2] > new_num[1]:
                    flag = 1
if flag == 0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

for i in range(0,K):
    if (A >= B):
        B *= 2
        continue

    if (B >= C):
        C *= 2
        continue

if (A < B and B < C) :
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
red, green, blue = map(int, input().split())
K = int(input())

for i in range(K):
    if (green <= red):
        green *= 2
    elif (blue <= green):
        blue *= 2

if (red < green and green < blue):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

ans = 0
while B <= A:
    B *= 2
    ans += 1
while C <= B:
    C *= 2
    ans += 1

if ans <= K:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
[A, B, C] = list(map(int, input().split()))
K = int(input())
N = 0
Answer = 'No'

while B <= A:
    B = 2*B
    N += 1

while C <= B:
    C = 2*C
    N += 1

if N <= K:
    Answer = 'Yes'
print(Answer)

Submission status: Accepted

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

flag = False
for i in range(0, K):
    a = A*2**i
    for j in range(0, K-i):
        b = B*2**j
        c = C*2**(K-i-j)
        if a < b < c:
            flag = True
            # print(a, b, c)
            break
    if flag:
        break
if flag:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
k = int(input())
cnt = 0
while a >= b:
    cnt += 1
    b *= 2
while b >= c:
    cnt += 1
    c *= 2

if cnt <= k:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

if B<=A:
    num1=0
    while B*(2**num1)<=A:
        num1+=1
    B=B*(2**num1)
    if C<=B:
        num2=0
        while C*(2**num2)<=B:
            num2+=1
        if K>=(num1+num2):
            print('Yes')
        else:
            print('No')
    else:
        if K>=num1:
            print('Yes')
        else:
            print('No')
            
else:
    if C<=B:
        num2=0
        while C*(2**num2)<=B:
            num2+=1
        if K>=(num2):
            print('Yes')
        else:
            print('No')
    else:
        print('Yes')

Submission status: Accepted

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

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

Submission status: Accepted

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
    else:
        break
if b>a and c>b:
    print("Yes")
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools
from copy import copy


def lr(abc):
    return


def check(abc, k):
    for i in range(K + 1):
        for v in itertools.combinations_with_replacement([0, 1, 2], i):
            ABC_ = copy(ABC)
            for j in v:
                ABC_[j] *= 2
            if ABC_[0] < ABC_[1] < ABC_[2]:
                return "Yes"
    return "No"


ABC = list(map(int, input().split()))
K = int(input())

print(check(ABC, K))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

if k < 0:
    ans = 'No'

print(ans)

Submission status: Accepted

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

for i in range(K):
    Bcp = B
    Ccp = C
    for j in range(i):
        Bcp *= 2
    for j in range(K-i):
        Ccp *= 2
    if A < Bcp and Bcp < Ccp:
        flag = 1
    #print(A, Bcp, Ccp)
if flag == 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
li = list(map(int,input().split()))
a=int(input())
magic = 0
for i in range(0,8):
    if li[0] >= li[1]:
        li[1] = li[1] * 2
        magic = magic + 1

for i in range(0,8):
    if li[1] >= li[2]:
        li[2] = li[2] * 2
        magic = magic + 1
if a >= magic:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
K = int(input())
cnt = 0
ans = False
while True:
  if cnt > K:
    break

  if B > A and C > B:
    ans = True
    break

  if B <= A:
    B *= 2
    cnt += 1
    continue
    
  if C <= B:
    C *= 2
    cnt += 1

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

Submission status: Accepted

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

for k in range(K):
    if not A < B:
        B *= 2
    elif not B < C:
        C *= 2
    else:
        break

print('Yes' if A < B < C else 'No')

Submission status: Accepted

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

K = int(input())

flg = False

for i_a in range(K+1):
    for i_b in range(K+1):
        for i_c in range(K+1):
            if(i_a + i_b + i_c <= K):
                score_a = A
                score_b = B
                score_c = C
                for n_a in range(i_a):
                    score_a *= 2
                for n_b in range(i_b):
                    score_b *= 2
                for n_c in range(i_c):
                    score_c *= 2
                if((score_b > score_a) and (score_c > score_b)):
                    flg = True
            
            if(flg):
                break
        if(flg):
            break
    if(flg):
        break

if(flg):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys

r, g, b = list(map(int, input().split()))
k = int(input())

def check():
    if (r < g < b):
        print("Yes")
    else:
        print("No")
    sys.exit()

m = k
for _ in range(k):
    if (r < g):
        break
    
    g *= 2
    m -= 1

if (m < 1):
    check()

mm = m
for _ in range(m):
    if (g < b):
        break
    
    b *= 2
    mm -= 1

check()

Submission status: Accepted

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

for i in range(K):
    if A >= B:
        B *= 2
        continue

    if B >= C:
        C *= 2
        continue

if A < B and B < C:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

while A >= B:
    B *= 2
    K -= 1

n = 0

while B >= C:
    n += 1
    C *= 2

if n <= K:
    print('Yes')
else:   
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

def f(A,B,C):
    if A < B and B < C:
        return True
    else:
        return False

for i in range(1, k):
    if f(a, b*(2**i), c*(2**(k-i))):
        print('Yes')
        sys.exit()

if f(a,b*(2**k),c):
    print('Yes')
    sys.exit()

if f(a,b,c*(2**k)):
    print('Yes')
    sys.exit()

print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num=input().split(" ")
num1=int(input())
A=int(num[0])
B=int(num[1])
C=int(num[2])
sum=0
while A>=B:
    sum+=1
    B=2*B
while B>=C:
    sum+=1
    C=2*C
if sum>num1:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
def solve(A, B, C, K):
    magic = 0
    while A >= B:
        B *= 2
        magic += 1
    while B >= C:
        C *= 2
        magic += 1
    print('Yes' if magic <= K else 'No')


if __name__ == '__main__':
    # S = input()
    # N = int(input())
    A, B, C = map(int, input().split())
    K = int(input())
    # As = [int(i) for i in input().split()]
    # Bs = [int(i) for i in input().split()]
    solve(A, B, C, K)

Submission status: Accepted

Solution code:
def main():
    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 K >= cnt:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import numpy as np
import sys
sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

# B > G > R
R,G,B = LI()
K = I()

count = 0

GR = False
while not GR:
    if G <= R:
        G *= 2
        count +=1
    else:
        GR = True

BG = False
while not BG:
    if B <= G:
        B *= 2
        count +=1
    else:
        BG = True

if count <= K:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
K=int(input())
flag=True
for i in range(K):
    if A>=B:
        B*=2
        continue
    if B>=C:
        C*=2
        continue
    if C>B and B>A:
        flag=False
        break
if C>B and B>A:
    flag=False
print('Yes' if flag==False else "No")

Submission status: Accepted

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

cnt = 0
while not(a<b<c):
    if a >= b:
        b = 2*b
    else:
        if b >= c:
            c = 2*c
    
    cnt += 1

if cnt <= k:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(k):
    if a >= b:
        b *= 2
    elif b >= c:
        c *= 2
    elif a < b and b < c:
        break


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

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
K = int(input())
frag = False
for i in range(K):
    if A >= B:
        B = 2 * B
    elif B >= C:
        C = C * 2
    
if  A < B and B < C:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

K = int(input())
K+=1

resu = 0

for k in range(K):
    if A>=B:
        B=B*2
    elif B>=C:
        C=C*2
    else:
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
@author: H_Hoshigi
"""
def main():
    A, B, C = map(int, input().split())
    K = int(input())

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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
if a < b < c:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(4100000)
import math
import itertools
INF = float('inf')
from heapq import heapify, heappop, heappush

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

    tmp = 0

    for i in range(k+1):
        for j in range(k+1-i):
            for l in range(k+1-i-j):
                _a = a * 2**i
                _b = b * 2**j
                _c = c * 2**l
                if _a < _b and _b < _c:
                    print('Yes')
                    return
    print('No')



if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in range(K):
  if A>=B:
    B = B*2
    continue
  if B>=C:
    C = C*2
    continue

if A<B<C:
  flag = True
    
print("Yes") if flag else print("No")

Submission status: Accepted

Solution code:
# coding: utf-8
import math
import numpy
#N = int(input())
a, b, c = map(int,input().split())
#A = list(map(int,input().split()))
K =int(input())
flg = False
i = 0
while a >= b:
    if i == K:
        break
    b *= 2
    i += 1
    
    #print(i,a,b,c)
while b >= c:
    if i == K:
        break
    c *= 2
    i += 1
    #print(a,b,c)
#print(a, b, c)
if a < b < c:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys
import numpy as np
import math  # gcdもあるよ
from collections import deque
from collections import defaultdict
from copy import deepcopy
from itertools import accumulate #リストを与えると累積和を返す
def input(): return sys.stdin.readline().rstrip()
from functools import lru_cache #メモ化

def main():
    a, b, c = list(map(int,input().split()))
    n = int(input())
    for _ in range(n):
        
        if a >= b:
            b = b * 2
            continue
        if b >= c:
            c = c * 2
            continue
    if a < b and b < c:
        print("Yes")
    else: print("No")
    return 0

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
word = input()
nums = word.split()
numin = [0,0,0]
seiko = 0
for j in range(3):
    numin[j] = int(nums[j])
k = int(input())

for i in range(k+1):
    if numin[0] >= numin[1]:
        numin[1] *= 2
    elif numin[1] >= numin[2]:
        numin[2] *= 2
    else:
        seiko = 1
        print('Yes')
        break

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

Submission status: Accepted

Solution code:
a,b,c = map(int, input().split())
k = int(input())
aa,bb,cc = a,b,c
ans = False
for i in range(k,-1,-1):
  aa,bb,cc = a,b,c
  cc *= 2**i
  bb *= 2**(k-i)
  if cc>bb>aa:
    ans = True
    break
    
if ans:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
import math
def resolve():
    A,B,C = map(int,input().split())
    K = int(input())
    if A < B:
        magic_B = 0
    else:
        magic_B = int(math.log2(A/B)) + 1
    B_mult = B * pow(2,magic_B)

    if B_mult < C:
        magic_C = 0
    else:
        magic_C = int(math.log2(B_mult/C)) + 1
    
    if magic_B + magic_C <= K:
        print("Yes")
    else:
        print("No")
resolve()

Submission status: Accepted

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

for _ in range(K):
    if A >= B:
        B=B*2
    else:
        C=C*2

if A<B and B<C:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import math

aka, mi, ao = map(int, input().split(" "))
k = int(input())

for i in range(k):
    if mi <= aka:
        mi *= 2
        continue
    if ao <= mi:
        ao *= 2
        continue
    ao *= 2

if ao > mi > aka:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

for i in range(K):
  if A >= B:
    B = B * 2
  else:
    C = C * 2

if A < B and B < C:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
K = int(input())
while K > 0:
  while A>=B and K > 0:
    B *= 2
    K -=1
  while B>=C and K > 0:
    C *= 2
    K -= 1
  if A < B < C:
    break
if B>=C:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

while A>=B:
    B*=2
    ans+=1
while B>=C:
    C*=2
    ans+=1
if ans>K:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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: Accepted

Solution code:
import sys

def hantei(A, B, C, K):
  i = 0
  while A >= B:
    if i >= K:
      return False
      sys.exit()
    B *= 2
    i += 1
  while B >= C:
    if i >= K:
      return False
      sys.exit()
    C *= 2
    i += 1
  return True
 

A, B, C = map(int, input().split())
K = int(input())
if(hantei(A, B, C, K)):
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
red, green, blue = map(int, input().split())
K = int(input())

for i in range(K):
    if red >= green:
        green = green * 2
    elif green >= blue:
        blue = blue * 2

if red < green and green < blue:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import math

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

X0 = math.log2(B/A)
Y0 = math.log2(C/B)

def get_num(x):
    if x<=0:
        return int(-x) + 1
    else:
        return 0

n = get_num(X0)
Y_ = Y0 - n
m = get_num(Y_)


print("Yes" if n+m <= K else "No")