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


for _ in range (K) :
    if R > G :
        G*=2
        continue
    # else:
    #     pass

    if G > B :
        B*=2
        continue
    # else:
    #     pass
    
if R < G < B :
    print('Yes')
else :
    print('No')

Submission status: Wrong Answer

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


for _ in range (K) :
    if R > G :
        G*=2
        continue
    else:
        pass

    if G > B :
        B*=2
        continue
    else:
        pass
    
if R < G < B :
    print('Yes')
else :
    print('No')

Submission status: Wrong Answer

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


for _ in range (K+1):
    if R > G :
        G*=2
        continue
    else:
        pass

    if G > B :
        B*=2
        continue
    else:
        pass
    
if R < G < B:
    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 :
        G*=2
        continue
    else:
        pass

    if G > B :
        B*=2
        continue
    else:
        pass
    
if R < G <B:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

l=[0,1,2,3,4,5,6,7]
for c  in itertools.permutations(l, 3):
    if sum(c) == K and A*2**c[0]<B*2**c[1] and B*2**c[1]<C*2**c[2]:
      print("Yes")
      exit(0)
print("No")

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

if A<B<C:
    print("Yes")
else:
    for k in range(1,K+1):
        for i in range(3**k):
            a,b,c=A,B,C
            for _ in range(k):
                if i%3==0:
                    a*=2
                elif i%3==1:
                    b*=2
                else:
                    c*=2
                i//=3
            if a<b<c:
                print("Yes")
                exit()
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

for _ in range(K):
    if A < B < C:
        break
    elif A > B:
        count += 1
        B *= 2
    elif B > C:
        count += 1
        C *= 2

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

Submission status: Wrong Answer

Solution code:
def main():
    a, b, c = [int(x) for x in input().split()]
    count = int(input())

    while a >= b:
        b *= 2
        count -= 1
    while b >= c:
        c *= 2
        count -= 1

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b, c = [int(x) for x in input().split()]
    count = int(input())

    while not a >= b:
        b *= 2
        count -= 1
    while not b >= c:
        c *= 2
        count -= 1

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
main=list(map(int,input().split()))
k=int(input())
for i in range(k):
    if(main[0]>main[1]):
        main[1]=main[1]*2
    elif(main[1]>main[2]):
        main[2]=main[2]*2
if(main[1]>main[0] and main[2]>main[1]): print('YES')
else: print('NO')

Submission status: Wrong Answer

Solution code:
"""
    Satwik_Tiwari ;) .
    24th july , 2020  - Friday
"""

#===============================================================================================
#importing some useful libraries.
from __future__ import division, print_function

from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase

from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter  # Counter(list)  return a dict with {key: count}
from itertools import combinations as comb # if a = [1,2,3] then print(list(comb(a,2))) -----> [(1, 2), (1, 3), (2, 3)]
from itertools import permutations as permutate
from bisect import bisect_left as bl
#If the element is already present in the list,
# the left most position where element has to be inserted is returned.
from bisect import bisect_right as br
from bisect import bisect
#If the element is already present in the list,
# the right most position where element has to be inserted is returned

#==============================================================================================
#fast I/O region
BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

# inp = lambda: sys.stdin.readline().rstrip("\r\n")

#===============================================================================================
#some shortcuts

mod = 1000000007
def inp(): return sys.stdin.readline().rstrip("\r\n") #for fast input
def out(var): sys.stdout.write(str(var))  #for fast output, always take string
def lis(): return list(map(int, inp().split()))
def stringlis(): return list(map(str, inp().split()))
def sep(): return map(int, inp().split())
def strsep(): return map(str, inp().split())
# def graph(vertex): return [[] for i in range(0,vertex+1)]
def zerolist(n): return [0]*n
def nextline(): out("\n")  #as stdout.write always print sring.
def testcase(t):
    for p in range(t):
        solve()
def printlist(a) :
    for p in range(0,len(a)):
        out(str(a[p]) + ' ')
def lcm(a,b): return (a*b)//gcd(a,b)
def power(a,b):
    ans = 1
    while(b>0):
        if(b%2==1):
            ans*=a
        a*=a
        b//=2
    return ans
def ncr(n,r): return factorial(n)//(factorial(r)*factorial(max(n-r,1)))
def isPrime(n) :
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) :
        if (n % i == 0 or n % (i + 2) == 0) :
            return False
        i = i + 6
    return True

#===============================================================================================
# code here ;))

def rec(a,b,c,k):
    # print(a,b,c)
    if(a<b<c):
        return True


    if(k>0):
        a1 = rec(a*2,b*2,c,k-1)
        a2 = rec(a*2,b,c*2,k-1)
        a3 = rec(a,b*2,c*2,k-1)

        return a1 or a2 or a3

