結果

問題 No.594 壊れた宝物発見機
ユーザー wajima_wataruwajima_wataru
提出日時 2018-01-03 22:52:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 561 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 10,828 KB
実行使用メモリ 24,372 KB
平均クエリ数 163.00
最終ジャッジ日時 2023-09-23 15:32:11
合計ジャッジ時間 4,170 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
24,096 KB
testcase_01 AC 129 ms
24,360 KB
testcase_02 AC 131 ms
23,712 KB
testcase_03 AC 130 ms
23,472 KB
testcase_04 AC 127 ms
23,396 KB
testcase_05 AC 128 ms
24,348 KB
testcase_06 AC 127 ms
23,572 KB
testcase_07 AC 128 ms
24,252 KB
testcase_08 AC 126 ms
23,976 KB
testcase_09 AC 129 ms
23,640 KB
testcase_10 AC 126 ms
23,652 KB
testcase_11 AC 125 ms
23,544 KB
testcase_12 AC 129 ms
23,652 KB
testcase_13 AC 127 ms
23,412 KB
testcase_14 AC 124 ms
24,336 KB
testcase_15 AC 125 ms
23,640 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 123 ms
23,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

P = []
for i in [-1, 0, 1]:
    for j in [-1, 0, 1]:
        for k in [-1, 0, 1]:
            P.append([i, j, k])
offset = [0, 0, 0]
d = 50
while d > 0:
    min_val = 10000000000
    for p in P:
        print('? {x} {y} {z}'.format(x=offset[0]+p[0]*d, y=offset[1]+p[1]*d, z=offset[2]+p[2]*d))
        D = int(input())
        if D < min_val:
            min_val = D
            min_p = p
    offset = [offset[0] + min_p[0] * d, offset[1] + min_p[1] * d, offset[2] + min_p[2] * d]
    d //= 2
print('! {x} {y} {z}'.format(x=offset[0], y=offset[1], z=offset[2]))
0