結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
85,232 KB
testcase_01 AC 105 ms
85,316 KB
testcase_02 AC 104 ms
85,372 KB
testcase_03 AC 128 ms
88,964 KB
testcase_04 AC 106 ms
85,320 KB
testcase_05 AC 112 ms
85,580 KB
testcase_06 AC 122 ms
89,020 KB
testcase_07 AC 120 ms
88,936 KB
testcase_08 AC 115 ms
89,128 KB
testcase_09 AC 122 ms
88,696 KB
testcase_10 AC 118 ms
88,964 KB
testcase_11 AC 121 ms
89,060 KB
testcase_12 AC 122 ms
89,000 KB
testcase_13 AC 129 ms
89,152 KB
testcase_14 AC 905 ms
89,056 KB
testcase_15 AC 1,110 ms
88,928 KB
testcase_16 AC 1,032 ms
89,072 KB
testcase_17 AC 780 ms
88,896 KB
testcase_18 AC 1,152 ms
89,220 KB
testcase_19 AC 1,206 ms
89,232 KB
testcase_20 AC 1,038 ms
89,132 KB
testcase_21 AC 1,070 ms
89,012 KB
testcase_22 AC 105 ms
85,116 KB
testcase_23 AC 107 ms
84,992 KB
testcase_24 AC 1,063 ms
89,224 KB
testcase_25 AC 1,115 ms
88,992 KB
testcase_26 AC 923 ms
89,136 KB
testcase_27 WA -
testcase_28 AC 1,159 ms
88,960 KB
testcase_29 AC 1,355 ms
88,904 KB
testcase_30 AC 1,306 ms
89,328 KB
testcase_31 AC 1,183 ms
89,272 KB
testcase_32 AC 1,085 ms
88,952 KB
testcase_33 AC 696 ms
89,264 KB
testcase_34 AC 431 ms
89,156 KB
testcase_35 AC 1,118 ms
89,284 KB
testcase_36 AC 533 ms
89,148 KB
testcase_37 AC 253 ms
89,180 KB
testcase_38 AC 353 ms
88,820 KB
testcase_39 AC 348 ms
89,072 KB
testcase_40 AC 251 ms
89,160 KB
testcase_41 AC 963 ms
89,088 KB
testcase_42 AC 275 ms
89,080 KB
testcase_43 AC 316 ms
89,260 KB
testcase_44 AC 800 ms
89,140 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