結果
| 問題 | No.594 壊れた宝物発見機 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-07-29 20:42:57 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                TLE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 1,008 bytes | 
| コンパイル時間 | 205 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 46,468 KB | 
| 最終ジャッジ日時 | 2024-07-16 15:58:34 | 
| 合計ジャッジ時間 | 6,581 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | TLE * 1 -- * 19 | 
ソースコード
from sys import stdin, stdout
input = lambda: stdin.readline().rstrip()
write = stdout.write
def main():
    x = y = z = 0
    for s in ('x', 'y', 'z'):
        d = dist(s, x, y, z)
        if s == 'x':
            x = d
        elif s == 'y':
            y = d
        else:
            z = d
    print('!', x, y, z)
def dist(axis, x, y, z):
    point = -100
    max_ = 150
    dmin = float('inf')
    while point < max_:
        xi = point if axis == 'x' else x
        yi = point if axis == 'y' else y
        zi = point if axis == 'z' else z
        print('?', xi, yi, zi)
        d = int(input())
        if d > dmin:
            break
        dmin = d
        point += 10
    dmin = d
    while 1:
        point -= 1
        xi = point if axis == 'x' else x
        yi = point if axis == 'y' else y
        zi = point if axis == 'z' else z
        print('?', xi, yi, zi)
        d = int(input())
        if d < dmin:
            dmin = d
        else:
            break
    return point + 1
main()
            
            
            
        