結果

問題 No.513 宝探し2
ユーザー sue_charosue_charo
提出日時 2017-06-01 23:13:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 844 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 10,940 KB
実行使用メモリ 26,200 KB
平均クエリ数 3.50
最終ジャッジ日時 2023-09-24 01:19:00
合計ジャッジ時間 1,978 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
26,132 KB
testcase_01 AC 53 ms
25,788 KB
testcase_02 AC 51 ms
26,144 KB
testcase_03 AC 54 ms
25,712 KB
testcase_04 AC 51 ms
26,044 KB
testcase_05 AC 52 ms
25,740 KB
testcase_06 AC 52 ms
25,556 KB
testcase_07 AC 52 ms
25,696 KB
testcase_08 AC 51 ms
26,200 KB
testcase_09 AC 53 ms
26,024 KB
testcase_10 AC 52 ms
25,740 KB
testcase_11 AC 54 ms
25,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
import array, bisect, collections, copy, heapq, itertools, math, random, re, string, sys, time
sys.setrecursionlimit(10 ** 7)
INF = 10 ** 20
MOD = 10 ** 9 + 7


def II(): return int(input())
def ILI(): return list(map(int, input().split()))
def IAI(LINE): return [ILI() for __ in range(LINE)]
def IDI(): return {key: value for key, value in ILI()}


def requestNextDis(x, y):
    print("{} {}".format(x, y))
    sys.stdout.flush()
    dis = int(input())
    if dis == 0:
        sys.exit()
    else:
        return dis


def main():
    dis_zero = requestNextDis(0, 0)
    dis_x_max = requestNextDis(10 ** 5, 0)
    dis_y_max = requestNextDis(0, 10 ** 5)
    ans_x = (10 ** 5 - dis_x_max + dis_zero) // 2
    ans_y = (10 ** 5 - dis_y_max + dis_zero) // 2
    requestNextDis(ans_x, ans_y)


if __name__ == "__main__":
    main()
0