Problem:


Score: 200 points

Problem Statement

M-kun has the following three cards:

A red card with the integer A.

A green card with the integer B.

A blue card with the integer C.

He is a genius magician who can do the following operation at most K times:

Choose one of the three cards and multiply the written integer by 2.

His magic is successful if both of the following conditions are satisfied after the operations:

The integer on the green card is strictly greater than the integer on the red card.

The integer on the blue card is strictly greater than the integer on the green card.

Determine whether the magic can be successful.

Constraints

1 \leq A, B, C \leq 7

1 \leq K \leq 7

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B C
K

Output

If the magic can be successful, print Yes; otherwise, print No.

Sample Input 1

7 2 5
3

Sample Output 1

Yes

The magic will be successful if, for example, he does the following operations:

First, choose the blue card. The integers on the red, green, and blue cards are now 7, 2, and 10, respectively.

Second, choose the green card. The integers on the red, green, and blue cards are now 7, 4, and 10, respectively.

Third, choose the green card. The integers on the red, green, and blue cards are now 7, 8, and 10, respectively.

Sample Input 2

7 4 2
3

Sample Output 2

No

He has no way to succeed in the magic with at most three operations.



Sample input:
7 2 5
3


Sample output:
Yes

Submission status: Accepted

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

import itertools
import collections

l = [1, 2, 3]
h = itertools.combinations_with_replacement(l, 2)

for i in range(0, K + 1):
    h = itertools.combinations_with_replacement(l, i)
    for v in h:
        c = collections.Counter(v)
        n_a = A * (2**c[1])
        n_b = B * (2**c[2])
        n_c = C * (2**c[3])
        if n_c > n_b and n_b > n_a:
            print("Yes")
            exit()
print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#n, m, q = map(int, input().split())
#List = list(map(int, input().split()))
#req = [list(map(int, input().split())) for _ in range(q)]
#t = t[:-1]
#print(ans[j], end = "") 改行無しで出力
#[0]*n
#sort = sorted(a)[::-1] 降順
a, b, c = map(int, input().split())
k = int(input())

bcount = 0
ccount = 0

while(b <= a):
    b = 2*b
    bcount += 1

while(c <= b):
    c = 2*c
    ccount += 1

if k < bcount + ccount:
    print("No")

else:
    print("Yes")

Submission status: Accepted

Solution code:
red, green, blue = map(int, input().split())
K = int(input())
res = 'No'
cnt = 0

# green > a に必要な回数を消費
while green <= red:
    green *= 2
    cnt += 1
# blue > green に必要な回数を消費
while blue <= green:
    blue *= 2
    cnt += 1

# 結果を判定
if cnt <= K:
  res = 'Yes'

print(res)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

result = False
for i in range(k):
    if a>=b:
        b*=2
    elif b>=c:
        c*=2
#    print('{}/{}/{}'.format(a,b,c))
    if a<b and b < c:
        result = True
        break

if result:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

for _ in range(K):
    if A >= B:
        B = B * 2
        continue
    if B >= C:
        C = C * 2
        continue

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)


def exec(a, b, c, cnt, k):
    if cnt > 0 and b > a and c > b:
        return True
    ans = False
    if cnt < k:
        ans |= exec(a*2, b, c, cnt+1, k)
        ans |= exec(a, b*2, c, cnt+1, k)
        ans |= exec(a, b, c*2, cnt+1, k)
    return ans


def main(input, print):
    A, B, C = map(int, input().split())
    K = int(input())

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


if __name__ == '__main__':
    main(sys.stdin.readline, print)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
A, B, C, k = map(int, open(0).read().split())
for a in range(k + 1):
  for b in range(k + 1 - a):
    for c in range(k + 1 - a - b):
      if A * 2**a < B * 2**b < C * 2**c:
        print("Yes");exit()
print("No")

Submission status: Accepted

Solution code:
A, B, C = map(int, input().split())
K = int(input())
i = K
while B <=A:
    if i == 0:
        print("No")
        break
    B = B*2
    i -=1
while i >=0:
    if C > B:
        print("Yes")
        break
    elif i == 0:
        print("No")
        break
    else:
        C=C*2
        i -=1

Submission status: Accepted

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

num_a = 0
for i in range(8):
    if a >= b:
        num_a += 1
        b *= 2
    else:
        break

num_b = 0
for i in range(8):
    if b >= c:
        num_b += 1
        c *= 2
    else:
        break
if num_a + num_b <= k:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

import sys


def judge(a, b, c, k):
    while a >= b:
        b *= 2
        k -= 1
    while b >= c:
        c *= 2
        k -= 1
    return k >= 0


def main():
    a, b, c = (int(z) for z in input().split())
    k = int(input())
    if judge(a, b, c, k):
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

if A<B:
    if B<C:
        print("Yes")
    else:
        if B<(C*(2 ** K)):
            print("Yes")
        else:
            print("No")
else:
    while A>=B:
        B *= 2
        K -= 1
    if B<(C*(2 ** K)):
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

