Problem:


Score: 200 points

Problem Statement

M-kun has the following three cards:

A red card with the integer A.

A green card with the integer B.

A blue card with the integer C.

He is a genius magician who can do the following operation at most K times:

Choose one of the three cards and multiply the written integer by 2.

His magic is successful if both of the following conditions are satisfied after the operations:

The integer on the green card is strictly greater than the integer on the red card.

The integer on the blue card is strictly greater than the integer on the green card.

Determine whether the magic can be successful.

Constraints

1 \leq A, B, C \leq 7

1 \leq K \leq 7

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B C
K

Output

If the magic can be successful, print Yes; otherwise, print No.

Sample Input 1

7 2 5
3

Sample Output 1

Yes

The magic will be successful if, for example, he does the following operations:

First, choose the blue card. The integers on the red, green, and blue cards are now 7, 2, and 10, respectively.

Second, choose the green card. The integers on the red, green, and blue cards are now 7, 4, and 10, respectively.

Third, choose the green card. The integers on the red, green, and blue cards are now 7, 8, and 10, respectively.

Sample Input 2

7 4 2
3

Sample Output 2

No

He has no way to succeed in the magic with at most three operations.



Sample input:
7 2 5
3


Sample output:
Yes

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]


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

Submission status: Accepted

Solution code:
A=list(map(int,input().split()))
K=int(input())
a=A[0]
b=A[1]
c=A[2]
count=0
while count<=K:
    if a>=b:
        b=b*2
        count=count+1
    else:
        break
if count==K:
    pass
else:
    c=c*(2**(K-count))
if a<b<c:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

a_b_c = list(map(int, input().split()))
r = a_b_c[0]
g = a_b_c[1]
b = a_b_c[2]
k = int(input())

while (g <= r and k >= 0):
    g *= 2
    k -= 1
while (b <= g and k >= 0):
    b *= 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())

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

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

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

Submission status: Accepted

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


def dfs(a, b, c, k):
    # print(a, b, c, k)
    yield (a, b, c)
    if k+1 <= K:
        for x, y, z in dfs(a, b*2, c, k+1):
            yield (x, y, z)
        for x, y, z in dfs(a, b, c*2, k+1):
            yield (x, y, z)


for a, b, c in dfs(A, B, C, 0):
    if a < b < c:
        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
    else:
        C *= 2

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = int(input())
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 = map(int, input().split())
K = int(input())
flag = False
for i in range(K+1):
  for j in range(K+1):
    for k in range(K+1):
      x = A * (1 << i)
      y = B * (1 << j)
      z = C * (1 << k)
      if i + j + k <=K and x < y and y < z:
        flag = True

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

Submission status: Accepted

Solution code:
#testB
if __name__=="__main__":
  r, g, b = map(int, input().split())
  k = int(input())


  for _ in range(k):
      if not r < g:
        g = g*2
        continue
      if not g < b:
        b = b*2
        use = False
  if r < g and g < b:
    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
    if b>a:
        break
while b>=c:
    c*=2
    num+=1
    if c>b:
        break
if num<=k:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

def func(num_list):
    count = 0
    for i in range(2):
        while(True):
            # print(num_list[i], num_list[i+1])
            if num_list[i] < num_list[i+1]:
                break
            else:
                num_list[i+1] = num_list[i+1] * 2 
                count = count + 1
    return count


if __name__ == "__main__":
    lines = []
    for l in sys.stdin:
        lines.append(l.rstrip('\r\n'))
    
    tmp = lines[0].split(' ')
    num_list = []
    for n in tmp:
        num_list.append(int(n))

    count = func(num_list)
    if count <= int(lines[1]):
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def l_in(type_): return list(map(type_, input().split()))
def i_in(): return int(input())
def m_in(type_): return map(type_, input().split())
def r_in(n, type_): return [type_(input()) for _ in range(n)]
ans = False
a, b, c = m_in(int)
k = i_in()
for _ in range(k):
    if c <= b or c <= a: c *= 2
    elif b <= a: b *= 2
    if c > b > a:
        ans = True
        break
print('Yes' if ans else 'No')

