結果
| 問題 | No.3520 L1等距離点 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-01 22:30:43 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 67 ms / 2,000 ms |
| コード長 | 334 bytes |
| 記録 | |
| コンパイル時間 | 142 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 71,968 KB |
| 平均クエリ数 | 6.94 |
| 最終ジャッジ日時 | 2026-05-01 22:30:50 |
| 合計ジャッジ時間 | 4,734 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 |
ソースコード
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)