日本搞逼视频_黄色一级片免费在线观看_色99久久_性明星video另类hd_欧美77_综合在线视频

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

A. MUH and Sticks(Codeforces Round #269)

來源:程序員人生   發布時間:2014-10-08 08:00:01 閱讀次數:3262次
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; }




生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關閉
程序員人生
主站蜘蛛池模板: 亚洲综合无码一区二区 | 国产性xxxx高清 | 欧美激情视频一区二区三区在线播放 | 99久33精品字幕 | 三级av在线 | 欧美日韩电影在线观看 | 欧美中文日韩 | 欧美日韩一区二区三区在线 | 久久久av亚洲男天堂 | 精品一区二区三区久久 | 国产视频一二区 | 成人综合av | 在线观看av的网站 | 久久午夜电影 | 青青草国产精品 | 亚洲久久一区 | 亚洲一区视频在线 | 天堂在线精品 | 韩国三级日本三级少妇99 | 亚洲福利小视频 | 黄色成人在线视频 | 99国产精品99久久久久久粉嫩 | 亚洲免费观看视频 | 爱爱的网站 | yw193com尤物 | 国产91精品久久久久久久网曝门 | 高清不卡一区二区 | 国产欧美日韩在线视频 | 国产精品成人一区二区三区 | 日韩精品成人一区二区在线观看 | 99久久久久国产精品免费 | 久久久久久麻豆 | 91蜜桃婷婷狠狠久久综合9色 | 天天干夜夜草 | 999午夜| www.国产在线观看 | 久草美女视频 | 欧美高清视频在线 | 亚洲一区二区三区在线视频 | 欧美一级电影 | 欧美一区二区三区影视 |