結果

問題 No.513 宝探し2
ユーザー ssmkzkssmkzk
提出日時 2018-11-08 17:59:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,385 ms / 2,000 ms
コード長 505 bytes
コンパイル時間 759 ms
コンパイル使用メモリ 10,880 KB
実行使用メモリ 64,396 KB
平均クエリ数 39.08
最終ジャッジ日時 2023-09-24 02:00:36
合計ジャッジ時間 7,571 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,385 ms
64,396 KB
testcase_01 AC 141 ms
45,452 KB
testcase_02 AC 140 ms
45,740 KB
testcase_03 AC 142 ms
45,440 KB
testcase_04 AC 142 ms
45,112 KB
testcase_05 AC 139 ms
45,176 KB
testcase_06 AC 141 ms
45,236 KB
testcase_07 AC 138 ms
45,200 KB
testcase_08 AC 138 ms
45,276 KB
testcase_09 AC 136 ms
45,136 KB
testcase_10 AC 144 ms
45,540 KB
testcase_11 AC 146 ms
45,064 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)
        d = int(input())
        if d == 0:
            sys.exit()
        m_l[i] = int(d)
    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