QOJ.ac

QOJ

実行時間制限: 1.0 s メモリ制限: 512 MB 満点: 100

#9784. 驴子与穿靴子的猫

統計

在遥远的“远得要命王国”(Far Far Away),史莱克(Shrek)有 $n$ 堆糖果。他非常喜欢吃糖果。第 $i$ 堆糖果中有 $a_i$ 颗糖果。

史莱克并不是唯一喜欢吃糖果的人。当他睡着后,驴子(Donkey)和穿靴子的猫(Puss in Boots)决定去吃他的糖果。他们不仅想吃掉所有的糖果,还想玩一个游戏。

穿靴子的猫是一只讲究荣誉的猫,它让驴子先手。游戏规则如下:

  • 在驴子的回合,他必须选择一堆糖果,并从该堆中吃掉正整数颗糖果。
  • 在穿靴子的猫的回合,它必须进行 $n$ 次类似于驴子的操作(但要复杂得多)。

无法进行操作的玩家输掉游戏。你需要确定获胜者。

输入格式

第一行包含一个整数 $n$,表示糖果堆的数量。这个整数同时也描述了穿靴子的猫每回合的操作次数。 第二行包含 $n$ 个整数 $a_i$,表示第 $i$ 堆糖果的数量。

数据范围

$1 \le n \le 10^5$ $0 \le a_i \le 10^9$

输出格式

输出 DonkeyPuss in Boots,取决于获胜者。

样例

输入 1

2
2 2

输出 1

Puss in Boots

输入 2

4
0 47 0 0

输出 2

Donkey

说明

在第一个样例中,有两种选择:

  • 驴子从一堆中拿走一颗糖果。然后,穿靴子的猫从同一堆中拿走第二颗糖果,并从另一堆中拿走两颗糖果。
  • 驴子从一堆中拿走两颗糖果。然后,穿靴子的猫从另一堆中分两次各拿走一颗糖果。

在第二个样例中,驴子从第二堆中拿走 47 颗糖果并获胜。

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.