結果

問題 No.594 壊れた宝物発見機
ユーザー kohei2019kohei2019
提出日時 2023-08-13 22:47:37
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 1,010 bytes
コンパイル時間 357 ms
コンパイル使用メモリ 82,316 KB
実行使用メモリ 84,020 KB
平均クエリ数 26.00
最終ジャッジ日時 2024-05-01 12:27:23
合計ジャッジ時間 5,292 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

def func(a,b,c):
    print('? {} {} {}'.format(a,b,c))
    D = int(input())
    return D

def sanbunntan(l,r):
    while l + 2 < r:
        c1 = l+(r-l)//3
        c2 = r-(r-l)//3
        if func(c1)<func(c2):
            r = c2
        else:
            l = c1
    val = sorted([(func(i),i) for i in range(l,r+1)])[0][1]
    return val

l=-110
r=110
while l + 2 < r:
    c1 = l+(r-l)//3
    c2 = r-(r-l)//3
    if func(c1,100,100)<func(c2,100,100):
        r = c2
    else:
        l = c1
valx = sorted([(func(i),i) for i in range(l,r+1)])[0][1]

l=-110
r=110
while l + 2 < r:
    c1 = l+(r-l)//3
    c2 = r-(r-l)//3
    if func(100,c1,100)<func(100,c2,100):
        r = c2
    else:
        l = c1
valy = sorted([(func(i),i) for i in range(l,r+1)])[0][1]

l=-110
r=110
while l + 2 < r:
    c1 = l+(r-l)//3
    c2 = r-(r-l)//3
    if func(100,100,c1)<func(100,100,c2):
        r = c2
    else:
        l = c1
valz = sorted([(func(i),i) for i in range(l,r+1)])[0][1]

print('! {} {} {}'.format(valx.valy,valz))
0