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, io, os, re
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from pprint import pprint
from math import sin, cos, pi, radians, sqrt, floor, ceil
from copy import copy, deepcopy
from collections import deque
from fractions import gcd
from functools import reduce
from itertools import groupby
from heapq import heapify, heappush, heappop

# sys.setrecursionlimit(5000)

n1 = lambda: int(sys.stdin.readline().strip())
nn = lambda: list(map(int, sys.stdin.readline().strip().split()))
f1 = lambda: float(sys.stdin.readline().strip())
fn = lambda: list(map(float, sys.stdin.readline().strip().split()))
s1 = lambda: sys.stdin.readline().strip()
sn = lambda: list(sys.stdin.readline().strip().split())
nl = lambda n: [n1() for _ in range(n)]
fl = lambda n: [f1() for _ in range(n)]
sl = lambda n: [s1() for _ in range(n)]
nm = lambda n: [nn() for _ in range(n)]
fm = lambda n: [fn() for _ in range(n)]
sm = lambda n: [sn() for _ in range(n)]

def array1(n, d=0): return [d] * n
def array2(n, m, d=0): return [[d] * m for x in range(n)]
def array3(n, m, l, d=0): return [[[d] * l for y in xrange(m)] for x in xrange(n)]
def linc(A, d=1): return map(lambda x: x + d, A)
def ldec(A, d=1): return map(lambda x: x - d, A)

A, B, C = nn()
K = n1()

i = 0
while i < K and A >= B:
    i += 1
    B *= 2

while i < K and B >= C:
    i += 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())
for _ 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:
# Author: S Mahesh Raju
# Username: maheshraju2020
# Date: 25/07/2020

from sys import stdin,stdout
from math import gcd, ceil, sqrt
from collections import Counter
from bisect import bisect_left, bisect_right
ii1 = lambda: int(stdin.readline().strip())
is1 = lambda: stdin.readline().strip()
iia = lambda: list(map(int, stdin.readline().strip().split()))
isa = lambda: stdin.readline().strip().split()
mod = 1000000007

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

#print(a,b,c)

if cnt>k or c<=b or a>=b:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

count = 0

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

while c <= b:
    count += 1
    c = 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())

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

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 True:
    if A<B:
        break
    else:
        B = B*2
        count += 1

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

Submission status: Accepted

Solution code:
def main():
    a, b, c = [int(x) for x in input().split()]
    count = int(input())

    while not a < b:
        if count == 0:
            break
        b *= 2
        count -= 1
    while not b < c:
        if count == 0:
            break
        c *= 2
        count -= 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())
i=0
while b<=a:
  b*=2
  i+=1
  
while c<=b:
  c*=2
  i+=1
  
if i<=k:print('Yes')
else:print('No')

Submission status: Accepted

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

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

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

Submission status: Accepted

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

if counter <= k:
    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:
    b *= 2
    k -= 1

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

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

Submission status: Accepted

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

cnt = 0
ans = "No"
while cnt <= K:
    if not A < B:
        B *= 2
        cnt += 1
        continue
    if not B < C:
        C *= 2
        cnt += 1
        continue
    if A < B < C:
        ans = "Yes"
        break


print(ans)

Submission status: Accepted

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

for ai in range(k+1):
    for bi in range(k+1):
        for ci in range(k+1):
            if not (ai + bi + ci == k):
                continue
            newA = a * (2 ** ai)
            newB = b * (2 ** bi)
            newC = c * (2 ** ci)

            if newB > newA and newC > newB:
                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):
    if b <= a:
        b*=2
        continue
    if c <= b:
        c*=2
if a < b and b < c:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()

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 b > g > r:
    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:
    b *= 2
    k -= 1

while b >= c and k > 0:
    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())

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:
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 and b > a:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

for i in range(k):
  if 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())

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:
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 < C:
    print('Yes')
else: 
    print("No")

Submission status: Accepted

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


for bit in range(3**K):
  (a,b,c) = (A,B,C)
  r_bit = bit
  for k in range(K):
    amari = r_bit%3
    r_bit = int(r_bit/3)
    if amari == 0:
      a *= 2
    elif amari == 1:
      b *= 2
    else:
      c *= 2
  
  if a < b < c:
    print('Yes')
    exit(0)

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<c:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
A, B, C = map(int, readline().split())
N = int(readline())
cnt = 0
while B <= A:
    B*=2
    cnt += 1
while C <= B:
    C*=2
    cnt +=1
if cnt <= N:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
def resolve():
    A,B,C = map(int,input().split())
    K = int(input())
    for i in range(K+1):
        for j in range(K-i+1):
            for k in range(K+1-i-j):
                a = A*(2**i)
                b = B*(2**j)
                c= C*(2**k)
                #print(i,j,k)
                if b>a and c>b:
                    print("Yes")
                    return
    print('No')

resolve()

