結果

問題 No.3520 L1等距離点
コンテスト
ユーザー AP25
提出日時 2026-05-01 22:30:43
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 200 ms / 2,000 ms
+ 2µs
コード長 334 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 75 ms
コンパイル使用メモリ 80,384 KB
実行使用メモリ 54,400 KB
平均クエリ数 6.94
最終ジャッジ日時 2026-09-16 18:06:49
合計ジャッジ時間 3,331 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 35
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

T, x0, y0, x1, y1 = map(int, input().split())

t0 = 0
t1 = T

while t1 - t0 > 1:

    m = (t0 + t1) // 2 

    print("?", m, flush = True)

    x,y = map(int, input().split())

    d0 = abs(x-x0) + abs(y-y0)
    d1 = abs(x-x1) + abs(y-y1)

    if d0 <= d1:
        t0 = m
    else:
        t1 = m

print("!",t0)
0