CF471A.MUH and Sticks
普及-
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Two polar bears Menshykov and Uslada from the St.Petersburg zoo and elephant Horace from the Kiev zoo got six sticks to play with and assess the animals' creativity. Menshykov, Uslada and Horace decided to make either an elephant or a bear from those sticks. They can make an animal from sticks in the following way:
- Four sticks represent the animal's legs, these sticks should have the same length.
- Two remaining sticks represent the animal's head and body. The bear's head stick must be shorter than the body stick. The elephant, however, has a long trunk, so his head stick must be as long as the body stick. Note that there are no limits on the relations between the leg sticks and the head and body sticks.
Your task is to find out which animal can be made from the given stick set. The zoo keeper wants the sticks back after the game, so they must never be broken, even bears understand it.
两只来自圣彼得堡动物园的北极熊——明什科夫(Menshykov)和乌斯拉达(Uslada),以及一只来自基辅动物园的大象霍勒斯(Horace),得到了六根木棍来玩耍,并以此评估动物们的创造力。明什科夫、乌斯拉达和霍勒斯决定用这些木棍拼出一只大象或一只熊。他们按如下方式用木棍拼成动物:
- 四根木棍代表动物的四条腿,这四根木棍长度必须完全相同;
- 剩余两根木棍分别代表动物的头部和身体:
- 熊的头部木棍必须比身体木棍短;
- 大象则因拥有长鼻子,其头部木棍必须与身体木棍等长。
注意:腿部木棍与头部/身体木棍之间的长度关系没有任何限制。
你的任务是判断:给定这六根木棍的长度,能拼出哪一种动物?动物园管理员游戏结束后要收回所有木棍,因此木棍绝对不可折断——连熊都明白这一点。
输入格式
The single line contains six space-separated integers l__i (1 ≤ l__i ≤ 9) — the lengths of the six sticks. It is guaranteed that the input is such that you cannot make both animals from the sticks.
单行包含六个以空格分隔的整数 li(1 ≤ li ≤ 9)——表示六根木棍的长度。保证输入数据满足:无法用这些木棍同时制作出两种动物。
输出格式
If you can make a bear from the given set, print string "Bear" (without the quotes). If you can make an elephant, print string "Elephant" (wıthout the quotes). If you can make neither a bear nor an elephant, print string "Alien" (without the quotes).
如果能用给定的集合构造出一只熊,则输出字符串 "Bear"(不带引号)。
如果能构造出一头大象,则输出字符串 "Elephant"(不带引号)。
如果既不能构造出熊也不能构造出大象,则输出字符串 "Alien"(不带引号)。
输入输出样例
输入#1
4 2 5 4 4 4
输出#1
Bear
输入#2
4 4 5 4 4 5
输出#2
Elephant
输入#3
1 2 3 4 5 6
输出#3
Alien
说明/提示
If you're out of creative ideas, see instructions below which show how to make a bear and an elephant in the first two samples. The stick of length 2 is in red, the sticks of length 4 are in green, the sticks of length 5 are in blue.

如果你缺乏创意,可以参考下方说明,其中展示了前两个示例中如何制作一只熊和一头大象。长度为 2 的木棍为红色,长度为 4 的木棍为绿色,长度为 5 的木棍为蓝色。

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