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: Wrong Answer

Solution code:
#: Author - Soumya Saurav
import sys,io,os,time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"

input = sys.stdin.readline

########################################
a , b , c  = map(int, input().split())
k = int(input())
if a < b < c:
	print("Yes")
	exit()

while b < a:
	if k == 0:
		exit(print("No"))
	b*=2
	#print("b:",b )
	k-=1

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

Submission status: Wrong Answer

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

cnt=0

for i in range(k):
	b*=2
	cnt+=1

for i in range(k-cnt):
	c*=2

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

Submission status: Wrong Answer

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

for kkk in range(0, K-1):
    if B < A:
        B *= 2
    if C < B:
        C *= 2

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

    if A < B and B < C:
        print("Yes")
        break
    elif i == N-1:
        print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

for i in range(K):
    if (B<A):
        B=B*2
        continue

    if (C>B):
        break
    else:
        C=C*2
        continue
        
if (A<B) and (B<C):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if (a>=b) and (b>=c):
    while (a>=b):
        b = b*2
        ans+=1
    while (b>=c):
        c = c*2
        ans+=1  
elif (a>=b) and (c>b):
    while (a>=b):
        b = b*2
        ans+=1
elif (b>=c) and (b>a):
    while (b>=c):
        c = c*2
        ans+=1 

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

Submission status: Wrong Answer

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

ans=0

while b <= a:
  b=b*2
  ans += 1
  
while c <= b:
  c=c*2
  ans += 1

if ans <= k:print("YES")
else:print("NO")

Submission status: Wrong Answer

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

k = int(input())

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

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

print('No')

Submission status: Wrong Answer

Solution code:
A,B,C = map(int, input().split())
K = int(input())
# A: aka < B: midori < C: ao
d = 0
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
            if a<b and b<c:
                print("Yes")
                d = 1
                break
if d ==0:
    print("No")

Submission status: Wrong Answer

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


def magic_works(red, green, blue):
    # The integer on the green card is strictly greater than the integer on the red card.
    if green <= red:
        return False
    # The integer on the blue card is strictly greater than the integer on the green card.
    if blue <= green:
        return False

    return True


def solve(red, green, blue, K):
    """Solve puzzle."""
    for _ in range(K):
        if red > green:
            green *= 2
        else:
            blue *= 2
    return magic_works(red, green, blue)


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

A, B, C = 7, 2, 5
K = 3


A, B, C = 7, 4, 2
K = 3
A, B, C = map(int,input().split())
K = int(input())

def calculate(a, b, c, k):
    res1 = math.ceil(math.log((a+1) / b, 2))
    m = (b * 2 ** res1) + 1
    res2 = math.ceil(math.log(m / c, 2))
    if (res1 + res2) <= k:
        print("Yes")
    else:
        print("No")

calculate(A, B, C, K)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

    if A < B and B < C:
        print("yes")
        break
    elif i == N-1:
        print("no")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for kkk in range(0, K):
    if B < A:
        B *= 2
    if C < B:
        C *= 2

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

Submission status: Wrong Answer

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

for i in range(k):

    if li[0] > li[1]:
        li[1]=li[1]*2
    else:
        li[2]=li[2]*2
    if li[0] < li[1] and li[1] < li[2]:
        print("Yes")
        quit()
print("No")

Submission status: Wrong Answer

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

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

if cnt >= K and B > C:
    print("No")
else:
    while B > C and cnt <= K:
        C = C*2
        cnt += 1

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

Submission status: Wrong Answer

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

for i in range(1, K+1):
  _B = B * (2 ** i)
  if A < _B:
    for j in range(1, K+1-i):
      _C = C * (2 ** j)
      if _B < _C:
        print('Yes')
        break
    else:
      continue
    break
else:
  print('No')

Submission status: Wrong Answer

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

for i in range(K1):
    K=K-1
    B=B*2
    if B > A:
        break

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

print(ans)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

for i in range(K+1):
  if( i == K ):
    break
  for j in range(K+1):
    if( i + j == K ):
      break
    for k in range(K+1):
      if( i + j + k == K ):
        break
      if A*(2**i) < B*(2**j) < C*(2**k):
        print("Yes")
        exit()
     
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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


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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

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

count = 0

while count < K:
    if A > B:
        B *= 2
        count += 1
    if B > C:
        C *= 2
        count += 1
    if A < B < C:
        print('Yes')
        sys.exit()

print('No')

Submission status: Wrong Answer

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

for i in range(k):
  if k == 0:
    break
  else:
    if b > c:
      c *= 2
      k -= 1
    else:
      pass
    
    if a > b:
      b *= 2
      k -= 1
    else:
      pass

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

print(result)

Submission status: Wrong Answer

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

for a in range(A):
    for b in range(B):
        for c in range(C):
            if a + b + c <= K:
                if B**b > A**a and C**c > B**b:
                    ans = 'Yes'

print(ans)

Submission status: Wrong Answer

