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:
#!usr/bin/env python3
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


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 LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


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


# Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
R, G, B = map(int, input().split())
K = int(input())
for _ in range(K):
    if G <= R:
        G *= 2
    elif B <= G:
        B *= 2
print('Yes' if R < G < B else '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')
        break
else:
    print('No')

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

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

for i in range(K):
    ng = i
    nb = K-i
    g = G * 2 ** ng
    b = B * 2 ** nb
    if R < g < b:
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
k=int(input())
i=0
while True:
  if a<b:
    break
  b*=2
  i+=1
while True:
  if b<c:
    break
  c*=2
  i+=1
if i<=k:
  print("Yes")
elif i>k:
  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
if counter <= 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
        continue
    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())
if A < B:
    if B < C * (2**K):
        print("Yes")
    else:
        print("No")
else:
    for i in range(1,K+1):
        if A < B * (2**i):
            if B * (2**i) < C * (2**(K-i)):
                print("Yes")
                break
            else:
                print("No")
                break

Submission status: Accepted

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

K = int(input())

judge = False
for i in range(K+1):
    for j in range(K+1):
        for k in range(K+1):
            x = a*2**i
            y = b*2**j
            z = c*2**k
            if i+j+k <= K and x < y and y < z:
                judge = True
                
if judge:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


def main():
    a,b,c = map(int, input().split())
    k = int(input())
    flag = False
    if a < b < c:
        print("Yes")
        sys.exit()

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

    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())
flag=False
for i in range(10):
    for j in range(10):
        for k in range(10):
            if i+j+k<=K and 2**i*a<2**j*b<2**k*c:
                flag=True
if flag:
    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
#print(K)
if K >= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
from sys import stdin, stdout
import math,sys,heapq
from itertools import permutations, combinations
from collections import defaultdict,deque,OrderedDict
from os import path
import bisect as bi
def yes():print('YES')
def no():print('NO')
if (path.exists('input.txt')): 
    #------------------Sublime--------------------------------------#
    sys.stdin=open('input.txt','r');sys.stdout=open('output.txt','w');
    def I():return (int(input()))
    def In():return(map(int,input().split()))
else:
    #------------------PYPY FAst I/o--------------------------------#
    def I():return (int(stdin.readline()))
    def In():return(map(int,stdin.readline().split()))

def dict(a):
    d={}
    for x in a:
        if d.get(x,-1)!=-1:
            d[x]+=1
        else:
            d[x]=1
    return d

def find_gt(a, x):
    'Find leftmost value greater than x'
    i = bi.bisect_right(a, x)
    if i != len(a):
        return i
    else:            
        return -1

def main():
    try:
        a,b,c=In()
        k=I()
        t1,t2=0,0
        if a>=b:
            t1=0
            while b<=a:
                b*=2
                t1+=1
        if b>=c:
            t2=0
            while c<=b:
                c*=2
                t2+=1

        #print(a,b,c)
        if a<b and b<c:
            if t1+t2<=k:
                print('Yes')
            else:
                print('No')
        else:
            print('No')

    except:
        pass
        
M = 998244353
P = 1000000007
 
if __name__ == '__main__':
    #for _ in range(I()):main()
    for _ in range(1):main()

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
K = int(input())
for _ in range(K):
    if A >= B:
        B *= 2
        continue
    if B >= C:
        C *= 2
        continue

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

Submission status: Accepted

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

while(a>=b):
  b *= 2
  s += 1
while(b>=c):
  c *= 2
  s += 1
  
