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

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

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

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

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

Submission status: Accepted

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

for i in range(k):
    if c > b > a:
        break
    elif b <= a:
        b = 2*b
    elif b >= c:
        c = 2*c
if c > b > a:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
#import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
#import heapq
from fractions  import gcd
#input=sys.stdin.readline
import bisect
a,b,c=map(int,input().split())
k=int(input())
cnt=0
y=0
while True:
    x=pow(2,y)
    if a<b*x:
        b*=x
        break
    else:
        cnt+=1
        y+=1
y=0

while True:
    x=pow(2,y)
    if b<c*x:
        c*=x
        break
    else:
        cnt+=1
        y+=1
if cnt<=k:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

ans = 'No'

while k != 0:
    if blue > green > red:
        ans = 'Yes'
        break
    elif blue <= green or blue <= red:
        blue *= 2
    elif green <= red:
        green *= 2
    k -= 1

if blue > green > red:
    ans = 'Yes'

print(ans)

Submission status: Accepted

Solution code:

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

flag = True
for f in range(K):
    g = 2 ** f
    h = 2**(K - f)
    
    
    bm = b * g
    cm = c * h

    if a < bm and bm < cm:
        print('Yes')
        flag = False
        break

if flag:
    print('No')

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
cards = list(map(int, input().split()))
K = int(input())
for i in range(K):
    if cards[0] >= cards[1]:
        cards[1] *= 2
    else:
        cards[2] *= 2
# print(cards)
if cards[0] < cards[1] < cards[2]:
    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:
  k -= 1
  b *= 2
while b >= c:
  k -= 1
  c *= 2

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

Submission status: Accepted

Solution code:
# vim: fileencoding=utf-8


def main():
    red, green, blue = map(int, input().split())
    k = int(input())
    res = "No"
    for i in range(k):
        if blue <= green or blue <= red:
            blue *= 2
        elif green <= red:
            green *= 2
        if blue > green and green > red:
            res = "Yes"
            break
    print(res)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
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())
a, b, c = M()
k = I()
for _ in range(k):
    if a >= b:
        b = 2*b
    else:
        c = 2*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+1) :
    for j in range(K+1-i) :
        a=A*(2**i)
        b=B*(2**j)
        c=C*(2**(K-i-j))
        if a<b<c :
            print("Yes")
            exit()

print("No")

Submission status: Accepted

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

Submission status: Accepted

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

if K < 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math
import string

def get_int():
    return int(stdin.readline().strip())


def get_tuple():
    return map(int, stdin.readline().split())


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

a,b,c = get_tuple()
k = get_int()
ans = 0
while b<=a:
    ans += 1
    b *= 2

while c<=b:
    ans += 1
    c *= 2
if ans<=k:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
def double(x, y):
    global count

    for _ in range(7):
        if x < y:
            break

        y *= 2
        count += 1

    return y


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

    b = double(a, b)
    c = double(b, c)

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


if __name__ == "__main__":
    count = 0
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict
from collections import deque
from collections import OrderedDict
import itertools
from sys import stdin
input = stdin.readline


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

  for i in range(K+1):
    for j in range(K-i+1):
      AA = A*(2**i)
      BB = B*(2**j)
      CC = C*(2**(K-i-j))
      if AA < BB < CC:
        print('Yes')
        return

  print('No')


if(__name__ == '__main__'):
  main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)

class Solve:
    def __init__(self):
        self.flag = False

    def helper(self, a, b, c, k):
        if k == 0:
            if b > a and c > b:
                self.flag = True
                return
            else:
                return
        else:
            self.helper(a * 2, b, c, k - 1)
            self.helper(a, b * 2, c, k - 1)
            self.helper(a, b, c * 2, k - 1)


def main():
    a,b,c = [int(i) for i in input().strip().split()]
    k = int(input().strip())
    
    solver = Solve()

    solver.helper(a, b, c, k)
    if solver.flag:
        print("Yes")
    else:
        print("No")



    return

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


def solve(a, b, c, k):
    while b <= a:
        b *= 2
        k -= 1
    while c <= b:
        c *= 2
        k -= 1
    return k >= 0



print("Yes" if solve(a, b, c, k) else "No")

Submission status: Accepted

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

K = int(input())

count = 0

while not R < G:
    G *= 2
    count += 1

while not G < B:
    B *= 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 i in range(1,K+1):
    if A >= B:
        B = B * 2
    elif B >= C:
        C = C * 2

    if A < B < C:
        print('Yes')
        exit()

print('No')

Submission status: Accepted

Solution code:
A, B, C = map(int, input().strip().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")

Submission status: Accepted

Solution code:
#M-SOLUTIONS B
#c>b>aが達成条件
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(a,b,c)
#print(count)
if count > k:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

for i in range(K):
    if B <= A:
        B *= 2
    else:
        if C <= B:
            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 = map(int, input().split())
k = int(input())

def solve(k, tup):
    a, b, c = tup
    while k > 0:
        if a >= b:
            b *= 2
            k -= 1
            continue
        if b >= c:
            c *= 2
            k -= 1
            continue

        return "Yes"
    
    if a < b < c:
        return "Yes"
    else:
        return "No"


print(solve(k, (a, b, c)))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#n=int(input())
a,b,c=map(int,input().split())
#l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]
k=int(input())
ans='No'
for i in range(0,k+1):
    cnew=c*(2**(i))
    bnew=b*(2**(k-i))
    if a<bnew and bnew<cnew:
        ans='Yes'
print(ans)

Submission status: Accepted

Solution code:
import sys, math
from collections import defaultdict
from itertools import product
sys.setrecursionlimit(500000)
MOD = 10**9+7

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

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

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def f(K, A, B, C):
    if K == 0:
        return False
    return (2*A < B < C) or f(K-1, 2*A, B, C) \
        or (A < 2*B < C) or f(K-1, A, 2*B, C) \
        or (A < B < 2*C) or f(K-1, A, B, 2*C)

def main():
    A, B, C = list(mi())
    K = ii()

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



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import os
from sys import stdin, stdout

def backtrack(a,b,c,k):
    if k==0:
        if a<b<c:
            return True
        return False
    
    ret = False
    ret |= backtrack(a*2,b,c,k-1)
    ret |= backtrack(a,b*2,c,k-1)
    ret |= backtrack(a,b,c*2,k-1)
    return ret

def solve(tc):
    a, b, c = map(int, stdin.readline().split())
    k = int(stdin.readline().strip())

    if backtrack(a,b,c,k):
        print("Yes")
    else:
        print("No")
    return

tcs = 1
tc = 1
while tc <= tcs:
    solve(tc)
    tc += 1

Submission status: Accepted

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

count = 0
count2 = 0

for i in range(100):
    if A < B:
        break
    B = B * 2
    count += 1

for i in range(100):
    if B < C:
        break
    C = C * 2
    count2 += 1

if K >= count + count2:
    print('Yes')
else:
    print('No')

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

Submission status: Accepted

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

K = int(input())

# blue >　green > red

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

if blue > green > red:
    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())
for _ in range(k):
    if a >= b:
        b *= 2
    else:
        c *= 2

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

Submission status: Accepted

Solution code:
# coding:utf-8

import sys
import math
import time
#import numpy as np
import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq
import itertools


#sys.setrecursionlimit(10**7)
#N, Q = map(int, input().split())
#G = [list(input()) for i in range(H)]
#INF = V * 10001
#A = [int(i) for i in input().split()]
#AB = [list(map(int, input().split())) for _ in range(K)]

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

while True:
  if(A<B and B<C):
    ans = "Yes"
  if(K==0):
    break
  if(A<B):
    C = C*2
    K-=1
  else:
    B = B*2
    K -= 1


print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def m():
    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:
        return 'No'
    else:
        return 'Yes'

print(m())

Submission status: Accepted

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

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

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

i = 0
# BがAより大きくなるために必要な回数
while(B<=A):
    i += 1
    B *= 2

# CがBより大きくなるために必要な回数
while(C<=B):
    i += 1
    C *= 2


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

