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:
# coding: utf-8
# Your code here!

card = input().split()
kaisu = int(input())

red  = int(card[0])
green  = int(card[1])
blue = int(card[2])

for num in range(1, kaisu + 1):
    
    if red >= green:
        green = green * 2
        
    elif green >= blue:
        blue = blue * 2
    
    else:
        blue = blue * 2
        
    # print(red,green,blue)
        

if red < green < blue:
    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):
    for j in range(K):
        if C*(2**(K-i-j)) > B*(2**j) > A*(2**i):
            print("Yes")
            sys.exit()
        else: continue
print("No")

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
K = int(input())
a=0
for i in range(K+1):
    if B*(2**i) > A:
        if C*(2**(K-i)) > B*(2**i):
            a=1
if a==1:
    print('Yes')
if a==0:
    print('No')

Submission status: Accepted

Solution code:
num = input("").split(" ")
num = [int(i) for i in num]
K = int(input(""))

for i in range(0, K):

    if num[1] >= num[2]:
        num[2] = num[2] * 2

    elif num[0] >= num[1]:
        num[1] = num[1] * 2

    elif num[0] >= num[2]:
        num[2] = num[2] * 2

    else:
        num[2] = num[2] * 2

if num[2] > num[1] > num[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 *= 2
    count += 1
    # print("b", b)

while b >= c:
    c *= 2
    count += 1
    # print("c", c)

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

Submission status: Accepted

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

bb = 0
cc = 0
while  a >= b:
  b = 2*b
  bb += 1

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

if bb + cc <= k:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
def solve():
    a,b,c= map(int,input().split())
    k=int(input())
    for k in range(k):
        if b <= a:
            b = b *2
        elif  c <= b:
            c = c * 2

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



solve()

Submission status: Accepted

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

if a >= b:
    for i in range(k):
        b = 2*b
        if a < b:
            count = i
            break
if b >= c:
    for j in range(count+1, k):
        c = 2*c
        if b < c:
            break
if a < b and b < c:
        print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

def check(A,B,C):
    if A < B and B < C:
        return 1
    else:
        return 0

def operation(A, B, C, K):
    res = 0
    if K == 0:
        return check(A,B,C)
    else:
        res = res + operation(A*2,B,C,K-1)
        res = res + operation(A,B*2,C,K-1)
        res = res + operation(A,B,C*2,K-1)
    return res

res = operation(A,B,C,K)

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

while c<=b 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())

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

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

Submission status: Accepted

Solution code:
from itertools import product


def f(n):
    tmp = [range(3)] * n
    return product(*tmp)


a, b, c = map(int, input().split())
K = int(input())
flag = 0
for I in f(K):
    x, y, z = a, b, c
    for i in I:
        if i == 0:
            x *= 2
        elif i == 1:
            y *= 2
        else:
            z *= 2

    if x < y < z:
        flag = 1
        break

print(['No', 'Yes'][flag])

Submission status: Accepted

Solution code:
r, g, b = input().split(' ')

n = int(input())

for i in range(0, n):
  if int(r) >= int(g):
    g = int(g) * 2
    continue
  if int(g) >= int(b):
    b = int(b) * 2
    continue
if int(r) < int(g) < int(b):
  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:
from sys import stdin
input = stdin.readline

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

i = a
j = b
k = c
l = 0

while i >= j:
    j = j*2
    l += 1

while j >= k:
    k = k*2
    l += 1

can = False

if(k > j > i and l <= x):
    print("Yes")
    can = True
   

if not can:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import numpy as np

A,B,C = list(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 and b < c):
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

ans = False

for _ in range(k):
    if c>b>a:
        ans = True
        break

    if a >= c:
        c *= 2
    else:
        if b == c:
            c *= 2
        elif c < b:
            if b < a:
                b *= 2
            else:
                c *= 2
        else:
            b *= 2
            
if c>b>a:
    ans = True

if ans:
    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 -= 1    

c = c*2**(k)
#print(a,b,c)
if (a<b and  b<c):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
A,B,C = map(int,input().split())
K = int(input())
card = [[] for _ in range(7)]
card[0].append([A,B,C])

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

Submission status: Accepted

Solution code:
def C(a, b, c):
    if((c>b) & (b>a)):
        return True
    else:
        return False

def main():
    a, b, c = map(int, input().split())
    k = int(input())
    ans_c = c
    for i in range(k+1):
        c = ans_c
        for j in range(k-i):
            c = c*2
        if(C(a, b, c)):
            print('Yes')
            return
        b = b * 2
    print('No')
main()

Submission status: Accepted

Solution code:
import sys
import math
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

if __name__=='__main__':
    a,b,c = IL()
    k = I()
    cb = 0
    while b<=a:
        b*=2
        cb += 1
    cc = 0
    while c<=b:
        c *= 2
        cc += 1
    if cb+cc<=k:
        print('Yes')
    else:
        print('No')
    exit()

