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:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)
A, B, C = map(int, input().split())
K = int(input())
def dfs(x, y, z, k):
  if k == 0:
    return x < y < z
  res = False
  res |= dfs(x * 2, y, z, k - 1)
  res |= dfs(x, y * 2, z, k - 1)
  res |= dfs(x, y, z * 2, k - 1)
  return res
if dfs(A, B, C, K): print("Yes")
else: print("No")

Submission status: Accepted

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

    ans = 0
    while a >= b:
        b *= 2
        ans += 1
    while b >= c:
        c *= 2
        ans += 1
    if k>=ans:
        print("Yes")
    else:
        print("No")
resolve()

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
f_inf = float('inf')
mod = 10 ** 9 + 7


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

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

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

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


if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
import itertools

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

flag = False

for arr in list(itertools.product([0,1,2], repeat=k)):
    temp = [a,b,c]
    for i in range(k):
        temp[arr[i]] = temp[arr[i]]*2

        if temp[0] < temp[1] and temp[2] > temp[1]:
            flag = True

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

Submission status: Accepted

Solution code:
a, b, c = map(int, input().split())
k = int(input())
ans = 0
for i in range(10000):
    if a < b and b < c:
        break
    else:
        if a < b:
            c *= 2

        else:
            b *= 2

    ans += 1

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

A, B, C = mapint()
K = int(input())

for k in range(K+1):
    if A>=B:
        B *= 2
        continue
    if B>=C:
        C *= 2
        continue
    print('Yes')
    break
else:
    print('No')

Submission status: Accepted

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

i_b = 0
while b <= a:
    i_b += 1
    b *= 2

i_c = 0
while c <= b:
    i_c += 1
    c *= 2

if i_b + i_c <= k:
    print ('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
a, b, c = [int(i) for i in input().split()]
k = int(input())
cnt = 0
while a >= b:
    b *= 2
    cnt += 1
while b >= c:
    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())

m = 0
while a >= b:
    m += 1
    b *= 2
while b >= c:
    m += 1
    c *= 2

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

Submission status: Accepted

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

cnt = 0

while B <= A:
    B = B * 2
    cnt += 1

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

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

a,b,c = na()
k = ni()

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

print('No')

Submission status: Accepted

Solution code:
#import numpy as np
#import math
#from decimal import *
#from numba import njit

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

    while K > 0:
        if B <= A:
            B = B*2
        elif C <= B:
            C = C*2
        K -= 1

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

Submission status: Accepted

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

K = int(input())

rest = K
while A >= B and rest > 0:
    B *= 2
    rest -= 1
while B >= C and rest > 0:
    C *= 2
    rest -= 1

if rest >= 0 and 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 = 0
while B <= A:
    ans += 1
    B *= 2
while C <= B:
    ans += 1
    C *= 2
if ans <= K:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
from math import gcd

from math import factorial as f

from math import ceil, floor, sqrt
import math

import bisect
import re
import heapq

from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

yes = "Yes"
no = "No"


def main():
    a, b, c = mi()
    k = ii()
    cnt = 0
    while b <= a:
        cnt += 1
        b *= 2
    while c <= b:
        cnt += 1
        c *= 2
    if k < cnt:
        print(no)
    else:
        print(yes)


main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

for k in range(K):
    if G <= R:
        G *= 2
    elif B <= G:
        B *= 2
    else:
        B *= 2

if B > G > R:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
import math


def input():
    return sys.stdin.readline().rstrip()


def main():
    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("No")
    else:
        print("Yes")






if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
count = 0
ans = "No"

A,B,C = I()
K = i()

while True:
    if B > A or K == 0:
        break
    else:
        B *= 2
        K -= 1
while True:
    if C > B or K == 0:
        break
    else:
        C *= 2
        K -= 1
if A < B and B < C:
    ans = "Yes"
print(ans)

Submission status: Accepted

Solution code:
import io
import os

from collections import Counter, defaultdict, deque


def solve(A, B, C, K):
    k = 0
    while A >= B:
        B *= 2
        k += 1
    while B >= C:
        C *= 2
        k += 1
    assert A < B < C
    if k <= K:
        return "Yes"
    return "No"


if __name__ == "__main__":
    input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
    A, B, C = [int(x) for x in input().split()]
    K, = [int(x) for x in input().split()]  

    ans = solve(A, B, C, K)
    
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import os
import sys
import math
import heapq
from decimal import *
from io import BytesIO, IOBase
from collections import defaultdict, deque

def r():
    return int(input())
def rm():
    return map(int,input().split())
def rl():
    return list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
# def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  a,b,c=LI()
  k=I()
  for _ in range(k):
    if a<b<c:
      return 'Yes'
    if a>=b:
      b*=2
    elif b>=c:
      c*=2

  if a<b<c:
    return 'Yes'
  return 'No'

# main()
print(main())

