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:
A,B,C = map(int,input().split())
K = int(input())
count = 0
if A < B:
    if B < C:
        print("Yes")
    else:
        for i in range(K):
            C = C * 2
        if B < C:
            print("Yes")
        else:
            print("No")


else:
    if B > C:
        for j in range(K):
            B = B * 2
            count += 1
            if A < B:
                continue
        if B < A:
            print("No")
        else:
            jj = K - count
            if jj == 0:
                print("No")
            else:
                if B < C:
                    print("Yes")
                else:
                    for k in range(jj):
                        C = C * 2
                    if B < C:
                        print("Yes")
                    else:
                        print("No")

    else:
        for o in range(K):
            C = C * 2
            #count += 1
            if A < C:
                continue
            count += 1
        #print(count)
        if C < A:
            print("No")
        else:
            pp = K - count
            print(pp)
            if pp == 0:
                print("No")
            else:
                if A < B:
                    print("Yes")
                else:
                    for os in range(pp):
                        B = B * 2
                    if A < B:
                        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(7):
  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())

m = 0
n = 1

while a > b:
    m = m + 1
    b = b * 2
    if a < b:
        break

while b > c:
    n = n + 1
    c = c * 2
    if b < c:
        break



if m + n <= k:
    print('Yes')

elif m + n > k:
    print('No')

Submission status: Wrong Answer

Solution code:
import random

a, b, c = map(int, input().split())
k = int(input())
l = [a, b, c]
m = random.choice(l) * 2

for i in range(k):
 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())
if b<=a:
    x = 0
    for i in range(k):
        b*=2
        if a < b:
            x += (i+1)
            break
    y = 2*(k-x) if k-x > 0 else 1
else:
    y = 0
    y += (k*2)
print(['No','Yes'][b<c*y])

Submission status: Wrong Answer

Solution code:
import random
data = list(map(int, input().split()))
K = int(input())
for i in range(K):
    l = [0, 1, 2]
    num = random.choice(l)
    data[num] = data[num]*2
    if (data[1] > data[0]) and (data[2] > data[1]):
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

Solution code:
x = input()
k = int(input())
x = x.split()
y = [int(s) for s in x]
dict = {"red":0, "green":0}
dict["red"] = y[0]
dict["green"] = y[1]
count = 0
if dict["red"] < dict["green"]:
      pass
else:
  for N in range(k):
    count += 1
    dict["green"] = dict["green"] * 2
    if dict["red"] < dict["green"]:
        break
    else:
        continue
dict["blue"] = y[2]
if k - count == 0:
  if dict["green"] > dict["blue"]:
    print("No")
  else:
    print("Yes")
    exit()
else:
  pass
i = k - count
if dict["green"] < dict["blue"]:
  print("Yes")
  exit()
else:
  for N in range(i):
    dict["blue"] = dict["blue"] * 2
    if dict["green"] < dict["blue"]:
      print("Yes")
      exit()
    else:
        continue
print("No")

Submission status: Wrong Answer

Solution code:
x = input()
k = int(input())
x = x.split()
y = [int(s) for s in x]
dict = {"red":0, "green":0}
dict["red"] = y[0]
dict["green"] = y[1]
count = 0
if dict["red"] < dict["green"]:
      pass
else:
  for N in range(k):
    count += 1
    dict["green"] = dict["green"] * 2
    if dict["red"] < dict["green"]:
        break
    else:
        continue
dict["blue"] = y[2]
if k - count == 0:
  if dict["green"] < dict["blue"]:
    print("No")
  else:
    print("Yes")
    exit()
else:
  pass
i = k - count
if dict["green"] > dict["blue"]:
  print("Yes")
  exit()
else:
  for N in range(i):
    dict["blue"] = dict["blue"] * 2
    if dict["green"] < dict["blue"]:
      print("Yes")
      exit()
    else:
        continue
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
    y = 2*(k-x) if k-x > 0 else 1
else:
    y = 0
    y += k
print(['No','Yes'][b<c*y])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
A,B,C=(int(x) for x in input().split())
k=int(input())
e=math.ceil(A/B)
f=math.ceil(B/C)
y=math.ceil(A/C)
if A>=B:
    z=y
else:
    z=f

g=0
if e>=4:
    g+=3
elif e>2:
    g+=2
elif e>=1:
    g+=1