Submission status: Accepted

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

count = 0

while A >= B:
    count += 1
    if count == K+1:
        print('No')
        exit()
    B *= 2

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

for i in range(100):
    if B >= C:
        C *= 2
        cnt += 1

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

Submission status: Accepted

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

K = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt=0

for i in range(7):
    if a[0] >= a[1]:
        a[1] *= 2
        cnt += 1
    else:
        break

for j in range(7):
    if a[1] >= a[2]:
        a[2] *= 2
        cnt += 1
    else:
        break

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

Submission status: Accepted

Solution code:
r,g,b=map(int,input().split())
k=int(input())
flag="No"
for i in range(k):
	if b>g and g>r:
		flag="Yes"
		break
	if r<=b and b<=g:
		b*=2
	elif b<=r and r<=g:
		b*=2
	elif b<=g and g<=r:
		b*=2
	elif g<=r and r<=b:
		g*=2
	elif g<=b and b<=r:
		b*=2
if b>g and g>r:
	flag="Yes"
print(flag)

Submission status: Accepted

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

flag = False

count = 0
while count < k:
    count += 1
    if r < g * (2 ** (k - count)) < b * (2 ** count):
        #print("A", r, g * (2 ** (k - count)), b * (2 ** count))
        flag = True
        break

count = 0
while count < k:
    count += 1
    if r * (2 ** (k - count)) < g < b * (2 ** count):
        #print("B", r * (2 ** (k - count)), g, b * (2 ** count), count)
        flag = True
        break

count = 0
while count < k:
    count += 1
    if r * (2 ** (k - count)) < g * (2 ** count) < b:
        #print("C", r * (2 ** (k - count)), g * (2 ** count), b)
        flag = True
        break

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

Submission status: Accepted

Solution code:
import itertools

red_num0, green_num0, blue_num0 = list(map(int, input().split()))
red_num1, green_num1, blue_num1 = red_num0, green_num0, blue_num0
K = int(input())
flag = False

for card_list in list(itertools.product(["red", "green", "blue"], repeat=K)):
    for card in card_list:
        if card == "red":
            red_num1 *= 2
        elif card == "green":
            green_num1 *= 2
        elif card == "blue":
            blue_num1 *= 2
    else:
        if(green_num1 > red_num1 and blue_num1 > green_num1):
            print("Yes")
            flag = True
            break
        red_num1, green_num1, blue_num1 = red_num0, green_num0, blue_num0

if(not flag):
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b, c = [int(x) for x in input().split()]
k = int(input())
count = 0
while 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:
numbers = [int(s) for s in input().split()] #0:赤, 1:緑, 2:青
K = int(input())
for i in range(K):
    if(numbers[2] <= numbers[0]):
        numbers[2] *= 2
    elif(numbers[1] <= numbers[0]):
        numbers[1] *= 2
    elif(numbers[2] <= numbers[1]):
        numbers[2] *= 2
    else:
        break
