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

i = 0
while a >= b:
  b = b * 2
  i += 1
while b >= c:
  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())
x = 0
if A >= B:
    x += len(str(bin(A//B)))-2
    B *= 2**x
if B >= C:
    x += len(str(bin(B//C)))-2
#print(x)
if x <= K:
    print('Yes')
if x > K:
    print('No')

Submission status: Accepted

Solution code:
i = list(map(int,input().split()))
k = int(input())
p = 0
q = 0
while i[0] >= i[1]:
    i[1] = 2 * i[1] 
    p = p + 1

while i[1] >= i[2]:
    i[2] = 2 * i[2]
    q = q + 1
r = p + q
if r <= k:
    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:
# 2020/07/25
# M-SOLUTIONS プロコンオープン 2020 - B

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

# Calc
idx = 0
while idx < k:
    if a >= b:
        b = b * 2
    elif b >= c:
        c = c * 2
    else:
        break
    idx = idx + 1

if a < b and b < c:
    ans = 'Yes'
else:
    ans = 'No'

# Output
print(ans)

Submission status: Accepted

Solution code:
import sys
import itertools
import copy
ORG=map(int, sys.stdin.readline().split())
K=int(sys.stdin.readline().strip())
L=list( itertools.product(range(3), repeat=K) )

for l in L:
    ABC=copy.deepcopy(ORG)
    for x in l:
        ABC[x]*=2
    if ABC[0]<ABC[1]<ABC[2]:
        print "Yes"
        quit()
else:
    print "No"

Submission status: Accepted

Solution code:
rgb = list(map(int, input().split(' ')))
r = rgb[0]
g = rgb[1]
b = rgb[2]
k = int(input())

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

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")

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

while b <= a:
    b *= 2
    k -= 1
    if k < 0:
        print('No')
        sys.exit()

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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 and k >= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import numpy as np

YES = "Yes"  # type: str
NO = "No"  # type: str

def judge(A, B, C):
    return (B>A and C>B)

def solve(A: int, B: int, C: int, K: int):

    for i in range(K+1):
        for j in range(K-i+1):
            for k in range(K-i-j+1):
                aa = A*(2**i)
                bb = B*(2**j)
                cc = C*(2**k)
                if judge(aa,bb,cc):
                    print(YES)
                    return

    print(NO)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    solve(A, B, C, K)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# @uthor : Kaleab Asfaw
import sys

input = sys.stdin.readline

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


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

a,b,c = inpl()
K = inp()
for i in range(8):
    for j in range(8):
        for k in range(8):
            if i+j+k > K: 
                continue
            na = a*2**i
            nb = b*2**j
            nc = c*2**k
            if nb > na and nc > nb:
                print('Yes')
                quit()
print('No')

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def exit(*argv, **kwarg):
    print(*argv, **kwarg)
    sys.exit()


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと


def a_int(): return int(read())


def ints(): return list(map(int, read().split()))


def read_col(H):
    '''H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_tuple(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_matrix(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


MOD = 10**9 + 7
INF = 2**31  # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter, xor, add
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right
from functools import reduce

A, B, C = ints()
K = a_int()

# 全部試してもいいかな
for a in range(K + 1):
    for b in range(a, K + 1):
        if a + b > K:
            break
        c = K - a - b
        if A * pow(2, a) < B * pow(2, b) < C * pow(2, c):
            exit('Yes')
print('No')

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
K = int(input())
a,b,c = A,B,C
n = 0
while a >= b:
    b *= 2
    n += 1
    if n > K:
        print("No")
        exit()

while b >= c:
    c *= 2
    n += 1
    if n > K:
        print("No")
        exit()
print("Yes")

Submission status: Accepted

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

for i in range(k):
  if ( a >= b):
    b=b*2
    continue
  elif ( b >= c ):
    c=c*2
    continue
  else:
    break
    
if (a<b and b<c):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys
 
def main():
  a,b,c = map(lambda x: int(x), input().split())
  k = int(input())
 
  for _ in range(k):
      if b <= a:
          b = 2 * b
          continue
      if c <= b:
          c = 2 * c
          continue
      print('Yes')
      return
 
  if (a < b) & (b < c):
      print('Yes')
      return
  print('No')
 
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/bin/python3

import os
import sys
from collections import *
from queue import *
import math
def main():
	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")

if __name__ == '__main__':
	#sys.stdin = open("input","r")
	#sys.stdout = open("output","w")
	main()

Submission status: Accepted

Solution code:
# Template 1.0
import sys, re
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log,floor
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a,b,c = MAP()

k = INT()

z = 0

for i in range(100):
    if(b>a):
        break
    b*=2
    z+=1

for i in range(1000):
    if(c>b):
        break
    c*=2
    z+=1
# print(z)
if(z<=k):
    print("Yes")
else:
    print("No")



# temp = floor(log(a/b, 2))+1
# if(temp>0):
#     b=b*(2**temp)
#
# temp1 = floor(log(b/c, 2))+1
# # print(temp, b, temp1)
# if(temp+temp1<=k):
#     print("Yes")
# else:
#     print("No")

Submission status: Accepted

Solution code:
[r, g, b] = map(int,input().split(' '))
K = int(input())
loop = 1
flag = False

while loop <= K+1:
  if b <= r or b <= g:
    b*=2
    loop += 1
    continue
  if g <= r:
    g*=2
    loop += 1
    continue
  if r < g < b:
    flag = True
    break
  loop += 1
  
if flag:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

for i in range(k):
  if a < b:
    break
  b *= 2
  #print("1 a:{} b:{} c:{}".format(a, b, c))
  cnt += 1

for i in range(k - cnt):
  if b < c:
    break
  c *= 2
  #print("2 a:{} b:{} c:{}".format(a, b, c))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def judge(red, green,blue):
    if blue > green:
        if green > red:
            return (True)
    else:
        return(False)


def main():
    red, green, blue  = map(int, input().split())
    K = int(input())

    while(K > 0):
        if green <= red:
            green *= 2
            K -= 1
            continue
        if blue <= green:
            blue *= 2
            K -= 1
            continue
        if judge(red, green, blue):
            break
        
    if judge(red, green, blue):
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# スペース区切りの整数の入力
a, b, c = map(int, input().split())
# 整数の入力
k = int(input())

for c_i in range(k+1):
    #print(c_i)
    for b_i in range(k-c_i+1):
        t_c = c*(2**c_i)
        t_b = b*(2**b_i)
        t_a = a*(2**(k-b_i-c_i))
        #print("t_c:{}, c_i:{}".format(t_c, c_i))
        #print("t_b:{}, b_i:{}".format(t_b, b_i))
        #print("t_a:{}, a_i:{}".format(t_a, k-b_i-c_i))
        if t_c > t_b > t_a:
            print("Yes")
            exit(0)

print("No")

Submission status: Accepted

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

rest = k
while True:
    if rest == 0 or (a < b and b < c):
        break

    if a >= b:
        b *= 2
        rest -= 1
        continue
    
    if a >= c or b >= c:
        c *= 2
        rest -= 1
        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())
for _ in range(k):
  if a<b<c:
    print('Yes')
    exit()
  elif a>=b:
    b=b*2
  else:
    c=c*2
if a<b<c:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
A, B, C = list(map(int, input().split()))
K = int(input())
flag = False
for i in range(K):
    b = (2 ** i) * B
    c = (2 ** (K - i)) * C
    if A < b < c:
        flag = True
if flag:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

# def gr(green,red):
#     # if g r: return Tree
#     # else: return False
#     return red < green
# def bg(brue,green):
#     # if g r: return Tree
#     # else: return False
#     return green < brue

def dfs(i ,r,g,b):
    if i>k:
        return False
    if r<g<b:
        return True
    if dfs(i+1,r*2,g,b): return True
    if dfs(i+1,r,g*2,b): return True
    if dfs(i+1,r,g,b*2): return True

    return False

if dfs(0,r,g,b):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

cnt=0

for i in range(k):
	if b>a:
		break
	b*=2
	cnt+=1
for i in range(k-cnt):
	c*=2

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = int(input())
# c > b > aならyes(k回だけどれかを2倍にできる)
# 何倍すればいいか
cnt = 0
# for i in range(k):
while not(b > a):
    b *= 2
    cnt += 1

while not(c > b):
    c *= 2
    cnt += 1

if cnt > k:
    ans = "No"
else:
    ans = "Yes"
print(ans)
# a_b = 0
# b_c = 0
# if a >= b:
#     if a % b == 0:
#         a_b = a // b 
#     else:
#         a_b = a // b + 1
# print(a_b)
# if a_b != 0:
#     b = b * a_b * 2
# if b >= c:
#     if b % c == 0:
#         b_c = b // c
#     else:
#         b_c = b // c + 1

# if a_b + b_c > k:
#     print("No")
# else:
#     print("Yes")

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = int(input())
ans = "No"
for ia in range(k + 1):
    for ib in range(k + 1):
        for ic in range(k + 1):
            if ia + ib + ic > k:
                break
            if (b * 2 ** ib > a * 2 ** ia) and (c * 2 ** ic > b * 2 ** ib):
                ans = "Yes"
print(ans)

Submission status: Accepted

Solution code:


A, B, C = map(int, input().split())
K = int(input())
i = 0
while i < K:
  if A >= B:
    B *= 2
    i += 1
  else:
    break
while i < K:
  if B >= C:
    C *= 2
    i += 1
  else:
    break
#print(i)
#print(A, B, C)
if A < B and B < C:
  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
        if k < 0:
            print('No')
            exit()
    while c <= b:
        c *= 2
        k -= 1
        if k < 0:
            print('No')
            exit()
    if a < b < c:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
red,green,blue=map(int,input().split())
k=int(input())
for i in range(k+1):
  if red<green<blue:
    print('Yes')
    sys.exit()
  elif green<=red:
    green*=2
  elif blue<=green:
    blue*=2
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
  if(b >= c):
    c*=2
    continue
  if(a<=b and b<=c):
      c*=2
      continue


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

Submission status: Accepted

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

Submission status: Accepted

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

K2 = 0
if B>A:#緑>赤
    if C>B:#青>緑
        pass
    else:#緑>青
        while B>=C:
            C = C*2
            K2 = K2 +1
            if C>B:
                break
else:#赤>緑
    while A>=B:
        B = B*2
        K2 = K2 +1
        if B>A:
            break
    if C>B:#青>緑
        pass
    else:#緑>青
        while B>=C:
            C = C*2
            K2 = K2 +1
            if C>B:
                break

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
K=int(input())
while B<=A:
  B=B*2
  K=K-1
while C<=B:
  C=C*2
  K=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())
M=K
for i in range(K):
    if A>=B:
        B=B*2
        M=K-(i+1)
    if A<B:
        break
C=C*(2**M)
if C>B and A<B:
    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):
    if a >= b:
        b = 2 * b
    elif b >= c:
        c = 2 * c
    count += 1

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

Submission status: Accepted

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

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

Submission status: Accepted

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

# red, green, blue

# green > red
# blue > green

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

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

Submission status: Accepted

Solution code:
A,B,C = map(int, input().split())
K = int(input())
# A: aka < B: midori < C: ao
def F(d):
    for i in range(K):
        for j in range(K - i):
            for k in range(K - i - j+1):
                a = A*2**i
                b = B*2**j
                c = C*2**k
                #print("a:",a, ",b:",b, ",c:",c)
                if a<b and b<c:
                    d = 1
                    return "Yes"
    if d ==0:
        return "No"

print(F(0))

Submission status: Accepted

Solution code:
A,B,C = list(map(int,input().split()))
K = int(input())
flag= 0
for i in range(K):
    if A>=B:
        B *=2
    elif C <= B:
        C *=2
    if C >B and B>A:
        flag = 1
        break
if flag == 0:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
a,b,c =map(int,input().split())
p=int(input())
 
cnt=0
 
for i in range(1,p+2):
    for j in range(1,p+2):
        for k in range(1,p+2):
            if i+j+k==p+3 and a*2**(i-1) < b*2**(j-1) and b*2**(j-1) < c*2**(k-1):
                cnt+=1
 
if cnt >0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

    if a>=b:
        b*=2
    elif b>=c:
        c*=2
    elif b>a and c>b:
        break
    cnt+=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())

for a in range(K+1):
    for b in range(K+1):
        c = K - (a + b)
        if (c >= 0) and (a + b + c <= K):
            if ((2**a)*A < (2**b)*B) and ((2**b)*B < (2**c)*C):
                print('Yes')
                exit()

print('No')

Submission status: Accepted

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

ans=0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding: UTF-8
import itertools
import copy
 
A,B,C = map(int, input().split())
K = int(input())


L = list(itertools.product(range(3), repeat=K))
#print(A)
flag = 0
for l in L:
  if flag ==1:
    break
  a = copy.deepcopy(A)
  b = copy.deepcopy(B)
  c = copy.deepcopy(C)
  for k in range(K):
    #k回目の処理
    if l[k] ==0:
      a *=2
    elif l[k] ==1:
      b *=2
    else:
      c *=2
    
    #判定
    if a<b and b<c:
      #print(l,a,b,c)
      print("Yes")
      flag = 1
      break
    
  
if flag ==0:
  print("No")

Submission status: Accepted

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

resolve()

Submission status: Accepted

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

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


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

Submission status: Accepted

Solution code:
a,b,c=(int(x) for x in input().split())
k=int(input())
flag=True
for i in range(k+1):
    if a<2**(k-i)*b and 2**(k-i)*b<2**i*c:
        print("Yes")
        exit()
        flag=False
        break
if flag:
    print("No")

Submission status: Accepted

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

while k > 0:
  if not b > a:
    b *= 2
    k -= 1
  elif not c > b:
    c *= 2
    k -= 1
  else:
    ans = "Yes"
    break

if c > b > a:
  ans = "Yes"

print(ans)

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

ans = 'No'

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

print(ans)

Submission status: Accepted

Solution code:
# 初期入力
import sys
input = sys.stdin.readline  #文字列では使わない
A,B,C = map(int, input().split())
K = int(input())

count =0
for i in range(20):
    if count >=K:
        break
    else:
        if A >=B:
            B *=2
            count +=1
            continue
        if B >=C:
            C *=2
            count +=1
        if A < B <C:
            print("Yes")
            sys.exit()
        
print("No")

Submission status: Accepted

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

def Base_to_3(X):
    if(int(X/3)):
        return Base_to_3(int(X/3))+str(X%3)
    return str(X%3)

for i in range(3**k):
    comb = Base_to_3(i)
    red = a*(2**comb.count('0'))
    green = b*(2**comb.count('1'))
    blue = c*(2**comb.count('2'))
    if red < green and green < blue:
        print('Yes')
        exit()

print('No')

Submission status: Accepted

Solution code:
def II(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
A,B,C=MI()
K=II()
i=0
while A>=B:
  B*=2
  i+=1
  if i>K:
    print('No')
    exit()
while B>=C:
  C*=2
  i+=1
  if i>K:
    print('No')
    exit()
print('Yes')

Submission status: Accepted

Solution code:
import sys

a, b, c = map(int, input().split())
k = int(input())
for x in range(k+1):
    for y in range(x, k+1):
        if a * (2**x) < b * (2**(y-x)) < c* (2**(k-x-y)):
            print("Yes")
            sys.exit()
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
        else:
            if B >= C:
                C *= 2
    if A < B and B < C:
        print('Yes')
    else:
        print('No')
main()

Submission status: Accepted

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

for i in range(4):
    if 2 ** i * b > a:
        n0 = i
        break

if 2 ** (k-n0) * c > 2 ** n0 * b:
    ans = "Yes"
else:
    ans = "No"
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

while True:
    if a >= b:
        b *= 2
        # print(b)
        k -= 1
    else:
        break
while True:
    if b >= c:
        c *= 2
        # print(c)
        k -= 1
    else:
        break

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

Submission status: Accepted

Solution code:
import sys

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

x=0
for i in range(K):
  if B > A:
    break
  B = B*2
  x += 1
  if i == K-1:
    ans = 'No'
    print(ans)
    sys.exit()

ans = 'Yes' if C*2**(K-x) > B else 'No'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_ = input()
a = int(input_.split(' ')[0])
b = int(input_.split(' ')[1])
c = int(input_.split(' ')[2])
k = int(input())
count = 0
ans = "No"
while count < k:
  if a >= b:
    b *= 2
    count += 1
  elif b >= c:
    c *= 2
    count += 1
  if a < b and b < c:
    ans = "Yes"
    break

print(ans)

Submission status: Accepted

Solution code:
A, B, C=map(int, input().split())
K=int(input())
K1=K
ans="No"
if A >= B:
    for i in range(K1):
        K=K-1
        B=B*2
        if B > A:
            break

K2=K
if K2==0 and C > B:
    ans="Yes"

for j in range(K2):
    K=K-1
    C=C*2
    if C > B:
        ans="Yes"
        break

print(ans)

Submission status: Accepted

Solution code:
abc = input().split()
r = int(abc[0])
g = int(abc[1])
b = int(abc[2])
k = int(input())

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python

ta, tb, tc = map(int, input().split())
k = int(input())

def dfs(s):
    a = ta
    b = tb
    c = tc
    if len(s) == k:
        #print(s)
        for i in range(k):
            if 'A' == s[i]:
                a *= 2
            elif 'B' == s[i]:
                b *= 2
            elif 'C' == s[i]:
                c *= 2
        if c > b > a:
            print('Yes')
            exit(0)
        return
    dfs(s+'A')
    dfs(s+'B')
    dfs(s+'C')

dfs('')

print('No')

Submission status: Accepted

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

tag=False
for i in range(K+1):
    for j in range(K-i+1):
        for k in range(K-i-j+1):
            if (b*(2**j)) > (a*(2**i)) and (c*(2**k)) > (b*(2**j)):
                tag=True
if tag:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

while r>=g:
  g*=2
  count=count-1

while g>=b:
  b*=2
  count=count-1

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

Submission status: Accepted

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

cnt = 0
Ans = "No"

while cnt <= K:
  if A >= B:
    B *= 2
    cnt += 1
  else:
    break
    
while cnt <= K:
  if B >= C:
    C *= 2
    cnt += 1
  else:
    Ans = "Yes"
    break

print(Ans)

Submission status: Accepted

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

for i in range(k):
    if r >= g:
        g *= 2
    elif g >= b:
        b *= 2
    
if r < g < b:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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