if z>=4:
    g+=3
elif z>2:
    g+=2
elif z>=1:
    g+=1
if A==B==C:
    g+=1


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

Submission status: Wrong Answer

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

if K == 0:
    if B > A and C > B:
        print('Yes')
        flag = 1
    else:
        pass
elif K > 0:
    if B <= A:
        for k in range(K):
            if B * (k + 1) * 2 > A:
                Bnew = B * (k + 1) * 2
                newK = K - k - 1
                if newK == 0:
                    if C > Bnew:
                        print('Yes')
                        flag = 1
                        break
                else:
                    for newk in range(newK):
                        if C * (newk + 1) * 2 > Bnew:
                            print('Yes')
                            flag = 1
                            break
                    break
    else:
        for k in range(K):
            if C * (k + 1) * 2 > B:
                print('Yes')
                flag = 1
                break
if flag == 0:
    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

for i in range(7):
  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:
def NextIntList(): return list(map(int,input().split()))
def NextInts(): return map(int,input().split())
import itertools
A,B,C = NextInts()
l = ["A","B","C"]
K = int(input())
for v in itertools.combinations_with_replacement(l, K):
    A_number = v.count("A")
    B_number = v.count("B")
    C_number = v.count("C")
    if A_number>0:
    	A_1 = A*2*A_number
    else:
    	A_1=A
    if B_number>0:
    	B_1 = B*2*B_number
    else:
    	B_1 = B
    if C_number>0:
    	C_1 = C*2*C_number
    else:
    	C_1 = C
    if C_1>B_1>A_1:
    	print("Yes")
    	break
else:
	print("No")

Submission status: Wrong Answer

Solution code:
L = input()
t = L.strip(' ')
words = t.split()
A = int(words[0])
B = int(words[1])
C = int(words[2])

K = int(input())


x = 0
y = 0
for i in range(K + 1):
    a = int(i)
    for f in range(K + 1):
        b = int(f)
        for g in range(K + 1):
            c = int(g)
            A = A * (2 ** a)
            C = C * (2 ** c)
            B = B * (2 ** b)
            if A <= B <= C and a + b + c == K:
                y += 1
            else:
                x += 1
if x == 3*K and y == 0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

#(K - i - j, i, j) =
#(1, 1, 1),(1, 1, 0),(1, 0, 1),(1, 0, 0)
#(0, 1, 1),(0, 1, 0),(0, 0, 1),(0, 0, 0)

def yes_no(A, B, C, K):
    for i in range(0, K + 1):
        for j in range(0, K + 1 - i):
            if i + j == K and i != 0 and j != 0:
                if C > B * 2 * i and B * 2 * i > A * 2 * j:
                    return "Yes"
            elif i + j == K and i != 0 and j == 0:
                if (C > B * 2 * i and B * 2 * i > A) or\
                   (C > B and B > A * 2 * i):
                    return "Yes"
            elif i + j != K and i != 0 and j != 0:
                if C * 2 * (K - i - j) > B * 2 * i and B * 2 * i > A * 2 * j:
                    return "Yes"
            elif i + j != K and i != 0 and j == 0:
                if (C * 2 * (K - i) > B * 2 * i and B * 2 * i > A) or\
                   (C * 2 * (K - i) > B and B > A * 2 * i):
                    return "Yes"
            elif i + j != K and i == 0 and j == 0:
                if C * 2 * K > B and B > A:
                    return "Yes"


def main():
    ans = yes_no(A, B, C, K)
    if ans == "Yes":
        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())

ans = 'No'
for i in range(K+1):
    for j in range(K+1-i):
        h = K-i-j 
        if i > 0 :
            R = A*2*i
        else:
            R = A
        if j > 0 :
            G = B*2*j
        else :
            G = B
        if h > 0 :           
            Bl = C*2*h
        else:
            Bl = C
        if G > R and Bl > G:
            ans = 'Yes'


print(ans)

Submission status: Wrong Answer

Solution code:
x = input()
k = int(input())
x = x.split()
y = [int(s) for s in x]
dict = {"red":0, "green":0}
dict["red"] = y[0]
dict["green"] = y[1]
count = 0
if dict["red"] < dict["green"]:
      pass
else:
  for N in range(k):
    count += 1
    dict["green"] = dict["green"] * 2
    if dict["red"] < dict["green"]:
        break
    else:
        continue
