結果

問題 No.513 宝探し2
ユーザー naimonon77naimonon77
提出日時 2018-02-05 16:16:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 388 bytes
コンパイル時間 166 ms
コンパイル使用メモリ 10,620 KB
実行使用メモリ 24,360 KB
平均クエリ数 82.75
最終ジャッジ日時 2023-09-23 15:38:17
合計ジャッジ時間 2,431 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

def find_v(mode):
    l = 0
    r = int(1e7)
    while r - l > 1:
        if (mode == 0): print(l, 0)
        else: print(0, l)

        l_res = int(input())

        if (mode == 0): print(r, 0)
        else: print(0, r)

        r_res = int(input())
        mid = (r+l) // 2
        if (l_res < r_res): r = mid
        else: l = mid
    return l

x = find_v(0)
y = find_v(1)
print(x, y)
0