結果

問題 No.513 宝探し2
ユーザー ssmkzkssmkzk
提出日時 2018-11-08 17:54:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 443 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 10,836 KB
実行使用メモリ 46,076 KB
平均クエリ数 39.33
最終ジャッジ日時 2023-09-23 16:31:05
合計ジャッジ時間 5,490 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 165 ms
45,712 KB
testcase_01 AC 157 ms
45,196 KB
testcase_02 AC 154 ms
45,444 KB
testcase_03 AC 158 ms
45,692 KB
testcase_04 AC 157 ms
45,300 KB
testcase_05 RE -
testcase_06 AC 158 ms
45,280 KB
testcase_07 AC 159 ms
45,300 KB
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 163 ms
45,848 KB
testcase_11 AC 158 ms
46,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
import sys

l = [0, 50000, 100000]

while True:
    m_l = [-1, -1, -1]
    for i in range(3):
        print(l[i], 0)
        m_l[i] = int(input())
    M_l = np.array(m_l)
    l.pop(np.argmax(M_l))
    l.append(l[1])
    l[1] = (l[0] + l[2]) // 2
    if l[0] == l[1]:
        break

print(l[0], 0)
print(l[0], int(input()))
if int(input()) == 0:
    sys.exit()
print(l[2], 0)
print(l[2], int(input()))
sys.exit()            
0