結果

問題 No.513 宝探し2
ユーザー ttrttr
提出日時 2020-06-06 22:20:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 464 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 10,812 KB
実行使用メモリ 24,324 KB
平均クエリ数 73.67
最終ジャッジ日時 2023-09-24 03:38:56
合計ジャッジ時間 2,749 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 40 ms
23,532 KB
testcase_02 AC 40 ms
24,024 KB
testcase_03 RE -
testcase_04 AC 41 ms
23,892 KB
testcase_05 AC 40 ms
23,820 KB
testcase_06 RE -
testcase_07 AC 39 ms
23,764 KB
testcase_08 AC 41 ms
23,592 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

lx = 0
rx = 10**5
Y = -1

while True:
    print(lx, Y)
    tl = int(input())
    print(rx, Y)
    tr = int(input())
    mx = (lx+rx)//2
    if tl < tr:
        rx = mx
    elif tr < tl:
        lx = mx
    else:
        break

ly = 0
ry = 10**5
while True:
    print(mx-1, ly)
    tl = int(input())
    print(mx-1, ry)
    tr = int(input())
    my = (ly+ry)//2
    if tl < tr:
        ry = my
    elif tr < tl:
        ly = my
    else:
        break
print(mx, my)
0