結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
24,360 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 122 ms
23,488 KB
testcase_04 WA -
testcase_05 AC 121 ms
23,764 KB
testcase_06 AC 122 ms
23,496 KB
testcase_07 WA -
testcase_08 AC 121 ms
24,252 KB
testcase_09 WA -
testcase_10 AC 122 ms
24,060 KB
testcase_11 AC 124 ms
23,628 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 123 ms
23,528 KB
testcase_15 AC 120 ms
23,756 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

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])
min_val = 10000000000
min_p = []
offset = [0, 0, 0]
d = 50
while d > 0:
    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