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:
#import sys
MOD = 10 ** 9 + 7
INFI = 10**10
#input = sys.stdin.readline
import math
from collections import deque
import itertools
import heapq
#import bisect
from fractions import Fraction
import copy
from functools import lru_cache
from collections import defaultdict
import pprint

#oo=list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
# ko=list("abcdefghijklmnopqrstuvwxyz")

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

#    h,w,a,b = map(int, input().split())
#    c = [[0 for j in range(n)] for i in range(n)]

def ret(a):
    c=[None]*(len(a)-1)
    if len(a)==1:
        return a[0]
    elif len(a)==0:
        return 0
    for i in range(1,len(a)):
        c[i-1]=abs(a[i]-a[i-1])
    return ret(c)

def soinsubunkai(n):
    a = []
    i = 1
    while i*i <= n:
        if n % i == 0 and i!=1:
            a.append(i)
            n=n//i

        if n% i !=0 or i==1:
            i += 1
    nokori=[n]
    return a + nokori

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

def main():
    #l,r,d=map(int,input().split())
    a,b,c = map(int, input().split())
    k=int(input())
    ans="Yes"
    if b<=a:
        while True:
            if k<=0:
                ans="No"
                break
            k-=1
            b=b*2
            if b>a:
                break
    if c<=b:
        while True:
            if k<=0:
                ans="No"
                break
            k-=1
            c=c*2
            if c>b:
                break
    print(ans)














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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
binary = [1, 2, 4, 8, 16, 32, 64, 128, 256]
K = int(input())
flg = False
for i in range(K+1):
  for j in range(K+1):
    for k in range(K+1):
      if i + j + k == K:
        if A*binary[i] < B*binary[j] and B*binary[j] < C*binary[k]:
          flg = True
if flg:
  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 A < B:
        break
    B *= 2
    count += 1
while True:
    if B < C:
        break
    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())
while a>=b:
    b*=2
    k-=1
while b>=c:
    c*=2
    k-=1
print(["No","Yes"][k>=0])

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
print('YNeos'[a>=b or b>=c::2])

Submission status: Accepted

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

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

# print(f'{cnt=}')

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

# print(f'{A=}, {B=}, {C=}, {cnt=}')
ans = 'Yes' if cnt <= K else 'No'
print(ans)

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
l=[A,B,C]
K=int(input())
id=0
flag=1
i=0
while i<K:
    if id==0:
        if l[id]>=l[id+1]:
            l[id+1]=2*l[id+1]
            i=i+1
        else:
            id=id+1
    elif id==1:
        if l[id]>=l[id+1]:
            l[id+1]=2*l[id+1]
            i=i+1
        else:
            break
    #print(l,i)
for i in range(2):
    if l[i]>=l[i+1]:
        flag=0
        break
if flag==0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
# a < b < c
a, b, c = map(int, input().split())
k = int(input())
greenok = False
if a < b:
    greenok = True
for _ in range(k):
    if greenok:
        c *= 2
    else:
        b *= 2
    if a < b:
        greenok = True
if a < b < c:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(1000000)

import bisect
import math
import collections
import heapq


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

    if C > B > A:
        return "Yes"
    return "No"


if __name__ == "__main__":
    A, B, C = tuple(map(int, input().split(" ")))
    K = int(input())
    print(solve(A, B, C, K))

Submission status: Accepted

Solution code:
ma = lambda :map(int,input().split())
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq
a,b,c = ma()
k = ni()
f = False
for i in range(k+1):
    if a < b*2**i and b*2**i <c*2**(k-i):
        f =True
yn(f)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
red, green, blue = [int(i) for i in input().split()]
k = int(input())
ans = 0
while green <= red:
    green *= 2
    ans += 1
while blue <= green:
    blue *= 2
    ans += 1
if ans <= k:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
def main():
    A = [int(i) for i in input().split()]
    K = int(input())

    cnt = 0
    while cnt < K and A[0] >= A[1]:
        A[1] *= 2
        cnt += 1

    while cnt < K and A[1] >= A[2]:
        A[2] *= 2
        cnt += 1

    if A[0] < A[1] and A[1] < A[2]:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
def sosa(x):
    return x*2
A,B,C=map(int,input().split())
K=int(input())
for i in range(K+1):
    if A>=B:
        B=sosa(B)
    elif B>=C:
        C=sosa(C)
    else:
        break
else:
    print("No")
    sys.exit()
print("Yes")

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
K = int(input())
f = False
for bit in range(2**K):
    b = B
    c = C
    for j in range(K):
        if (bit >> j) & 1:
            c *= 2
        else:
            b *= 2
    if A < b and b < c:
        f = True
if f:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

