結果
| 問題 |
No.594 壊れた宝物発見機
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-10-06 13:57:56 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,324 bytes |
| コンパイル時間 | 537 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 83,496 KB |
| 平均クエリ数 | 87.60 |
| 最終ジャッジ日時 | 2024-07-26 15:25:20 |
| 合計ジャッジ時間 | 5,563 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 11 RE * 8 |
ソースコード
#int(input())
#map(int, input().split())
#list(map(int, input().split()))
import sys
x = 0
y = 0
z = 0
def ques(x, y, z):
print(f"? {x} {y} {z}")
sys.stdout.flush()
D = int(input())
return D
min1 = -150
max1 = 150
while max1 - min1 >= 3:
h1 = min1 + (max1 - min1) // 3
h2 = max1 - (max1 - min1) // 3
d1 = ques(h1, y, z)
d2 = ques(h2, y, z)
if d1 <= d2:
max1 = d2
else:
min1 = d1
ansx = 0
dx = 1 << 32
for i in range(min1, max1+1):
d = ques(i, y, z)
if d < dx:
dx = d
ansx = 1
x = ansx
min1 = -150
max1 = 150
while max1 - min1 >= 3:
h1 = min1 + (max1 - min1) // 3
h2 = max1 - (max1 - min1) // 3
d1 = ques(x, h1, z)
d2 = ques(x, h2, z)
if d1 <= d2:
max1 = d2
else:
min1 = d1
ansx = 0
dx = 1 << 32
for i in range(min1, max1+1):
d = ques(x, i, z)
if d < dx:
dx = d
ansx = 1
y = ansx
min1 = -150
max1 = 150
while max1 - min1 >= 3:
h1 = min1 + (max1 - min1) // 3
h2 = max1 - (max1 - min1) // 3
d1 = ques(x, y, h1)
d2 = ques(x, y, h2)
if d1 <= d2:
max1 = d2
else:
min1 = d1
ansx = 0
dx = 1 << 32
for i in range(min1, max1+1):
d = ques(x, y, i)
if d < dx:
dx = d
ansx = 1
z = ansx
print(f"! {x} {y} {z}")