QOJ.ac

QOJ

时间限制: 1 s 内存限制: 1024 MB 总分: 100 可 Hack ✓

#14257. 药水骚动

统计

你非常接近成为宝可梦冠军,但最后一个障碍挡在你的面前:四天王。在你的旅程中,你将你的初始宝可梦培养到了足够高的等级,并且为了向你最喜欢的宝可梦展示忠诚,你发誓绝不捕捉其他任何宝可梦。这通常会使你在面对该地区最强大的训练家时处于劣势,但你从经验中知道,只要有足够的恢复道具和准备,就有可能挺过任何战斗。

你通过进行一些计算来开始准备。你唯一的宝可梦初始时有 $N$ 点生命值,如果其生命值降至零或以下,它就会倒下。你深知在与四天王的战斗中,你的宝可梦将被对手训练家攻击 $M$ 次,每次攻击可能造成不同数量的伤害。考虑到这一点,你直接前往友好商店,囤积了 $P$ 瓶药水,每瓶药水可以恢复 $20$ 点生命值。

每次你的宝可梦受到攻击后,你都可以使用任意数量的药水(直到药水用尽)来治疗你的宝可梦,但你的宝可梦的生命值永远不能超过 $N$。如果你的宝可梦的生命值降至零或以下,它就会倒下,你将输掉战斗。给定对手宝可梦每次攻击造成的伤害量,请判断你是否能在宝可梦不倒下的情况下通过四天王的挑战。

输入格式

输入的第一行包含三个空格分隔的整数 $N, M, P$。它们分别代表你的宝可梦的生命值($1 \le N \le 100\,000$)、对手宝可梦的攻击次数($1 \le M \le 1\,000$)以及你拥有的药水数量($1 \le P \le 100\,000$)。

第二行包含 $M$ 个空格分隔的整数 $d_1, \dots, d_M$($1 \le d_i \le 100\,000$),按顺序代表每次攻击造成的伤害量。

输出格式

输出一行,如果你的宝可梦能够承受每一次攻击并存活下来,则输出 champion,否则输出 next time

样例

输入 1

100 3 1
25 35 45

输出 1

champion

输入 2

10 3 1
8 9 10

输出 2

next time

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.