多多色-多人伦交性欧美在线观看-多人伦精品一区二区三区视频-多色视频-免费黄色视屏网站-免费黄色在线

國內最全IT社區平臺 聯系我們 | 收藏本站
阿里云優惠2
您當前位置:首頁 > php開源 > 綜合技術 > A. MUH and Sticks(Codeforces Round #269)

A. MUH and Sticks(Codeforces Round #269)

來源:程序員人生   發布時間:2014-10-08 08:00:01 閱讀次數:3254次
A. MUH and Sticks
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

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
4 2 5 4 4 4
output
Bear
input
4 4 5 4 4 5
output
Elephant
input
1 2 3 4 5 6
output
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.


代碼:

#include <iostream> #include <cstdio> #include <cstring> using namespace std; int a[100]; int main() { memset(a,0,sizeof(a)); int x; int sign=0; for(int i=0;i<6;i++) { scanf("%d",&x); a[x]++; } for(int i=0;i<=10;i++) { if(a[i]>=4) { sign=1; a[i]=a[i]-4; break; } } if(sign) { int x; for(int i=0;i<=10;i++) { if(a[i]) { x=i; break; } } if(a[x]==2) { printf("Elephant "); } else printf("Bear "); } else printf("Alien "); return 0; }




生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關閉
程序員人生
主站蜘蛛池模板: 欧美亚洲激情 | 99国产精品久久久久久久成人热 | 九九精品视频一区二区三区 | 亚洲欧美一 | 最近中文字幕免费mv视频8 | 久久99精品久久久久久综合 | 在线成人免费视频 | 欧美精品亚洲精品日韩 | 日韩欧美国产高清 | 国产精品嫩草影院在线看 | 日本护士xxxx视频免费 | 国产成人久久精品二区三区牛 | 狠狠干天天色 | 欧洲亚洲综合一区二区三区 | 亚洲视频天堂 | 亚洲欧美久久一区二区 | 成人欧美日韩高清不卡 | 午夜毛片不卡高清免费 | 一区二区中文字幕在线观看 | 一级毛片一级毛片一级毛片aaav | 国产裸舞福利在线视频合集 | 最近最新免费中文字幕高清 | 免费观看的男女羞羞视频 | 另类图片 亚洲 校园 小说区 | 尤物视频网站在线观看 | 日韩另类 | 亚洲 成人 欧美 自拍 | 最近最新中文字幕在线第一页 | 亚洲国产成人在线观看 | 日韩欧美在线观看 | 亚洲日本中文字幕天堂网 | 国产极品美女在线 | 欧美日韩亚洲国产一区二区三区 | www在线视频| 亚洲视频精品在线观看 | 亚洲福利一区福利三区 | 欧美成性色 | 亚洲图片一区 | 在线视频国产一区 | 巨大黑人极品videos精品 | 欧美成人观看免费完全 |