結果

問題 No.594 壊れた宝物発見機
コンテスト
ユーザー cleantted
提出日時 2017-11-10 23:10:39
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 1,063 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 358 ms
コンパイル使用メモリ 20,824 KB
実行使用メモリ 39,888 KB
平均クエリ数 156.20
最終ジャッジ日時 2026-03-31 02:41:04
合計ジャッジ時間 7,131 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 RE * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

ans = [0,0,0]

for i in range(3):
    up = 100
    down = -100
    if i == 0:
        while up != down:
            print("?", up, 0, 0)
            d1 = int(input())
            print("?", down, 0, 0)
            d2 = int(input())
            
            if d1 <= d2:
                down = (up + down)//2
            else:
                up = (up + down)//2
    elif i == 1:
        while up != down:
            print("?", ans[0], up, 0)
            d1 = int(input())
            print("?", ans[0], down, 0)
            d2 = int(input())
            
            if d1 <= d2:
                down = (up + down)//2
            else:
                up = (up + down)//2
    elif i == 2:
        while up != down:
            print("?", ans[0], ans[1], up)
            d1 = int(input())
            print("?", ans[0], ans[1], down)
            d2 = int(input())
            
            if d1 <= d2:
                down = (up + down)//2
            else:
                up = (up + down)//2
                
    ans[i] = up

print("!", ans[0], ans[1], ans[2])
0