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
sys.setrecursionlimit(10**7)

readline = sys.stdin.buffer.readline
def readstr():return readline().rstrip().decode()
def readstrs():return list(readline().decode().split())
def readint():return int(readline())
def readints():return list(map(int,readline().split()))
def printrows(x):print('\n'.join(map(str,x)))
def printline(x):print(' '.join(map(str,x)))

r,g,b = readints()
k = readint()

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

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

Submission status: Accepted

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

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:
# input()
# int(input())
# map(int, input().split())
# list(map(int, input().split()))
# list(map(int, list(input()))) # スペースがない数字リストを読み込み
import math
import fractions
import sys
import bisect
import heapq  # 優先度付きキュー(最小値取り出し)
import collections
from collections import Counter
from collections import deque
import pprint
import itertools

sr = lambda: input()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    if n == 1:
        return arr

    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


# a^n
def power(a, n, mod):
    x = 1
    while n:
        if n & 1:
            x *= a % mod
        n >>= 1
        a *= a % mod
    return x % mod


# n*(n-1)*...*(l+1)*l
def kaijo(n, l, mod):
    if n == 0:
        return 1
    a = n
    tmp = n - 1
    while (tmp >= l):
        a = a * tmp % mod
        tmp -= 1
    return a

# Union Find
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

# 約数生成
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors


inf = 10 ** 18
mod = 10 ** 9 + 7

a,b,c =lr()
k = ir()
flag = False
for i in range(k+1):
    bb = b
    cc = c
    for j in range(i):
        bb*=2
    for l in range(k-i):
        cc*=2
    if a < bb < cc:
        flag = True
        break
if flag:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

for i in range(K):
  if B <= A:
    B *= 2
    continue
  if C <= B:
    C *= 2
    continue
    
if A < B < C:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
def resolve():
    A,B,C=pin()
    K,=pin()

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

    print(["No","Yes"][C>B and B>A])
            

    
#%%submit!
resolve()

Submission status: Accepted

Solution code:
def main():
    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 >= a:
        c *= 2
        k -= 1
    if a < 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+1):
    for j in range(k+1-i):
        l = k - j - i
        if a * 2**i < b * 2**j and b * 2**j < c * 2**l:
            print('Yes')
            exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#B
A,B,C=map(int,input().split())
K=int(input())
cnt=0
ans="No"
while cnt<K:
    if A>=B:
        B*=2
    elif B>=C:
        C*=2
    if A<B and B<C:
        ans="Yes"
        break
    cnt+=1
print(ans)

Submission status: Accepted

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

ans = False
for i in range(K):
    if A < B < C:
        ans = True
        break

    if B <= A:
        B *= 2
    elif C <= B:
        C *= 2

if A < B < C:
    ans = True


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

Submission status: Accepted

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

cnt=0

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

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

if cnt<=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:
        if b < c:
            break
        else:
            c*=2
    else:
        b*=2

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = int(input())
f = 0
for i in range(k+1):
    if a < b * (2 ** i) and b * (2 ** i) < c * (2 ** (k-i)):
        f = 1

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    ABC=input().split(" ")
    A,B,C=int(ABC[0]),int(ABC[1]),int(ABC[2])
    K=input()
    K=int(K)
    cnt=0
    while(cnt<=K and B<=A):
        B*=2
        cnt+=1
    while(cnt<=K and C<=B):
        C*=2
        cnt+=1
    if(cnt<=K):
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

print("No")

Submission status: Accepted

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

p = 0

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

Submission status: Accepted

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

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

    if a<b and b<c:
        print("Yes")
        exit()
    i+=1
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 b >= c:
        c = c*2
if a < b and b < c:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
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:
red, green, blue = [int(x) for x in input().split()]

for _ in range(int(input())):
    if blue <= green:
        blue *= 2

    elif green <= red:
        green *= 2

if blue > green and green > red:
    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 = b*2
    else:
        c = c*2

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

Submission status: Accepted

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

    c = 0
    # gがrより大きくなるまで2倍する
    while r >= g:
        g *= 2
        c += 1
    
    # bがgより大きくなるまで2倍する
    while g >= b:
        b *= 2
        c += 1

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

if __name__ == "__main__":
    resolve()

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())
cnt = 0
while b <= a:
    b *= 2
    cnt -= -1
# print(cnt)
while c <= b:
    c *= 2
    cnt -= -1
# print(cnt)
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 i in range(k+1):
	for j in range(k+1):
		for l in range(k+1):
			if i+j+l<=k:
				A = a*(2**i)
				B = b*(2**j)
				C = c*(2**l)
				if A< B and B< C: ans = "Yes"
				
print(ans)

Submission status: Accepted

Solution code:
## necessary imports
import sys
input = sys.stdin.readline
# from math import ceil, floor, factorial;

def ceil(x):
    if x != int(x):
        x = int(x) + 1;
    return x;
    