if(s<=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:
n , m , l = map(int , input().split())
k=int(input())
for a in range(k+1):
  for b in range(k+1):
    for c in range(k+1):
      a1 = (n*(2**a))
      b1 = (m*(2**b))
      c1 = (l*(2**c))
      if a+b+c <= k and a1 < b1 and b1 < c1:
        print("Yes")
        exit()
        
print('No')

Submission status: Accepted

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

if b > a:
  multiplier = 2 ** k
  if c * multiplier > b:
    ans = 'Yes'
  else:
    ans = 'No'
else:
  while b <= a:
    b *= 2
    k -= 1
  multiplier = 2 ** k
  if c * multiplier > b:
    ans = 'Yes'
  else:
    ans = 'No'

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if K>=0 and  C>B and B>A:
  result='Yes'

print(result)

Submission status: Accepted

Solution code:
a,b,c=[int(x) for x in input().split(" ")]
k=int(input())
count=0
while b<=a:
    count+=1
    b*=2
while c<=b:
    count+=1
    c*=2
if count<=k:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

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

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

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

Submission status: Accepted

Solution code:
import copy
import math

# a = get_int()
def get_int():
    return int(input())

# a = get_string()
def get_string():
    return input()

# a_list = get_int_list()
def get_int_list():
    return [int(x) for x in input().split()]

# a_list = get_string_list():
def get_string_list():
    return input().split()

# a, b = get_int_multi()
def get_int_multi():  # a, b = get_int_multi()
    return map(int, input().split())

# a_list = get_string_char_list()
def get_string_char_list():
    return list(str(input()))

# print("{} {}".format(a, b))
# for num in range(0, a):
# a_list[idx]
# a_list = [0] * a
'''
while (idx < n) and ():

    idx += 1
'''

def main():

    a, b ,c = get_int_multi()
    k = get_int()

    n2 = a / b
    m2 = math.floor(math.log(n2,2) +1)
    if m2 < 0:
        m2 = 0

    n1 = (b * pow(2, m2)) / c
    m1 = math.floor(math.log(n1,2) +1)
    if m1 < 0:
        m1 = 0

    if k >= m1+m2:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from math import log2,ceil
def main():
    A,B,C=map(int,input().split())
    K=int(input())
    if A<B<C:
        print("Yes")
    else:
        op=0
        if B<=A:
            val=ceil(log2(A/B))
            op+=val
            B<<=val
            if B==A:
                B*=2
                op+=1
        if C<=B:
            val=ceil(log2(B/C))
            op+=val
            C<<=val
            if C==B:
                C*=2
                op+=1
        if op<=K:
            print("Yes")
        else:
            print("No")
if __name__=='__main__':
    main()

Submission status: Accepted

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

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

def main():
    mod=10**9+7
    a,b,c=MI()
    K=I()
    cnt=0
    while b<=a:
        b*=2
        cnt+=1
        
    while c<=b:
        c*=2
        cnt+=1
        
    if cnt<=K:
        print("Yes")
    else:
        print("No")

main()

Submission status: Accepted

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

isCheck = None
for i in range(K+1):
    for j in range(K+1):
        for k in range(K+1):
            x = a*2**(i)
            y = b*2**(j)
            z = c*2**(k)
            if i+j+k <= K and x < y and y < z:
                isCheck = True

if isCheck:
    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
print("No")if k<0 else print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)
INF = 10 ** 9 + 1  # sys.maxsize # float("inf")
MOD = 10 ** 9 + 7


def debug(*x):
    print(*x, file=sys.stderr)


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


def main():
    # parse input
    A, B, C = map(int, input().split())
    K = int(input())
    print(solve(A, B, C, K))


# tests
T1 = """
7 2 5
3
"""
TEST_T1 = """
>>> as_input(T1)
>>> main()
Yes
"""

T2 = """
7 4 2
3
"""
TEST_T2 = """
>>> as_input(T2)
>>> main()
No
"""


def _test():
    import doctest
    doctest.testmod()
    g = globals()
    for k in sorted(g):
        if k.startswith("TEST_"):
            doctest.run_docstring_examples(g[k], g)


def as_input(s):
    "use in test, use given string as input file"
    import io
    f = io.StringIO(s.strip())
    g = globals()
    g["input"] = lambda: bytes(f.readline(), "ascii")
    g["read"] = lambda: bytes(f.read(), "ascii")


