結果
| 問題 |
No.594 壊れた宝物発見機
|
| コンテスト | |
| ユーザー |
mkawa2
|
| 提出日時 | 2020-01-05 21:18:31 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 804 bytes |
| コンパイル時間 | 650 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 46,644 KB |
| 最終ジャッジ日時 | 2024-07-16 19:12:51 |
| 合計ジャッジ時間 | 6,906 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 19 |
ソースコード
import sys
sys.setrecursionlimit(10 ** 6)
def II(): return int(sys.stdin.readline())
def main():
memo={}
def question(i,a):
if (i,a) in memo:return memo[(i,a)]
xyz=[0,0,0]
xyz[i]=a
print("?",end=" ")
print(*xyz)
memo[(i,a)]=res=II()
return res
ans=[0]*3
for i in range(3):
l=-101
r=101
while l+2<r:
cl=(2*l+r)//3
cr=(l+2*r)//3
dl=question(i,cl)
dr=question(i,cr)
if dl<dr:r=cr
else:l=cl
c=(l+r)//2
dl=question(i,l)
dc=question(i,c)
dr=question(i,r)
mn=min(dl,dc,dr)
if mn==dl:ans[i]=l
if mn==dc:ans[i]=c
if mn==dr:ans[i]=r
print("!",end=" ")
print(*ans)
main()
mkawa2