# swap_array function
def swaparr(arr, a,b):
    temp = arr[a];
    arr[a] = arr[b];
    arr[b] = temp

## gcd function
def gcd(a,b):
    if b == 0:
        return a
    return gcd(b, a % b);

## nCr function efficient using Binomial Cofficient
def nCr(n, k): 
    if(k > n - k): 
        k = n - k 
    res = 1
    for i in range(k): 
        res = res * (n - i) 
        res = res / (i + 1) 
    return int(res) 

## upper bound function code -- such that e in a[:i] e < x;
def upper_bound(a, x, lo=0, hi = None):
    if hi == None:
        hi = len(a);
    while lo < hi:
        mid = (lo+hi)//2
        if a[mid] < x:
            lo = mid+1
        else:
            hi = mid
    return lo

## prime factorization
def primefs(n):
    ## if n == 1    ## calculating primes
    primes = {}
    while(n%2 == 0 and n > 0):
        primes[2] = primes.get(2, 0) + 1
        n = n//2
    for i in range(3, int(n**0.5)+2, 2):
        while(n%i == 0 and n > 0):
            primes[i] = primes.get(i, 0) + 1
            n = n//i
    if n > 2:
        primes[n] = primes.get(n, 0) + 1
    ## prime factoriazation of n is stored in dictionary
    ## primes and can be accesed. O(sqrt n)
    return primes

## MODULAR EXPONENTIATION FUNCTION
def power(x, y, p): 
    res = 1
    x = x % p  
    if (x == 0) : 
        return 0
    while (y > 0) : 
        if ((y & 1) == 1) : 
            res = (res * x) % p 
        y = y >> 1      
        x = (x * x) % p 
    return res 

## DISJOINT SET UNINON FUNCTIONS
def swap(a,b):
    temp = a
    a = b
    b = temp
    return a,b

# find function with path compression included (recursive)
# def find(x, link):
#     if link[x] == x:
#         return x
#     link[x] = find(link[x], link);
#     return link[x];

# find function with path compression (ITERATIVE)
def find(x, link):
    p = x;
    while( p != link[p]):
        p = link[p];
    
    while( x != p):
        nex = link[x];
        link[x] = p;
        x = nex;
    return p;


# the union function which makes union(x,y)
# of two nodes x and y
def union(x, y, link, size):
    x = find(x, link)
    y = find(y, link)
    if size[x] < size[y]:
        x,y = swap(x,y)
    if x != y:
        size[x] += size[y]
        link[y] = x

## returns an array of boolean if primes or not USING SIEVE OF ERATOSTHANES
def sieve(n): 
    prime = [True for i in range(n+1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p * p, n+1, p):
                prime[i] = False
        p += 1
    return prime

#### PRIME FACTORIZATION IN O(log n) using Sieve ####
MAXN = int(1e5 + 5)
def spf_sieve():
    spf[1] = 1;
    for i in range(2, MAXN):
        spf[i] = i;
    for i in range(4, MAXN, 2):
        spf[i] = 2;
    for i in range(3, ceil(MAXN ** 0.5), 2):
        if spf[i] == i:
            for j in range(i*i, MAXN, i):
                if spf[j] == j:
                    spf[j] = i;
    ## function for storing smallest prime factors (spf) in the array

################## un-comment below 2 lines when using factorization #################
# spf = [0 for i in range(MAXN)]
# spf_sieve();
def factoriazation(x):
    ret = {};
    while x != 1:
        ret[spf[x]] = ret.get(spf[x], 0) + 1;
        x = x//spf[x]
    return ret
    ## this function is useful for multiple queries only, o/w use
    ## primefs function above. complexity O(log n)

## taking integer array input
def int_array():
    return list(map(int, input().strip().split()))
## taking string array input
def str_array():
    return input().strip().split();

#defining a couple constants
MOD = int(1e9)+7;
CMOD = 998244353;
INF = float('inf'); NINF = -float('inf');

################### ---------------- TEMPLATE ENDS HERE ---------------- ###################

r, g, b = int_array();
k = int(input());

cnt = 0;
while(g <= r):
    cnt += 1;
    g *= 2;
cnt2 = 0;
while(b <= g):
    cnt2 += 1;
    b *= 2;
if cnt + cnt2 <= k:
    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:
  count += 1
  B *= 2
while B >= C:
  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 b <= a:
        b *= 2
    else:
        c *= 2

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
# coding: utf-8

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

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
#import 
#=input()
#int(input())
a,b,c=map(int,input().split())
k = int(input())
#=list(map(int,input().split()))
#=[list(map(int,input().split())) for _ in range()]

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

    count = 0
    while count < k:
        if a < b and b < c:
            break
        if not a < b:
            b *= 2
        elif not b < c:
            c *= 2
        count += 1

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print("No")

Submission status: Accepted

Solution code:
r,g,b = map(int,input().split())
k = int(input())
for i in range(k):
    if r >= g:
        g *= 2
    elif g >= b:
        b *= 2

if b > g and g > r:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

n = 0

while A >= B:
    B = 2*B
    n += 1
if n > K:
    print('No')
while B >= C:
    C = 2*C
    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())