dict["blue"] = y[2]
if k - count == 0:
  if dict["green"] < dict["blue"]:
    print("No")
  else:
    print("Yes")
    exit()
else:
  pass
i = k - count
if dict["green"] < dict["blue"]:
  print("Yes")
  exit()
else:
  for N in range(i):
    dict["blue"] = dict["blue"] * 2
    if dict["green"] < dict["blue"]:
      print("Yes")
      exit()
    else:
        continue
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def NextIntList(): return list(map(int,input().split()))
def NextInts(): return map(int,input().split())
import itertools
A,B,C = NextInts()
l = ["A","B","C"]
K = int(input())
for v in itertools.combinations_with_replacement(l, K):
    A_number = v.count("A")
    B_number = v.count("B")
    C_number = v.count("C")

    if A_number>0:
    	A_1 = A*2*A_number
    else:
    	A_1=A
    if B_number>0:
    	B_1 = B*2*B_number
    else:
    	B_1 = B
    if C_number>0:
    	C_1 = C*2*C_number
    else:
    	C_1 = C
    if C_1>B_1>A_1:
    	print("Yes")
    	break
else:
	print("No")

Submission status: Wrong Answer

Solution code:
from itertools import combinations_with_replacement
from collections import Counter

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


lsts = []
lst = list(map(Counter, combinations_with_replacement([a,b,c], k)))
result = False
if a == b and b == c:
    if k >= 3:
        result = True
if a == b or b == c or c == a:
    if k >= 3:
        result = True
for l in lst:
    al, bl, cl = a*(2**l[a]), b*(2**l[b]), c*(2**l[c])
    if (bl > al) and (cl > bl):
        result = True
if result:
    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 c < b:
        c*=2
    elif b < a:
        b*=2
    k-=1
print("Yes" if c>b>a else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

flag = False

#基からA<B<Cのとき
if A<B and B<C:
    print("Yes")
    flag=True

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

        elif B>C:
            C *= 2

        if A<B and B<C:
            print("Yes")
            flag=True
            break


if flag == False:
    print("No")

Submission status: Wrong Answer

Solution code:
import math
A,B,C=(int(x) for x in input().split())
k=int(input())
e=math.ceil(A/B)
f=math.ceil(B/C)
y=math.ceil(A/C)
if A>=B:
    z=y
else:
    z=f

g=0
if e>5:
    g+=3
elif e>2:
    g+=2
elif e>=1:
    g+=1

if z>5:
    g+=3
elif z>2:
    g+=2
elif z>=1:
    g+=1
if A==B==C:
    g+=1


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

Submission status: Wrong Answer

Solution code:
def NextIntList(): return list(map(int,input().split()))
def NextInts(): return map(int,input().split())
import itertools
A,B,C = NextInts()
l = ["A","B","C"]
K = int(input())
for v in itertools.combinations_with_replacement(l, K):
    A_number = v.count("A")
    B_number = v.count("B")
    C_number = v.count("C")
    print(v)
    if A_number>0:
    	A_1 = A*2*A_number
    else:
    	A_1=A
    if B_number>0:
    	B_1 = B*2*B_number
    else:
    	B_1 = B
    if C_number>0:
    	C_1 = C*2*C_number
    else:
    	C_1 = C
    print(A_1,B_1,C_1)
    if C_1>B_1>A_1:
    	print("Yes")
    	break
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):
    for j in range(K+1-i):
        for h in range(K+1-i-j) :
            if i == 0 and j == 0 and h == 0:
                z = 1
            else :
                if i > 0 :
                    R = A*2*i
                else:
                    R = A
                if j > 0 :
                    G = B*2*j
                else :
                    G = B
                if h > 0 :           
                    Bl = C*2*h
                else:
                    Bl = C
                if G > R and Bl > G:
                    ans = 'Yes'
                    break


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:
from itertools import combinations_with_replacement
from collections import Counter

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


lsts = []
lst = list(map(Counter, combinations_with_replacement([a,b,c], k)))
result = False
if a == b and b == c:
    if k >= 3:
        result = True
if a == b or b == c or c == a:
    if k >= 2:
        result = True
for l in lst:
    al, bl, cl = a*(2**l[a]), b*(2**l[b]), c*(2**l[c])
    if (bl > al) and (cl > bl):
        result = True
