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(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:
import math
a,b,c = map(int,input().split())
k = int(input())
co = 0
while b <= a:
	co += 1
	b *= 2
while c <= b:
	co += 1
	c *= 2
#print(a,b,c)
print('Yes' if co <= k else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin,stdout
r,g,b=map(int,stdin.readline().split())
k=int(stdin.readline())
while g<=r:
    k-=1
    g*=2
while b<=g:
    k-=1
    b*=2
print('Yes' if k>=0 else 'No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# B

import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
import itertools

input = sys.stdin.readline

# 再起回数上限変更
# sys.setrecursionlimit(1000000)

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

for x in list(itertools.combinations_with_replacement([0,1,2], k)):
    a_, b_, c_ = a, b, c
    for val in x:
        if val == 0:
            a_ *= 2
        elif val == 1:
            b_ *= 2
        elif val == 2:
            c_ *= 2
    if b_ > a_ and c_ > b_:
        print('Yes')
        sys.exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, math, itertools, collections, bisect 
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

time = 0

while True:
  if time >= k:
    print("No")
    break
    
  if a >= b:
    b *= 2
  elif b >= c:
    c *= 2
  time += 1
  
  if a < b and b < c:
    print("Yes")
    break

Submission status: Accepted

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

Submission status: Accepted

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

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

def e(r, g, b):
    return g > r and b > g

from itertools import product
for pp in product([0, 1, 2], repeat=k):
    rr = r
    gg = g
    bb = b
    for p in pp:
        if p == 0:
            rr *= 2
        elif p == 1:
            gg *= 2
        else:
            bb *= 2
    if e(rr, gg, bb):
        print('Yes')
        break
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
    count += 1

while c <= b:
    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 K > 0:
    if A >= B:
        B *= 2
        K -= 1

    if K <= 0:
        break

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

    if A < B < C:
        break

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

Submission status: Accepted

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

Submission status: Accepted

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

A,B,C = (int(x) for x in input().rstrip('\n').split())
K = int(input().rstrip('\n'))
les = K
for i in range(K):
  if A>=B:
    B = B*2
    les -= 1
  else:
    break
les2 = les
for _ in range(les):
  if B>=C:
    C = C*2
    les2 -= 1
  else:
    break
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())

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

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

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
k=int(input())
abc=[a,b,c]
for i in range(k):
    if a>=b:
        b*=2
    elif a<b:
        if b>=c:
            c*=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())

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

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = int(input())
for i in range(k):
  if a >= b:
    b *= 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,k = map(int, open(0).read().split())

r = 0

while not b>a:
    b *= 2
    r += 1

while not c>b:
    c *= 2
    r += 1

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

Submission status: Accepted

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

i=0

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

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

print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(k):
    if g<=r:
        g*=2
    elif b<=g:
        b*=2

    if r<g<b:
        print("Yes")
        exit()

print("No")

Submission status: Accepted

Solution code:
import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 19
MOD = 10 ** 9 + 7
EPS = 10 ** -10

r, g, b = MAP()
K = INT()

cnt = 0
while r >= g:
    g *= 2
    cnt += 1
while g >= b:
    b *= 2
    cnt += 1
if cnt <= K:
    Yes()
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("Yes")
else:
  print("No")

Submission status: Accepted

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

def main():
    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')


if __name__ == "__main__":
    main()

Submission status: Accepted

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

count = 0

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

Submission status: Accepted

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

#A < B < C
for i in range(K):
    if A >= B:
        B *= 2
    elif B >= C:
        C *= 2
    if A < B < C:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B,C = (int(X) for X in input().split())
K = int(input())
Count = 0
while True:
    if B>A:
        break
    else:
        B *= 2
        Count += 1
while True:
    if C>B:
        break
    else:
        C *= 2
        Count += 1
if Count<=K:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
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 ZIP(n): return [LIST() for _ in range(n)]
def NSTR(n): return [input() for _ in range(n)]


INF = float("inf")
MOD = 10**9 + 7


def main():
    A, B, C = MAP()
    K = INT()
    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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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


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

Submission status: Accepted

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

def solve( a, b, c, k ):
    if a < b and b < c:
        print( "Yes" )
        exit()
    elif k == 0:
        return
    else:
        solve( 2 * a, b, c, k - 1 )
        solve( a, 2 * b, c, k - 1 )
        solve( a, b, 2 * c, k - 1 )

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from sys import exit
from decimal import *
import heapq
from math import sqrt, pi
from fractions import gcd
import random
import string
import copy
from itertools import combinations, permutations, product
from operator import mul, itemgetter
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

#############
# Main Code #
#############

# A:赤, B:緑, C:青
# A < B < Cにする
A, B, C = getNM()
K = getN()

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

Submission status: Accepted

Solution code:

#!/usr/bin/python
# -*- coding: utf-8 -*-

import numpy as np

def int_mtx(N):
    x = []
    for _ in range(N):
        x.append(list(input()))
    return np.array(x)

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

for i in range(0,K):
    if A >= B:
        B = 2*B
    else:
        if B >= C:
            C = 2*C
    if C > B and B > A:
        print('Yes')
        exit()

print('No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jul 25 21:02:29 2020

@author: NEC-PCuser
"""

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

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

def predicate_green():
    return b > a

def predicate_blue():
    return c > b

while k != 0:
    if not predicate_green():
        b *= 2
        k -= 1

    elif not predicate_blue():
        c *= 2
        k -= 1

    else:
        break

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

else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

# = str(input())
A, B, C = map(int, input().split())
K = int(input())
# = list(map(int, input().split()))
# = [int(input()) for i in range(N)]
# = [list(map(int, input().split())) for i in range(N)]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

k = int(input())

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(N):
  for j in range(N):
    k = N-(i+j)
    P = A*pow(2,i)
    Q = B*pow(2,j)
    R = C*pow(2,k)
    #print(A,B,C,C>B)
    if R > Q and Q > P:
      print("Yes")
      exit()
print("No")

Submission status: Accepted

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

cntgb = 0
x = g / r
while True:
	if x > 1:
		break
	else:
		x *= 2
		cntgb += 1
cntbg = 0
x = b / g / (2 ** cntgb )
while True:
	if x > 1:
		break
	else:
		x *= 2
		cntbg += 1
if cntbg + cntgb > k:
	print('No')
else:
	print('Yes')

Submission status: Accepted

Solution code:
A, B, C = [int(x) for x in input().split()]
K = int(input())
i = 0
while 1:
    if (A >= B):
        B *= 2
        i += 1
    elif (B >= C):
        C *= 2
        i += 1
    else:
        break
print('Yes' if i <= K else 'No')

Submission status: Accepted

Solution code:
import itertools
from copy import deepcopy

abc = input().split()
a = int(abc[0])
b = int(abc[1])
c = int(abc[2])
k = int(input())

perms = itertools.product([0, 1, 2], repeat=k)
bool_ = False

for perm in perms:
  tmp = [deepcopy(a), deepcopy(b), deepcopy(c)]
  
  for idx in perm:
    tmp[idx] *= 2
    
  if tmp[0] < tmp[1] and tmp[1] < tmp[2]:
    print('Yes')
    bool_ = True
    break
    
if not bool_:
  print('No')

Submission status: Accepted

Solution code:
# coding: utf-8


def solve(*args: str) -> str:
    a, b, c = map(int, args[0].split())
    k = int(args[1])

    ret = False
    for i in range(k+1):
        for j in range(k+1-i):
            ret |= a*pow(2, i) < b*pow(2, j) < c*pow(2, k-i-j)

    return 'Yes' if ret else 'No'


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Submission status: Accepted

Solution code:
#関数リスト
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())

a,b,c = MI()
K = I()

while K >= 0:
    if a >= b:
        b *= 2
        K -= 1
    elif b >= c:
        c *= 2
        K -= 1
    else:
        print("Yes")
        sys.exit()
print("No")

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
k = int(input())
ans = 'No'
for m in [(i,j,k-i-j) for i in range(k+1) for j in range(k-i+1)]:
    if A*2**m[0]<B*2**m[1]<C*2**m[2]:
        ans = 'Yes'
        break
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8

import math
import re
import numpy as np
import copy

#読み込む
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
    else:
        C *= 2

ans = "No"

#print(A,B,C)

if A < B and B < C:
    ans = "Yes"

print(ans)

Submission status: Accepted

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

for i in range(0,k+1):
    r=red
    g=green*pow(2,i)
    b=blue*pow(2,k-i)
    
    if r<g<b:
        print("Yes")
        # print(red,green,blue)
        exit()
        
print("No")

Submission status: Accepted

Solution code:
#ceilevenoddformula
import math
import bisect
import copy
import time
from collections import Counter
#map(int,input().split())
#int(x) for x in input().split()
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 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())
while k>0 and a>=b:
    b *= 2
    k-=1
while k>0 and b >= c:
    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())
cnt=0
while A>=B:
    if cnt<K:
        B *=2
        cnt += 1
    if cnt>=K:
        break
if A>=B:
    print("No")
else:
    while B>=C:
        if cnt<K:
            C *= 2
            cnt += 1
        if cnt>=K:
            break
    if B>=C:
        print("No")
    else:
        print("Yes")

Submission status: Accepted

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

bk, ck = 0, 0

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

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

if bk + ck <= k:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
### ----------------
### ここから
### ----------------

import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline

    a,b,c=map(int, readline().rstrip().split())
    k=int(readline())
    bk=0
    ck=0
    while b <= a:
        b*=2
        bk+=1
    while c <= b:
        c*=2
        ck+=1
    if (bk+ck)<=k:
        print("Yes")
    else:
        print("No")

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

### ----------------
### ここまで 
### ----------------

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math


a, b, c = [int(w) for w in input().split()]
k = int(input())
t = 0
while not b > a:
    b *= 2
    t += 1
while not c > b:
    c *= 2
    t += 1
cond = t <= k
print("Yes" if cond else "No")

Submission status: Accepted

Solution code:
from itertools import product
A, B, C = map(int, input().split())
K = int(input())
ans = 'No'
for k in range(0, K+1):
    for x in product([1,2,3], repeat=k):
        a, b, c = A, B, C
        for i in range(k):
            if x[i] == 1:
                a = 2*a
            elif x[i] == 2:
                b = 2*b
            else:
                c = 2*c
        if b > a and c > b:
            ans = 'Yes'
print(ans)

Submission status: Accepted

Solution code:
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
#======================================================#
def main():
    a, b, c = MII()
    k = II()
    while a >= b and k > 0:
        b *= 2
        k -= 1
    while b >= c and k > 0:
        c *= 2
        k -= 1

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): 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 LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

a,b,c=MI()
k=II()

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

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

print("Yes")

Submission status: Accepted

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

ans=False
for i in range(0,k+1):
    for j in range(0,k+1):
        if(i+j>k):
            continue
        if(a*2**i<b*2**j and b*2**j < c*2**(k-i-j)):
            #print(i,j,k-i-j)
            ans=True

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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

ans = 'No'
for _ in range(K):
    if A >= B:
        B = B * 2
    else:
        if B >= C:
            C = C * 2
    if A < B and B < C:
        ans = 'Yes'
        break
print(ans)

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
K = int(input())
cnt = 0
if A>=B:
    for i in range(K):
        B = 2*B
        cnt += 1
        if A<B:
            break
if B>=C:
     for j in range(K-cnt):
        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())

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

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

Submission status: Accepted

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


def II():
    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 = II()

    while k > 0:
        if a >= b:
            b *= 2
        elif b >= c:
            c *= 2

        k -= 1

    print("Yes" if c > b > a else "No")


main()

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
k = int(input())
p = 0
for i in range(k+1):
	if c*(2**i) > b*(2**(k-i)) and b*(2**(k-i)) > a:
		p += 1
		break
if p == 1:
	print('Yes')
else:
	print('No')

Submission status: Accepted

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

while A >= B or B >= C:
  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())
while k:
    if a >= b:
        b *= 2
    else:
        break
    k -= 1
while k:
    if b >= c:
        c *= 2
    else:
        break
    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())
count = 0

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

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

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_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 ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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

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

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

Submission status: Accepted

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

ans=0
for x in range(k+1):
  bb=b*(2**x)
  for y in range(k-x+1):
    cc=c*(2**y)
    if a<bb<cc:
      ans+=1
      
if ans>0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

a, b, c = map(int, readline().split())
k= int(readline())
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 = map(int, input().split())
k = int(input())
while a >= b:
	b *= 2
	k -= 1
while b >= c:
	c *= 2
	k -= 1
if k >= 0:
	print("Yes")
else:
	print("No")