# print(temp)
def solve():
    a,b,c = sep()
    k = int(inp())
    if(rec(a,b,c,k)):
        print('Yes')
    else:
        print('No')



testcase(1)
# testcase(int(inp()))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,C = [int(x) for x in input().split()]
K=int(input())
 
while(A>=B):
  B=B*2
  K-=1
  if K==0 and A>=B and B>=C:
    print("No")
    exit()
 
while(B>=C):
  C=C*2
  K-=1
  if K==0 and B>=C:
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
A,B,C = [int(x) for x in input().split()]
K=int(input())
 
while(A>B):
  K-=1
  if K==0:
    print("No")
    exit()
  B=B*2
 
while(B>C):
  C=C*2
  if K==1:
    break
  K-=1
  if K==0:
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
from math import ceil
a,b,c=map(int,input().split())
k=int(input())
if b<=a:
    bm = ceil((a + 1) / b)
    b *= bm
    k -= (bm+1)//2
if c<=b:
    cm = ceil((b + 1) / c)
    k -= (cm+1)//2
if k<0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

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

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

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

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

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

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

Submission status: Wrong Answer

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

d=k
for i in range(k):
  if b < a:
    b = b*2
  if b > a:
    d=d-i
    break;

for i in range(d):
  if c < b:
    c = c*2
  if c > b:
    break;
  
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())

d=k
for i in range(k):
  if b < a:
    b = b*2
  if b > a:
    d=d-k
    break;

for i in range(d):
  if c < b:
    c = c*2
  if c > b:
    break;
  
if a < b and b < c:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
nums=[int(e) for e in input().split()]
K=int(input())

for i in range(K):
    if  nums[2]>nums[1] and nums[1]>nums[0]:
        break
    else:
        if max(nums)!=nums[2]:
            nums[2]=2*nums[2]
        else:
            nums[1]=2*nums[1]

if nums[2]>nums[1] and nums[1]>nums[0]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b,c,k=map(int,open(0).read().split())
for d in range(k):
	if a>=b:b*=2
	else:c*=2
print('YNeos'[a<b<c::2])

Submission status: Wrong Answer

Solution code:
try:
    import math
    A,B,C = map(int,input().split())
    k = int(input())
    if A<B and B<C:
        print("YES")
    else:
        if A<B:
            if B == C:
                p = 1
            else:
                p = math.log((B/C),2)
            if(k>p):
                print("Yes")
            else:
                print("No")
        elif B<C:
            if A == B:
                p = 1
            else:
                p = math.log((A/B),2)
            if(k>p):
                B = B*(2**math.ceil(p))
                if C>B:
                    print("Yes")
                else:
                    if C*(2**(k-math.ceil(p)))>B:
                        print("Yes")
                    else:
                        print("No")
            else:
                print("No")
        else:
            # p = math.log(2,(B/C))
            if A == B:
                q = 1
            else:
                q = math.log((A/B),2)
            if(k>(q)):
                B = B*(2**math.ceil(q))
                if(C*(2**(k-math.ceil(q)))>B):
                    print("Yes")
                else:
                    print("No")
            else:
                print("No")
                
except EOFError:
    print(" ")

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
num = int(input())
k = 0
for i in range(num):    #num回２倍を繰り返す。でなければNoをprint
  if a[0] == max(a) or a[1] == max(a):   #リストaの中のmaxよりも青が小さいならば青を二倍する
    a[2] = a[2] * 2
    k += 1
  if a[1] == min(a) and k < num:
    a[1] = a[1] * 2
    k += 1
print(a)
if a[0] < a[1] and a[1] < a[2]:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
try:
    import math
    A,B,C = map(int,input().split())
    k = int(input())
    if A<B and B<C:
        print("YES")
    else:
        if A<B:
            if B == C:
                p = 1
            else:
                p = math.log(2,(B/C))
            if(k>p):
                print("Yes")
            else:
                print("No")
        elif B<C:
            if A == B:
                p = 1
            else:
                p = math.log(2,(A/B))
            if(k>p):
                B = B*(2**math.ceil(p))
                if C>B:
                    print("Yes")
                else:
                    if C*(2**(k-math.ceil(p)))>B:
                        print("Yes")
                    else:
                        print("No")
            else:
                print("No")
        else:
            # p = math.log(2,(B/C))
            if A == B:
                q = 1
            else:
                q = math.log(2,(A/B))
            if(k>(q)):
                B = B*(2**math.ceil(q))
                if(C*(2**(k-math.ceil(q)))>B):
                    print("Yes")
                else:
                    print("No")
            else:
                print("No")
                
except EOFError:
    print(" ")

Submission status: Wrong Answer

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