Submission status: Accepted

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

cnt = 0
while B <= A:
    B *= 2
    cnt += 1
while C <= B:
    C *= 2
    cnt += 1

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

Submission status: Accepted

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

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

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

print('Yes' if c>b>a 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 a<b and b>=c:
    c *= 2
if a<b and b<c:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys


def _i(): return int(sys.stdin.readline().strip())


def _ia(): return map(int, sys.stdin.readline().strip().split())


def main():
    a, b, c = _ia()
    k = _i()

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

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

    return "Yes" if cnt <= k else "No"


if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    a , b , c = map(int,input().split())
    k = int(input())
    cnt = 0
    while b<=a:
        cnt += 1
        b *= 2
    while c<=b:
        cnt += 1
        c *= 2

    if cnt >k:
        print("No")
    else:
        print("Yes")

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
range = xrange
input = raw_input

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())
x = 0
while a >= b:
    b *= 2
    x += 1
while b >= c:
    c *= 2
    x += 1
if x <= k:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# import sys
import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
    # combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    a,b,c = readInt()
    k = int(input())
    res = 0
    while b<=a:
        b *= 2
        res += 1
    while c<=b:
        c *= 2
        res += 1
    if res<=k:
        print("Yes")
    else:
        print("No")
    return

if __name__=='__main__':
    main()

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())
ans=0
while a>=b:
    b*=2
    ans+=1
while b>=c:
    c*=2
    ans+=1
if ans<=k:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

while C <= B and K > 0:
    C = 2 * C
    K = 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())
x = 0
while 1:
    if b > a:
        break
    else:
        b *= 2
        x += 1
y = 0
while 1:
    if c > b:
        break
    else:
        c *= 2
        y += 1
if x + y <= k:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, Counter, namedtuple, deque
import itertools
import functools
import bisect
import heapq
import math
import copy
# from fractions import gcd

MOD = 10 ** 9 + 7
# MOD = 998244353
# sys.setrecursionlimit(10**8)

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:
#!/usr/bin/env python3

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

if A < B < C:
    print('Yes')
    exit()

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: Accepted

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


i=0
while B<=A:
    i+=1
    B*=2
while C<=B:
    i+=1
    C*=2
if i>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

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#
#    ------------------------------------------------
#           ____          _     Generatered using
#          / ___|        | |
#         | |    __ _  __| | ___ _ __  ______ _
#         | |   / _` |/ _` |/ _ \ '_ \|_  / _` |
#         | |__| (_| | (_| |  __/ | | |/ / (_| |
#          \____\____|\____|\___|_| |_/___\____|
#
#      GNU Affero General Public License v3.0
#    ------------------------------------------------
#    Author   : prophet
#    Created  : 2020-07-25 08:05:35.508699
#    UUID     : idTjzDkOmGFPLyah
#    ------------------------------------------------
#
production = True

import sys, math, collections

def input(f = 0, m = 0):

    if m > 0: return [input(f) for i in range(m)]
    else:
        l = sys.stdin.readline()[:-1]

        if f >= 10:
            u = False
            f = int(str(f)[-1])
        else: u = True

        if f == 0: p = [l]
        elif f == 1: p = list(map(int, l.split()))
        elif f == 2: p = list(map(float, l.split()))
        elif f == 3: p = list(l)
        elif f == 4: p = list(map(int, list(l)))
        elif f == 5: p = l.split()

        return p if u else p[0]

def out(l, f = 0, n = True):

    if f == 0: p = str(l)
    elif f == 1: p = " ".join(map(str, l))
    elif f == 2: p = "\n".join(map(str, l))
    elif f == 3: p = "".join(map(str, l))

    print(p, end = "\n" if n else "")

def log(*args):
    if not production:
        print("$$$", end = "")
        print(*args)