if result:
    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):
    for j in range(K+1-i):
        for h in range(K+1-i-j) :
            if i == 0 and j == 0 and h == 0:
                z = 1
            else :
                if i > 0 :
                    R = A*2*i
                else:
                    R = A
                if j > 0 :
                    G = B*2*j
                else :
                    G = B
                if h > 0 :           
                    Bl = C*2*h
                else:
                    Bl = C
                if G > R and Bl > G:
                    ans = 'Yes'
                    break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
re=0
re1=0
su=0
for i in range (k):
    re=re+b*2
    su = su +1
    if (re > a ):
        quit()
for j in range(k-su):
    re1= re1 + c*2
if (re1 > re):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

if a<b and b<c and i<=k:
    print("Yse")
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):
    A = A*(2**i)
    for j in range(0,K+1):
        B = B*(2**j)
        for h in range(0,K+1):
            C = C*(2**h)
            if (i+j+h) <= K and C>B>A:
                print("Yes")
                exit()
print("No")

Submission status: Wrong Answer

Solution code:
import random
data = list(map(int, input().split()))
K = int(input())
for i in range(K):
    l = [0, 1, 2]
    num = random.choice(l)
    data[num] = data[num]*2
    if data[1] > data[0] and data[2] > data[1]:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

Solution code:
from itertools import combinations_with_replacement
from collections import Counter

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


lsts = []
lst = list(map(Counter, combinations_with_replacement([a,b,c], k)))
result = False
if a == b and b == c:
    if k >= 3:
        result = True
for l in lst:
    al, bl, cl = a*(2**l[a]), b*(2**l[b]), c*(2**l[c])
    if (bl > al) and (cl > bl):
        result = True
if result:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

flag = False

#基からA<B<Cのとき
if A<B and B<C:
    print("Yes")
    flag=True

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

        else:
            C *= 2

        if A<B and B<C:
            print("Yes")
            flag=True
            break


if flag == False:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from itertools import combinations_with_replacement
from collections import Counter

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


lsts = []
lst = list(map(Counter, combinations_with_replacement([a,b,c], k)))
result = False
if a == b and b == c:
    if k >= 3:
        result = True
for l in lst:
    al, bl, cl = a*(2**l[a]), b*(2**l[b]), c*(2**l[c])
    if (bl > al) and (cl > bl):
        result = True
        print(l[a], l[b], l[c])
if result:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def magic_2():
    a,b,c = map(int, input().split())
    k = int(input())
    my_list = [b,c]
    i = 0
    while i <= k-1:
        multiply_list = [items * 2 for items in my_list]
        i += 1
    new_list = [a] + multiply_list
    if new_list[0] < new_list[1] < new_list[2]:
        print("yes")
    else:
        print("No")
   
magic_2()

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 (sum1>sum or sum2>sum1 or (sum1>sum and sum2>sum1)):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

if K==0:
    if B > A and C > B:
        print('Yes')
        flag = 1
    else:
        pass
elif K>0:
    K=K+1
    for k in range(K):
        if k==0:
            if B>A:
                for newk in range(K):
                    if newk==0:
                        if C > B:
                            print('Yes')
                            flag=1
                            break
                    else:
                        if C * newk * 2 > B:
                            print('Yes')
                            flag=1
                            break
                break

        else:
            if B*k*2>A:
                Bnew=B*k*2
                newK = K - k
                for newk in range(newK):
                    if newk==0:
                        if C > B:
                            print('Yes')
                            flag=1
                            break
                    else:
                        if C * newk * 2 > Bnew:
                            print('Yes')
                            flag=1
                            break
                break

if flag == 0:
    print('No')

Submission status: Wrong Answer

Solution code:
import math

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

count = 0

if A > B:
  temp = math.log(A/B) / math.log(2)
  temp = math.ceil(temp)
  count += temp
  B = 2**temp * B
  if B == C :
    count += 1
    B *= 2
else:
  count += 0
  
if B > C:
  temp = math.log(B/C) / math.log(2)
  temp = math.ceil(temp)
  count += temp
  C = 2**temp * C
  if B == C:
    count += 1
    C *= 2
else:
  count += 0
  
if  C > B and count <= N:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
a,b,c=map(int, input().split())
d=int(input())
ans="No"
def b3():
    global ans
    d=b*8
    if(a<d<c):
        ans="Yes"