if(numbers[1] > numbers[0] and numbers[2] > numbers[1]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
n = int(input())
for i in range(0, n+1):
    for j in range(0, n-i+1):
        k = n-i-j
        if a*(2**i) < b*(2**j) < c*(2**k):
            #print(i, j, k)
            print('Yes')
            exit()
        else:
            continue
print('No')

Submission status: Accepted

Solution code:
import sys

A,B,C=map(int,input().split())
K=int(input())
for i in range(K+1):
  #print(K,A,B,C,i)
  if( A < B and B < C):
    print('Yes')
    sys.exit()
  else:
    if(i >= K):
      print('No')
      sys.exit()
    else:
      if(A >= B):
        B *= 2
      elif(B >= C):
        C *= 2
      else:
        pass

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

for i in range(k):
  if N[1] <= N[0]:
    N[1] = N[1] * 2
  elif N[2] <= N[1]:
    N[2] = N[2] * 2
  
if N[1] > N[0] and N[2] > N[1]:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

ans_array =Array
counter = 0
for i in range(7):
  if ans_array[0] >= ans_array[1]:
    ans_array[1] = ans_array[1] * 2
  else:
    if ans_array[1] >= ans_array[2]:
      ans_array[2] = ans_array[2] * 2
      if ans_array[1] < ans_array[2]:
        counter = i + 1
        if counter <= K:
          print("Yes")
        else:
          print("No")
        exit()
    else:
        if counter <= K:
          print("Yes")
        else:
          print("No")
        exit()
else:
  print("No")

Submission status: Accepted

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

ans='No'

for i in range(K):
  for j in range(K-i+1):
    red=A
    green=B
    blue=C
    
    if red<green*(2**i) and green*(2**i) <blue*(2**j):
      ans='Yes'
      break
    elif red<green*(2**j) and green*(2**j) < blue*(2**i):
      ans='Yes'
      break


print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
A = [int(x) for x in input().split()]
src = np.array(A)
K = int(input())
flag = 0

for i in range(K):
  if(src[0] < src[1]):
    if(src[1] < src[2]):
      flag = 1
      break
    else:
      src[2] *= 2
  else:
    src[1] *= 2
   
if(src[0] < src[1]):
	if(src[1] < src[2]):
		print("Yes")
	else:
		print("No")
else:
  print("No")

Submission status: Accepted

Solution code:
def chk_result(x, y, z):
    a = int(x)
    b = int(y)
    c = int(z)
    if (a < b and b < c):
        return True
    else:
        return False


s = input().split()
intAR = int(s[0])
intBG = int(s[1])
intCB = int(s[2])

s = input().split()
intK = int(s[0])

res = False

while intK > 0:
    if (intAR >= intBG):
        intBG = intBG * 2
    elif (intBG >= intCB):
        intCB = intCB * 2
    
    #print(str(intAR) + ' ' + str(intBG) + ' ' + str(intCB))
    res = chk_result(intAR, intBG, intCB)
    if (res):
        print('Yes')
        exit()
    intK -= 1

print('No')

Submission status: Accepted

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

K = int(input())

while K > 0:
  if g <= r:
    g *= 2
    K -= 1
  elif b <= g:
    b *= 2
    K -= 1
  else:
    break
    




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

Submission status: Accepted

Solution code:
r, g, b = map(int, input().split())
op = int(input())
while op > 0 and g <= r:
    g *= 2
    op -= 1
while op > 0 and b <= g:
    b *= 2
    op -=1
if r < g and g < b:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
a = list(map(int,input().split()))
n = int(input())

for x in range(n):
    if a[2] <= a[1]:
        a[2] = a[2]*2
    elif a[0] >= a[1]:
        a[1] = a[1]*2
    if a[0] < a[1] < a[2]:
        print("Yes")
        sys.exit()

print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# モジュールのインポート
import math

# 標準入力を取得
A, B, C = list(map(int, input().split()))
K = int(input())

# 求解処理
ans = str()
k_b = 0
if A >= B:
    k_b = int(math.log(A / B) / math.log(2)) + 1
if k_b > K:
    ans = "No"
else:
    if 2**(K - k_b) * C > 2**k_b * B:
        ans = "Yes"
    else:
        ans = "No"

# 結果出力
print(ans)

Submission status: Accepted

Solution code:
a,b,c = [int(i) for i 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('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
a,b,c= list(map(int, input().strip().split()))
N = int(input().strip())
x=0
y=N
if b<=a:
    for i in range(100):
        b*=2
        x=x+1
        y=y-1
        if b>a:
            break

if y<0:
    if c<=b:
        print("No")
    else:
        print("Yes")
else:
    for i in range(y):
        c*=2
    if c<=b:
        print("No")
    else:
        print("Yes")

Submission status: Accepted

Solution code:

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

if b < a:
    for i in range(1, 10):
        b = b*2
        if b > a:
            y = i
            break
elif b == a:
    y = 1
    b = b * 2
else:
    y = 0

if c < b:
    for i in range(1, 10):
        c = c*2
        if c > b:
            x = i
            break
elif c == b:
    x = 1
else:
    x = 0


if (x+y) <= k:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

ans = 0
for x in range(k+1):
    for y in range(k+1-x):
        for z in range(k+1-x-y):
            if b*2**y > a*2**x and c*2**z > b*2**y:
                ans += 1
#print(ans)

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

Submission status: Accepted

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

flag = 0
count = 0

while flag == 0 and count < K:
    if data[1] <= data[0]:
        data[1] *= 2
    elif data[2] <= data[1]:
        data[2] *= 2
    if data[0] < data[1] and data[1] < data[2]:
        flag = 1
    count += 1
    
if flag == 1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
from itertools import * 
*x,=map(int,input().split())
K=int(input())
c = combinations_with_replacement(range(3), K)
a=x.copy()
ans=0
for i in c:
    a=x.copy()
    for j in i:
        a[j] = a[j] * 2
        if a[0] < a[1] and a[1] < a[2]: 
            ans=1
if ans==1: 
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
nums = [int(x) for x in input().split()]
k = int(input())

# R < G < B の関係性が成り立つようにする。
# 一度の操作で任意のカードの数字を二倍にできる　⇒  数字の操作はnums[x] }* (2**n)ということ。
# k回の2倍化処理が可能で、カードの種類は3種類なので、 3**k通りのパターンが考えられる。

def nums_check(nums):
      if nums[0] < nums[1] and nums[1] < nums[2]:
            return True
      else:
            return False

for i in range(k):
      if nums_check(nums) == True:
            break
      elif nums[0] >= nums[1]:
            nums[1] *= 2
      elif nums[1] >= nums[2]:
            nums[2] *= 2

print("Yes") if nums_check(nums) == True 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>=c:
        c=c*2
    elif a<=c and b>=c:
        c=c*2
    elif a<=c and b<=a:
        b=b*2
    elif c>=b and b>=a:
        c=c*2

if c>b and a<b:
    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):
    if G <= R:
        G *= 2
    elif B <= G:
        B *= 2
    # print('Green: ' + str(G) + ' blue:' + str(B))



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

Submission status: Accepted

Solution code:
abc = list(map(int, input().split()))
K = int(input())
tmp = [i for i in range(K)]
ans = 'No'

for i in range(K + 1):
    for j in range(K + 1):
        for k in range(K + 1):
            if i + j + k == K:
                tmpabc = []
                tmplst = [i, j, k]
                for l in range(3):
                    tmpabc.append(abc[l] * (2 ** tmplst[l]))
                if tmpabc[0] < tmpabc[1] and tmpabc[1] < tmpabc[2]:
                    ans = 'Yes'
                    break

print(ans)

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=B*2
    elif(B>=C):
        C=C*2
    else:
        break
        
    
if (C>B >A):
     print('Yes')
else:
     print('No')

Submission status: Accepted

Solution code:
A,B,C = map(int, input().split())
flag = False
K = int(input())
for i in range (K+1):
    for t in range (K+1):
        for u  in range(K+1):
            if i + t + u == K:
                if B * (2**t) > A * (2**i) and C * (2**u) > B * (2**t):
                    flag = True
if flag:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import itertools
abc = list(map(int, input().split()))
K = int(input())
tmp = [i for i in range(K)]
ans = 'No'

for i in range(K + 1):
    for j in range(K + 1):
        for k in range(K + 1):
            if i + j + k == K:
                tmpabc = []
                tmplst = [i, j, k]
                for l in range(3):
                    tmpabc.append(abc[l] * (2 ** tmplst[l]))
                if tmpabc[0] < tmpabc[1] and tmpabc[1] < tmpabc[2]:
                    ans = 'Yes'
                    break

print(ans)

Submission status: Accepted

Solution code:
import itertools

A, B, C = map(int, input().split())
k = int(input())
l = ['a', 'b', 'c']
for v in itertools.combinations_with_replacement(l, k):
  new_A = A * (2**(v.count('a')))
  new_B = B * (2**(v.count('b')))
  new_C = C * (2**(v.count('c')))
  if new_A < new_B < new_C:
    print('Yes')
    exit()
    
print('No')

Submission status: Accepted

Solution code:
import sys
import os
# import math
# input = sys.stdin.readline

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


def str_array():
    return input().strip().split()

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

def take_input():
	if os.environ.get("check"):
		sys.stdin = open('input.txt', 'r') 
		sys.stdout = open('output.txt', 'w')
		
take_input()
######################### TEMPLATE ENDS HERE #################################

a,b,c = int_array()
k = int(input())

# conditions
#c>b>a

count = 0

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

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

Submission status: Accepted

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

AA = A
BB = B
CC = C

count = 0

for i in range(K):
    if AA < BB < CC:
        print("Yes")
        break
    elif CC <= AA or CC <= BB:
        CC *= 2
        count +=1
    elif BB <= AA:
        BB *= 2
        count +=1

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

Submission status: Accepted

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


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

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

Submission status: Accepted

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

for _ in range(k):
    if r >= g:
        g *= 2
    elif g >= b:
        b *= 2
    
    if r < g and g < b:
        print('Yes')
        exit()

print('No')

Submission status: Accepted

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

count = 0
while count < k:
  if a<b and b<c:
    print('Yes')
    exit()
  elif a >= b:
    b *= 2
    count += 1
  elif b >= c:
    c *= 2
    count += 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
[r,g,b]=list(map(int,input().split()))
#b>g>r
k=int(input())
m=k
n=0
while m>=0:
  tg=pow(2,m)*g
  tb=pow(2,n)*b
  if tg>r and tb>tg:
    print("Yes")
    exit(0)
  m-=1
  n+=1
print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
"""
AtCoder :: M-Solutions Programming Contest 2020 :: Magic 2
https://atcoder.jp/contests/m-solutions2020/tasks/m_solutions2020_b
"""
import sys


def solve(red, green, blue, K):
    """Solve puzzle."""
    # 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.
    for _ in range(K):
        if green > red and blue > green:
            return True

        if red >= green:
            green *= 2
        else:
            blue *= 2

    return green > red and blue > green


def main():
    """Main program."""
    red, green, blue = (int(i) for i in sys.stdin.readline().split())
    K = int(sys.stdin.readline())
    if solve(red, green, blue, K):
        print('Yes')
    else:
        print('No')
    

if __name__ == '__main__':
    main()