ans = "No"

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from itertools import product
A = [int(a) for a in input().split()]
K = int(input())
X = list(product([0, 1, 2], repeat = K))
for x in X:
    B = A[:]
    for xx in x:
        B[xx] *= 2
    if B[0] < B[1] < B[2]:
        print("Yes")
        break
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, raw_input().split())
k = int(raw_input())
# greedily

while( a >= b):
	b*= 2
	k -=1
while( b >= c):
	c*= 2
	k -=1

print 'Yes' if k >= 0 else 'No'

Submission status: Accepted

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

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

Submission status: Accepted

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

for _ in range(K+1):
    # print(A, B, C)
    if B <= A:
        B *= 2
    elif C <= B:
        C *= 2
    else:
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

Solution code:
import sys

A, B, C = map(int, sys.stdin.readline().split())
K = int(sys.stdin.readline())

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:
import math
a, b, c = map(int, input().split())
k = int(input())
ans = 0
if a >= b:
    ans += math.floor(math.log2(a / b)) + 1
    b *= pow(2, math.floor(math.log2(a / b)) + 1)
if b >= c:
    ans += math.floor(math.log2(b / c)) + 1
print("Yes" if ans <= k else "No")

Submission status: Accepted

Solution code:
import sys

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

for _ in range(k):
    if a >= b:
        b *= 2
    elif b >= c:
        c *= 2
    
    if a < b < c:
        print('Yes')
        sys.exit()
print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

print("NYoe s"[k>=green+blue::2])

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 or b>=c:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
import sys
import re
import math
import collections
import decimal
import bisect
import itertools
import fractions
import functools
import copy
import heapq
import decimal
import statistics
import queue

# import numpy as np

sys.setrecursionlimit(10 ** 9)
INF = 10 ** 16
MOD = 10 ** 9 + 7
# MOD = 998244353

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))


# ===CODE===

def main():
    r, g, b = ns()
    k = ni()

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

    if r < g < 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())
p = 0
for i in range(k):
    if p == 0:
        if b <= a:
            b *= 2
            continue
        elif b > a:
            p = 1
    if p == 1:
        c *= 2
        if c > b:
            p = 2
if p == 2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:

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

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

c_cnt = 0
while B >= C:
    C *= 2
    c_cnt += 1

# print(A, B, C)
# print(b_cnt, c_cnt)

if b_cnt + c_cnt <= K:
    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 and B < C):
    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 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:
a,b,c=map(int,input().split())
k=int(input())

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

Submission status: Accepted

Solution code:
import sys
from operator import itemgetter

sys.setrecursionlimit(10**9)
input = sys.stdin.readline

def ii(): return int(input())
def mi(): return map(int, input().split())
def lmi(): return list(map(int, input().split()))
def iif(n): return [int(input()) for _ in range(n)]
def lmif(n): return [list(map(int, input().split())) for _ in range(n)]
def ss(): return input().split()

def main():
    mod = 1000000007
    
    a, b, c = mi()
    k = ii()

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

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


    return

main()

Submission status: Accepted

Solution code:
import sys
a, b, c=map(int, input().split())
k=int(input())
while(k>=1 and a>=b):
    b=b*2
    k=k-1
if a>=b:
    print("No")
    sys.exit()
while(k>=1 and b>=c):
    c=c*2
    k=k-1
if b>=c:
    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 = B*2
  elif B >= C:
    C = C*2
  else:
    break

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

Submission status: Accepted

Solution code:
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

a,b,c=nii()
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:
def main():
    abc = [int(_x) for _x in input().split()]
    RED = abc[0]
    GREEN = abc[1]
    BLUE = abc[2]
    K = int(input())

    for i in range(K):
        if GREEN <= RED:
            GREEN *= 2
        elif BLUE <=GREEN:
            BLUE *= 2
        else:
            pass
    if RED < GREEN and GREEN < BLUE:
        print("Yes")
    else:
        print("No")
main()

Submission status: Accepted

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

c=0
while not (A[0]<A[1]<A[2]) and c<K:
    if A[0]>=A[1]:
        A[1]=A[1]*2
        c+=1
    elif A[1]>=A[2]:
        A[2]=A[2]*2
        c+=1
    #print(A)

print(['No','Yes'][A[0]<A[1]<A[2]])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = list(map(int, input().split()))
k = int(input())
counta = 0
while b <= a:
    counta += 1
    b *= 2
    if counta>k:
        print('No')
        exit()

while c <= b:
    counta += 1
    c *= 2
    if counta>k:
        print('No')
        exit()
print('Yes')

Submission status: Accepted

Solution code:
a = [*map(int, input().split())]
k = int(input())

opct = 0
for i in range(2):
    while a[i] >= a[i+1]:
        a[i+1] *= 2
        opct += 1

print(["No", "Yes"][opct <= k])