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 main():
    A, B, C = map(int, input().split())
    K = int(input())

    for k in range(K):
        if B <= A:
            B *= 2
        elif C <= B:
            C *= 2
    
    if A < B and 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 a >= b:
    b *= 2
    k -= 1
while b >= c:
    c *= 2
    k -= 1
if k < 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def f(a,b,c):
    if b > a and c > b:
        return True

def main():
    abc = list(map(int,input().split()))
    k = int(input())

    for i in range(k):
        if abc[1] >= abc[2]:
            abc[2] *= 2
        elif abc[0] >= abc[2]:
            abc[2] *= 2
        elif abc[0] >= abc[1]:
            abc[1] *= 2
        if abc[0] < abc[1] < abc[2]:
            print('Yes')
            return
    print('No')


if __name__=='__main__':
    main()

Submission status: Accepted

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

while cnt <= K + 1:
  if B <= A:
    B *= 2
    cnt += 1
  elif C <= B:
    C *= 2
    cnt += 1
  else:
    break

if cnt <= K:
  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+1):
    for j in range(K+1):
        for k in range(K+1):
            if i+j+k != K:
                continue
            a = A*pow(2,i)
            b = B*pow(2,j)
            c = C*pow(2,k)
            if a < b and b < c:
                print("Yes")
                exit()
print("No")

Submission status: Accepted

Solution code:
"""
    こんにちは。これはクシャルです
    
    Author : thekushalghosh (クシャル)
    Team   : CodeDiggers
 
    I prefer Python language over the C++ language :p :D
        
    Visit my website : thekushalghosh.github.io
"""
import sys,math,cmath,time,itertools
start_time = time.time()
##########################################################################
################# ---- THE ACTUAL CODE STARTS BELOW ---- #################
    
def solve():
    a,b,c = invr()
    k = inp()
    q = 0
    while b <= a:
        b = b * 2
        q = q + 1
    w = 0
    while c <= b:
        c = c * 2
        w = w + 1
    if q + w <= k:
        qw = "Yes"
    else:
        qw = "No"
    print(qw)
    
################## ---- THE ACTUAL CODE ENDS ABOVE ---- ##################
##########################################################################
 
def main():
    global tt
    if not ONLINE_JUDGE:
        sys.stdin = open("input.txt","r")
        sys.stdout = open("output.txt","w")
    t = 1
    for tt in range(t):
        solve()
    if not ONLINE_JUDGE:
        print("Time Elapsed :",time.time() - start_time,"seconds")
        sys.stdout.close()
    
#---------------------- USER DEFINED INPUT FUNCTIONS ----------------------#
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    return(input().strip())
def invr():
    return(map(int,input().split()))
 
#------------------ USER DEFINED PROGRAMMING FUNCTIONS ------------------#
def counter(a):
    q = [0] * max(a)
    for i in range(len(a)):
        q[a[i] - 1] = q[a[i] - 1] + 1
    return(q)

def counter_elements(a):
    q = dict()
    for i in range(len(a)):
        if a[i] not in q:
            q[a[i]] = 0
        q[a[i]] = q[a[i]] + 1
    return(q)

def string_counter(a):
    q = [0] * 26
    for i in range(len(a)):
        q[ord(a[i]) - 97] = q[ord(a[i]) - 97],1
    return(q)
 
def factors(n):
    q = []
    for i in range(1,int(n ** 0.5) + 1):
        if n % i == 0: q.append(i); q.append(n // i)
    return(list(sorted(list(set(q)))))
 
def prime_factors(n):
    q = []
    while n % 2 == 0: q.append(2); n = n // 2
    for i in range(3,int(n ** 0.5) + 1,2):
        while n % i == 0: q.append(i); n = n // i
    if n > 2: q.append(n)
    return(list(sorted(q)))

def transpose(a):
    n,m = len(a),len(a[0])
    b = [[0] * n for i in range(m)]
    for i in range(m): 
        for j in range(n): 
            b[i][j] = a[j][i]
    return(b)

#-----------------------------------------------------------------------#
        
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
    input = sys.stdin.readline
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#B
a, b, c = map(int, input().split())
K=int(input())
for i in range(K):
    if a>=c:
        c=2*c
    elif a>=b:
        b=2*b
    elif b>=c:
        c=2*c
    else:
        c=2*c
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())

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:
from sys import stdin
from sys import setrecursionlimit
from itertools import product
setrecursionlimit(10 ** 7)

a,b,c = map(int,stdin.readline().rstrip().split())

li = ["a","b","c"]
k = int(input())

lin = list(product(li, repeat=k))

