結果
問題 | No.2227 King Kraken's Attack |
ユーザー | 👑 timi |
提出日時 | 2023-03-08 16:01:11 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 493 bytes |
コンパイル時間 | 314 ms |
コンパイル使用メモリ | 82,300 KB |
実行使用メモリ | 82,340 KB |
最終ジャッジ日時 | 2024-04-10 09:51:09 |
合計ジャッジ時間 | 5,456 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 36 ms
60,260 KB |
testcase_01 | AC | 35 ms
52,480 KB |
testcase_02 | AC | 35 ms
52,944 KB |
testcase_03 | AC | 161 ms
75,520 KB |
testcase_04 | AC | 35 ms
52,816 KB |
testcase_05 | AC | 36 ms
52,128 KB |
testcase_06 | AC | 34 ms
51,956 KB |
testcase_07 | AC | 35 ms
52,828 KB |
testcase_08 | AC | 34 ms
52,272 KB |
testcase_09 | AC | 46 ms
61,908 KB |
testcase_10 | AC | 36 ms
52,940 KB |
testcase_11 | AC | 35 ms
52,636 KB |
testcase_12 | AC | 92 ms
68,872 KB |
testcase_13 | AC | 54 ms
63,288 KB |
testcase_14 | AC | 36 ms
52,244 KB |
testcase_15 | AC | 34 ms
52,828 KB |
testcase_16 | AC | 34 ms
53,380 KB |
testcase_17 | AC | 350 ms
75,484 KB |
testcase_18 | AC | 36 ms
52,880 KB |
testcase_19 | AC | 35 ms
52,284 KB |
testcase_20 | TLE | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
testcase_41 | -- | - |
testcase_42 | -- | - |
testcase_43 | -- | - |
testcase_44 | -- | - |
testcase_45 | -- | - |
ソースコード
H,W,LA,LB,KA,KB=map(int, input().split()) if KA==0 and KB==0: print((H-1)//LA+(W-1)//LB+2) exit() if KB==0: H,W,LA,LB,KA,KB=W,H,LB,LA,KB,KA import bisect Y=(H*W-1)//KA+1 ans=10**10 for y in range(Y+1): xx=max(0,H*W-y*KA) if xx==0: ans=min(ans,y) else: X=(xx-1)//KB+1 ng,ok=-1,X+1 for i in range(20): mid=(ok+ng)//2 ko=y*KA+mid*KB+min(H,LA*y)*min(W,LB*mid) if ko>=H*W: ok=mid else: ng=mid ans=min(ans,y+ok) print(ans)