enu = enumerate
ter = lambda a, b, c: b if a else c
ceil = lambda a, b: -(-a // b)
flip = lambda a: (a + 1) & 1

def mapl(i, f = 0):

    if f == 0: return list(map(int, i))
    elif f == 1: return list(map(str, i))
    elif f == 2: return list(map(list, i))

#
#   >>>>>>>>>>>>>>> START OF SOLUTION <<<<<<<<<<<<<<
#


def solve():

    a, b, c = input(1)
    k = input(11)

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

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

    log(k)
    out(ter(k >= 0, "Yes", "No"))

    return


solve()

#
#   >>>>>>>>>>>>>>>> END OF SOLUTION <<<<<<<<<<<<<<<
#

Submission status: Accepted

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

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

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

Submission status: Accepted

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 B > A and C > B:
        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<c:
    print('Yes')
    exit()
  if c<=a or c<=b:
    c*=2
  else:
    if b<=a:
      b*=2
  if a<b<c:
    print('Yes')
    exit()
print('No')

Submission status: Accepted

Solution code:
from itertools import product


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

for D in product([0, 1, 2], repeat=K):
    ans = [A, B, C]
    for d in D:
        ans[d] *= 2
    if ans[0] < ans[1] < ans[2]:
        print("Yes")
        break
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
        continue
    if not b < c:
        c *= 2
        continue
if a < b and b < c:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

k = int(input())

while a>=b:
  b *= 2
  k -= 1
  
while b>=c:
  c *= 2
  k -= 1
  
print("Yes" if k >=0 else "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
print("Yes" if count<=k else "No")

Submission status: Accepted

Solution code:
p = list(map(int,input().split()))
K = int(input())
a = p[0]
b = p[1]
c = p[2]
i = 0
while b <= a:
  b = b*2
  i += 1
while c <= b:
  c = c*2
  i += 1
if i <= K:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(500000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

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

for i in range(k):
    if a<b:
        c*=2
    else:
        b*=2
# print(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())

res = 0

while a >=b:
    b = b*2
    res +=1
    
while b >= c:
    c = c*2
    res +=1

if res <= k:
    print("Yes")

else:
    print("No")

Submission status: Accepted

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

count = 0
while 1:
    if b > a:
        break
    b = 2*b
    count += 1
while 1:
    if c > b:
        break
    c = 2*c
    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())
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())
for i in range(k):
    if b <= a:
        b *= 2
    elif c <= b:
        c *= 2

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

Submission status: Accepted

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

while A >= B:
    K -= 1
    B *= 2
    if K < 0:
        print('No')
        exit()
while B >= C:
    K -= 1
    C *= 2
    if K < 0:
        print('No')
        exit()
print('Yes')

Submission status: Accepted

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

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

Submission status: Accepted

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

for ctA in range(K+1):
    for ctB in range(K-ctA+1):
        for ctC in range(K-ctA-ctB+1):
            if A*(2**ctA) < B*(2**ctB) < C*(2**ctC):
                print('Yes')
                exit()
print('No')

Submission status: Accepted

Solution code:
#X = int(input())
#S = str(input())
A, B, C = map(int, input().split())
#C = list(map(int, input().split()))
ans = 0
while A >= B:
  B *= 2
  ans += 1
#print(A, B, C, ans)  
while B >= C:
  C *= 2
  ans += 1
  
K = int(input())
#print(ans)
if ans <= K:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

print('Yes' if cnt <= k else 'No')

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.readline

def solve():
    A, B, C = map(int, readline().split())
    K = int(readline())

    count = 0

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

solve()

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    A, B, C = map(int, readline().split())
    K = int(readline())
    count = 0
    while A>=B:
        B*=2
        count += 1
    while B>=C:
        C*=2
        count += 1
    if count<=K:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

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")
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
print("Yes" if k >= 0 else "No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def check(s):
    for i in range(len(s)):
        if s[i] != s[len(s)-1-i]:
            return False
    return True

def main():
    a, b, c = rli()
    k = ri()
    for i in range(k):
        if a >= b:
            b *= 2
            continue
        if b >= c:
            c *= 2
    if a < b and b < c:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b, c = (int(x) for x in 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")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

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

while A >= B:
    B *= 2
    K -= 1
while B >= C:
    C *= 2
    K -= 1

print("Yes" if K >= 0 else "No")

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

A,B,C = I()
K = i()
num = 0
for i in range(100):
    if B > A:
        break
    B *= 2
    num += 1
for i in range(100):
    if C > B:
        break
    C *= 2
    num += 1
if num <= 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:
        B *= 2
    elif B >= C:
        C *= 2
if A < B < C:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

n=0

while a>=b:
    b=b*2
    n+=1

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

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

Submission status: Accepted

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

cnt = 0
while A >= B:
    B *= 2
    cnt += 1
while B >= C:
    C *= 2
    cnt += 1

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

Submission status: Accepted

Solution code:
a,b,c=map(int,input().split())
k=int(input())
while a>=b and k!=0:
  k-=1
  b*=2
if a>=b:
  k=0
while b>=c and k!=0:
  k-=1
  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())
cnt=0
while a>=b:
    b*=2
    cnt+=1
while b>=c:
    c*=2
    cnt+=1
if k>=cnt:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

K = int(input())

cnt = 0

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

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

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

Submission status: Accepted

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

K = int(input())

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,C = map(int,input().split())
K = int(input())
for _ in range(K):
    if A >= B:
        B *= 2
    else:
        if B >= C:
            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())
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:
import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	A, B, C = getlist()
	K = int(input())
	jud = "No"
	for i in range(K + 1):
		for j in range(K + 1):
			for k in range(K + 1):
				a, b, c = A, B, C
				a *= 2 ** i
				b *= 2 ** j
				c *= 2 ** k
				if i + j + k <= K:
					if a < b and b < c:
						print("Yes")
						return

	print("No")

if __name__ == '__main__':
	main()