QOJ.ac

QOJ

Time Limit: 1.0 s Memory Limit: 256 MB Total points: 100 Hackable ✓

#6783. 烹饪比赛

Statistics

《小林家的龙女仆》是由酷教信者创作并绘制的日本漫画系列。由京都动画制作的电视动画系列于 2017 年 1 月至 4 月在日本播出。

在第 8 集中,两位主角小林和托尔进行了一场厨艺比赛,以决定谁来为康娜的郊游制作便当。为了决定胜者,她们邀请了 $n$ 个人来品尝她们的食物,并根据这些人的反馈改变她们的分数。

反馈共有四种类型。反馈类型及分数变化如下表所示:

类型 反馈 小林的分数变化 托尔的分数变化
1 小林做的更好 $+1$ $0$
2 托尔做的更好 $0$ $+1$
3 两人都做得很好 $+1$ $+1$
4 两人都做得不好 $-1$ $-1$

给定这 $n$ 个人的反馈类型,你能找出厨艺比赛的获胜者吗(已知小林和托尔的初始分数均为 0)?

输入格式

输入包含多组测试数据。第一行包含一个整数 $T$ ($1 \le T \le 100$),表示测试数据的组数。对于每组测试数据:

第一行包含一个整数 $n$ ($1 \le n \le 20$),含义如上所述。

下一行包含 $n$ 个整数 $a_1, a_2, \dots, a_n$ ($1 \le a_i \le 4$),表示这 $n$ 个人给出的反馈类型。

输出格式

对于每组测试数据,输出一行。如果小林的分数更高,输出 “Kobayashi”。如果托尔的分数更高,输出 “Tohru”。如果小林的分数与托尔的分数相等,输出 “Draw”。

样例

输入 1

3
3
1 2 1
2
2 4
2
3 4

输出 1

Kobayashi
Tohru
Draw

说明

对于第一组测试数据,小林得到 $1 + 0 + 1 = 2$ 分,而托尔得到 $0 + 1 + 0 = 1$ 分。所以获胜者是小林。

对于第二组测试数据,小林得到 $0 - 1 = -1$ 分,而托尔得到 $1 - 1 = 0$ 分。所以获胜者是托尔。

对于第三组测试数据,小林得到 $1 - 1 = 0$ 分,而托尔得到 $1 - 1 = 0$ 分。所以是平局。

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.