def c3():
    global ans
    e=c*8
    if(a<b<e):
        ans="Yes"
def b2c1():
    global ans
    d=b*4
    e=c*2
    if(a<d<e):
        ans="Yes"
def b1c2():
    global ans
    d=b*2
    e=c*4
    if(a<d<e):
        ans="Yes"
b3()
c3()
b2c1()
b1c2()
print(ans)

Submission status: Wrong Answer

Solution code:
A, B, C = [int(n) for n in input().split()]
K = int(input())
ans = 'No'
for i in range(1, K+1):
    for j in range(1, K+1):
        if A <= B<<i <= C<<j and i+j<=K:
            ans = 'Yes'
            break
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
L = input()
t = L.strip(' ')
words = t.split()
A = int(words[0])
B = int(words[1])
C = int(words[2])

K = int(input())


x = 0
y = 0
for i in range(K + 1):
    a = int(i)
    for f in range(K + 1):
        b = int(f)
        for g in range(K + 1):
            c = int(g)
            A = A * (2 ^ a)
            C = C * (2 ^ c)
            B = B * (2 ^ b)
            if A <= B <= C and a + b + c == K:
                y += 1
            else:
                x += 1
if x == 3*K and y == 0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

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


print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B, C = [int(n) for n in input().split()]
K = int(input())
ans = 'No'
for i in range(1, K+1):
    for j in range(1, K+1):
        if A < B<<i < C<<j and i+j<=K:
            ans = 'Yes'
            break
print(ans)

Submission status: Wrong Answer

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

def yes_no(A, B, C, K):
    for i in range(0, K + 1):
        for j in range(0, K + 1 - i):
            if i + j != K and i != 0 and j != 0:
                if C * 2 * (K - i - j) > B * 2 * i and B * 2 * i > A * 2 * j:
                    return "Yes"
            elif i + j != K and i != 0 and j == 0:
                if (C * 2 * (K - i) > B * 2 * i and B * 2 * i > A) or\
                   (C * 2 * (K - i) > B and B > A * 2 * i):
                    return "Yes"
            elif i == 0 and j == 0:
                if C * 2 * K > B and B > A:
                    return "Yes"
            elif i + j == K and i != 0 and j != 0:
                if C > B * 2 * i and B * 2 * i > A * 2 * j:
                    return "Yes"
            elif i + j == K and i != 0 and j == 0:
                if (C > B * 2 * i and B * 2 * i > A) or\
                   (C > B and B > A * 2 * i):
                    return "Yes"

def main():
    ans = yes_no(A, B, C, K)
    if ans == "Yes":
        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())
if k == 1:
  if b < c:
    b = b*2
  else:
    c = c*2
elif k > 1:
  for i in range(1,k):
    if b < c:
      b = b*2
    else:
      c = c*2
if a < b and b < c:
  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 x > K:
    print("No")
  elif B < C:
    print("Yes")
if B > C:
  y = math.ceil(math.log(B/C, 2))
  if x+y > K:
    print("No")
  else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
def magic_2():
    a,b,c = map(int, input().split())
    k = int(input())
    my_list = [b,c]
    i = 0
    while i <= k-1:
        multiply_list = [items * 5 for items in my_list]
        i += 1
    new_list = [a] + multiply_list
    if new_list[0] < new_list[1] < new_list[2]:
        print("yes")
    else:
        print("No")
   
magic_2()

Submission status: Wrong Answer

Solution code:
"""
b > g > r

"""

r, g, b = list(map(int, input().split()))
k = int(input())
flag = False
for i in range(k):
    if r > b and b > 2 * g :
        g *= 2
    elif r > g and b > 2 * g:
        g *= 2
    else:
        b *= 2

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


def combinations(k):
    result = [[0, 0, 0]]
    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):
    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=input().split()
K=int(input())

answer='Yes'



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


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



if K<0:
    answer='No'

print(answer)

Submission status: Wrong Answer

Solution code:
import sys
r,g,b = map(int,input().split())
k = int(input())
#青＞緑＞赤
count = 0
if g*(2**k)>r:
    while g<r and k>=count:
        g*=2
        count += 1
else:
    print("No")
    sys.exit(0)

if b*(2**(k-count))>g:
    print("Yes")
else:
    print("No")