Submission status: Accepted

Solution code:
def resolve():
    A, B, C = list(map(int, input().split()))
    K = int(input())
    cnt = 0
    left = A
    right = B
    while left >= right:
        right *= 2
        cnt += 1
        if cnt > K:
            print("No")
            return
    left = right
    right = C
    while left >= right:
        right *= 2
        cnt += 1
        if cnt > K:
            print("No")
            return
    print("Yes")
    
    
if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
## for use in beginner level questions where speed is key
## and also for single test case code
## mastercopy for x,y,z

import sys
import heapq, functools, collections
import random
from collections import Counter, defaultdict

# read line as a string
# strr = input()

# read line as an integer
a,b,c = list(map(int,input().split()))
k = int(input())

# read one line and parse each word as a string
# lst = input().split()

# read one line and parse each word as an integer

cnt = 0

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

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

# print(cnt, a, b, c)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#############<------------  Xorcestor_X ---------------->############

from math import *


def is_even(p):
    n=len(p)
    count=0
    for i in range(n):
        index=p.index(i,i,n)
        if i==index:
            pass
        else:
            count+=1
            temp=p[i]
            p[i]=p[index]
            p[index]=temp
    # print(p)
    if count%2==0:
        return True
    else:
        return False



prime=[]

def SieveOfEratosthenes():
    global prime
    prime=[1]*2000010
    prime[1]=0
    p=2
    while p*p<=2000001:
        if prime[p]:
            for i in range(p*p,2000002,p):
                prime[i]=0

lpf=[]

def precompute():
    global lpf
    lpf=[0]*1000001
    for i in range(2,1000001):
        if not lpf[i]:
            for j in range(i,1000001,i):
                if not lpf[j]:
                    lpf[j]=i


def binpow(a,b):
    res=1
    while b>0:
        if b&1:
            res*=a
        a*=a
        b>>=1
    return res


def modpow(a,b,x):
    res=1
    while b>0:
        if b&1:
            res*=a
            res%=x
        a*=a
        a%=x
        b>>=1
    return res

cont=[]

def f(x):
    global cont
    total=0
    for i in cont:
        total+=abs(i-x)
    return total


def bs(low,high,target):
    while low+3<high:
        mid=(low+high)/2
        if arr[mid]<target:
            low=mid
        else:
            high=mid-1
    for i in range(high,low-1,-1):
        if arr[o]<target:
            return i
    return -1


def ternary_search(l,r):
    while r-l>10:
        m1=l+(r-l)/3
        m2=r-(r-l)/3
        f1=f(m1)
        f2=f(m2)
        if f1>f2:
            l=m1
        else:
            r=m2

    mino=f(l)

    for i in range(l,r+1):
        mino=min(mino,f(i))

    return mino

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

arr=[c,b,a]
count=0
while arr[1]<=arr[2]:
    arr[1]*=2
    count+=1

while arr[0]<=arr[1]:
    arr[0]*=2
    count+=1

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

Submission status: Accepted

Solution code:
'''بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ'''
#codeforces
gi = lambda : list(map(int,input().split()))
r, g, b = gi()
k, = gi()
while k and g <= r:
	k -= 1
	g *= 2
while k and b <= g:
	k -= 1
	b *= 2
if g <= r or b <= g:
	print("No")
else:
	print("Yes")

Submission status: Accepted

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

while A >= B:
    B *= 2
    K -= 1
    if K < 0:
        print("No")
        exit()
while B >= C:
    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())
flg=0
for i in range(k+1):
    if a<b*(2**i)<c*(2**(k-i)):
        flg=1
        break
if flg==1:
    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:
FAST_IO = 1
if FAST_IO:
    import io, sys, atexit
    rr = iter(sys.stdin.read().splitlines()).next
    sys.stdout = _OUTPUT_BUFFER = io.BytesIO()

    @atexit.register
    def write():
        sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
else:
    rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())
rrmm = lambda n: [rrm() for _ in xrange(n)]
a,b ,c = rrm()
k = rri()
def solve(a, b,c, k):
    while k:
        if a<b<c:
            return True
        if b<=a:
            b*=2
            k-=1
        elif c<=b:
            c*=2
            k-=1
    return a<b<c
ans = solve(a, b,c ,k)
if ans:
    print("Yes")