for i in range(K+1):
    if a < b* 2**i and b* 2**i < c* 2**(K-i):
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

print("No")

Submission status: Accepted

Solution code:
def solve(A, B, C, K):
    for k in range(0, K+1):
        for n in range(0, k+1):
            if A < (2**n)*B < (2**(k-n))*C:
                return True
    return False
A, B, C = map(int,input().split())
K = int(input())
if solve(A, B, C, K):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
d=int(input())
result=[]
for i in range(d+1):
    for j in range(d+1):
        for k in range(d+1):
            if i+j+k>d:
                continue
            n=[(2**i)*a,(2**j)*b,(2**k)*c]
            result.append(n)
for i in range(len(result)):
    m=result[i]
    if m[1]>m[0] and m[2]>m[1]:
        print('Yes')
        exit()
print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

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
    else:
        C = C*2

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

Submission status: Accepted

Solution code:
r,g,b=map(int,input().split())
K=int(input())
cnt=0
for i in range(100):
    if g<=r:
        g=g*2
        cnt+=1
    elif b<=g:
        b=b*2
        cnt+=1

if cnt<=K:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

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

Submission status: Accepted

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

n = 0

while A >= B :
  B *= 2
  n += 1
  
while B >= C :
  C *= 2
  n += 1

if n <= K :
  print("Yes")
else :
  print("No")

Submission status: Accepted

Solution code:
import sys
from collections import deque,defaultdict

I=sys.stdin.readline

def ii():
	return int(I().strip())
def li():
	return list(map(int,I().strip().split()))

def mi():
	return map(int,I().strip().split())


def main():
	a,b,c=mi()
	k=ii()
	x=k
	for i in range(k):
		if b<=a:
			b*=2
			x-=1
	for i in range(x):
		if c<=b:
			c*=2
	if b>a and c>b:
		print("Yes")
	else:
		print("No")








		


		










		






if __name__ == '__main__':
	main()

Submission status: Accepted

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

ans=False
for p in range(0,k):
    for q in range(0,k-p+1):
        for r in range(0,k-p-q+1):
            if a*(2**p) < b*(2**q) and b*(2**q) < c*(2**r):
                ans= True
                break
if ans:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
a,b,c = map(int, sys.stdin.readline().rstrip("\n").split())
k = int(sys.stdin.readline().rstrip("\n"))
t = 0
while a >= b:
    b *= 2
    t += 1
while b >= c:
    c *= 2
    t += 1
if t <= k:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

nax=2**K

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

Submission status: Accepted

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

n = 0
while B<=A:
    B = B*2
    n+=1

while C<=B:
    C = C*2
    n+=1

if n>K:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

e = 0
while a >= b:
  b *= 2
  e += 1
while b >= c:
  c *= 2
  e += 1
#print(e, k)
if e > k:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

while a >= b and k > 0:
    b *= 2
    k -= 1

while b >= c and k > 0:
    c *= 2
    k -= 1

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

Submission status: Accepted

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

kk=0
while B<=A:
    B = B*2
    kk+=1

while C<=B:
    C = C*2
    kk+=1

if kk<=K:
    ans="Yes"
else:
    ans = "No"

print(ans)

Submission status: Accepted

Solution code:
import itertools

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

for k in itertools.combinations_with_replacement(["", "A", "B", "C"], K):
  if A*2**k.count("A") < B*2**k.count("B") and B*2**k.count("B") < C*2**k.count("C"):
    print("Yes")
    break
else:
  print("No")

Submission status: Accepted

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

count = 0

while A >= B:
  B *= 2
  count += 1

while B >= C:
  C *= 2
  count += 1

print("Yes" if count <= K else "No")

Submission status: Accepted

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

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

    if B <= A:
        B = B * 2
        continue

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

cnt = 0

while b <= a:
    b *= 2
    cnt += 1

while c <= b:
    c *= 2
    cnt += 1

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

Submission status: Accepted

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

token=0
for i in range(k+1):
    c_c=c*(2**i)
    for j in range(k-i+1):
        b_c=b*(2**j)
        if a<b_c and b_c < c_c:
            token=1

if token : print("Yes")
else : print("No")

Submission status: Accepted

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

i = 0
while B <= A:
    B = 2 * B
    i += 1

j = 0
while C <= B:
    C = 2 * C
    j += 1

if i + j <= K:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:


def main():
    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 and b < c):
            print("Yes")
            return

    print("No")
    return

if __name__=="__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

ans = False
for x in range(k + 1):
    for y in range(k - x + 1):
        for z in range(k - x - y + 1):
            if a * (2 ** x) < b * (2 ** y) < c * (2 ** z):
                ans = True
                break

print('Yes') if ans else print('No')

Submission status: Accepted

Solution code:
#-----------------------------
#https://atcoder.jp/contests/agc008/submissions/15248942
import sys
 
sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))
#-----------------------------
R,G,B = inm()
K = ini()
X = 0
while R >= G:
    X += 1
    G *= 2