Submission status: Accepted

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

K = int(input())

for x in range(K):
  if A<B*(2**x) and B*(2**x)<C*(2**(K-x)):
    print('Yes');exit()
      
print('No')

Submission status: Accepted

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

#赤＜緑＜青
kB = 0
kC = 0

while A >= B:
    B *= 2
    kB += 1

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

if kB + kC <= K:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

def dfs(k, a, b, c):
	if k == 0:
		if b > A and c > b:
			return True
		else:
			return False

	if dfs(k - 1, a * 2, b, c):
		return True

	if dfs(k - 1, a, b * 2, c):
		return True

	if dfs(k - 1, a, b, c * 2):
		return True

	return False

r = dfs(K, A, B, C)
if r:
	print('Yes')
else:
	print('No')

Submission status: Accepted

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

# B > A
# C > B
import sys
for i in range(K+1):
    A=a
    B=b*(2**i)
    C=c*(2**(K-i))
    #print(i,K-i,A,B,C)
    if B>A and C>B:
        print('Yes')
        sys.exit()
else:
    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
print('Yes' if r < g < b else '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=b*2
  count+=1
while b>=c:
  c=c*2
  count+=1

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

Submission status: Accepted

Solution code:
read = lambda: list(map(int, input().split()))
card = read()
k = int(input())
for _ in range(k):
    if card[0] >= card[1]:
        card[1] *= 2
    elif card[1] >= card[2]:
        card[2] *= 2

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

Submission status: Accepted

Solution code:
import random

nums = input().split()

#print(nums)
#A = nums[0]
#B = nums[1]
#C = nums[2]
a = int(nums[0])
b = int(nums[1])
c = int(nums[2])
#print(a)
K = input()
k = int(K)

#print(type(a))

#print(k)

cnt = 0

#print(type(cnt))

while a >= b:
  cnt +=1
  b *= 2
  #print(b)

while b >= c:
  cnt += 1
  c *= 2
  #print(c)
  
#if cnt

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

	

#for hoge in range(1,k +1):
#	print(hoge)
#print(random.choice(nums))

#print(A)

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
K=int(input())
ans="No"
for _ in range(K+1):
  if A>=B:
    B*=2
  elif B>=C:
    C*=2
  else:
    ans="Yes"
print(ans)

Submission status: Accepted

Solution code:
import itertools as it

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

allcase = list(it.product([0,1,2,3],repeat=k))

for case in allcase:
  nums = [a,b,c]
  for step in case:
    if step == 3:
      continue
    nums[step] *= 2
  if nums[0] < nums[1] and nums[1] < nums[2]:
    print('Yes')
    exit()
print('No')

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
K = int(input())
r, g, b = A, B, C
cnt = 0
while(r >= g):
    cnt += 1
    g *= 2
while(g >= b):
    cnt += 1
    b *= 2
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 and b<c:
        print("Yes")
        exit()
    if b<=a:
        b*=2
        continue
    if c<=b:
        c*=2
        continue
if a<b and b<c:
    print("Yes")
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

k = 0
while True:
    if A < B < C:
        print("Yes")
        break
    else:
        if k == K:
            print("No")
            break

        if B <= A:
            B *= 2
        elif C <= B:
            C *= 2
        k += 1

Submission status: Accepted

Solution code:
A, B, C, K = [int(_) for _ in open(0).read().split()]
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:
# -*- coding: utf-8 -*-


def main():
    import sys
    input = sys.stdin.readline

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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


def main():
    import sys
    input = sys.stdin.readline

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

    while True:
        if a >= b:
            b *= 2
            count += 1
        else:
            break

    while True:
        if b >= c:
            c *= 2
            count += 1
        else:
            break

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding:utf-8
a, b, c = map(int, input().split())
k = int(input())
counter = 0

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

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

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

Submission status: Accepted

Solution code:
a,b,c = [int(x) for x in input().split(' ')]
k = int(input())
z=0
while(a>=b):
    b*=2
    z+=1
while (b>=c):
    c*=2
    z+=1
if(z<=k):
    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:
def main():
    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")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
(r1,g1,b1)=input().split()
(r,g,b)=(int(r1),int(g1),int(b1))
k=int(input())
flg=0
for i in range(k):
  if not g > r :
    g *= 2
  elif not 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())

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

