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 solve():
    A, B, C = [int(x) for x in input().split()]
    K = int(input())
    ans = False
    for i in range(K):
        red = A * 2**i
        green = B * 2**(K - i)
        blue = C
        # print(i, red, green, blue)
        if green > red and blue > green:
            ans = True
            break

        red = A
        green = B * 2**i
        blue = C * 2**(K - i)
        # print(i, red, green, blue)
        if green > red and blue > green:
            ans = True
            break

        red = A * 2**i
        green = B
        blue = C * 2**(K - i)
        # print(i, red, green, blue)
        if green > red and blue > green:
            ans = True
            break

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


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import math

def a():
    x = int(input())
    
    if x < 600:
        print(8)
    elif x<800:
        print(7)
    elif x<1000:
        print(6)
    elif x<1200:
        print(5)
    elif x<1400:
        print(4)
    elif x<1600:
        print(3)
    elif x<1800:
        print(2)
    else:
        print(1)

def b():
    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
    if count <= k:
        print('Yes')
    else:
        print('No')



def c():
    pass



def d():
    pass


# a()
b()
# c()
# d()

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

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

Submission status: Accepted

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

# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
# from decimal import Decimal
# from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    R, G, B = il()
    K = ii()

    for k in range(K):
        if B <= G:
            B *= 2
        elif G <= R:
            G *= 2

        if B > G > R:
            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())
for i in range(K):
  if A>=B:
    B=B*2
  elif B>=C:
    C=C*2
if ((A<B)&(B<C)):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
from sys import *
a,b,c = map(int,stdin.readline().split())
k = int(stdin.readline())
while b <= a:
    b = b*2
    k -= 1
while c <= b:
    c = c*2
    k -= 1
if k < 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
r, g, b = map(int, input().split())
k = int(input())
for i in range(k):
    if b <= r or b <= g:
        b *= 2
    elif g <= r:
        g *= 2
    else:
        b *= 2
if r < g and g < b:
    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
    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())

f = 0

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

Submission status: Accepted

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

ans = 0
X = [0]*3 #X[0]:red X[1]:green X[2]:blue
for i in range(K + 1):
    for j in range(K + 1 - i):
        X[0] = A*2**i
        X[1] = B*2**j
        X[2] = C*2**(K - i - j)
        if X[1] > X[0] and X[2] > X[1]:
            ans = 1
print("Yes" if ans == 1 else "No")

Submission status: Accepted

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

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


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

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

Submission status: Accepted

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

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

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
if n>k:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
from sys import stdin,setrecursionlimit
import heapq,bisect,math,itertools,string,queue,copy
setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, stdin.readline().split()))



def main():
    count = 0
    A,B,C = inpl()
    K = int(input())
    for i in range(K+1):
        for j in range(K+1-i):
            k = K-i-j
            a = A*(2**i)
            b = B*(2**j)
            c = C*(2**k)
            if a < b < c:
                print('Yes')
                return

    print('No')
    """while True:
        if A < B < C:
            print('Yes')
            return
        if B < A:
            B *= 2
            count += 1
            if count == K and not(A < B < C):
                print('No')
                return
        if C < B:
            C *= 2
            count += 1
            if count == K and not(A < B < C):
                print('No')
                return"""
main()

Submission status: Accepted

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

a = int(A)
b = int(B)
c = int(C)
k = int(K)

#print(a)
#print(b)
#print(c)
#print(k)

out = 'No'

for i in range(k+1):
#  print(i)
#  print(''+str(a)+''+str(b)+''+str(c))
  if a >= b:
    b *=2
  elif b >= c:
    c *=2
  else:
    out = 'Yes'
#  print(''+str(a)+''+str(b)+''+str(c))
  

print(out)

Submission status: Accepted

Solution code:
l = list(map(int,input().split()))
r, g, b = l[0], l[1], l[2]
k = int(input())
 
for _ in range(k):
  if r >= g:
    g *= 2
  elif g >= b:
    b *= 2
 
if b > g and g > r:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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

def dfs(A, B, C, i):
    if i == k:
        return ((A < B) and (B < C))
    return (dfs(A * 2, B, C, i + 1) or dfs(A, B * 2, C, i + 1) or dfs(A, B, C * 2, i + 1))

if dfs(a, b, c, 0):
    ans = "Yes"
else:
    ans = "No"

print(ans)

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*c
        continue
    if b >= c:
        c = 2*c
        continue
    if a >= b:
        b = 2*b
        continue

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

    if a < bb and bb < cc:
        ans = "Yes"
        break
    else:
        ans = "No"