while G >= B:
    X += 1
    B *= 2

if X <= K:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(['Yes','No'][B>=C])

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest


def resolve():
    a, b, c = map(int, input().split())
    k = int(input())
    ans = 0

    for i in range(k + 1):
        if a < b * (2 ** i) and b * (2 ** i) < c * (2 ** (k - i)):
            ans = 1
            break
    
    if ans == 1:
        print('Yes')
    else:
        print('No')


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """7 2 5
3"""
        output = """Yes"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """7 4 2
3"""
        output = """No"""
        self.assertIO(input, output)


if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
from itertools import product
from copy import copy

cards = list(map(int, input().split()))
k = int(input())
success = False
for ops in product(range(3), repeat=k):
    c = copy(cards)
    for op in ops:
        c[op] *= 2
    if c[1] > c[0] and c[2] > c[1]:
        success = True
if success:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
from sys import stdin
import sys
import itertools as it

A, B, C = [int(x) for x in stdin.readline().rstrip().split()]
K = int(input())
if C > B and B > A:
    print("Yes")
    sys.exit()
for i in range(K+1):
    c1 = C*(2**i)
    b1 = B*(2**(K-i))
    if c1 > b1 and b1 > A:
        print("Yes")
        sys.exit()
print("No")

Submission status: Accepted

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

Submission status: Accepted

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

count = 0
while True:
    if a >= b:
        b *= 2
        count += 1
        continue
    elif b >= c:
        c *= 2
        count += 1
        continue
    else:
        break

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

Submission status: Accepted

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

Submission status: Accepted

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

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

#red a
#green b
#blue c
#a < b < c

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

while a >= b:
  b*= 2
  k -= 1

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def solve():
    a, b, c = map(int, input().split())
    k = int(input())
    while a >= b and k > 0:
        b *= 2
        k -= 1

    if a >= b:
        print("No")
        exit()

    d = c * 2 ** k
    #print(a,b,c,d,k)
    if d > b:
        print("Yes")
    else:
        print("No")


solve()

Submission status: Accepted

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

Submission status: Accepted

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

    # a < b < c
    cnt = 0

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

resolve()

Submission status: Accepted

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

while not (a<b and b<c):
    if a>=b :
        b*=2
        k-=1
    if b>=c :
        c*=2
        k-=1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
import numpy as np

a, b, c = map(int, input().split())
k = int(input())
t = -1
for i in range(k):
    if b > a:
        t = k-i
        break
    else:
        b *= 2
if t != -1:
    for j in range(t):
        if c >b:
            break
        else:
            c*= 2
            pass
if c > b:
    print("Yes")

else:
    print("No")

Submission status: Accepted

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

count = 0

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

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

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

Submission status: Accepted

Solution code:
def resolve():
  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 and B < C:
      print("Yes")
      return True
  print("No")

if __name__ == "__main__":
  resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    A, B, C = map(int, input().split())
    K = int(input())
    if A < B < C:
        print('Yes')
        exit()
    cnt = 0
    while cnt <= K:
        if A >= B:
            B *= 2
            cnt += 1
        else:
            break

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

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


    

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

mycnt = 0
while G <= R:
    G *= 2
    mycnt += 1
while B <= G:
    B *= 2
    mycnt += 1
if mycnt <= K:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
carda, cardb, cardc = list(map(int,input().split()))
nokori = int(input())
while carda >= cardb:
  cardb *= 2
  nokori -= 1
while cardb >= cardc:
  cardc *= 2
  nokori -= 1
if nokori >= 0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,C=map(int,input().split())
K=int(input())
while(True):
    if A>=B:
        B*=2
        K=K-1
    else: break
while(True):
    if B>=C:
        C*=2
        K=K-1
    else: break
if K<0: print('No')
else: print('Yes')

Submission status: Accepted

Solution code:
from math import ceil

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

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

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

Submission status: Accepted

Solution code:
import sys
import math
import statistics
import heapq

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

for a in range(K + 1):
    for b in range(K + 1 - a):
        for c in range(K + 1 - a - b):
            Ad = A * (2 ** a)
            Bd = B * (2 ** b)
            Cd = C * (2 ** c)
            # print("{} {} {}".format(a, b, c))
            # print("{} {} {}".format(Ad, Bd, Cd))

            if Ad < Bd < Cd:
                print("Yes")
                sys.exit()

print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)

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

trial = 0

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

Submission status: Accepted

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

while a >= b:
    b *= 2
    k -= 1

while b >= c:
    c *= 2
    k -= 1

if k >= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

def fun(i, k, s, t, u):
    if i == k:
        #print(s, t, u, s < t < u)
        return s < t < u
    else:
        f1 = fun(i + 1, k, s, t * 2, u)
        f2 = fun(i + 1, k, s, t, u * 2)
        return f1 or f2

t = fun(0, k, a, b, c)
print(['No', 'Yes'][t])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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


if __name__ == '__main__':
    main()