CF952B.A Map of the Cat

普及+/提高

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

If you have ever interacted with a cat, you have probably noticed that they are quite particular about how to pet them. Here is an approximate map of a normal cat.

However, some cats won't tolerate this nonsense from the humans. Here is a map of a grumpy cat.

You have met a cat. Can you figure out whether it's normal or grumpy?

Interaction

This is an interactive problem. Initially you're not given any information about the cat. Instead, the cat is divided into ten areas, indexed from 0 to 9.

In one query you can choose which area you'll pet and print the corresponding index to standard out. You will get the cat's response, as depicted on the corresponding map, via standard in. For simplicity all responses are written in lowercase.

Once you're certain what type of cat you're dealing with, output "normal" or "grumpy" to standard out.

如果你曾经和猫互动过,你可能已经注意到,它们对被抚摸的方式非常挑剔。下面是一只普通猫的大致区域图。

然而,有些猫可不会容忍人类的这种胡闹。下面是一只暴躁猫的区域图。

你遇到了一只猫。你能判断出它是一只普通猫还是一只暴躁猫吗?

交互方式

本题为交互式问题。初始时你不会获得关于这只猫的任何信息。相反,这只猫被划分为十个区域,编号从 0 到 9。

每次查询中,你可以选择要抚摸的区域,并将对应编号输出至标准输出。随后,你将通过标准输入收到猫对该区域的反应(反应类型见对应区域图)。为简化起见,所有反应均以小写字母表示。

当你确定了所面对的是哪种猫之后,请向标准输出打印 "normal" 或 "grumpy"。

说明/提示

Please make sure to use the stream flushing operation after each query in order not to leave part of your output in some buffer.

请确保每次查询后都执行流刷新操作,以免将部分输出滞留在缓冲区中。

输入解题思路,AI测评打分。不知道怎么写?

首页