Submission status: Accepted

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

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

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

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

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

solve(A, B, C, K)

Submission status: Accepted

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

tmp = k

while b <= a:
    b *= 2
    tmp -= 1

while c <= b:
    c *= 2
    tmp -= 1

#print(tmp,a,b,c)

if tmp >= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys, bisect, math, itertools, heapq, collections
from operator import itemgetter
# a.sort(key=itemgetter(i)) # i番目要素でsort
from functools import lru_cache
# @lru_cache(maxsize=None)
sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = float('inf')
mod = 10**9 + 7
eps = 10**-7


def inp():
    '''
    一つの整数
    '''
    return int(input())


def inpl():
    '''
    一行に複数の整数
    '''
    return list(map(int, input().split()))


def str_inp():
    '''
    文字列をリストとして読み込む
    '''
    return list(input()[:-1])


a, b, c = inpl()
k = inp()
FLAG = True
while k:
    if b > a:
        FLAG = False
        break
    b *= 2
    k -= 1
if FLAG:
    print("No")
    exit()
FLAG = True
while k:
    if c > b:
        break
    c *= 2
    k -= 1
if FLAG and c <= b:
    print("No")
    exit()
print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))
ZIP = lambda: zip(*(MAP() for _ in range(n)))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    A, B, C = MAP()
    K = INT()

    cnt = 0
    while True:
        if A < B: break
        B *= 2
        cnt += 1

    while True:
        if B < C: break
        C *= 2
        cnt += 1

    print("Yes" if cnt <= K else "No")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

numbers=[A,B,C]

for k in range(K):
    a=numbers[0]
    b=numbers[1]
    c=numbers[2]
    if c<=a or c<=b:
        c*=2
        numbers[2]=c
    elif b <= a:
        b*=2
        numbers[1]=b

if numbers[0]< numbers[1] and numbers[1]<numbers[2]:
    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 cnt <= k else 'No')

Submission status: Accepted

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

count = 0
while not(A < B):
  B = B*2
  count+=1
while not(B < C):
  C = C*2
  count += 1
if count <= K:
  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 C <= B:
    C *= 2
  elif B <= A:
    B *= 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 and cnt<K:
  B=2*B
  cnt+=1

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

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

Submission status: Accepted

Solution code:
from itertools import product
def solve():
    card_org = list(map(int,input().split()))
    K = int(input())
    comb = list(product(range(3), repeat=K))

    for c in comb:
        card = card_org[:]
        if card[1] > card[0] and card[2] > card[1]:
            print('Yes')
            return

        for i in range(K):
            card[c[i]] *= 2
        
            if card[1] > card[0] and card[2] > card[1]:
                print('Yes')
                return
    
    print('No')

if __name__ == '__main__':
    solve()

Submission status: Accepted

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

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

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

# print('-----output-----')

Submission status: Accepted

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

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

while b >= c:
    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())
for i in range(1,k+1):
    if a>=b:
        b*=2
    else:
        c*=2
if a<b<c:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys, math
import io, os
#data = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter
#from itertools import permutations,combinations
def data(): return sys.stdin.readline().strip()
def mdata(): return list(map(int, data().split()))
def outl(var) : sys.stdout.write('\n'.join(map(str, var))+'\n')
def out(var) : sys.stdout.write(str(var)+'\n')
#from decimal import Decimal
from fractions import Fraction
#sys.setrecursionlimit(100000)
INF = float('inf')
mod = int(1e9)+7



a,b,c=mdata()
k=int(data())
while b<=a:
    b*=2
    k-=1
while c<=b:
    k-=1
    c*=2
if k>=0:
    out("Yes")
else:
    out("No")

Submission status: Accepted

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

kaisuu = 0

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

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A, B, C = map(int, input().split())
K = int(input())

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

for i in range(K):
    if B >= C:
        C *= 2
        counter += 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000000)
import math
from math import gcd
def lcm(a, b): return a * b // gcd(a, b)
from itertools import count, permutations, chain, product
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok

def get_inv(n, modp):
    return pow(n, modp-2, modp)

def factorials_list(n, modp):    # 10**6
    fs = [1]
    for i in range(1, n+1):
        fs.append(fs[-1] * i % modp)
    return fs

def invs_list(n, fs, modp):     # 10**6
    invs = [get_inv(fs[-1], modp)]
    for i in range(n, 1-1, -1):
        invs.append(invs[-1] * i % modp)
    invs.reverse()
    return invs

def comb(n, k, modp):
    num = 1
    for i in range(n, n-k, -1):
        num = num * i % modp
    den = 1
    for i in range(2, k+1):
        den = den * i % modp
    return num * get_inv(den, modp) % modp

def comb_from_list(n, k, modp, fs, invs):
    return fs[n] * invs[n-k] * invs[k] % modp

#

class UnionFindEx:
    def __init__(self, size):
        #正なら根の番号、負ならグループサイズ
        self.roots = [-1] * size
    def getRootID(self, i):
        r = self.roots[i]
        if r < 0:   #負なら根
            return i
        else:
            r = self.getRootID(r)
            self.roots[i] = r
            return r
    def getGroupSize(self, i):
        return -self.roots[self.getRootID(i)]
    def connect(self, i, j):
        r1, r2 = self.getRootID(i), self.getRootID(j)
        if r1 == r2:
            return False
        if self.getGroupSize(r1) < self.getGroupSize(r2):
            r1, r2 = r2, r1
        self.roots[r1] += self.roots[r2]    #サイズ更新
        self.roots[r2] = r1
        return True

Yes = 'Yes'
No = 'No'


def main():
    A, B, C = mis()
    K = ii()
    q = []
    q.append((A, B, C))
    nq = []
    for _ in range(K+1):
        while q:
            a, b, c = q.pop()
            if a < b < c:
                print(Yes)
                return
            nq.append((a*2, b, c))
            nq.append((a, b*2, c))
            nq.append((a, b, c*2))
        nq, q = q, nq
    print(No)





main()

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect, bisect_left, bisect_right

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a, b, c = MAP()
k = INT()
flag = False
while a >= b and k > 0:
    b *= 2
    k -= 1
# print(a, b, k)
while b >= c and k > 0:
    c *= 2
    k -= 1
# print(a, b, c)
if a < b < c:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys
from math import ceil
def input(): return sys.stdin.readline().strip()


def main():
    a, b, c = map(int, input().split())
    K = int(input())
    for i in range(1 << (K*2)):
        A, B, C = a, b, c
        for j in range(7):
            if not i & (1 << (2*j)) and not i & (1 << (2*j+1)):
                continue
            elif i & (1 << (2*j)) and not i & (1 << (2*j+1)):
                A *= 2
            elif not i & (1 << (2*j)) and i & (1 << (2*j+1)):
                B *= 2
            else:
                C *= 2
        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
for i in range(7):
  if a < b:
    break
  b *= 2
  count += 1

for j in range(7):
  if b < c:
    break
  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())
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 = map(int,input().split())
k = int(input())
for i in range(k):
    if a < b:
        if b < c:
            break
        else:
            c *= 2
            if b < c:
                break
    else:
        b *= 2
else:
    print("No")
    exit()
print("Yes")

Submission status: Accepted

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


A, B, C = [int(x) for x in input().split(" ")]
K = int(input())

for i in range(K + 1):
    j = K - i
    if A < B * (2 ** i) and B * (2 ** i) < C * (2 ** j):
        print("Yes")
        sys.exit(0)
print("No")

Submission status: Accepted

Solution code:
import math
import sys
import collections
import bisect
readline = sys.stdin.readline


def main():
    a, b, c = map(int, readline().rstrip().split())
    k = int(readline().rstrip())
    i = 0
    while k > i:
        if a >= b:
            b *= 2
            i += 1
            continue
        if b >= c:
            c *= 2
            i += 1
            continue
        print('Yes')
        return
    print('Yes' if c > b and b > a else 'No')


if __name__ == '__main__':
    main()