結果

問題 No.3520 L1等距離点
コンテスト
ユーザー titia
提出日時 2026-05-01 21:43:36
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 350 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 525 ms
コンパイル使用メモリ 20,952 KB
実行使用メモリ 35,460 KB
平均クエリ数 6.74
最終ジャッジ日時 2026-05-01 21:43:50
合計ジャッジ時間 13,613 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
input = sys.stdin.readline

T,x,y,z,w=list(map(int,input().split()))

dis=abs(x-z)+abs(y-w)

OK=0
NG=T

while NG>OK+1:
    mid=(OK+NG)//2

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

    retx,rety=list(map(int,input().split()))

    nowdis=abs(x-retx)+abs(y-rety)

    if nowdis*2<dis:
        OK=mid
    else:
        NG=mid

print("!",OK,flush=True)
0