Codeforces Round #269 (Div. 2)_html/css_WEB-ITnose

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.

Input

The single line contains six space-separated integers li (1?≤?li?≤?9) ? the lengths of the six sticks. It is guaranteed that the input is such that you cannot make both animals from the sticks.

Output

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).

立即学习“前端免费学习笔记(深入)”;

Sample test(s)

input

  1. 4 2 5 4 4 4

登录后复制

output

  1. Bear

登录后复制

input

  1. 4 4 5 4 4 5

登录后复制

output

  1. Elephant

登录后复制

input

  1. 1 2 3 4 5 6

登录后复制

output

  1. Alien

登录后复制

Note

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.

题意:模拟水题

  1. #include #include #include #include #include using namespace std;int main() {map mp;mp.clear();int f[6];for (int i = 0; i = 4) {mp[f[i]] -= 4;flag = 1;break;}if (!flag) {printf("Alien\n");return 0;}flag = 0;for (int i = 0; i



登录后复制

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
编程技术

纯css3实现的3D按钮_html/css_WEB-ITnose

2025-3-28 14:05:48

编程技术

css初学者应该关注的网站_html/css_WEB-ITnose

2025-3-28 14:05:52

0 条回复 A文章作者 M管理员
欢迎您,新朋友,感谢参与互动!
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
私信列表
搜索