print(ans)

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:
       
        C = C*2
        
if A < B and B < C:
    print('Yes')
    
else:
    print('No')

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
#from operator import itemgetter
sysread = sys.stdin.buffer.readline
read = sys.stdin.buffer.read
#from heapq import heappop, heappush
from collections import defaultdict
sys.setrecursionlimit(10**7)
import math
#from itertools import product, accumulate, combinations, product
#import bisect# lower_bound etc
#import numpy as np
#from copy import deepcopy
#from collections import deque


def run():
    A, B, C, K = map(int, read().split())
    k1 = math.ceil(math.log2(A/B))
    if math.ceil(math.log2(A / B)) == math.log2(A / B):
        k1 += 1
    if k1 < 0:
        k1 = 0
    B *= 2 ** k1
    k2 = math.ceil(math.log2(B/C))
    if math.ceil(math.log2(B/C)) == math.log2(B/C):
        k2 += 1
    if k2 < 0:
        k2 = 0

    #print(k1, k2, [A,B,C])
    if K >= k1 + k2:
        print('Yes')
    else:
        print('No')



if __name__ == "__main__":
    run()

Submission status: Accepted

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

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

for i in range(k):
    if not(c > b) or not(c > a):
        c *= 2
    elif not(b > a):
        b *= 2
    else:
        print('Yes')
        sys.exit()

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

Submission status: Accepted

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

    n = int(input())
    count = 0
    while a >= b:
        count+=1
        b=b*2

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

    if count <= n:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
from math import sqrt,ceil,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())


# for _ in range(ii()):

a,b,c=mi()
k=ii()
for i in range(k):
    if a>=b:
        b*=2
    else:
        c*=2
    if a<b<c:
        break
# print(a,b,c)
if a<b<c:
    print("Yes")
else:
    print('No')

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def main():
    a, b, c = MI()
    k = I()
    res = k
    flag = True
    if b <= a:
        for i in range(k):
            b *= 2
            res -= 1
            if b > a:
                break
        else:
            flag = False
    if c <= b:
        for i in range(res):
            c *= 2
            res -= 1
            if c > b:
                break
        else:
            flag = False
    if flag:
        print('Yes')
    else:
        print('No')



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
""" B
    https://atcoder.jp/contests/m-solutions2020/tasks/m_solutions2020_b
"""
import sys
import math
from functools import reduce
from bisect import bisect_left

def readString():
    return sys.stdin.readline()

def readInteger():
    return int(readString())

def readStringSet(n):
    return sys.stdin.readline().split(" ")[:n]

def readIntegerSet(n):
    return list(map(int, readStringSet(n)))

def readIntegerMatrix(n, m):
    return reduce(lambda acc, _: acc + [readIntegerSet(m)], range(0, n), [])

def main(A, B, C, K):
    while A >= B:
        if K == 0:
            return "No"
        B *= 2
        K -= 1
    while B >= C:
        if K == 0:
            return "No"
        C *= 2
        K -= 1

    return "Yes"

if __name__ == "__main__":
    _A, _B, _C = readIntegerSet(3)
    _K = readInteger()

    print(main(_A, _B, _C, _K))

Submission status: Accepted

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

ans = False
tmp_a = a
tmp_b = b
tmp_c = c

for i in range(0,k+1):
  for j in range(0,k+1):
    for l in range(0,k+1):
      tmp_a *= pow(2,i)
      tmp_b *= pow(2,j)
      tmp_c *= pow(2,l)
      if tmp_a < tmp_b and tmp_b < tmp_c and i + j + l <= k:
        ans = True
        break
      tmp_a = a
      tmp_b = b
      tmp_c = c

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def function(numbers, K):
    ans = 'No'
    for i in range(K+1):
        A = int(numbers[0])
        B = int(numbers[1])
        C = int(numbers[2])
        B = B*2**i
        C = C*2**(K-i)
        if (B > A) & (C > B):
            ans = 'Yes'
    return ans


if __name__ == '__main__':
    numbers = input().split()
    K = int(input())
    print(function(numbers, K))

Submission status: Accepted

Solution code:
from sys import stdin

def main():
    a, b, c = [int(x) for x in stdin.readline().rstrip().split()]
    k = int(input())

    n = 0
    bb = b
    while bb <= a:
        bb = bb * 2
        n += 1
    
    if n > k:
        print("No")
        return

    m = k - n

    cc = c
    for i in range(m):
        cc = cc * 2

    if cc > bb:
        print("Yes")
    else:
        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 and magic < K:
    B*=2
    magic+=1