while not(A < B):
    B *= 2
    K -= 1

while not(B < C):
    C *= 2
    K -= 1

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def TUPLE(): return tuple(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7 
#mod = 998244353
from decimal import *
#import numpy as np
#decimal.getcontext().prec = 10

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

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

ans = "No"
for a in range(K+1):
  for b in range(K+1):
    for c in range(K+1):
      if a+b+c<=K and (A<<a)<(B<<b)<(C<<c):
        ans = "Yes"
print(ans)

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
flag=False
k=int(input())
for i in range(k+1) :
  if c*2**i>b*2**(k-i) and b*2**(k-i)>a :
    flag=True
    break

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

Submission status: Accepted

Solution code:
def rec(a, b, c, k, n=0):
    if n == k:
        if c > b > a:
            return 1
        else:
            return 0
    return rec(2*a, b, c, k, n+1) + rec(a, 2*b, c, k, n+1) + rec(a, b, 2*c, k, n+1)


def main():
    A, B, C = map(int, input().split())
    K = int(input())
    if rec(A, B, C, K) > 0:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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


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

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

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

Submission status: Accepted

Solution code:
# Contest No.: M-SOLUTIONS Programming Contest 2020
# Problem No.: B
# Solver:      JEMINI
# Date:        20200725

import sys
import heapq

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

    return

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from sys import stdin
A,B,C = [int(x) for x in stdin.readline().rstrip().split()]
K = int(stdin.readline().rstrip())
while True:
    if B > A:
        break
    if K == 0:
        break
    B*=2
    K-=1

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

Submission status: Accepted

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

K = int(input())

cnt = 0

while True:
    if A >= B:
        B *= 2
        cnt += 1

    if B >= C:
        C *= 2
        cnt += 1

    if (A < B) & (B < C):
        break

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
(A, B, C, ) = [int(n) for n in input().split()]
(K, ) = [int(n) for n in input().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:
#!python3

import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())

def resolve():
    a, b, c = iim()
    k = int(input())

    i = 0
    while a >= b:
        b *= 2
        i += 1
    while b >= c:
        c *= 2
        i += 1

    print("Yes" if i <= k else "No")

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

for _ in range(K):
    if B <= A:
        B = B * 2
    elif C <= 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())

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
A,B,C = LI()
K = I()
count = 0
while 1:
    if A<B:
        break
    B *= 2
    count += 1
while 1:
    if B<C:
        break
    C *= 2
    count += 1
print('Yes' if count<=K else 'No')

Submission status: Accepted

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

cnt = 0

while True:
    if a < b:
        break
    
    b = b * 2
    cnt += 1
    
while True:
    if b < c:
        break
    
    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(B<=A):
        B=B*2
    elif(C<=B):
        C=C*2
if((B>A) and (C>B)):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

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

main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
red,green,blue=map(int,input().split())
k=int(input())
#red<green<blue
cnt=0
while red>=green:
    green*=2
    cnt+=1


while green>=blue:
    blue*=2
    cnt+=1

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

Submission status: Accepted

Solution code:
l=list(map(int,input().split()))
K=int(input())
from itertools import product
for i in range(K+1):
    for j in product([0,1,2], repeat=i):
        c=l.copy()
        for k in j:
            c[k]*=2
        if c[1]>c[0] and c[2]>c[1]:
            print("Yes")
            exit()
print("No")

Submission status: Accepted

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

for _ 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:
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 = [int(i) for i in input().split()]
K = int(input())
count = 0
while not A < B:
  B *= 2
  count += 1
while not B < C:
  C *= 2
  count += 1
if count <= K:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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


cnt = 0
# let b > a
while a >= b:
  b *= 2
  cnt += 1

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

if k < cnt:
  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 and b<c:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k =int(input())
n=0
while a >= b:
    b=b*2
    n+=1
while b >= c:
    c=c*2
    n+=1