import itertools
import numpy as np
k = [i for i in range(8)]
Com = [v for v in itertools.permutations(k, 3) if np.sum(v) == K]

Ans = []
for c in Com:
  A = [2**c[i] * Card[i] for i in range(3)]
  if (A.index(min(A)) == 0) and (A.index(max(A)) == 2):
    Ans.append(c)

if len(Ans) != 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
num = int(input())
k = 0
for i in range(num):    #num回２倍を繰り返す。でなければNoをprint
  if a[2] < max(a):   #リストaの中のmaxよりも青が小さいならば青を二倍する
    a[2] = a[2] * 2
    k += 1
  elif a[1] < max(a) and k <num:
    a[1] = a[1] * 2
    k += 1
if a[0] < a[1] and a[1] < a[2]:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

K = int(input())

flag = False

for i in range(0, K+1):
    for j in range(0, K+1):
        for k in range(0, K+1):
            x = A * 2**i
            y = B * 2**j
            z = C * 2**k
            # print(x, y, z)

            if x < y < z:
                flag = True


if flag == True:
    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
    else:
        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())

flag = False

for i in range(0, K):
    for j in range(0, K):
        for k in range(0, K):
            x = A * 2**i
            y = B * 2**j
            z = C * 2**k
            # print(x, y, z)

            if x < y and y < z and i + j + k <= K:
                flag = True


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

Submission status: Wrong Answer

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

cnt = 0
for _ in range(k):
    if a > b:
        b *= 2
        cnt += 1
    if b > c:
        c *= 2
        cnt += 1
    # print(a, b, c)

if (cnt <= k) and (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())

flag = False

for i in range(0, K):
    for j in range(0, K):
        for k in range(0, K):
            x = A * 2**i
            y = B * 2**j
            z = C * 2**k
            # print(x, y, z)

            if x < y < z and i + j + k <= K:
                flag = True


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

Submission status: Wrong Answer

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

K = int(input())

flag = False

for i in range(0, K):
    for j in range(0, K - i):
        for k in range(0, K - i - j):
            x = A * 2**i
            y = B * 2**j
            z = C * 2**k

            if x < y < z and i + j + k <= K:
                flag = True


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

Submission status: Wrong Answer

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

K = int(input())

flag = False

for i in range(0, K):
    for j in range(0, K - i):
        for k in range(0, K - i - j):
            x = A * 2**i
            y = B * 2**j
            z = C * 2**k

            if x < y < z:
                flag = True


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

Submission status: Wrong Answer

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

K = int(input())

flag = False

for i in range(0, K):
    for j in range(0, K):
        for k in range(0, K):
            x = A * 2**i
            y = B * 2**j
            z = C * 2**k

            if x < y < z:
                flag = True


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

Submission status: Wrong Answer

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

ans="no"
for i in range(k+1):
  if a<b<c:
    ans="yes"
  else:
    if a>=b:
      b*=2
    elif b>=c:
      c*=2


print(ans)

Submission status: Wrong Answer

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

ans="no"
for i in range(k+1):
  if a<b<c:
    ans="yes"
  else:
    if a>=b:
      b*=2
    elif b>=c:
      c*=2
    else:
      c*=2

print(ans)

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
K = int(input())
 
 
def combinations(k):
    result = []
    for a in range(k + 1):
        for b in range(k + 1):
            for c in range(k + 1):
                if a + b + c <= k:
                    result.append([a, b, c])
 
    return result
 
 
def magic(A, B, C, K):
    if A < B < C:
        return True
 
    for l in combinations(K):
        a, b, c = A, B, C
        a_count, b_count, c_count = l
        if a_count > 0:
            a = 2 * a_count
        if b_count > 0:
            b = 2 * b_count
        if c_count > 0:
            c = 2 * c_count
 
        if a < b < c:
            return True
 
    return False
 
 
if (magic(A, B, C, K)):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
cards = list(map(int,input().split()))
K = int(input())
for i in range(K):
    if cards[1]<=cards[0]:
        cards[1]*=2
        
    elif cards[2]<=cards[1]:
        cards[2]*=2
        
    else:
        break

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

Submission status: Wrong Answer

Solution code:
cards = list(map(int,input().split()))
K = int(input())
for i in range(K):
    if cards[1]<=cards[0]:
        cards[2]*=2
        continue
    if cards[2]<=cards[1]:
        cards[1]*=2
        continue
    else:
        break
    

if cards[0]<cards[1]<cards[2]:
    print('Yes')
else:
    print('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*b
  elif b>c:
    c = 2*c
  else:
    ans="Yes"
    break
if a<b and b<c:
    ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
cards = list(map(int,input().split()))
K = int(input())
for i in range(K):
    if cards[2]<cards[1]:
        cards[2]*=2
        continue
    if cards[1]<cards[0]:
        cards[1]*=2
        continue
    else:
        break
    
if cards[0]<cards[1]<cards[2]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n):
    res = [None] * n
    for i in range(n):
        res[i] = II()
    return res