Solution code:
A,B,C = map(int, input().split())
K = int(input())
# A: aka < B: midori < C: ao
d = 0
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
                break
if d ==0:
    print("No")

Submission status: Wrong Answer

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


if a>=b or b>=c:
    print('No')

Submission status: Wrong Answer

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

red, green, blue = A, B, C

ans = "No"

from itertools import product

for p in product(range(3),repeat=K):
    red_tmp = red * 2 * p.count(0)
    green_tmp = green ** 2 * p.count(1)
    blue_tmp = blue ** 2 * p.count(2)
    
    if blue_tmp > green_tmp > red_tmp:
        ans = "Yes"
        break
    
print(ans)

Submission status: Wrong Answer

Solution code:
import math
import collections
import fractions
import itertools
import functools
import operator

def solve():
    a, b, c = map(int, input().split())
    k = int(input())
    i = k
    for p in range(i+1):
        for q in range(i-p):
            for r in range(i-p-q):
                if a**max(p, 1) < b**max(q, 1) < c**max(r, 1):
                    print("Yes")
                    exit()
    print("No")
    return 0

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1,k+1):
    min_val = min(abc)
    min_idx = abc.index(min_val)
    abc[min_idx] *= 2

if abc[0] < abc[1] and abc[1] < abc[2]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

print('No')

Submission status: Wrong Answer

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

while n > 0:
    if flg == 0:
        b = b * 2
        n = n - 1
        #print(a,b,c)
        if a < b:
            flg = 1
            if b < c:
                print('Yes')
                exit()
    else:
        c = c * 2
        n = n - 1
        #print(a,b,c)
        if b < c:
            print('Yes')
            exit()

print('No')

Submission status: Wrong Answer

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

A, B, C = int(A), int(B), int(C)

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

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

Submission status: Wrong Answer

Solution code:
import random

def Magic2():
    
    num = list(map(int,input().split()))

    count = int(input())

    for i in range(count):
        select = random.randint(0, 2)
        
        num[select] = 2.*num[select]
        
    if num[0] < num[1] and num[1] < num[2]:
        print('Yes')
        
    else:
        print('No')
        

if __name__ == '__main__':
    Magic2()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys


def resolve(in_):
    a, b, c = map(int, next(in_).split())
    k = int(next(in_))
    for _ in range(k):
        if a >= b:
            b * 2
        elif b >= c:
            c * 2
        else:
            break
    return 'Yes' if a < b and b < c else 'No'


def main():
    answer = resolve(sys.stdin.buffer)
    print(answer)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
array = list(map(int, input().split(' ')))

K = int(input())

for i in range(K):
  if array[2] == max(array):
    if array[0] > array[1]:
      array[1] = array[1] * 2
    else:
      array[0] = array [0] * 2
  else:
    array[2] = array[2] * 2

if array[0] < array[1] and array[1] < array[2]:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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

if K - Ak > 0:
    for j in range(K - Ak):
        if B > C:
            C = C * 2
else:
    print("No")
    exit(0)

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
def main():
    A, B, C = map(int, input().split())
    K = int(input())
    for i in range(K):
        if A < B:
            break
        B *= 2
    K -= i
    for i in range(K):
        if B < C:
            break
        C *= 2
    if A < B and B < C:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
A, B, C = [int(n) for n in input().split()]
K = int(input())
a = (A+B-1)//B
b = (A+C-1)//C
print('Yes' if (a+b)//2<=K and A<B*a<C*b else 'No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

while(A>B and K > 0):
    B *=2
    K -=1

while(B>C and K > 0 ):
    C *=2
    K -=1

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

Submission status: Wrong Answer

Solution code:
import sys
import math
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
a,b,c=get_ints()
k=int(input())
x,y,z=0,0,0
if c>b and b>a:
    print("Yes")
else:
    for i in range(k):
        x=x+1
        b=2*b
        if b>a:
            y=1
            break
    if y==1:
        if c>b:
            print("Yes")
        else:
            for j in range(k-x):
                c=c*2
                if c>b:
                    z=1
                    break
            if z==1:
                print("Yes")
            else:
                print("No")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import sqrt,ceil,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())


# for _ in range(ii()):

a,b,c=mi()
k=ii()
for i in range(k):
    if a>b:
        b*=2
    else:
        c*=2
if a<b<c:
    print("Yes")
else:
    print('No')

Submission status: Wrong Answer

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

for i in range(k):
    if r < g < b:
        break
    else:
        if b < g and b < r:
            b *= 2
        elif g < r:
            g *= 2
        else:
            r *= 2

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
k = int(input())
#青＞緑＞赤
r,g,b = 0,0,0
for i,num in enumerate(a):
    if i==0:
        r = num
    elif i==1:
        g = num
    elif i==2:
        b = num

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

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

Submission status: Wrong Answer

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
#a>b>c

var = False

for i 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: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
a,b,c=map(int,stdin.readline().split())
k=int(stdin.readline())
for i in range(k):
  if i%2!=0:
    c*=k
  if i%2==0:
    b*=k