for i in lin:
    A = a
    B = b
    C = c
    for j in i:
        if j == "a":
            A *= 2
        elif j == "b":
            B *= 2
        else:
            C *= 2
    if A < B and B < C:
        print("Yes")
        exit()

print("No")

Submission status: Accepted

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

ans = 0

import itertools
X = list(itertools.product(range(0,8), range(0,8), range(0,8)))
for i in X:
    if sum(i)<=K and B*(2**i[1])>A*(2**i[0]) and C*(2**i[2])>B*(2**i[1]):
        ans += 1


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

Submission status: Accepted

Solution code:
#b
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")

Submission status: Accepted

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

for k in range(K):
    if A >= B:
        B = 2*B
        continue
    elif B >= C:
        C = 2*C
        continue
    elif A >= C:
        C = 2*C
        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())
cnt=0
while not a<b:
  cnt+=1
  b*=2  
while not b<c:
  cnt+=1
  c*=2  
print('Yes' if k>=cnt else 'No')

Submission status: Accepted

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

count = 0

while True:
  if b > a:
    break
  else:
    b *= 2
    count += 1

while True:
  if c > b:
    break
  else:
    c *= 2
    count += 1

if k >= count:
  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 *= 2
    else:
        c *= 2

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

Submission status: Accepted

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

C = C * math.pow(2, K)
for b in range(K+1):
    if A < B and B < C:
        print("Yes")
        exit()
    C = C//2
    B = B*2
print("No")

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = int(input())
ok = False
for i in range(k):
    if k > 0:
        if b <= a:
            b *= 2
            k -= 1
        else:
            if c <= b:
                c *= 2
                k -= 1
            else:
                ok = True
    # print(c, b, a, k)

if c > 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 a >= b:
        b *= 2
    elif b >= 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())
for i in range(K+1):
    for j in range(K+1):
        for k in range(K+1):
            if C*(2**k) > B*(2**j) and B*(2**j) > A*(2**i) and i+j+k<=K:
                print("Yes")
                exit(0)
print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import os
import heapq
import sys
import math
import operator
from collections import defaultdict
from io import BytesIO, IOBase


"""def gcd(a,b):
    if b==0:
        return a
    else:
        return gcd(b,a%b)"""

"""def pw(a,b):
    result=1
    while(b>0):
        if(b%2==1): result*=a
        a*=a
        b//=2
    return result"""



def inpt():
    return [int(k) for k in input().split()]


def main():
    r,g,b=map(int,input().split())
    k=int(input())
    ct=0
    if(g<=r):
        while(g<=r):
            ct+=1
            g*=2
    if (b <= g):
        while(b<=g):
            ct+=1
            b*=2
    if(ct<=k):
        print('Yes')
    else:
        print('No')



BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

if __name__ == "__main__":
    main()

Submission status: Accepted

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

while True:
    if A < B:
        break
    else:
        B *= 2
        K -= 1

while True:
    if B < C:
        break
    else:
        C *= 2
        K -= 1

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

Submission status: Accepted

Solution code:
import sys

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

if a>=b:
    while a>=b:
        b*=2
        cnt+=1
        if cnt>k:
            print('No')
            sys.exit()
if b>=c:
    while b>=c:
        c*=2
        cnt+=1
        if cnt>k:
            print('No')
            sys.exit()
            
print('Yes')

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    a, b, c = map(int, input().split())
    k = int(input())
    for _ in range(k):
        if a >= b:
            b *= 2
        elif b >= c:
            c *= 2
    if a < b and 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 a >= b:
        b = b*2
        k = k-1
    else:
        break

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

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

Submission status: Accepted

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

while(B<=A):
    B*=2
    cnt += 1

while(C<=B):
    C*=2
    cnt += 1

if(cnt>K):
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

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

if B > A and C > B:
    ans = 'Yes'
    
print(ans)

Submission status: Accepted

Solution code:
a,b,c=list(map(int,input().split()))
k=int(input())
while a>=b and k>0:
    k-=1
    b*=2
while b>=c and k>0:
    k-=1
    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())

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:
a, b, c = map(int, input().split())
k = int(input())

while b <= a:
    if k == 0:
        print("No")
        exit()
    b *= 2
    k -= 1

while c <= b:
    if k == 0:
        print("No")
        exit()
    c *= 2
    k -= 1

print("Yes")

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	B
# CreatedDate:  2020-07-25 21:03:41 +0900
# LastModified: 2020-07-25 21:11:58 +0900
#


import os
import sys
# import numpy as np
# import pandas as pd


def main():
    a, b, c = map(int, input().split())
    k = int(input())
    for _ in range(k):
        if a >= b:
            b = 2*b
        elif b >= c:
            c = 2*c
        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())

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

Submission status: Accepted

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

