CF79A.Bus Game

普及-

通过率:0%

时间限制:2.00s

内存限制:256MB

AC君温馨提醒

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

题目描述

After Fox Ciel won an onsite round of a programming contest, she took a bus to return to her castle. The fee of the bus was 220 yen. She met Rabbit Hanako in the bus. They decided to play the following game because they got bored in the bus.

  • Initially, there is a pile that contains x 100-yen coins and y 10-yen coins.
  • They take turns alternatively. Ciel takes the first turn.
  • In each turn, they must take exactly 220 yen from the pile. In Ciel's turn, if there are multiple ways to take 220 yen, she will choose the way that contains the maximal number of 100-yen coins. In Hanako's turn, if there are multiple ways to take 220 yen, she will choose the way that contains the maximal number of 10-yen coins.
  • If Ciel or Hanako can't take exactly 220 yen from the pile, she loses.

Determine the winner of the game.

狐狸雪儿在编程竞赛的现场赛中获胜后,乘坐公交车返回她的城堡。公交车费为220日元。她在公交车上遇到了兔子花子。由于在车上感到无聊,她们决定玩下面这个游戏。

  • 初始时,有一堆硬币,其中包含 xx 枚100日元硬币和 yy 枚10日元硬币。
  • 她们轮流进行游戏,雪儿先手。
  • 每轮中,当前玩家必须恰好从堆中取走220日元。在雪儿的回合中,若存在多种取走220日元的方式,她会选择其中包含最多枚100日元硬币的方式;在花子的回合中,若存在多种取走220日元的方式,她会选择其中包含最多枚10日元硬币的方式。
  • 若轮到某位玩家时,她无法恰好取走220日元,则该玩家输掉游戏。

请判断该游戏的获胜者。

输入格式

The first line contains two integers x (0 ≤ x ≤ 106) and y (0 ≤ y ≤ 106), separated by a single space.

第一行包含两个整数 xx(0 ≤ x ≤ 1060 \le x \le 10^6)和 yy(0 ≤ y ≤ 1060 \le y \le 10^6),以单个空格分隔。

输出格式

If Ciel wins, print "Ciel". Otherwise, print "Hanako".

如果茜尔获胜,则输出“Ciel”;否则,输出“Hanako”。

输入输出样例

  • 输入#1

    2 2

    输出#1

    Ciel
  • 输入#2

    3 22

    输出#2

    Hanako

说明/提示

In the first turn (Ciel's turn), she will choose 2 100-yen coins and 2 10-yen coins. In the second turn (Hanako's turn), she will choose 1 100-yen coin and 12 10-yen coins. In the third turn (Ciel's turn), she can't pay exactly 220 yen, so Ciel will lose.

在第一回合(Ciel 的回合),她将选择 2 枚 100 日元硬币和 2 枚 10 日元硬币。在第二回合(Hanako 的回合),她将选择 1 枚 100 日元硬币和 12 枚 10 日元硬币。在第三回合(Ciel 的回合),她无法恰好支付 220 日元,因此 Ciel 将输掉游戏。

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

首页