結果

問題 No.2227 King Kraken's Attack
ユーザー buey_tbuey_t
提出日時 2023-02-25 13:04:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,397 bytes
コンパイル時間 410 ms
コンパイル使用メモリ 82,192 KB
実行使用メモリ 89,440 KB
最終ジャッジ日時 2024-04-10 09:47:40
合計ジャッジ時間 28,724 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
85,356 KB
testcase_01 AC 108 ms
85,532 KB
testcase_02 AC 110 ms
85,372 KB
testcase_03 AC 124 ms
89,160 KB
testcase_04 AC 111 ms
85,528 KB
testcase_05 AC 107 ms
85,116 KB
testcase_06 AC 119 ms
89,224 KB
testcase_07 AC 121 ms
88,932 KB
testcase_08 AC 118 ms
89,120 KB
testcase_09 AC 126 ms
89,440 KB
testcase_10 AC 125 ms
89,100 KB
testcase_11 AC 123 ms
89,252 KB
testcase_12 AC 130 ms
88,900 KB
testcase_13 AC 134 ms
88,880 KB
testcase_14 AC 946 ms
89,096 KB
testcase_15 AC 1,060 ms
89,156 KB
testcase_16 AC 951 ms
88,960 KB
testcase_17 AC 702 ms
88,892 KB
testcase_18 AC 1,128 ms
89,104 KB
testcase_19 AC 1,182 ms
89,004 KB
testcase_20 AC 1,036 ms
89,004 KB
testcase_21 AC 1,091 ms
88,932 KB
testcase_22 AC 110 ms
85,044 KB
testcase_23 AC 110 ms
85,040 KB
testcase_24 AC 1,073 ms
88,960 KB
testcase_25 AC 1,146 ms
89,204 KB
testcase_26 AC 956 ms
89,380 KB
testcase_27 WA -
testcase_28 AC 1,187 ms
89,300 KB
testcase_29 AC 1,403 ms
89,296 KB
testcase_30 AC 1,304 ms
89,208 KB
testcase_31 AC 1,188 ms
89,260 KB
testcase_32 AC 1,083 ms
89,300 KB
testcase_33 AC 692 ms
89,296 KB
testcase_34 AC 434 ms
88,896 KB
testcase_35 AC 1,123 ms
88,952 KB
testcase_36 AC 531 ms
89,216 KB
testcase_37 AC 250 ms
89,300 KB
testcase_38 AC 348 ms
89,104 KB
testcase_39 AC 343 ms
89,176 KB
testcase_40 AC 263 ms
89,080 KB
testcase_41 AC 954 ms
89,092 KB
testcase_42 AC 268 ms
89,092 KB
testcase_43 AC 306 ms
88,900 KB
testcase_44 AC 792 ms
89,256 KB
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    try:
        import pypyjit
        pypyjit.set_param('max_unroll_recursion=-1')
    except:
        pass
    try:
        import sys
        sys.setrecursionlimit(10**7)
    except:
        pass
    from math import sqrt,sin,cos,tan,ceil,radians,floor,gcd,exp,log,log10,log2,factorial,fsum
    import heapq
    from bisect import bisect_left, bisect_right
    import copy
    from collections import deque,Counter,defaultdict
    from itertools import permutations,combinations
    from decimal import Decimal,ROUND_HALF_UP
    #tmp = Decimal(mid).quantize(Decimal('0'), rounding=ROUND_HALF_UP)
    from functools import lru_cache, reduce
    #@lru_cache(maxsize=None)
    from operator import add,sub,mul,xor,and_,or_
    INF = 10**18
    mod1 = 10**9+7
    mod2 = 998244353
    
    #DecimalならPython
    
    H,W,La,Lb,Ka,Kb = map(int, input().split())
    
    ans = INF
    
    for i in range(H+1):
        l = 0
        h = 10**12
        while h-l > 1:
            m = (l+h)//2
            
            if min(i*La,H)*min(m*Lb,W) + i*Ka + m*Kb >= H*W:
                h = m
            else:
                l = m
        
        ans = min(ans, h+i)
    
    print(ans)
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
if __name__ == '__main__':
    main()
0