cnt = 0
while B <= A:
    cnt += 1
    B *= 2
while C <= B:
    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())

count = 0
for i in range(K):
    if A >= B:
        B *= 2
        count += 1
    else:
        break

if A >= B:
    print('No')
    sys.exit()

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

if B >= C:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
K = int(input())
cnt = 0
while B <= A:
    cnt += 1
    B *= 2
while C <= B:
    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())
ans = 'No'
for k in range(K+1):
  if A < B < C:
    ans ='Yes'
    break
  if A >= B:
    B *= 2
    continue
  if B >= C:
    C *= 2
    continue
print(ans)

Submission status: Accepted

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

    for i in range(3**K):
        ii = i
        AA, BB, CC = A, B, C
        for j in range(K):
            if ii % 3 == 0:
                AA *= 2
            elif ii % 3 == 1:
                BB *= 2
            else:
                CC *= 2
            ii = ii // 3
        if AA < BB < CC:
            print("Yes")
            return
    print("No")
    return

main()

Submission status: Accepted

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

bb=b
bcnt=0
while a>=bb:
    bb=bb*2
    bcnt+=1

cc=c
ccnt=0
while bb>=cc:
    cc=cc*2
    ccnt+=1

if bcnt+ccnt<=k:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

for _ 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
input = sys.stdin.readline

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

i = 0

while True:
    if a >= b:
        b *= 2
    elif b >= c:
        c *= 2
    
    i += 1
    if i == k:
        break

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a, b, c = list(map(int, input().split()))
#a = list(map(int, input().split()))
# data = [list(map(int, input().split())) for i in range(n)]
k = int(input())
#a = list(map(int, input().split()))
# b = list(map(int, input().split()))
# ab_sorted = sorted(ab, key=lambda x: x[0])
#x = [list(map(int, input().split())) for i in range(n)]
# print(min(15*n, 100*(n//10+1), 100*(n//10)+15*(n % 10)))
# for i in range(1, int(n**0.5)+1):
if a < b and b < c:
    print("Yes")
    exit()

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

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.readline
import time
import math
import itertools as it
def inpl():
    return list(map(int, input().split()))
st = time.perf_counter()
# ------------------------------

A, B, C = inpl()
k = int(input())

while A >= B:
    k -= 1
    if k < 0:
        print('No')
        sys.exit()
    B *= 2
while B >= C:
    k -= 1
    if k < 0:
        print('No')
        sys.exit()
    C *= 2

print('Yes')



# ------------------------------
ed = time.perf_counter()
print('time:', ed-st, file=sys.stderr)

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

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

Submission status: Accepted

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

def main(a,b,c,k):
    count=0
    while not (a<b):
        b*=2
        count+=1
    while not (b<c):
        c*=2
        count+=1
    #print(a,b,c,count)
    if count<=k:
        return 'Yes'
    else:
        return 'No'

if __name__=='__main__':
    a,b,c,k=readinput()
    ans=main(a,b,c,k)
    print(ans)

Submission status: Accepted

Solution code:
A,B,C = map(int, input().split())
K = int(input())
count = 0
if B > A:
    pass
elif A >= B:
    while A >= B:
        B *= 2
        count += 1
if C > B:
    pass
elif B >= C:
    while B >= C:
        C *= 2
        count += 1
if K >= count:
    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(k):
    if a >= b:
        b *= 2
        continue

    if b >= c:
        c *= 2

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

Submission status: Accepted

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


def map(now_a, now_b, now_c, now_k):
    if now_a < now_b and now_b < now_c:
        return 1
    elif now_k == 0:
        return 0
    else:
        r1 = map(now_a*2, now_b, now_c, now_k-1)
        r2 = map(now_a, now_b*2, now_c, now_k-1)
        r3 = map(now_a, now_b, now_c*2, now_k-1)
        if r1+r2+r3 == 0:
            return 0
        else:
            return 1


if map(a, b, c, k) == 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
A,B,C=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:
#n=int(input())
a,b,c=map(int,input().split())
k=int(input())
t=0
while(b<=a):
  b=b*2
  t+=1
while(c<=b):
  c=c*2
  t+=1
if t>k:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

n = 0
while B <= A:
    B *= 2
    n += 1

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

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(K):
    if B <= A:
        B = B * 2
        #print("B=",B)
    else:
        C = C * 2
        #print("C=",C)
        

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

Submission status: Accepted

Solution code:
inp = list(map(int,input().split()))
k=int(input())
z=0
while z<=k:
    if inp[1]<=inp[0]:
        inp[1]*=2
        z+=1
    else:
        break
while z<k:
    if inp[2]<=inp[1]:
        inp[2]*=2
        z+=1
    else:
        break
flag=0
if inp[2]>inp[1] and inp[1]>inp[0]:
    if z<=k:
        flag=1
        print ('Yes')
if flag==0:
    print ('No')

Submission status: Accepted

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

def check(x, y):
    if (x >y):
        return True
    else:
        return False

for i in range(k+1):
    if check(c, b) and check(b, a):
        print("Yes")
        exit()
    if b >= c:
        c *= 2
    elif a >= b:
        b *= 2
    
print("No")

Submission status: Accepted

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

Submission status: Accepted

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

score = 0
for bx2 in range(k+1):
    cx2 = k-bx2
    
    if a < b*2**bx2 < c*2**cx2:
        print("Yes")
#        print(bx2, cx2)
        score = 1
        break
        
if score == 0:
    print("No")

Submission status: Accepted

Solution code:
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('Yes')
else:print('No')

Submission status: Accepted

Solution code:
import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    sys.setrecursionlimit(10**7)
    INF = 10**18
    MOD = 10**9 + 7
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    _LI = lambda : [int(x)-1 for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())
    SI = lambda : sys.stdin.readline().rstrip()

    A,B,C = LI()
    K = NI()

    for _ in range(K):
        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())

for i in range(K+1):
    if pow(2,i)*C>pow(2,K-i)*B and pow(2,K-i)*B>A:
        print('Yes')
        exit(0)
print('No')

Submission status: Accepted

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

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

while C <= B:
    C *= 2
    K -= 1

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

Submission status: Accepted

Solution code:
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import sys


def get_ints():
    return map(int, sys.stdin.readline().strip().split())


def std_in():
    return sys.stdin.readline().strip()


def main():
    a, b, c = get_ints()
    k = int(std_in())

    for i in range(k):
        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())

for _ in range(k):
    if b <= a:
        b *= 2
        continue
    if c <= b:
        c *= 2
        continue

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

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    A, B, C = map(int, input().split())
    K = int(input())

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


main()

Submission status: Accepted

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

def check(a,b,c):
    if a < b and b < c:
        return True
    else:
        return False

ans = "No"
if check(A,B,C):
    ans = "Yes"
else:
    while K>0:
        if A >= B:
            B*=2
            K-=1
            # print("K=",K," (A,B,C)=", A,B,C)
            if check(A,B,C):
                ans = "Yes"
                break
        else:
            if B >= C:
                C*=2
                K-=1
                # print("K=",K," (A,B,C)=", A,B,C)
                if check(A,B,C):
                    ans = "Yes"
                    break

print(ans)

Submission status: Accepted

Solution code:
import math
a,b,c = [int(x) for x in input().split()]
k = int(input())
a1,b1,c1 = math.log2(a),math.log2(b),math.log2(c)
k1,k2 = 0,0
# print(a1,b1,c1)
if b1<=a1:
    k1 = math.floor(a1-b1+1)
    b1 = b1+k1
if c1<=b1:
    k2 = math.floor(b1-c1+1)
if k1+k2<=k:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

count = 0
for _ in range(1, 100):
    if (a < b):
        break
    count+=1
    b *= 2
for _ in range(1, 100):
    if (b < c):
        break
    count+=1
    c *= 2

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

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:
            b *= 2
            continue
        elif b >= c:
            c *= 2
    if a < b and b < c:
        print("Yes")
    else:
        print("No")


main()

Submission status: Accepted

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

ans = 'No'

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

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

print(ans)

Submission status: Accepted

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

for k in range(K+1):
    for i in range(k+1):
        for j in range(k-i+1):
            l=k-i-j

            if a*(2**i)<b*(2**j)<c*(2**l):
                print('Yes')
                exit(0)

print('No')

Submission status: Accepted

Solution code:
from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()


abc = readInts()
k = readInt()

def ok(arr):
	return arr[0]<arr[1] and arr[1]<arr[2]

if ok(abc):
	print("Yes")
else:
	ans = 0
	arr = abc
	if 0 in arr:
		print("No")
		exit()

	while not ok(arr):
		if arr[0]>=arr[1]:
			arr[1]*=2
			ans+=1
		elif arr[1]>=arr[2]:
			arr[2]*=2
			ans+=1
	if k>=ans:
		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 *= 2
    elif C <= B:
        C *= 2

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

Submission status: Accepted

Solution code:
def main():
    A,B,C = tuple(int(c) for c in input().split())
    K = int(input())

    #Cをi回、Bをj回倍にする
    for i in range(K+1):
        c2 = C * 2**i
        for j in range(K-i+1):
            #print(i, j)
            b2 = B * 2**j
            if c2 > b2 > A:
                print('Yes')
                exit()
    else:
        print('No')

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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