Codeforces 269 (Div. 2) A. MUH and Sticks(水题)
来源:互联网 发布:python json 美化 编辑:程序博客网 时间:2024/05/16 10:09
水题一道,注意拍下序就好处理了
代码如下:
#include <bits/stdc++.h>using namespace std;int a[10], b[10];int main(void) { for(int i=0; i<6; ++i) scanf("%d", &a[i]); sort(a, a+6); int flag = -1; for(int i=0; i<3; ++i) { if(a[i]==a[i+3]) { flag = i; break; } } int cnt = 0; for(int i=0; i<flag; ++i) { b[cnt++] = a[i]; } for(int i=flag+4; i<6; ++i) { b[cnt++] = a[i]; } if(flag == -1) puts("Alien"); else if(b[0] < b[1]) puts("Bear"); else if(b[0] == b[1]) puts("Elephant"); else puts("Alien"); return 0;}
0 0
- Codeforces 269 (Div. 2) A. MUH and Sticks(水题)
- Codeforces Round #269 (Div. 2) A. MUH and Sticks
- 【Codeforces Round 269 (Div 2)A】【简单讨论】MUH and Sticks 6根木棍拼动物
- A. MUH and Sticks(Codeforces Round #269)
- codeforces-#471A. MUH and Sticks(模拟)
- codeforces 471A MUH and Sticks
- A. MUH and Sticks
- 【Codeforces Round 269 (Div 2)B】【简单构造】MUH and Sticks 数值升序输出三种可能编号序
- 【Codeforces Round 269 (Div 2)C】【暴力】MUH and Sticks 纸牌搭楼n张牌恰好搭楼数
- Codeforces #269 (Div. 2) B. MUH and Important Things(水题:麻烦)
- codeforces 之 MUH and Sticks
- Codeforces Round #269 (Div. 2) B. MUH and Important Things
- Codeforces Round #269 (Div. 2) D.MUH and Cube Walls
- Codeforces Round #269 (Div. 2)(D. MUH and Cube Walls(KMP))
- Codeforces #269 (Div. 2)C. MUH and House of Cards(数学:通项公式)
- Codeforces #269 (Div. 2)D. MUH and Cube Walls(数据结构:KMP)
- Codeforces Round #269 (Div. 2) D题 MUH and Cube Walls(KMP)
- Codeforces #269 (Div. 2)D. MUH and Cube Walls(KMP)
- 世界最长油条现身武汉 达3.72米 (图)
- 最近面试公司--岗位--结果(不断更新)
- 21世纪报系总编和总经理被带走
- 哈尔滨妇女权益条例新规:赚钱不给老婆花也算家暴(图)
- 中华藏獒王"嘉玛"首例纯种藏獒克隆项目成功
- Codeforces 269 (Div. 2) A. MUH and Sticks(水题)
- 柯震东经纪人柴智屏被大陆限制出境 疑涉刑事犯罪
- 用MFC做简单计算器
- 复试 北大
- 东莞"女德班"被责令停办 学员被遣散并退回学费
- 中国最小黑客:为不做作业 黑掉学校系统
- animation-fill-mode: none | forwards | backwards | both; 检索或设置对象动画时间之外的状态。
- 李亚鹏离婚前写给王菲的信疯传 内容矛盾
- linux下安装ROOT过程