while B>=C and magic < K:
    C*=2
    magic+=1

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

Submission status: Accepted

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

import sys
from typing import Any, Callable, Deque, Dict, List, Mapping, Optional, Sequence, Set, Tuple, TypeVar, Union
# import time
# import math, cmath
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import _heapify_max, _heappop_max, _siftdown_max
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import Fraction               # Fraction(a, b) => a / b ∈ Q. note: Fraction(0.1) do not returns Fraciton(1, 10). Fraction('0.1') returns Fraction(1, 10)



def main():
    Num = Union[int, float]
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79e+308
    # inf = 2 ** 63 - 1             # (for fast JIT compile in PyPy) 9.22e+18
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input():  return sys.stdin.readline().rstrip()
    def ii():     return int(input())
    def isp():    return input().split()
    def mi():     return map(int, input().split())
    def mi_0():   return map(lambda x: int(x)-1, input().split())
    def lmi():    return list(map(int, input().split()))
    def lmi_0():  return list(map(lambda x: int(x)-1, input().split()))
    def li():     return list(input())
    def debug(x): print(x, file=sys.stderr)
    # def _heappush_max(h, item): h.append(item); _siftdown_max(h, 0, len(h)-1)

    def calc_op(a, b, c):
        cnt = 0
        while a >= b:
            cnt += 1
            b *= 2
        while b >= c:
            cnt += 1
            c *= 2
        return cnt
    
    
    a, b, c = mi()
    k = ii()
    print('Yes') if calc_op(a, b, c) <= k 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 *= 2
    k -= 1
    

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

if a < 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("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
if cnt <= K :
    print('Yes') 
else:
    print('No')

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

Submission status: Accepted

Solution code:
aka,midori,ao=map(int,input().split())
K = int(input())
count = 1
while count <= K-1:
    if aka>=midori:
        midori = midori*2
        count = count+1
    else:
        break
while count <= K:
    if midori>=ao:
        ao = ao*2
        count = count+1
    else:
        break
if aka<midori:
    if midori<ao:
        print("Yes")
    else:
        print("No")
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-i):
        k = K - i - j
        #print(i, j, k)
        if a * 2**i < b * 2**j and b * 2**j < c * 2**k:
            print("Yes")
            exit()
print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from itertools import product

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

seed = [0,1,2]
lists = []

cnt = 0

for _ in range(k):
  lists.append(seed)
  
for pattern in product(*lists):
  tmp_cards = cards.copy()
  flag = True
  for choise in pattern:
    tmp_cards[choise]*=2
  if (tmp_cards[1] > tmp_cards[0]) and (tmp_cards[2] > tmp_cards[1]):
    cnt+=1

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

Submission status: Accepted

Solution code:
import sys


def resolve(in_):
    a, b, c = map(int, next(in_).split())
    k = int(next(in_))
    for _ in range(k):
        if a >= b:
            b *= 2
        elif b >= c:
            c *= 2
        else:
            break
    return 'Yes' if a < b and b < c else 'No'


def main():
    answer = resolve(sys.stdin.buffer)
    print(answer)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
K=int(input())
a=A
b=B
c=C
ans=0
for i in range(8):
  if b<=a:
    b*=2
    ans+=1
for i in range(8):
  if c<=b:
    c*=2
    ans+=1
if ans<=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):
    if a>=b:
        b*=2
    elif b>=c:
        c*=2
if b>a and c>b:
    ans = "Yes"
print(ans)

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(0, K + 1 - i):
    b = B * (2 ** i)
    c = C * (2 ** j)
    if A < b < c:
      print("Yes")
      quit()
      
print("No")

Submission status: Accepted

Solution code:
array = list(map(int, input().split(' ')))

K = int(input())

for i in range(K):
  if array[2] == max(array):
    if array[0] >= array[1]:
      array[1] = array[1] * 2
    else:
      array[2] = array [2] * 2
  else:
    array[2] = array[2] * 2

if array[0] < array[1] and array[1] < array[2]:
  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
  elif b >= c:
    c *= 2

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

Submission status: Accepted

Solution code:
a = input().split(" ")
b = int(a[1])
c = int(a[2])
a = int(a[0])
k = int(input())
check=0
while True:
  if check == k:
    if int(c) > int(b) and int(b) > int(a): 
      print("Yes")
      break;
    else:
      print("No")
      break;
  else:
    if int(c) <= int(b):
      c = c*2
      check += 1
    elif int(b) <= int(a):
      b = b*2
      check += 1
    else:
      c = c*2
      check += 1

