結果

問題 No.513 宝探し2
ユーザー tookunn_1213tookunn_1213
提出日時 2017-05-06 00:02:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 419 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 10,828 KB
実行使用メモリ 24,384 KB
平均クエリ数 23.50
最終ジャッジ日時 2023-09-23 13:52:00
合計ジャッジ時間 2,867 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
23,672 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 41 ms
24,228 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 RE -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 41 ms
24,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
def query(p):
	print(p[0],p[1])
	sys.stdout.flush()
	return int(input())
dis=query((0,0))
def rec(l,r):
	lr = (r+l)//2
	ll=lr-(r-l)//3
	rr=lr+(r-l)//3
	sys.stderr.write(str(ll)+':')
	sys.stderr.write(str(rr)+'\n')
	sys.stderr.flush()
	lll=query((ll,0))
	rrr=query((rr,0))
	if lll < rrr:
		return rec(l,(r+l)//2)
	elif lll > rrr:
		return rec((r+l)//2,r)
	else:
		return lll
y=rec(0,dis)
x=dis-y
query((x,y))
0