結果

問題 No.1748 Parking Lot
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2021-11-21 02:58:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 320 bytes
コンパイル時間 647 ms
コンパイル使用メモリ 10,612 KB
実行使用メモリ 12,460 KB
最終ジャッジ日時 2023-09-03 19:13:53
合計ジャッジ時間 5,682 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
12,460 KB
testcase_01 AC 16 ms
7,812 KB
testcase_02 AC 15 ms
8,192 KB
testcase_03 AC 15 ms
8,256 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())
from heapq import heappop,heappush
P = []
heappush(P,(2-2*K,2-K,K))
heappush(P,(-2*(N-K),K,2*N-K))
for i in range(N-1):
    x,l,r = heappop(P)
    while r<=0 or l>=N:
        x,l,r = heappop(P)
    mid = (l+r)//2
    heappush(P,(-(mid-l),l,mid))
    heappush(P,(-(r-mid),mid,r))
print(mid)
0