a = A
b = B
c = C
ans = 0
if a < b < c:
    ans = 1

for i in range(3**k):
    a = A
    b = B
    c = C
    i3 = Base_10_to_n(i, 3).zfill(k)
    mem = 0
    Pick = []
    for j in range(k):
        if i3[j] == '0':
            a *= 2
        elif i3[j] == '1':
            b *= 2
        elif i3[j] == '2':
            c *= 2
#        print(a, b, c)
    if a < b < c:
        ans = 1
#        print('!!')
if ans:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import math


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

count = 0

ab = int(math.log2(A/B)+1)
bc = int(math.log2((B*(2**ab))/C)+1)

if ab + bc <= K:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
from sys import stdin
A, B, C = [int(_) for _ in stdin.readline().rstrip().split()]
K = int(stdin.readline().rstrip())
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())

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

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
K = int(input())
for i in range(K):
    if A >= B:
        B *= 2
        continue
    elif 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())
 
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 sys
input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    r,g,b=map(int,input().split())
    k=int(input())
    while(k>0):
        if(g<=r):
            g=g<<1
            k-=1
        elif(b<=g):
            b=b<<1
            k-=1
        else:
            break;
    if(r<g and g<b):
        print('Yes')
    else:
        print('No')
    
main()

Submission status: Accepted

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

while B <= A and K:
	B *= 2
	K -= 1

while C <= B and K:
	C *= 2
	K -= 1

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

Submission status: Accepted

Solution code:
a, b, c = list(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:
# B - Magic 2


def magic(a, b, c, k):
    for i in range(k):
        if a >= b:
            b = b * 2
        elif b >= c:
            c = c * 2
        i += 1
    if a < b and b < c:
        return "Yes"
    else:
        return "No"


if __name__ == "__main__":
    param_a, param_b, param_c = map(int, input().split(' '))
    param_k = int(input())
    print(magic(param_a, param_b, param_c, param_k))

Submission status: Accepted

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

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

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

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

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

# if A < B and B < C:
#     print("Yes")
# else:
#     print("No")
A, B, C = LI()
K = int(input())

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

Submission status: Accepted

Solution code:
import sys
import itertools
# import numpy as np
import time
import math
import heapq
from collections import defaultdict
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 18
MOD = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

# map(int, input().split())

r, g, b = map(int, input().split())
K = int(input())

while K > 0 and r >= g:
    g *= 2
    K -= 1
while K > 0 and g >= b:
    b *= 2
    K -= 1

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

Submission status: Accepted

Solution code:
import itertools

a, b, c = map(int, input().split(" "))
k = int(input())
f = False
for conb in list(itertools.combinations_with_replacement([0, 1, 2], k)):
    a_i = conb.count(0)
    b_i = conb.count(1)
    c_i = conb.count(2)
    
    if (a * (2 ** a_i) < b * (2 **b_i)) and (b * (2 ** b_i) < c * (2 ** c_i)):
        f = True

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

Submission status: Accepted

Solution code:
r, g, b = map(int, input().split())
k = int(input())
count = 0
while g<=r: g*=2; count+=1
while b<=g: 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())

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)

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

# A=red,B=green,C=blue
# B > A, C > B
def dfs(i,a,b,c):
  if i==K:
    if b>a and c>b:
      return True
    else:
      return False

  for j in range(3):
    if j==0:
      if dfs(i+1,2*a,b,c):
        return True
    elif j==1:
      if dfs(i+1,a,2*b,c):
        return True
    else:
      if dfs(i+1,a,b,2*c):
        return True

  return False