input = sys.stdin.buffer.readline
read = sys.stdin.buffer.read

if sys.argv[-1] == "-t":
    print("testing")
    _test()
    sys.exit()

main()

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

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 * (2 ** i)
    TC = C * (2 ** (K-i))
    if TB > A and TC > TB:
        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())
n = 0
while b <= a:
    b *= 2
    n += 1
while c <= b:
    c *= 2
    n += 1

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

Submission status: Accepted

Solution code:
import itertools
A,B,C = list(map(int, input().split()))
K = int(input())
ans = False
for p in itertools.product(['a','b','c'], repeat=K):
    A0,B0,C0 = A,B,C
    for e in p:
        if e == 'a':
            A0 = 2*A0
        elif e == 'b':
            B0 = 2*B0
        else:
            C0 = 2*C0
    if A0 < B0 < C0 :
        ans = True
        break
print('Yes' if ans else 'No')

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**8)
input = sys.stdin.readline
X = list(map(int,input().split()))
K = int(input())
K += 1

for i in range(K):
    for j in range(K-i):
        for k in range(K-i-j):
            if X[0]*(2**i) < X[1]*(2**j) and X[1]*(2**j) < X[2]*(2**k):
                print('Yes')
                sys.exit()
print('No')

Submission status: Accepted

Solution code:
# Problem B - Magic 2

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

# B check
while B<=A:
    B = B * 2
    K -= 1

# C check
while C<=B:
    C = C * 2
    K -= 1

# output
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())
while b <= a:
    b *= 2
    k -= 1
while c <= b:
    c *= 2
    k -= 1
print("Yes" if k >= 0 else "No")

Submission status: Accepted

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

for i in range(k+1) :
  if a >= b :
    b *= 2
  elif b >= c :
    c *= 2
  else :
    print("Yes")
    exit()
    
print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import itertools

lst = list(map(int, input().split()))
k = int(input())

ans = 'No'
for tup in itertools.combinations_with_replacement([0, 1, 2], k):
    temp = lst[:]
    for i in tup:
        temp[i] *= 2
    if temp[0] < temp[1] and temp[1] < temp[2]:
        ans = 'Yes'
print(ans)

Submission status: Accepted

Solution code:
#from collections import deque,defaultdict
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split()) 
ins = lambda : input().strip()
DBG = True # and False
BIG = 10**18
R = 10**9 + 7
#R = 998244353

def ddprint(x):
  if DBG:
    print(x)

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
abc=list(map(int, input().split()))
k=int(input())
a=abc[0]
b=abc[1]
c=abc[2]

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

Submission status: Accepted

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

n = 0

while (A >= B):
  B = 2*B
  n +=1
  
while B>=C:
  C = 2*C
  n += 1
  
#print(A,B,C,n)

if n <= 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(K+1):
    if C <= B:
        C *= 2
        count += 1
    elif B <= A:
        B *= 2
        count += 1



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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.buffer.readline
import os
from math import*

r,g,b=map(int,input().split())
k=int(input())
while g<=r and k>0:
	g*=2
	k-=1
while b<=g and k>0:
	b*=2
	k-=1
if b>g and g>r:
	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
    
while c<=b:
    c*=2
    cnt+=1
    
if 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 B >= C:
        C *= 2
    elif A >= B:
        B *= 2
#    print(A,B,C)
if A < B < C:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

while a >= b:
    b *= 2
    ct += 1
    
while b >= c:
    c *= 2
    ct += 1
    

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

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 >= C:
        C *= 2
        K -= 1

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
import  math
import fractions
from collections import defaultdict
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

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

count=0
while(B<=A):
    B*=2
    count+=1
while(C<=B):
    C*=2
    count+=1

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

Submission status: Accepted

Solution code:
def main():
    A, B, C = (int(x) for x in input().split())
    K = int(input())

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

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

for a in range(K):
    for b in range(K):
        if A * 2**a < B * 2**b < C * 2**(K-(a+b)):
            print('Yes')
            sys.exit()