print('Yes' if n<=k else '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:
x=input()
x0=x.split()
a=int(x0[0])
b=int(x0[1])
c=int(x0[2])
k=int(input())
q=0
while a>=b:
    q+=1
    b*=2
while b>=c:
    q+=1
    c*=2
if q<=k:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
#N, K = (int(i) for i in input().split())
#B = [int(x) for x in input().split()]
#A = [[int(i) for i in input().split()] for i in range(N)]
A, B, C = (int(i) for i in input().split())
K = int(input())

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

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

Submission status: Accepted

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

for i in range(K+1):
    j = K - i
    b = B * 2 ** i
    c = C * 2 ** j
    if b > A and c > b:
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import bisect_right
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
#import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
A,B,C = map(int,input().split())
K = int(input())
flag = 0
while K > 0:
    if A < B and B < C:
        flag = 1
        break
    if A >= B:
        B *= 2
        K -= 1
    elif B >= C:
        C *= 2
        K -= 1
if flag == 1:
    print("Yes")
else:
    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
  elif B>=C:
    C*=2

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

Submission status: Accepted

Solution code:
r,g,b=map(int, input().split())
m =int(input())
ans = 0
while g<=r:
  g*=2
  ans+=1
while b<=g:
  b*=2
  ans+=1
if ans<=m:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

while k:
    if not a < b:
        b *= 2
        k -= 1
        continue
    elif not b < c:
        c *= 2
        k -= 1
        continue
    else:
        break


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

Submission status: Accepted

Solution code:
import itertools
A,B,C=map(int,input().split())
K=int(input())
for seq in itertools.product(range(3),repeat=K):
    a,b,c=A,B,C
    for i in range(K):
        if seq[i]==0:
            a=a*2
        elif seq[i]==1:
            b=b*2
        else:
            c=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())

def dfs(a,b,c,k):
    if k==0:
        if a<b<c:
            print("Yes")
            exit()
    else:
        dfs(a,2*b,c,k-1)
        dfs(a,b,2*c,k-1)
dfs(a,b,c,k)
print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    A,B,C = list(map(int, input().split(' ')))
    K = int(input())
    
    P=[A,B,C]
    for k in range(K):
        if not (P[1] >P[0]):
            P[1] = P[1] * 2
        elif not (P[2] >P[1]):
            P[2] = P[2] * 2
            
    if P[0] < P[1] < P[2]:
        print('Yes')
    else:
        print('No')
        
        
    
    

main()

Submission status: Accepted

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

def main():
    a,b,c = map(int, readline().split())
    K = int(readline())

    for i in range(K):
        if a >= b:
            b *= 2
        else:
            if b >= c:
                c *= 2
    
    if a < b < c:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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
print("Yes" if ans<=k else "No")

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
a,b,c,k=map(int,open(0).read().split())
while a>=b:
    k-=1
    b*=2
while b>=c:
    k-=1
    c*=2
print("Yes" if k>=0 else "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 *= 2
    elif C <= B:
        C *= 2
        
if A < B and B < C:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

def count(A, B, C):
    ret = 0
    while B <= A:
        B *= 2
        ret += 1
    while C <= B:
        C *= 2
        ret += 1
    return ret
    
A, B, C = input().split(' ')
K = int(input())

A = int(A)
B = int(B)
C = int(C)

if count(A, B, C) <= K:
    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())
co=0
while not (a<b and b<c):
  if co == k:
    print('No')
    break
  if not a<b:
    b*=2
  else:
    c*=2
  co+=1
  
else:
  print('Yes')

Submission status: Accepted

Solution code:
import heapq
t = 1
def max(a,b):
	if a > b:
		return a
	return b
while t > 0:
	t -= 1
	a,b,c = map(int,input().split())
	k = int(input())
	# v = []
	# l = []
	# if a >= b:
	while k > 0 and a >= b:
		b *= 2
		k -= 1
	while k > 0 and b >= c:
		c *= 2
		k -= 1
	# if c < b:
	# 	c *= 2
	# elif b < a:
	# 	b *= 2
	if a < b and b < c:
		print("Yes")
	else:
		print("No")
	# v = list(map(int,input().strip().split()))[0:n]
	# for i in range(q):
	# 	p = int(input().strip())
	# 	v.append(p)
	# for i in range(n):
	# 	l.append(0)
	# for i in v:
	# 	l[i-1] += 1
	# for i in range(n):
	# 	if(l[i] <= q-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
    elif c<=b: 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 A >= B and K > 0:
    K -= 1
    B *= 2
while B >= C and K > 0:
    K -= 1
    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())

count=0
while b<=a:
    count+=1
    b*=2

while c<=b:
    count+=1
    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())
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:
# import sys
# input = sys.stdin.readline

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

a = lmp()
k = int(input())
while k != 0:
    k -= 1
    for i in range(1,3):
        if a[i-1] >= a[i]:
            a[i] *= 2
            break
if a[0] < a[1] < a[2]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

count=0

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections
from decimal import Decimal # 10進数で考慮できる

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

A, B, C = LI()
K = int(input())

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    import sys
    A,B,C=list(map(int,sys.stdin.readline().split()))
    K=int(sys.stdin.readline())
    for i in range(K+1):
        if B<=A:
            B*=2
        elif C<=B:
            C*=2
        else:
            print('Yes')
            return

    print('No')

main()

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(k):
    if a>=b:
        b=b*2
    elif a<b:
        c=c*2
else:
    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())

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

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