QOJ.ac

QOJ

حد الوقت: 3 s حد الذاكرة: 1024 MB مجموع النقاط: 100 تفاعلية

#5206. 冷与热

الإحصائيات

这是一个交互式题目。

移居到另一个国家后,小 Hanna 发现玩“热与冷”游戏变得更加困难了:她听不懂提示短语!你需要为她编写一个辅助程序。

游戏场地是一个矩形,宝藏隐藏在坐标为 $0$ 到 $10^6$(含边界)之间的某个整数坐标点上。Hanna 会访问若干个坐标合法的点。如果访问的点包含隐藏的宝藏,她会收到当地语言的“Found!”短语。幸运的是,语调让她能够识别出这个短语——在本题中,它将用感叹号表示。

否则,对于除第一个点之外的每个访问点,Hanna 会收到一个当地语言的短语,说明与上一个访问点相比,她现在距离宝藏是“更近”、“更远”还是“距离相同”。距离按欧几里得度量计算。在访问第一个点后,如果那里没有宝藏,Hanna 会收到当地语言的“Not found”短语。

你的程序必须帮助 Hanna 通过访问最多 64 个点来找到宝藏。

交互

你的程序应输出每个访问点的坐标,每行两个坐标,数值在 $0$ 到 $10^6$ 之间(含边界),并在每次输出后刷新缓冲区。

对于每个访问点,测试系统会写入以下短语之一:“Found!”、“Closer”、“Further”、“At the same distance”或“Not found”,这些短语使用某种语言,且在整个游戏过程中保持一致。第一个短语以感叹号结尾,所有其他短语不包含感叹号。所有短语仅包含拉丁字母、空格和感叹号,长度在 2 到 30 个字符之间(含边界),不以空格开头或结尾,且两两不同。这些短语不一定来自任何真实的人类语言。

在收到带有感叹号的短语后,你的程序必须终止,且不得再输出任何内容。

样例

输入 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

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.