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:
#Problem B

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

for i in range(K):

    if A >= B:
        B *= 2
    elif B > A:
        if B >= C:
            C *= 2
        elif B < C:
            pass
    else:
        pass

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())
d={"a":a,"b":b,"c":c}
for i in range(k+1):
    if d["a"]<d["b"]<d["c"]:
        print("Yes")
        exit()
    elif d["a"]>=d["c"]:
        d["c"]*=2
    elif d["a"]>=d["b"]:
        d["b"]*=2
    elif d["b"]>=d["c"]:
        d["c"]*=2
print("No")

Submission status: Accepted

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

r = ABC[0]
b = ABC[1]
g = ABC[2]

for i in range(K):
    if (r < b and b < g):
        print("Yes")
        exit()
    elif (r >= b):
        b *= 2
    elif (b >= g):
        g *= 2

if (r < b and b < g):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

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

if K >= N:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

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

        exit(0)

print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
K = int(input())
for _ in range(K):
    if B <= A:
        B *= 2
    elif C <= B:
        C *= 2
    if B > A and C > B:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

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

if K == flag:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools


def _run(a, b, c, k):
    for conditions in itertools.product([0, 1, 2], repeat=k):
        buff = [a, b, c]
        for condition in conditions:
            buff[condition] = buff[condition] * 2
        if buff[0] < buff[1] < buff[2]:
            print("Yes")
            return
    print("No")


def _main():
    A, B, C = map(int, input().split())
    K = int(input())
    _run(A, B, C, K)


if __name__ == "__main__":
    _main()

Submission status: Accepted

Solution code:
from sys import exit

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

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

print("No")

Submission status: Accepted

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

k = int(input())


c = c *(2 ** k)

l = 0
m = k
while not(a < b and b < c) and (l >= 0 and m >= 0):
    l += 1
    m -= 1
    b *= 2
    c /= 2

if l >= 0 and m >= 0 and 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())
from itertools import permutations, product
comb_lst = list(product([0,1,2], repeat = k))
flag = False
for comb in comb_lst:
    abc_lst = [a, b, c]
    for num in comb:
        abc_lst[num] *= 2
    if abc_lst[0] < abc_lst[1] and abc_lst[1] < abc_lst[2]:
        flag = True

print('Yes' if flag == True else '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
  else:
    C *= 2

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

Submission status: Accepted

Solution code:
import math

def resolve():
    
    R,G,B=map(int,input().split())
    K=int(input())
    # A=list(map(int,input().split()))

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

    print(ans)        


resolve()

Submission status: Accepted

Solution code:

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

counter = 0

while(b<=a):
    b = b*2
    counter += 1

while(c<=b):
    c = c*2
    counter += 1

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

def main():
    ans = 'No'
    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:
        ans='Yes'

    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

while red >= green and K > 0:
  green = green * 2
  K -= 1
  

while green >= blue and K > 0:
  blue = blue * 2
  K -= 1
  
if red < green and blue > green:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


a,b,c = list(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:
R,G,B=map(int,input().split())
K=int(input())
while 0<K:
    if G<=R:G+=G
    elif B<=G:B+=B
    else:break
    K-=1
print('Yes'if(R<G and G<B)else'No')

Submission status: Accepted

Solution code:
Red, Green, Blue = map(int, input().split())
K = int(input())

Flag = False
for i in range(0, K):
    if not (Green > Red):
        Green = Green * 2
    elif not (Blue > Green):
        Blue = Blue * 2
    if (Green > Red) and (Blue > Green):
        Flag = True
        break

if Flag:
    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")
        exit()
        #print(a,b,c)

print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,C = [int(x) for x in input().split()]
K = int(input())
for b in range(0,K+1):
    if A < B * 2**b:
        kb = b
        break
if B * 2**kb < C * 2**(K-kb):
    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
        continue
    elif b >= c:
        c *= 2
    else:
        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())
cnt = 0
while B <= A:
    B *= 2
    cnt += 1
while C <= B:
    C *= 2
    cnt += 1
print("Yes" if cnt <= K else "No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect
from scipy.special import comb
import copy
sys.setrecursionlimit(10**6)


def zz():
    return list(map(int, sys.stdin.readline().split()))


def z():
    return int(sys.stdin.readline())


def S():
    return sys.stdin.readline()[:-1]


def C(line):
    return [sys.stdin.readline() for _ in range(line)]


A, B, C = zz()
K = z()

# A<B<C　にしたい
for i in range(K):
    if (A >= B):
        B *= 2
    elif (B >= C):
        C *= 2
    # 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())

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())
for i in range(k):
  if a >= b:
    b = b*2
    continue
  else:
    if b >= c:
      c = c*2
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 != 0:
    if B <= A:
        B *= 2
    elif C <= B:
        C *= 2
    else:
        break
    K -= 1

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

Submission status: Accepted

Solution code:
import os
import sys
from io import BytesIO, IOBase
# from collections import defaultdict as dd
# from collections import deque as dq
# import itertools as it
# from math import sqrt, log, log2
# from fractions import Fraction

def main():
    t = 1
    for _ in range(t):
        # n = int(input)
        r, g, b = map(int, input().split())
        k = int(input())
        #nums = list(map(int, input().split()))
        while g <= r and k:
            g <<= 1
            k -= 1
        while b <= g and k:
            b <<= 1
            k -= 1
        
        if k == 0 and (b<=r or g<=r or b<=g):
            print('No')
        else:
            print('Yes')
            
        # b>g>r
        # if b>g>r:
        #     print('Yes')
        # else:
        # elif g>r:
        #     while b <= g and k:
        #         b <<= 1
        #         k -= 1
            
        #     if k == 0 and b<= g:
        #         print('No')
        #     else:
        #         print('Yes')

        # elif b > r:
        #     while g <= r and k:
        #         g <<= 1
        #         k -= 1
            
        #     if k == 0 and g<= r:
        #         print('No')
        #     elif g >= b:
        #         print('No')
        #     else:
        #         print('Yes')
        
        # else:





        




































# region fastio
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")
# endregion
 
if __name__ == "__main__":
    main()

Submission status: Accepted

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

count = 0

for l in range(k+1):
    for m in range(k+1-l):
        for n in range(k+1-l-m):
            if a * (2**l) < b * (2**m) and b * (2**m) < c * (2**n):
                count +=1

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = "No"

for i in range(K+1):
    # print(i)
    if a < b*(2**i) < c*(2**(K-i)):
        ans = "Yes"
        break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

k = int(input())

count=0
while True:
    if b>a:
        break
    count+=1
    b=b*2
#print(b)
while True:
    if c>b:
        break
    count+=1
    c=c*2

if count <= k:
    print('Yes')
else:
    print('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 = B * 2
    count += 1
    
while True:
  if C > B:
    break
    
  else:
    C = C * 2
    count += 1    

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

Submission status: Accepted

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

for a 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())
cnt = 0
while a >= b:
    b *= 2
    cnt += 1

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

print("Yes" if k >= cnt else "No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

YES = "Yes" 
NO = "No"  

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

def check(A,B,C):
    if A < B < C:
        print(YES)
        sys.exit()

for i in range(K):
    if B <= A:
        B = B * 2
    elif C <= B:
        C = C * 2

    check(A,B,C)

print(NO)

Submission status: Accepted

Solution code:
import copy

cards = list(map(int, input().split()))
k = int(input())

ans = set()
for i in range(3**k):
    n = i
    s = []
    while n:
        s.append(n % 3)
        n //= 3
    m = len(s)
    res = 0
    cards_copy = copy.deepcopy(cards)
    for j in range(m):
        cards_copy[s[j]] *= 2
    a, b, c = cards_copy
    if a < b < c:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

Solution code:
import sys,bisect,string,math,time,functools,random,fractions
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
from itertools import permutations,combinations,groupby
rep=range;R=range
def Golf():n,*t=map(int,open(0).read().split())
def I():return int(input())
def S_():return input()
def IS():return input().split()
def LS():return [i for i in input().split()]
def MI():return map(int,input().split())
def LI():return [int(i) for i in input().split()]
def LI_():return [int(i)-1 for i in input().split()]
def NI(n):return [int(input()) for i in range(n)]
def NI_(n):return [int(input())-1 for i in range(n)]
def StoLI():return [ord(i)-97 for i in input()]
def ItoS(n):return chr(n+97)
def LtoS(ls):return ''.join([chr(i+97) for i in ls])
def RA():return map(int,open(0).read().split())
def GI(V,E,ls=None,Directed=False,index=1):
    org_inp=[];g=[[] for i in range(V)]
    FromStdin=True if ls==None else False
    for i in range(E):
        if FromStdin:
            inp=LI()
            org_inp.append(inp)
        else:
            inp=ls[i]
        if len(inp)==2:
            a,b=inp;c=1
        else:
            a,b,c=inp
        if index==1:a-=1;b-=1
        aa=(a,c);bb=(b,c);g[a].append(bb)
        if not Directed:g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1):
    #h,w,g,sg=GGI(h,w,search=['S','G'],replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1) # sample usage
    mp=[boundary]*(w+2);found={}
    for i in R(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[boundary]+[mp_def[j] for j in s]+[boundary]
    mp+=[boundary]*(w+2)
    return h+2,w+2,mp,found
def TI(n):return GI(n,n-1)
def accum(ls):
    rt=[0]
    for i in ls:rt+=[rt[-1]+i]
    return rt
def bit_combination(n,base=2):
    rt=[]
    for tb in R(base**n):s=[tb//(base**bt)%base for bt in R(n)];rt+=[s]
    return rt
def gcd(x,y):
    if y==0:return x
    if x%y==0:return y
    while x%y!=0:x,y=y,x%y
    return y
def YN(x):print(['NO','YES'][x])
def Yn(x):print(['No','Yes'][x])
def show(*inp,end='\n'):
    if show_flg:print(*inp,end=end)

mo=10**9+7
inf=float('inf')
FourNb=[(-1,0),(1,0),(0,1),(0,-1)];EightNb=[(-1,0),(1,0),(0,1),(0,-1),(1,1),(-1,-1),(1,-1),(-1,1)];compas=dict(zip('WENS',FourNb));cursol=dict(zip('LRUD',FourNb))
l_alp=string.ascii_lowercase
#sys.setrecursionlimit(10**7)
read=sys.stdin.buffer.read;readline=sys.stdin.buffer.readline;input=lambda:sys.stdin.readline().rstrip()

########################################################################################################################################################################

show_flg=False
show_flg=True

ans=0

a,b,c=LI()
k=I()
q=0
for i in range(k+1):
    for j in range(k-i+1):
        #show(c*2**i,b*2**j,a*2**(k-i-j),(i,j,k-i-j),c*2**i>b*2**j>a*2**(k-i-j))
        if c*2**i>b*2**j>a*2**(k-i-j):
            q=1

Yn(q)

Submission status: Accepted

Solution code:
r, g, b  = map(int, input().split())
k = int(input())

flag=0
for i in range(k):
    if g<=r:
        g=g*2
    elif b<=g:
        b=b*2
    else:
        break
    
if b>g and g>r:
    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

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

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

Submission status: Accepted

Solution code:
L = [int(i) for i in input().split()]
K = int(input())
from itertools import product
for k in range(K+1):
    for l in product([0,1,2], repeat=K):
        LC = L[::]
        for a in l:
            LC[a] *= 2
        if LC[0] < LC[1] < LC[2]:
            print('Yes')
            exit()

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

Submission status: Accepted

Solution code:
import sys


def handler():
    a, b, c = [int(i) for i in input().strip().split()]
    bar = int(input().strip())
    foo = 0
    while b <= a:
        b *= 2
        foo += 1
    while c <= b:
        c *= 2
        foo += 1
    if foo <= bar:
        sys.stdout.write('Yes\n')
    else:
        sys.stdout.write('No\n')


def main():
    while True:
        try:
            handler()
        except ValueError:
            continue
        except EOFError:
            break


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
r,g,b = map(int, input().split())
k = int(input())

a = 0
while r>=g:
  g *= 2
  a += 1

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

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

# print(r,g,b,a)

Submission status: Accepted

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

for _ in range(K):
    if C <= B or C <= A:
        C = C * 2
        continue
    if B <= A:
        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,k=map(int,open(0).read().split())
import sys
count=0
while b<=a:
    b*=2
    count+=1
    if count>k:
        print('No')
        sys.exit()
while c<=b:
    c*=2
    count+=1
    if count>k:
        print('No')
        sys.exit()
print('Yes')

Submission status: Accepted

Solution code:
def main():
    a,b,c=map(int,input().split())
    k=int(input())
    cnt=0
    while cnt < k:
        cnt+=1
        if a >= b: b*=2
        elif b >= c: c*=2
        else: 
            break
    if a < b and b < c: print('Yes')
    else: print('No')
    return

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd # 最大公約数
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split()))

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

for i in range(K):
    if B <= A:
        B *= 2
    else:
        if C <= B:
            C *= 2
        else:
            pass
    if A < B < C:
        flag = 1
        
if flag:
    print('Yes')
else:
    print('No')

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

k = 0

while(1):
    if B <= A:
        B = B * 2
        k += 1
    else: break

while(1):
    if C <= B or C <= A:
        C = C * 2
        k += 1
    else: break


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

Submission status: Accepted

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

# a < b
# b < c


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

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

if ans <= 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):
  if b <= a:
    b = 2 * b
  elif c <= b:
    c = 2 * 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 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())
for bit in range(1<<K):
    Bt = B
    Ct = C
    for i in range(K):
        if bit & (1<<i): #Bの場合
            Bt *= 2
        else:
            Ct *= 2
    if  A<Bt and Bt<Ct:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
K = int(input())
T = 0
if A < B:
  C = C * (2**K)
  if B < C:
    T = 1
else:
  N = K
  S = 0
  for i in range(N):
    B = B*2
    K -=1
    if A < B:
      S = 1
      break
  if S:
    for i in range(K):
      C = C*2
    if B < C:
      T = 1
if T:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import random as rng
import itertools as it
import collections as col
import heapq as hq
import sys
import copy as cp
sys.setrecursionlimit(10**9)


def dump_impl(*objects):
    print(*objects, file=sys.stderr)


def dump_dummy(*objects):
    pass


dump = dump_impl if "DEBUG" in sys.argv else dump_dummy


def odd(n): return n & 1


def even(n): return not odd(n)


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(0)
print("No")

Submission status: Accepted

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

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

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())
if b<=a:
    while b<=a:
        b*=2
        k-=1
if c<=b:
    while c<=b:
        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())

d = 0
while b <= a:
    b *= 2
    d += 1
while c <= b:
    c *= 2
    d += 1

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

Submission status: Accepted

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

