QOJ.ac

QOJ

時間限制: 1 s 記憶體限制: 256 MB 總分: 100

#12579. 狐狸怎么叫?

统计

为了揭开那个古老的谜团——狐狸到底发出什么样的声音,你带着一台非常好的数字录音机走进了森林。然而,森林里充满了各种动物的声音,录音中可以听到许多不同的声响。但你为这项任务做了充分的准备:你确切地知道其他所有动物发出的声音。因此,录音中剩下的部分——所有无法识别的噪音——一定都是狐狸发出的。

输入格式

输入的第一行包含测试用例的数量 $T$。接下来是各个测试用例的描述:

每个测试用例的第一行包含录音内容——由小写英文字母组成的单词,以空格分隔。每行最多包含 100 个字母,且单词总数不超过 100 个。接下来的几行是你预先收集的关于其他动物的信息,格式为 <animal> goes <sound>。动物数量不超过 100 只,每只动物的名字长度不超过 100 个字母,且均为真实的英文动物名称。这些行中不会出现 fox goes ...

每个测试用例的最后一行正是你需要回答的问题:what does the fox say?

输出格式

对于每个测试用例,输出一行,包含狐狸发出的声音,顺序与录音中的顺序一致。你可以假设狐狸并不是沉默的(与普遍看法相反,狐狸并不使用摩尔斯电码交流)。

样例

输入 1

1
toot woof wa ow ow ow pa blub blub pa toot pa blub pa pa ow pow toot
dog goes woof
fish goes blub
elephant goes toot
seal goes ow
what does the fox say?

输出 1

wa pa pa pa pa pa pow

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.