結果
| 問題 |
No.513 宝探し2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-28 11:18:58 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 518 bytes |
| コンパイル時間 | 106 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 27,864 KB |
| 平均クエリ数 | 54.83 |
| 最終ジャッジ日時 | 2024-07-17 03:45:19 |
| 合計ジャッジ時間 | 2,897 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 3 RE * 6 |
ソースコード
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 = d1
else:
Lx = d1
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 = d1
else:
Ly = d1
ask(Rx,Ry)