結果

問題 No.2227 King Kraken's Attack
ユーザー norikamenorikame
提出日時 2023-01-19 02:40:38
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 500 bytes
コンパイル時間 231 ms
コンパイル使用メモリ 82,232 KB
実行使用メモリ 62,960 KB
最終ジャッジ日時 2024-04-10 09:15:07
合計ジャッジ時間 3,972 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
51,948 KB
testcase_01 AC 34 ms
52,908 KB
testcase_02 AC 35 ms
53,268 KB
testcase_03 AC 39 ms
58,848 KB
testcase_04 AC 35 ms
52,432 KB
testcase_05 AC 38 ms
52,688 KB
testcase_06 AC 45 ms
59,716 KB
testcase_07 AC 35 ms
52,656 KB
testcase_08 AC 37 ms
53,560 KB
testcase_09 AC 40 ms
61,024 KB
testcase_10 AC 41 ms
61,432 KB
testcase_11 AC 38 ms
52,596 KB
testcase_12 AC 35 ms
53,564 KB
testcase_13 AC 39 ms
58,096 KB
testcase_14 AC 116 ms
59,636 KB
testcase_15 AC 35 ms
53,016 KB
testcase_16 AC 43 ms
58,824 KB
testcase_17 AC 232 ms
61,596 KB
testcase_18 AC 168 ms
60,828 KB
testcase_19 AC 44 ms
61,180 KB
testcase_20 AC 43 ms
60,488 KB
testcase_21 AC 70 ms
61,840 KB
testcase_22 AC 33 ms
53,004 KB
testcase_23 AC 32 ms
52,876 KB
testcase_24 AC 69 ms
60,712 KB
testcase_25 AC 197 ms
61,296 KB
testcase_26 AC 125 ms
59,988 KB
testcase_27 AC 102 ms
59,540 KB
testcase_28 AC 48 ms
62,004 KB
testcase_29 AC 43 ms
62,272 KB
testcase_30 AC 46 ms
62,832 KB
testcase_31 AC 48 ms
62,176 KB
testcase_32 AC 47 ms
62,960 KB
testcase_33 AC 43 ms
60,820 KB
testcase_34 AC 43 ms
61,184 KB
testcase_35 AC 47 ms
62,224 KB
testcase_36 AC 43 ms
60,964 KB
testcase_37 AC 35 ms
51,908 KB
testcase_38 AC 35 ms
53,016 KB
testcase_39 AC 34 ms
52,404 KB
testcase_40 AC 35 ms
52,388 KB
testcase_41 AC 34 ms
53,372 KB
testcase_42 AC 34 ms
52,896 KB
testcase_43 AC 34 ms
52,396 KB
testcase_44 AC 33 ms
52,200 KB
testcase_45 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

# 

INF = (int)(1e9)
h, w, la, lb, ka, kb = map(int, input().split())
amx, bmx, res = (h+la-1) // la, (w+lb-1) // lb, INF

for acnt in range(amx+1):
    alen, adda = min(h, acnt*la), acnt * ka
    lval, rval = -1, bmx + 1
    while rval-lval > 1:
        cval = rval - (rval-lval) // 2
        blen, addb = min(w, cval*lb), cval * kb
        if alen*blen+adda+addb < h*w:
            lval = cval
        else:
            rval = cval
    if rval <= bmx:
        res = min(res, acnt+rval)

print(res)
0