310026: CF1773H. Hot and Cold

Memory Limit:1024 MB Time Limit:3 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Hot and Cold

题意翻译

**这是一个交互题。** 在一个横纵坐标均不超过 $10^6$ 的平面上,有一个目标点。你需要通过每次询问一个点来确定目标点的位置。询问次数不得超过64次。 对于不是第一个的每一个询问,系统会给出这个点与目标点的距离 $x$ 和上一个点与目标点的距离 $y$ 的关系。若 $x > y$,则系统给出"Closer",若 $x = y$,则给出"At the same distance",若 $x < y$,则给出"Further"。特别地,若询问点与目标点一致,则只给出"Found!"。对于第一个询问,若与目标点不一致,则只给出"Not Found"。 但是,所有给出的关系不会使用英文给出。每一种关系会对应唯一的一种字符串,而且每一种字符串也只对应一种关系。在这种对应中,只有代表"Found!"的字符串中会出现感叹号,代表其他关系的字符串中不会出现感叹号。 如果系统给出代表"Found!"的字符串,则你的程序应该立刻结束,不再输出别的任何东西。 输入的所有字符串中只包含小写字母、空格与感叹号。数据保证感叹号只在代表"Found!"的字符串中出现,且任何字符串不以空格开始或结尾。所有字符串长度在 2 与 30 之间。

题目描述

This is an interactive problem. After emigrating to another country, little Hanna came across the fact that playing "Hot and cold" became more difficult: she does not understand the hint phrases! You are to write a helping program for her. The playground where the game happens is a rectangle, and the treasure is hidden in some point with integer coordinates between 0 and $ 10^6 $ , inclusive. Hanna visits several points with valid coordinates. If the visited point contains the hidden treasure, she receives the phrase "Found!" in the local language. Fortunately, the intonations allow her to recognize this phrase — in this problem it will be denoted by an exclamation mark. Otherwise, for each visited point except for the first one, Hanna receives a phrase in the local language stating whether she is now "Closer", "Further", or "At the same distance" from the treasure, compared to the previous point. The distances are measured in Euclidean metric. After the first visited point, in case of no treasure there, Hanna receives the phrase "Not found" in the local language. Your program must help Hanna find the treasure by visiting at most 64 points.

输入输出格式

输入格式


输出格式


Your program should print each visited point in a line with two coordinates between 0 and $ 10^6 $ , inclusive, and flush the output after each one. For each visited point, the testing system writes one of the phrases: "Found!", "Closer", "Further", "At the same distance", or "Not found" in some language, consistent throughout the game. The first phrase ends with an exclamation mark, all other phrases do not contain exclamation marks. All phrases contain only Latin letters, spaces and exclamation marks, have lengths between 2 and 30, inclusive, don't start or end with a space, and are pairwise distinct. The phrases are not necessarily coming from any real human language. After receiving a phrase with an exclamation mark, your program must halt without printing anything else. Visiting points more than once is allowed, and each such visit counts towards the limit of 64 queries.

输入输出样例

输入样例 #1

Tabilmadi

Daha yakin

Daha yakin

Sama distanco

Dalej

Znaydeno!

输出样例 #1

500 200

560 230

566 240

566 238

30 239

566 239

输入样例 #2

You are lucky today!

输出样例 #2

777777 777777

Input

题意翻译

**这是一个交互题。** 在一个横纵坐标均不超过 $10^6$ 的平面上,有一个目标点。你需要通过每次询问一个点来确定目标点的位置。询问次数不得超过64次。 对于不是第一个的每一个询问,系统会给出这个点与目标点的距离 $x$ 和上一个点与目标点的距离 $y$ 的关系。若 $x > y$,则系统给出"Closer",若 $x = y$,则给出"At the same distance",若 $x < y$,则给出"Further"。特别地,若询问点与目标点一致,则只给出"Found!"。对于第一个询问,若与目标点不一致,则只给出"Not Found"。 但是,所有给出的关系不会使用英文给出。每一种关系会对应唯一的一种字符串,而且每一种字符串也只对应一种关系。在这种对应中,只有代表"Found!"的字符串中会出现感叹号,代表其他关系的字符串中不会出现感叹号。 如果系统给出代表"Found!"的字符串,则你的程序应该立刻结束,不再输出别的任何东西。 输入的所有字符串中只包含小写字母、空格与感叹号。数据保证感叹号只在代表"Found!"的字符串中出现,且任何字符串不以空格开始或结尾。所有字符串长度在 2 与 30 之间。

加入题单

算法标签: