結果
問題 |
No.513 宝探し2
|
ユーザー |
|
提出日時 | 2020-05-28 12:00:21 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 55 ms / 2,000 ms |
コード長 | 551 bytes |
コンパイル時間 | 147 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 27,736 KB |
平均クエリ数 | 56.00 |
最終ジャッジ日時 | 2024-07-17 02:44:12 |
合計ジャッジ時間 | 1,744 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
import sys sys.setrecursionlimit(10000000) MOD = 10 ** 9 + 7 INF = 10 ** 15 def ask(x,y): print(x,y,flush = True) d = int(input()) if d == 0: exit() return d Lx = -1 Rx = 100001 while Rx - Lx > 1: Mx = (Rx + Lx)//2 d1 = ask(Mx,0) d2 = ask(Mx + 1,0) if d1 < d2: Rx = Mx else: Lx = Mx Ly = -1 Ry = 100001 while Ry - Ly > 1: My = (Ry + Ly)//2 d1 = ask(0,My) d2 = ask(0,My + 1) if d1 < d2: Ry = My else: Ly = My ask(Rx,Ry) ask(Lx,Ly) ask(Rx,Ly) ask(Lx,Ry)