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

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

Submission status: Wrong Answer

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()

r, g, b = map(int, input().split(" "))
k = int(input())

for i in range(k):
    if g <= b:
        g *= 2
    elif b <= g:
        b *= 2
if b > g > r:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

is_Ok = False
for i in range(k) :
    # print(k,a,b,c)
    if (a > b) :
        b *= 2
        continue

    if (b > c) :
        c *= 2
        continue

    if (a<b and b<c) :
        is_Ok = True
        break

if (a<b and b<c) :
    is_Ok = True

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys


def handler():
    a, b, c = [int(i) for i in input().strip().split()]
    bar = int(input().strip())
    foo = 0
    while b <= a:
        b *= 2
        foo += 1
    while c <= b:
        c *= 2
        foo += 1
    if foo <= bar:
        sys.stdout.write('YES\n')
    else:
        sys.stdout.write('NO\n')


def main():
    while True:
        try:
            handler()
        except ValueError:
            continue
        except EOFError:
            break


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jul 25 21:02:29 2020

@author: NEC-PCuser
"""

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

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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())
i = 0
while(not(A < B)):
    B = B * 2
    i = i + 1
while(not(B < C)):
    C = C * 2
    i = i + 1
print(i)
if i <= K:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#import numpy as np
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial#, gcd
from bisect import bisect_left, bisect_right #bisect_left(list, value)
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
pl = lambda x: print(*x, sep='\n')

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

def chk(A, B, C):
    if A < B < C:
        return True
    else:
        return False

for _ in range(K):
    # print(' A, B, C', A, B, C)
    if chk(A, B, C):
        print('Yes')
        exit()
    if A >= B:
        B *= 2
    elif B >= C:
        C *= 2

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

resolve()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict,deque
import math
def gcd(a,b):
    return b if not a%b else gcd(b,a%b)
def lcm(a,b):
    return (a*b)//gcd(a,b)

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

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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys, bisect, math, itertools, heapq, collections
from operator import itemgetter
# a.sort(key=itemgetter(i)) # i番目要素でsort
from functools import lru_cache
# @lru_cache(maxsize=None)
sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = float('inf')
mod = 10**9 + 7
eps = 10**-7


def inp():
    '''
    一つの整数
    '''
    return int(input())


def inpl():
    '''
    一行に複数の整数
    '''
    return list(map(int, input().split()))


def str_inp():
    '''
    文字列をリストとして読み込む
    '''
    return list(input()[:-1])


a, b, c = inpl()
k = inp()
FLAG = True
while k:
    if b > a:
        FLAG = False
        break
    b *= 2
    k -= 1
if FLAG:
    print("No")
    exit()
FLAG = True
while k:
    if c > b:
        break
    c *= 2
    k -= 1
if FLAG:
    print("No")
    exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
k=int(input())
cnt=0
for i in range(k):
    if b>a:
        break
    else:
        b*=2
        cnt+=1
for i in range(k):
    if c>b:
        break
    else:
        c*=2
        cnt+=1


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

Submission status: Wrong Answer

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


resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

a,b,c=MI()
k=II()

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

while c<=b:
    c*=2
    k-=1
    if k<0:
        print("NO")
        exit()

print("YES")

Submission status: Wrong Answer

Solution code:
A, B, C = map(int, input().split())
binary = [1, 2, 4, 8, 16, 32, 64, 128, 256]
K = int(input())
flg = False
for i in range(K):
  for j in range(K):
    for k in range(K):
      if i + j + k == K:
        if A*binary[i] < B*binary[j] and B*binary[j] < C*binary[k]:
          flg = True
if flg:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import math
a, b, c = map(int, input().split())
k = int(input())
ans = 0
if a >= b:
    ans += math.floor(math.log2(a / b)) + 1
    b *= pow(2, math.ceil(math.log2(a / b)))
if b >= c:
    ans += math.floor(math.log2(b / c)) + 1
print("Yes" if ans <= k else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

k = int(input())

for i in range(k):
    if a < b and b < c:
        print("Yes")
        exit()

    elif a > b:
        b *= 2

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

Solution code:
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

a,b,c=nii()
k=int(input())

for i in range(k):
  if a<b<c:
    print('Yes')
    exit()

  if a>=b:
    b*=2
  if b>=c:
    c*=2

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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 and A < B < C:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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


def readstr():
    return input().strip()


def readint():
    return int(input())


def readnums():
    return map(int, input().split())


def readstrs():
    return input().split()


def main():
    A, B, C = readnums()
    K = readint()
    while K:
        if A > B:
            B *= 2
            K -= 1
        elif B > C:
            C *= 2
            K -= 1
        else:
            break

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

for i in range(k):
    if a > b:
        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 sys, os, math, bisect, itertools, collections, heapq, queue, copy, array

# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
# from decimal import Decimal
# from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    R, G, B = il()
    K = ii()

    for k in range(K):
        if B < G:
            B *= 2
        elif G < R:
            G *= 2
        if B > G > R:
            print('Yes')
            exit()
    else:
        print('No')


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = "No"
for a in range(K):
  for b in range(K):
    for c in range(K):
      if a+b+c<=K and (A<<a)<(B<<b)<(C<<c):
        ans = "Yes"
print(ans)

Submission status: Wrong Answer

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
a,b,c = readInts()
k = I()
for i in range(k):
    if a < b < c:
        print('Yes')
        exit()
    if b > c:
        c *= 2
    elif a > b:
        b *= 2
    #print(a,b,c)
if a < b < c:
    print('Yes')
    exit()
else:print('No')

Submission status: Wrong Answer

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

Solution code:
A, B, C = list(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 > A:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Time Limit Exceeded

Solution code:
r, g, b = [int(x) for x in input().split()]
times = int(input())

def check(r, g, b, times):
    while True:
        if b > g > r:
            return 'Yes'
        elif b < g:
            times -= 1
            b *= 2
        elif g < r:
            times -= 1
            g *= 2
        if times < 0:
            return 'No'

print(check(r, g, b, times))

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
#template
def inputlist(): return [int(j) for j in input().split()]
#template
A,B,C = inputlist()
K = int(input())
count = 0
while count < K:
    if A > B:
        B = 2*B
        count +=1
        continue
    if B > C:
        C = 2*C
        count +=1
        continue
    if A < B<C:
        print("Yes")
        exit()
if A < B < C:
    print("Yes")
else:
    print("No")

Submission status: Time Limit Exceeded

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

while k > 0:
  if b < a:
    b *= 2
    k -= 1
  elif c < b:
    c *= 2
    k -= 1

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

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
a,b,c=map(int,input().split())
k=int(input())
if a<b:
    if b<c:
        print('Yes')
    else:
        count=0
        while b>=c:
            b*=2
            count+=1
        if count<=k:
            print('Yes')
        else:
            print('No')
else:
    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: Time Limit Exceeded

Solution code:
a, b, c = map(int, input().split())#赤midoriao
k = int(input())
#赤＜緑＜青
if a < b and b<c:
  print("Yes")
else:
  while k > 0:
    if a >= b:
      b = b*2
      k-=1
      if k==0:
        break
    if b >= c and k>0:
      c = c*2
      k -=1
  if a < b and b < c:
    print("Yes")
  else:
    print("No")

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

K = int(input())

while K > 0:
  if g < r:
    g *= 2
    K -= 1
    continue

  if b < g:
    b *= 2
    K -= 1
    continue

  if g > r and b > g:
    break




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

Submission status: Time Limit Exceeded

Solution code:
def main():
    A, B, C = map(int, input().split())
    K = int(input())
    n = 0
    while n < K:
        if C < B or C < A:
            C = C * 2
            n += 1
            if C > B > A:
                print('Yes')
                return
        elif B < A:
            B = B * 2
            n += 1
            if C > B > A:
                print('Yes')
                return
    print('No')
            
main()

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
i = list(map(int, input().split()))
limit = int(input())
k = 0
while not i[0] < i[1] < i[2]:
    if i[2] < i[1]:
        i[2] *= 2
        k += 1
    if k == limit:
        break
    if i[1] < i[0]:
        i[1] *= 2
        k += 1
    if k == limit:
        break
if k <= limit and i[0] < i[1] < i[2]:
    print("Yes")
else:
    print("No")

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

while(k > 0):
    if l[0] > l[1]:
        l[1] *= 2
        k -= 1
    elif l[1] > l[2]:
        l[2] *= 2
        k -= 1
    
    if l[0] < l[1] and l[1] < l[2]:
        print('Yes')
        exit()

print('No')

Submission status: Time Limit Exceeded

Solution code:
#-------------
A,B,C = map(int, input().split())
K = int(input())
#-------------
 
while True :
  if A > B :
    B = B*2
    K -= 1
  if B > C :
    C = C*2
    K -= 1
  if K == 0 :
    break

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

Submission status: Time Limit Exceeded

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

count = 0
while count<k:
    if g<r:
        g *= 2
        count += 1

    elif b<g:
        b *= 2
        count += 1
    
    if b>g and g>r:
        break

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

Submission status: Time Limit Exceeded

Solution code:
input_ = input()
a = int(input_.split(' ')[0])
b = int(input_.split(' ')[1])
c = int(input_.split(' ')[2])
k = int(input())
count = 0
ans = "No"
while count < k:
  if a > b:
    b *= 2
    count += 1
  elif b > c:
    c *= 2
    count += 1
  if a < b and b < c:
    ans = "Yes"

print(ans)

Submission status: Time Limit Exceeded

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

count = 0
while count<k:
    if b<r or b<g:
        b *= 2
        count += 1
    elif g<r:
        g *= 2
        count += 1

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

Submission status: Time Limit Exceeded

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

Submission status: Time Limit Exceeded

Solution code:
def main():
    red, green, blue  = map(int, input().split())
    K = int(input())

    while(K > 0):
        if green <= red:
            green *= 2
            K -= 1
            continue
        if blue <= green:
            blue *= 2
            K -= 1
            continue

    if blue > green:
        if green > red:
            print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

Submission status: Time Limit Exceeded

Solution code:
a, b, c = map(int, input().split())
k = int(input())
flag = False
if a < b < c:
    flag = True
count = 0
while count < k and not (a < b < c):
    if a > b:
        count += 1
        b = 2*b
    if b > c:
        count += 1
        c = 2*c

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

Submission status: Time Limit Exceeded

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

num = 0

while (True):
    if  (num == K):
        break
        
    if (R > G):
        G *= 2
        num += 1
        
    if (R < G):
        break
    
while (True):
    if  (num == K):
        break
        
    if (G > B):
        B*= 2
        num += 1
        
    if (G < B):
        break

if (R < G and G < B):
    ans = 'Yes'
    
print(ans)

Submission status: Time Limit Exceeded

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

while k:
    if a>=b:
        b *= 2
        k -= 1
    elif b>=c:
        c *= 2
        k -= 1

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

Submission status: Time Limit Exceeded

Solution code:
a, b, c = map(int, input().split())
k = int(input())
flag = False
if a < b < c:
    flag = True
count = 0
if not flag:
    while count < k:

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

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

while True :
  if A >= B :
    B = B*2
    K -= 1
  if B >= C :
    C = C*2
    K -= 1
  if K == 0 :
    break

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

Submission status: Time Limit Exceeded

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

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

Submission status: Time Limit Exceeded

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

i = 0
while i < k:
  if a >= b:
    b = b * 2
    i += 1
  if c >= b:
    c = c * 2
    i += 1

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

Submission status: Time Limit Exceeded

Solution code:
from collections import defaultdict,deque
from sys import stdin,setrecursionlimit
import heapq,bisect,math,itertools,string,queue,copy
setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, stdin.readline().split()))



def main():
    count = 0
    A,B,C = inpl()
    K = int(input())
    while True:
        if A < B < C:
            print('Yes')
            return
        if B < A:
            B *= 2
            count += 1
            if count == K and not(A < B < C):
                print('No')
                return
        if C < B:
            C *= 2
            count += 1
            if count == K and not(A < B < C):
                print('No')
                return
main()

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
"""
@author: H_Hoshigi
"""
def main():
    A, B, C = map(int, input().split())
    K = int(input())

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

if __name__ == "__main__":
    main()

Submission status: Time Limit Exceeded

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

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

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

Submission status: Time Limit Exceeded

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

i = 0

while i<K:
  if B<=A:
    B *= 2
    i += 1
  elif C<=B:
    C*= 2
    i += 1

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