def LIR(n):
    res = [None] * n
    for i in range(n):
        res[i] = LI()
    return res
def FR(n):
    res = [None] * n
    for i in range(n):
        res[i] = IF()
    return res
def LIR(n):
    res = [None] * n
    for i in range(n):
        res[i] = IF()
    return res
def LIR_(n):
    res = [None] * n
    for i in range(n):
        res[i] = LI_()
    return res
def SR(n):
    res = [None] * n
    for i in range(n):
        res[i] = S()
    return res
def LSR(n):
    res = [None] * n
    for i in range(n):
        res[i] = LS()
    return res
mod = 1000000007
inf = float('INF')

#solve
def solve():
    a, b, c = LI()
    k = II()
    tmp = 0
    while a > b:
        b *= 2
        tmp += 1
    while b > c:
        c *= 2
        tmp += 1
    print("Yes" if tmp <= k else "No")
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
cards = list(map(int,input().split()))
K = int(input())
count=0
while count<K:
    if cards[1]>cards[2]:
        cards[2]*=2
        count+=1
    elif cards[0]>cards[1]:
        cards[1]*=2
        count+=1
    else:
        cards[0]*=2
        count+=1

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

Submission status: Wrong Answer

Solution code:
cards = list(map(int,input().split()))
K = int(input())
count=0
while count<K:
    if cards[1]>cards[2]:
        cards[2]*=2
        count+=1
    elif cards[0]>cards[1]:
        cards[1]*=2
        count+=1
    else:
        cards[0]*=2
        count+=1
    print(cards)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


for i in range(N):
    if C < B:
        C *= 2
    elif B < C:
        B *= 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+1):
    for j in range(0,K+1-i):
        for k in range(0,K+1-i-j):
            #print('{},{},{}'.format(i,j,k))
            if(A*(2**i) < B*(2**j) and B*(2**j) < C*(2**k)):
                if(i==j==k==0):
                    break
                print('Yes')
                exit()

print('No')

Submission status: Wrong Answer

Solution code:
cards = list(map(int,input().split()))
K = int(input())
for i in range(K):
    if cards[1]>cards[2]:
        cards[2]*=2
    elif cards[0]>cards[1]:
        cards[1]=cards[1]*2
    else :
        cards[0]*=2

if cards[0]<cards[1]<cards[2]:
    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+1):
    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:
A, B, C = map(int, input().split(" "))
N = int(input())
 
for i in range(N+1):
    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:
lis = list(map(int, input().split()))
K = int(input())
a = int(lis[0])
b = int(lis[1])
c = int(lis[2])
count = 0
 
if b > a and c > b:
    print("Yes")
    
for i in range(10000):
  if b < a:
    b *= 2
    count += 1
    if count == K+1:
      print("No")
      break
    else:
      pass
  elif c < b:
    c *= 2
    count += 1
    if count == K+1:
      print("No")
      break
  elif b > a and c > b:
    print("Yes")
    break
  else:
    print("No")
    break

Submission status: Wrong Answer

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 (a < b < c ):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
K = int(input())
sum = 0
sum1 = 0
sum2 = 0
for i in range(K):
  if (C):
    sum2+=C*2
  elif(B):
    sum1+=B*2
  elif(A):
    sum+=A*2
if (sum<sum1<sum2):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import math
A, B, C = map(int, input().split())
K = int(input())
x = 0
if A < B < C:
  print("Yes")
if A >= B:
  x = math.ceil(math.log(A/B, 2))
  B =B*(2**x)
  if A != B:
    if x > K:
      print("No")
    elif B < C:
      print("Yes")
  else:
    x += 1
if B >= C:
  y = math.ceil(math.log(B/C, 2))
  C = C*(2**y)
  if B != C:
    if x+y > K:
      print("No")
    else:
      print("Yes")
  else:
    y += 1
    if x+y > K:
      print("No")
    else:
      print("Yes")

Submission status: Wrong Answer

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


def combinations(k):
    result = []
    for a in range(k + 1):
        for b in range(k + 1):
            for c in range(k + 1):
                if a + b + c <= k:
                    result.append([a, b, c])

    return result


def magic(A, B, C, K):
    if A < B < C:
        return True

    for l in combinations(K):
        a, b, c = A, B, C
        a_count, b_count, c_count = l
        if a_count > 0:
            a *= 2 * a_count
        if b_count > 0:
            b *= 2 * b_count
        if c_count > 0:
            c *= 2 * c_count

        if a < b < c:
            return True

    return False


if (magic(A, B, C, K)):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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