else:
    print("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
    i+=1

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

Submission status: Accepted

Solution code:
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

a,b,c =I()
k=k()

while cnt != k:
    if a >= b:
        b *= 2
    else:
        if b >= c:
            c *= 2
    cnt += 1

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

num = 0

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

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

if num <= k:
    print("Yes")

else:
    print("No")

Submission status: Accepted

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

for _ in range(K + 1):
#    print(A, B, C)
    if(A >= B):
        B = 2 * B
        continue
    
    if(B >= C):
        C = 2 * C
        continue

    print("Yes")
    exit()


print("No")

Submission status: Accepted

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

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

ANS=0

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

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

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

Submission status: Accepted

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

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

count = 0
flg = False
while A >= B:
    B *= 2
    count += 1

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

if count > K:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
a,b,c = map(int,input().split())
k = int(input())
for i in range(k):
    if not b > a:
        b *= 2
    elif not 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())
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:
def resolve():
    A, B, C = [int(i) for i in input().split()]
    K = int(input())
    if A < B and B < C:
        print("Yes")
        return
    for _ in range(K):
        if B >= C:
            C *= 2
        elif A >= B:
            B *= 2
        if A < B and B < C:
            print("Yes")
            return
    else:
        print("No")


resolve()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

if k <= K:
    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 :
    b *= 2
    ans += 1
while b >= c :
    c *= 2
    ans += 1

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    a,b,c = [int(v) for v in 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('Yes' if a<b and b<c else 'No')


main()

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(k):
  if red < green and green < blue:
    break
  else:
    if red >= green:
      green *= 2
    elif green >= blue:
      blue *= 2
      
if red < green and green < blue:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

for i in range(k+1):
  tb = b
  tc = c
  for j in range(i):
    tb *= 2
  for j in range(k-i):
    tc *= 2
  if tb > a and tc > tb:
    flag = True
    break

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

Submission status: Accepted

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

while(k):
    if a < b:
        break
    else:
        b *= 2

    k -= 1

while(k):
    if b < c:
        break
    else:
        c *= 2

    k -= 1

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    N = list(map(int, input().split()))
    K = int(input())
    cnt = 0
    i = 0
    while cnt < K:
        if i >= 2:
            break
        if N[i] < N[i+1]:
            i += 1
            continue
        N[i+1] *= 2
        cnt += 1 
        
    if N[0] < N[1] and N[1] < N[2]:
        return "Yes"
    else:
        return "No"

if __name__ == '__main__':
    print(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
        continue
    if B>=C:
        C *= 2
        continue

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

else:
    print('No')

Submission status: Accepted

Solution code:
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


a, b, c = LI()
k = I()
i = 0
while i < k:
    if a >= b:
        b *= 2
    elif b >= c:
        c *= 2
    if a < b and b < c:
        break
    i += 1
    # print(a, b, 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())

c = 0
while(A >= B):
    c += 1
    B *= 2
while(B >= C):
    c += 1
    C *= 2
if(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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

ok1=False
while True:
    if count==K:
        if B>A:
            ok1=True
        break
    if B>A:
        ok1=True
        break
    B*=2
    count+=1
    
ok2=False
while True:
    if count==K:
        if C>B:
            ok2=True
        break
    if C>B:
        ok2=True
        break
    C*=2
    count+=1

if ok1 and ok2:
    print("Yes")
else:
    print("No")

#print(A,B,C, ok1, ok2)

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = int(input())
while(a >= b and k): # 緑をいじる
    b *= 2
    k -= 1
while(b >= c and k): # 青をいじる
    c *= 2
    k -= 1
print("Yes" if a<b<c else "No")

Submission status: Accepted

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

resolve()

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

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

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

Submission status: Accepted

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

while X>0:
  if B<=A:
    B=2*B
  elif C<=B:
    C=2*C
  X-=1

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

Submission status: Accepted

Solution code:
# 青 > 緑 > 赤
def main():
    red,green,blue = map(int,input().split())
    k = int(input())
    while k > 0:
        k -= 1
        if green <= red:
            green *= 2
        else:
            blue *= 2

    if blue > green and green > red:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
k = int(input())
count = 0
while a[0] >= a[1]:
    count += 1
    a[1] *= 2
while a[1] >= a[2]:
    count += 1
    a[2] *= 2
if count > k:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
A,B,C = [int(hoge) for hoge in input().split()]
K = int(input())
for k 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 numpy as np
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial#, gcd
from bisect import bisect_left, bisect_right #bisect_left(list, value)
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
pl = lambda x: print(*x, sep='\n')

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

def chk(A, B, C):
    if A < B < C:
        return True
    else:
        return False

for _ in range(K):
    # print(' A, B, C', A, B, C)
    if A >= B:
        B *= 2
    elif B >= C:
        C *= 2
    if chk(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 = 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 and b < c:
        break

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

Submission status: Accepted

Solution code:
import sys, math

if(__name__ == "__main__"):

    A, B, C = map(int, input().strip().split() )
    """
    A: r, B: g, C: b
    b > g > r
    C > B > A
    """
    K = int( input().strip() )

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

Submission status: Accepted

Solution code:
import sys
a, b, c = map(int, input().split())
k = int(input())
for i in range(k):    
    if b >= c:
        c *= 2
    elif a >= b:
        b *= 2
    else:
        print('Yes')
        sys.exit()
if a < b < c:
    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()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

A,B,C = LI()
K = I()



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

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