1.链接地址:

http://bailian.openjudge.cn/practice/2027

http://poj.org/problem?id=2027

2.题目:

总Time Limit:
1000ms
Memory Limit:
65536kB
Description
Zombies love to eat brains. Yum.
Input
The first line contains a single integer n indicating the number of data sets.

The following n lines each represent a data set. Each data set will be formatted according to the following description:

A single data set consists of a line "X Y", where X is the number of brains the zombie eats and Y is the number of brains the zombie requires to stay alive.

Output
For each data set, there will be exactly one line of output. This line will be "MMM BRAINS" if the number of brains the zombie eats is greater than or equal to the number of brains the zombie requires to stay alive. Otherwise, the line will be "NO BRAINS".
Sample Input
3
4 5
3 3
4 3
Sample Output
NO BRAINS
MMM BRAINS
MMM BRAINS
Source
South Central USA 2004

3.思路:

4.代码:

 1 #include<iostream>
 2 using namespace std;
 3 int main()
 4 {
 5     int n;
 6     cin>>n;
 7     int a,b;
 8     int i;
 9     for(i=0;i<n;i++)
10     {
11         cin>>a>>b;
12         if(a>=b) cout<<"MMM BRAINS"<<endl;
13         else cout<<"NO BRAINS"<<endl;
14     }
15     //system("pause");
16        return 0;
17 }

转载于:https://www.cnblogs.com/mobileliker/p/3584541.html

OpenJudge/Poj 2027 No Brainer相关推荐

  1. POJ 2027 No Brainer(水~)

    Description 输入x,y,如果x< y,输出NO BRAINS,否则输出MMM BRAINS Input 第一行为用例组数,每组用例两个整数x和y Output 对于每组用例,按题意输 ...

  2. OpenJudge/Poj 2001 Shortest Prefixes

    1.链接地址: http://bailian.openjudge.cn/practice/2001 http://poj.org/problem?id=2001 2.题目: Shortest Pref ...

  3. OpenJudge/Poj 1163 The Triangle

    1.链接地址: http://bailian.openjudge.cn/practice/1163 http://poj.org/problem?id=1163 2.题目: 总时间限制: 1000ms ...

  4. OpenJudge/Poj 1915 Knight Moves

    1.链接地址: http://bailian.openjudge.cn/practice/1915 http://poj.org/problem?id=1915 2.题目: 总Time Limit: ...

  5. OpenJudge/Poj 1226 Substrings

    1.链接地址: http://bailian.openjudge.cn/practice/1226/ http://poj.org/problem?id=1226 2.题目: 总时间限制: 1000m ...

  6. POJ 2017 No Brainer(超级水题)

    一.Description Zombies love to eat brains. Yum. Input The first line contains a single integer n indi ...

  7. c语言记忆化搜索,HNUSTC语言基础简单数据结构acm入门第一讲搜索.ppt

    C语言基础,简单数据结构,ACM入门讲座搜索部分 Bjut:mark063 2010.10.30 1 Evaluation only. Created with Aspose.Slides for . ...

  8. POJ的题目分类(两个版本)

    版本一: 简单题 1000A+B Problem 1001Exponentiation 1003 Hangover 1004 Financial Management 1005 I Think I N ...

  9. OpenJudge 2757 最长上升子序列 / Poj 2533 Longest Ordered Subsequence

    1.链接地址: http://poj.org/problem?id=2533 http://bailian.openjudge.cn/practice/2757 2.题目: 总Time Limit: ...

最新文章

  1. python【蓝桥杯vip练习题库】ADV-359分解质因数
  2. C语言位运算,醍醐灌顶式教学
  3. STL学习之一(栈(statck))
  4. 数据“被”覆盖有假象,SQL数据库恢复终极绝招(数据恢复高级技术)
  5. Softmax, DNN, WideDeep Model
  6. Linux安装卸载Mysql数据库
  7. [笔记]Windows核心编程《二十二》注入DLL和拦截API
  8. cat5e跑万兆_cat5e网线支持千兆吗?
  9. 邮件传输协议 SMTP 、POP3 、IMAP 和 Exchange 比较及联系?
  10. 小程序点击图片全屏播放视频
  11. 并发编程之:Atomic
  12. 给想去阿里面试的同学一些意见
  13. 杭电一学生还没毕业年薪已过百万,带十几人的研发团队!
  14. 二十三、正则表达式中的“r”含义
  15. Facemark:使用OpenCV进行面部特征点检测
  16. mysql ndb 关闭_MySQL NDB Cluster环境启动与关闭
  17. 火爆的人工智能项目都在这里了|Gitee项目推荐
  18. 企业数仓DQC数据质量管理实践篇
  19. [局域网共享批处理文件]局域网共享时看不到工作组计算机的
  20. 30分钟搞定极光sdk安卓客户端接入

热门文章

  1. ajax请求,请求头是provisional are shown。请求未发送出去
  2. 关于美工ps出图table格式的处理
  3. 5G UE — UE 的位置信息
  4. Apache ServiceComb — Service Center
  5. VMware 虚拟化编程(15) — VMware 虚拟机的恢复方案设计
  6. RESTful_基础知识
  7. md加密 16位 32位
  8. github新建repositories后import已有code 随后同步更新
  9. Centos rescue 模式
  10. Ceph Storage Cluster(CEPH存储集群) Configuration配置