operation = 0

while operation < k and b <= a:
    b *= 2
    operation += 1

while operation < k and c <= b:
    c *= 2
    operation += 1

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

Submission status: Accepted

Solution code:
import math
def main():
    a,b,c = [int(x) for x in input().split()]
    k = int(input())
    k_b = max(0, math.floor(math.log2(a / b))+1) 
    k_c = max(0, math.floor(math.log2(b * math.pow(2, k_b) / c)) + 1)
    #print(k_b, k_c)
    print('Yes' if k >= k_b + k_c else 'No')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# 入力
A,B,C = list(map(int, input().split()))
K = int(input())
ans = 'No'

for i in range(K+1):
    if(A>=B):
        B *= 2
    else:
        if(B>=C):
            C *= 2
        else:
            ans = 'Yes'
            break

print(ans)

Submission status: Accepted

Solution code:
def resolve():
    '''
    code here
    '''
    A, B, C = [int(item) for item in input().split()]
    K = int(input())
    is_flag = False
    for i in range(K+1):
        for j in range(K+1):
            if i+j <= K:
                if A*2**i < B*2**j < C*2**(K-(i+j)):
                    is_flag = True
    
    print('Yes') if is_flag else print('No')


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

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

if 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())
    
    def dfs(a, b, c, k):
        if c > b > a:
            print("Yes")
            exit(0)
        if k == 0:
            return
        dfs(2*a, b, c, k-1)
        dfs(a, 2*b, c, k-1)
        dfs(a, b, 2*c, k-1)
    
    dfs(a, b, c, k)
    print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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