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.代码:

 #include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int a,b;
int i;
for(i=;i<n;i++)
{
cin>>a>>b;
if(a>=b) cout<<"MMM BRAINS"<<endl;
else cout<<"NO BRAINS"<<endl;
}
//system("pause");
return ;
}

OpenJudge/Poj 2027 No Brainer的更多相关文章

  1. POJ 2027 - No Brainer

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

  2. OpenJudge / Poj 2141 Message Decowding

    1.链接地址: http://poj.org/problem?id=2141 http://bailian.openjudge.cn/practice/2141/ 2.题目: Message Deco ...

  3. OpenJudge/Poj 2105 IP Address

    1.链接地址: http://poj.org/problem?id=2105 http://bailian.openjudge.cn/practice/2105 2.题目: IP Address Ti ...

  4. OpenJudge/Poj 2013 Symmetric Order

    1.链接地址: http://bailian.openjudge.cn/practice/2013 http://poj.org/problem?id=2013 2.题目: Symmetric Ord ...

  5. OpenJudge/Poj 1088 滑雪

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

  6. OpenJudge/Poj 2001 Shortest Prefixes

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

  7. OpenJudge/Poj 2000 Gold Coins

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

  8. OpenJudge/Poj 1936 All in All

    1.链接地址: http://poj.org/problem?id=1936 http://bailian.openjudge.cn/practice/1936 2.题目: All in All Ti ...

  9. OpenJudge/Poj 1661 帮助 Jimmy

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

随机推荐

  1. 实现微信文章页面 http://mp.weixin.qq.com/s?__biz=MjM5MDI3OTAwMg==&amp;mid=200337417&amp;idx=1&amp;sn=5959ed1d722c7da66b

    首先发了一篇文章,在微信后台.复制文章链接管理员 保存到数据库 $notice_list = $db->getAll(" SELECT `title`,`file_url`,`arti ...

  2. careercup-中等难度 17.9

    17.9 设计一个方法,找出任意指定单词在一本书中的出现频率. 解法: 1 单次查询 遍历这本书的每个单词,计算给定单词出现的次数.时间复杂度O(n),我们无法继续优化它,因为书中的每个单次都需要访问 ...

  3. careercup-中等难度 17.8

    17.8 给定一个整数数组(有正数和负数),找出总和最大的连续序列,并返回总和. 解法: 就是求连续子序列的和最大,不过存在一个问题: 假设整个数组都是负数,怎么样才是正确的行为呢?看看这个简单的数组 ...

  4. EntityFramework小知识

    Entity Framework 应用程序有以下优点: 1 应用程序可以通过更加以应用程序为中心的概念性模型(包括具有继承性.复杂成员和关系的类型)来工作. 2 应用程序不再对特定的数据引擎或存储架构 ...

  5. mac中vmware tools进行磁盘压缩和vmware-tools-cli的使用方法

    前言: 高高兴兴的在vmware9.0中安装了mac10.8系统,然后学习iphone开发,但是发现下载的pdf都是基于xcode3.2.5的,又在10.8上面安装3.2.5,出现“五国”无法解决,最 ...

  6. LINUX系统备份

    LINUX系统备份 =========================================================== 作者: gswwgph(http://gswwgph.itp ...

  7. C#_dropdownlist_1

    关于ASP.net MVC 中DropDownList绑定与提交数据   在做 ASP.net MVC项目中,数据绑定也是很关键的,现在以个人经验与大家交流下 ASP.net MVC 中DropDow ...

  8. php 获取远程图片

    一 function gethttpimage($url){      set_time_limit(0);      if(!empty($url)){        $imgUrl=date('Y ...

  9. javascript中window.event事件用法详解

    转自http://www.jb51.net/article/32564.htm描述 event代表事件的状态,例如触发event对象的元素.鼠标的位置及状态.按下的键等等. event对象只在事件发生 ...

  10. GCC生成的汇编代码

    假设我们写了一个C代码文件 code.c包含下面代码: int accum = 0; int sum(int x, int y){ int t = x + y; accum += t; return ...