print('No')

Submission status: Accepted

Solution code:
import sys
input=lambda: sys.stdin.readline().rstrip()
a,b,c=map(int,input().split())
k=int(input())
ct=0
while b<=a:
  ct+=1
  b*=2
while c<=b:
  ct+=1
  c*=2
if ct<=k:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
nums = list(map(int, input().split()))
cards = {'r':nums[0], 'g':nums[1], 'b':nums[2]}
tN = int(input())

def func_check():
    judge = 0
    if cards['g'] > cards['r']:
        judge += 1
    if cards['b'] > cards['g']:
        judge += 2
    if judge == 0:
        c = 'g'
    elif judge == 1:
        c = 'b'
    elif judge == 2:
        c = 'g'
    elif judge == 3:
        c = 'comp'
    return c

for i in range(tN):
    judge = func_check()
    if judge == 'comp':
        break
    else:
        cards[judge] *= 2
judge = func_check()
if judge == 'comp':
    output = 'Yes'
else:
    output = 'No'
print(output)

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

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

while r >= g:
    try_cnt -= 1
    g *= 2        
    
while g >= b:
    try_cnt -= 1
    b *= 2

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

Submission status: Accepted

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

    while (B <= A):
        num += 1
        if num <= K:
            B *= 2
        else:
            return ("No")

    while (C <= B):
        num += 1
        if num <= K:
            C *= 2
        else:
            return ('No')

    return('Yes')

print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(a, b, c, k):
    for i_a in range(k+1):
        for i_b in range(k+1):
            for i_c in range(k+1):
                if i_a + i_b + i_c > k:
                    break
                x = a * (2**i_a)
                y = b * (2**i_b)
                z = c * (2**i_c)
                if x < y < z:
                    return "Yes"
    return "No"

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

Submission status: Accepted

Solution code:
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

a,b,c=nm()
k=ni()

while(True):
  if(b<=a):
    if(k<=0):
      print('No')
      exit()
    b*=2
    k-=1
  else:
    break

while(True):
  if(c<=b):
    if(k<=0):
      print('No')
      exit()
    c*=2
    k-=1
  else:
    break
print('Yes')

Submission status: Accepted

Solution code:
A, B, C = [int(v) for v in input().strip().split(" ")]
K = int(input().strip())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b,c,k=map(int,open(0).read().split())
#while k:k-=1;t=a<b;b*=2-t;c*=1+t
while k:k-=1;exec(f'{"bc"[a<b]}*=2')
#while k:k-=1;exec('%c*=2'%'bc'[a<b])
#while k:k-=1;vars()['bc'[a<b]]*=2
print('NYoe s'[b<c::2])

Submission status: Accepted

Solution code:
a,b,c,k=map(int,open(0).read().split())
#while k:k-=1;t=a<b;b*=2-t;c*=1+t
while k:k-=1;vars()['bc'[a<b]]*=2
print('NYoe s'[b<c::2])

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

r, g, b = rm()
n = ri()
c = 0
while r >= g:
    g *= 2
    c += 1
d = 0
while g >= b:
    b *= 2
    d += 1
print('Yes' if c+d <= n else 'No')

Submission status: Accepted

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

while r >= g:
  g *= 2
  count += 1
  
while g >= b:
  b *= 2
  count += 1

if k >= count:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
a = list(map(int, input().split()))
k = int(input())
count = 0

while a[1] <= a[0]:
    a[1] = a[1]*2
    count += 1
while a[2] <= a[1]:
    a[2] = a[2]*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(1,k+1):
  if a>=b>=c or a>=c>=b:
    c=c*2
  elif b>=a>=c or b>=c>=a:
    c=c*2
  elif c>=b>a:
    c=c*2
  elif c>b==a:
    b=b*2
  elif c>a>=b:
    b=b*2
if c>b>a:
  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 < c:
            break
        elif a >= b:
            b *= 2
        elif b >= c:
            c *= 2

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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