Submission status: Accepted

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

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 = 2*b
    elif b >= c:
        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())

need1=0
need2=0
while True:
    if a>=b:
        b *=2
        need1+=1
    else:
        break

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

ans = need1 + need2

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

Submission status: Accepted

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

ans = False
while K >= 0:
    if A >= B:
        B = B * 2
        K -= 1
    elif B >= C:
        C = C * 2
        K -= 1
    else:
        ans = True
        break

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

Submission status: Accepted

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

ans = "No"
cnt = 0
while cnt < K:
    if A >= B:
        B *= 2
    elif B >= C:
        C *= 2

    if A < B and B < C:
        ans = "Yes"
        break
    cnt += 1

print(ans)

Submission status: Accepted

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

for i in range(k):
    if a < b:
        c *= 2
    else:
        b *= 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):
    tmp = min(B,C)
    if(B==C):
        C *= 2
    elif(2*B >= C):
        C *= 2
    else:
        B *=2
    # print(A,B,C)
if A< B and B<C:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = input().split()
A = int(s[0])
B = int(s[1])
C = int(s[2])
K = int(input())

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

b = A < B < C

print('Yes' if b else 'No')

Submission status: Accepted

Solution code:
X = list(map(int, input().split()))
K = int(input())
flg = False;
for i in range(K):
    if X[0] < X[1]*2**i & X[1]*2**i < X[2]*2**(K-i):
        flg = True;
if flg:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys

def check(r,g,b):
    return r<g and g<b

r,g,b=input().split()
r,g,b=int(r),int(g),int(b)

K=int(input())+1

#print(r,g,b,K)

for i in range(K):
    for j in range(K-i):
        for k in range(K-i-j):
            if check(r*2**(i),g*2**(j),b*2**(k)):
                print("Yes")
                sys.exit(0)
print("No")

Submission status: Accepted

Solution code:
a,b,c = map(int, input().split(' '))
k = int(input())
 
for _ in range(k):
    if a >= b:
        b *= 2
    elif b >= c:
        c *= 2
    else:
        break

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

Submission status: Accepted

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

cnt=0
while li[0]>=li[1]:
  li[1]*=2
  cnt+=1

while li[1]>=li[2]:
  li[2]=2*li[2]
  cnt+=1 

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(20000)
def solve(a, b, c, k):
    if(a < b and b < c and k>=0):
        return "Yes"
    elif(k < 0):
        return "No"
    s1 = solve(a, 2*b, c, k-1)
    s2 = solve(a, b, 2*c, k-1)
    if(s1 == "Yes" or s2 == "Yes"):
        return "Yes"
    else:
        return "No"

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = "No"
def f(a, b, c, cnt, k):
    global ans
    if cnt > k:
        return
    if b > a and c > b:
        ans = "Yes"
        return
    
    f(2*a, b, c, cnt+1, k)
    f(a, 2*b, c, cnt+1, k)
    f(a, b, 2*c, cnt+1, k)


f(A, B, C, 0, K)
print(ans)

Submission status: Accepted

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


d=a//b//2


if not b*2**d>a:
    d+=1
b=b*2**d

e=b//c//2
if not c*2**e>b:
    e+=1

if k>=d+e:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

t = 0
s = 0
while a[1] <= a[0]:
    a[1] = a[1] * 2
    t = t + 1
while a[2] <= a[1]:
    a[2] = a[2] * 2
    s = s + 1

if t+s <=b:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
from itertools import combinations_with_replacement
import copy

def main(lst, K):
    original = copy.copy(lst)
    # 要するにC>B>Aになればおけ．
    comb = combinations_with_replacement([0, 1, 2], K)
    for c in comb:
        lst = copy.copy(original)
        for i in c:
            lst[i] *= 2
            if lst[0] < lst[1] and lst[1] < lst[2]:
                print('Yes')
                exit()
    print('No')

if __name__ == '__main__':
    lst = list(map(int, input().split()))
    K = int(input())
    main(lst, K)

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
K = int(input())
while A>=B:
  B *= 2
  K -= 1
if K < 0:
  print('No')
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())

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

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

print("No")

Submission status: Accepted

Solution code:
import sys
import copy
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())
INF = 1000000000000

a = LI()
k = I()

m = pow(3,k)
result = False
for i in range(m):
    val = copy.copy(a)
    for _ in range(k):
        tmp = i % 3
        i = i // 3
        val[tmp] = val[tmp]*2
    
    if(val[1] > val[0] and val[2] > val[1]):
        result = True

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