if dfs(0,A,B,C):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = int(input())
flg = False
c = (2**k) * c
for i in range(k):
  if a < b < c:
    flg = True
    break
  b *= 2
  c //= 2

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import lru_cache
import bisect
import re
import queue
import copy
import decimal


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [Scanner.string() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [Scanner.int() for i in range(n)]


def solve():
    A, B, C = Scanner.map_int()
    K = Scanner.int()
    for i in range(K):
        if A >= B:
            B *= 2
        else:
            C *= 2
    return A < B < C


def main():
    # sys.setrecursionlimit(1000000)
    # sys.stdin = open("sample.txt")
    print('YNeos'[not solve()::2])


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a, b, c = map(int,input().split())
k = int(input())
 
for i in range(k):
  if b <= a:
    b *= 2
  elif c <= b:
    c *= 2
  else:
    break
    
if a >= b or 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  b <= a:
    b *=2
  elif c <= b:
    c*=2
  else:
    break
    
if a >= b or b >= c:
  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:
    cnt += 1
    b *= 2
while b >= c:
    cnt += 1
    c *= 2
if cnt <= 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 not a < b:
  b*=2
  cnt+=1

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

#print('cnt:',cnt,'k:',k)
print('Yes' if cnt <=k 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 a < b and b < c else "No")

Submission status: Accepted

Solution code:
def main():
    A, B, C = input_ints()
    K = input_ints()

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

        K -= 1

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


def input_ints():
    line_list = input().split()

    if len(line_list) == 1:
        return int(line_list[0])
    else:
        return map(int, line_list)


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


def input_int_tuple_list(n: int):
    return [tuple(map(int, input().split())) for _ in range(n)]


main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

def main():
    r,g,b = map(int, input().split())
    k = int(input())
    
    for i in range(k):
        for j in range(k):
            if i+j > k:
                continue
            if r*2**i < g*2**j < b*2**(k-i-j):
                print('Yes')
                return
    print('No')
    
main()

Submission status: Accepted

Solution code:
def find(A,B,C,K):
#     A<B<C
    for i in range(K+1):
        v1 = i
        v2 = K - i
        B0 = B*(2**v1)
        C0 = C*(2**v2)
        if A < B0 and B0 < C0:
            return True
    return False

A,B,C = list(map(int,input().strip().split()))
K = int(input())
if find(A,B,C,K):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
abc=list(map(int,input().split()))
a,b,c=abc[0],abc[1],abc[2]
k=int(input())
for i in range(k+1):
    if a < b < c:
        print("Yes")
        break
    elif b <= a < c:
        b *= 2
    else:
        c *= 2
else:
    print("No")

Submission status: Accepted

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

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


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

Submission status: Accepted

Solution code:
from math import log2, ceil

a, b, c = map(int, input().split())
k = int(input())
# n >= log2((a+1)/b)
bi = ceil(log2((a+1) / b))
bi = max(bi, 0)
b *= pow(2, bi)
ci = ceil(log2((b+1) / c))
ci = max(ci, 0)
if bi + ci <= 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:
        break
    b*=2
    k-=1
while k>0:
    if b<c:
        break
    c*=2
    k-=1
if a<b<c:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

k = 0
while A >= B:
    B *= 2
    k += 1
while B >= C:
    C *= 2
    k += 1

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

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
N = int(input())
stack = [(A,B,C,N)]
flag = False
while stack:
  a,b,c,n = stack.pop()
  if a<b and b<c:
    flag = True
    break
  if n>0:
    stack.append((a*2,b,c,n-1))
    stack.append((a,b*2,c,n-1))
    stack.append((a,b,c*2,n-1))
print('Yes') if flag else print('No')

Submission status: Accepted

Solution code:
A,B,C = list(map(int,input().split()))
K = int(input())
for i in range(K):
    for j in range(K-i):
        k = K-i-j
        if 2**i*A<2**j*B<2**k*C:
            print('Yes')
            exit()
print('No')

Submission status: Accepted

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

t = 0
while a >= b:
    b *= 2
    t += 1

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

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

Submission status: Accepted

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


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

Submission status: Accepted

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

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

if a < b < c and n <= k:
  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())
count =0
while A >=B:
    B *=2
    count +=1

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

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = int(input())
while a>=b:
    b*=2
    k-=1
while b>=c:
    c*=2
    k-=1
if k>=0:
    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
    else:
        pass

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

Submission status: Accepted

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