if c>b and b>a:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:

a, b, c = (int(x) for x in input().split())
k = int(input())

ans = 'No'

for i in range(k):

    if c < b : 
        c = c * 2
    else :
        if b < a :
            b = b * 2

    # print("A : {0}".format(a))
    # print("B : {0}".format(b))
    # print("C : {0}".format(c))

    if a < b < c :
        ans = 'Yes'
        break

print(ans)

Submission status: Wrong Answer

Solution code:
x,y,z=map(int,input().split())
K=int(input())
flag=0
while K!=0:
    if z>y and y>x:
        print('Yes')
        # flag=-1
        break
    else:
        while y<x:
            y*=2
            K-=1
            if K==0:
                flag=1
                break
        while z<y:
            z*=2
            if K==0:
                flag=1
                break
            K-=1
    if flag==1:
        break
if z>y and y>x:
    
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys


def resolve(in_):
    a, b, c = map(int, next(in_).split())
    k = int(next(in_))
    for _ in range(7):
        if a >= b:
            b * 2
        elif b >= c:
            c * 2
        else:
            break
    return 'Yes' if a < b and b < c else 'No'


def main():
    answer = resolve(sys.stdin.buffer)
    print(answer)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

ans = "No"
for bi in range(k):
    ci = k - bi
    bb = b
    cc = c * (2 ** ci)
    for _ in range(bi):
        bb *= 2
        if a < bb and bb < cc:
            ans = "Yes"
            break

print(ans)

Submission status: Wrong Answer

Solution code:

R,G,B=map(int,input().split())
K = int(input())
i = 1
while i <= K and not(R<G and G<B):
    if R>=G:
        G = G*2
        i+=1
    if G>=B:
        B = B*2
        i+=1
if R<G and G<B:
    print("Yes")
else:
    print('No')

Submission status: Wrong Answer

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

for i in range(K + 1):
  for j in range(0, K + 1 - i):
    b = B * (2 ** i)
    c = C * (2 ** i)
    if A < b < c:
      print("Yes")
      quit()
      
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 'No'
for j in range(1,K+1):
    G = B*2*(j)
    Bl = C*2*(K-j)
    if G > A and Bl > G :
        ans = 'Yes'
        break

print(ans)

Submission status: Wrong Answer

Solution code:
import sys

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


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

while A > B and cnt >= K:
    B = B*2
    cnt += 1

if cnt >= K and B > C:
    print("No")
else:
    while B > C and cnt >= K:
        C = C*2
        cnt += 1

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

Submission status: Wrong Answer

Solution code:
l = list(map(int,input().split()))
r, g, b = l[0], l[1], l[2]
k = int(input())
 
for _ in range(k):
  if r >= g:
    g *= 2
  elif g >= b:
    b *= 2
  else:
    print('Yes')
    break
 
if b > g and g > r:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import math
import collections
import fractions
import itertools
import functools
import operator

def solve():
    a, b, c = map(int, input().split())
    k = int(input())
    i = k+1
    for p in range(i):
        for q in range(i-p):
            for r in range(i-p-q):
                if a**p < b**q < c**r:
                    print("Yes")
                    exit()
    print("No")
    return 0

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

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


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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
# 幅優先探索（行きがけ）
import collections
import sys
import copy
import re
import math


def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    A, B, C = LI()
    K = I()
    for i in range(K):
        if A >= B:
            B *= 2
        else:
            K -= (i)
            break

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
k = int(input())
x = 0
for i in range(1,k+1):
    if 2*i*b > a:
        x += i
        break
else:
    x += k
y = k-x if k-x >= 1 else 1
if 2*y*c > 2*x*b:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

# 求解処理
ans = str()
k_b = math.floor(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: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A_list = list(map(int, input().split()))
K = int(input())
sort_ = sorted(A_list)
if(A_list == sort_):
  print("Yes")
  exit()
  
  
for i in range(K):
  if(A_list[0]>=A_list[1]):
    A_list[1] = A_list[1]*2
  elif(A_list[1]>=A_list[2]):
    A_list[2] = A_list[2]*2
  else:
    exit()
  #print(A_list)
    
    
sort_ = sorted(A_list)
set_ = sorted(list(set(A_list)))
#print(A_list,set_)
if(A_list != set_):
  print("No")
elif(A_list == sort_):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

if A<B*2 and B*2<C*4:
  print("Yes")
  exit()
elif A<B*4 and B*4<C*2:
  print("Yes")
  exit()  
elif A<B and B<C*8:
  print("Yes")
  exit()
elif A<B and B<C*8:
  print("Yes")
  exit()
else:  
  print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    a, b, c = list(map(int, input().split()))
    k = int(input())
    if b == 1 or c == 1:
        print('No')
        return
    count = 0
    while count < k:
        if b <= a:
            b *= 2
            count += 1
        elif c <= b:
            c *= 2
            count += 1
        else:
            break
    if a < b and b < c:
        print('Yes')
    else:
        print('No')

main()