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. PCL 点云数据操作 OpenCV遍历数据

    1.对于点云类型实例cloud,对其第i个点进行赋值操作,使用cloud.point[i].x 和 cloud.point[i].y 和cloud.point[i].z 分别对其XYZ坐标赋值. cl ...

  2. 使用python编写批量卸载android应用的脚本

    该脚本的功能是卸载android手机中安装的所有第三方应用,主要是使用adb shell pm.adb uninstall 命令,所以使用的前提是需要配好adb的环境变量,下面上代码: #!/usr/ ...

  3. MFC——从实现角度分析微云界面

    在云计算时代之风吹来,很多互联网公司都在建云,提出云盘.云储存.云平台.云空间等等,骤然间,天下皆云.云是啥?有用户量,就有云,没有用户量,你的系统,你的云,也就是一朵白云. 最近研究了下微云的界面, ...

  4. Vi、Vim及Gedit编辑器

    搜索(注意,不需要输入:号.也可以先输入:号再键入命令) /string……………………向后搜索,从光标处向文件尾搜索,按n键继续搜索下一个 ?string……………………向前搜索 注意:搜索时会将所 ...

  5. Editing and Deleting Data

    Editing and Deleting Data In the previous chapter we've come to learn how we can use the zend-form a ...

  6. VB.net 利用SerialPort进行读取串口操作

    Imports SystemImports System.IO.Ports Public Class Form1 Private Sub Form1_Load(ByVal sender As Syst ...

  7. WebKit笔记

    加载网页时执行javascript代码 let mWebView = WKWebView.init(frame: self.view.bounds) self.view.addSubview(mWeb ...

  8. JFinal极速开发实战-业务功能开发-通用表单验证器

    提交表单数据时,需要经过前端的验证才能提交到后台,而后台的验证器再做一道数据的校验,成功之后才能进入action进行业务数据的处理. 在表单数据的验证中,数据类型的验证还是比较固定的.首先是对录入数据 ...

  9. 关于Git的stash命令

    add 添加新文件到 Git 代码仓库的索引中 $ git add filename mv 移动或重命名文件 $ git mv old-filename new-filename rm 从工作目录和 ...

  10. PHP Fatal error: Cannot pass parameter 2 by reference

    PHP Fatal error:  Cannot pass parameter 2 by reference in 这个错误的意思是:不能按引用传递第2个参数 我的理解是: 方法的第2个参数 需要传递 ...