結果

問題 No.594 壊れた宝物発見機
ユーザー kohei2019kohei2019
提出日時 2023-08-13 23:06:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 170 ms / 2,000 ms
コード長 1,045 bytes
コンパイル時間 227 ms
コンパイル使用メモリ 82,372 KB
実行使用メモリ 70,240 KB
平均クエリ数 88.00
最終ジャッジ日時 2024-05-01 12:43:13
合計ジャッジ時間 4,907 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 167 ms
69,592 KB
testcase_01 AC 170 ms
69,344 KB
testcase_02 AC 158 ms
69,976 KB
testcase_03 AC 157 ms
69,592 KB
testcase_04 AC 155 ms
69,472 KB
testcase_05 AC 155 ms
69,720 KB
testcase_06 AC 154 ms
70,240 KB
testcase_07 AC 153 ms
70,232 KB
testcase_08 AC 159 ms
69,728 KB
testcase_09 AC 150 ms
69,344 KB
testcase_10 AC 157 ms
69,208 KB
testcase_11 AC 164 ms
69,336 KB
testcase_12 AC 163 ms
69,336 KB
testcase_13 AC 167 ms
69,464 KB
testcase_14 AC 158 ms
69,848 KB
testcase_15 AC 162 ms
69,584 KB
testcase_16 AC 164 ms
69,976 KB
testcase_17 AC 158 ms
69,088 KB
testcase_18 AC 158 ms
69,600 KB
testcase_19 AC 158 ms
69,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def func(a,b,c):
    print('? {} {} {}'.format(a,b,c),flush=True)
    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,100,100),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(100,i,100),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(100,100,i),i) for i in range(l,r+1)])[0][1]

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