OpenJudge/Poj 2027 No Brainer
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的更多相关文章
- POJ 2027 - No Brainer
Description Zombies love to eat brains. Yum. Input The first line contains a single integer n indica ...
- OpenJudge / Poj 2141 Message Decowding
1.链接地址: http://poj.org/problem?id=2141 http://bailian.openjudge.cn/practice/2141/ 2.题目: Message Deco ...
- OpenJudge/Poj 2105 IP Address
1.链接地址: http://poj.org/problem?id=2105 http://bailian.openjudge.cn/practice/2105 2.题目: IP Address Ti ...
- OpenJudge/Poj 2013 Symmetric Order
1.链接地址: http://bailian.openjudge.cn/practice/2013 http://poj.org/problem?id=2013 2.题目: Symmetric Ord ...
- OpenJudge/Poj 1088 滑雪
1.链接地址: bailian.openjudge.cn/practice/1088 http://poj.org/problem?id=1088 2.题目: 总Time Limit: 1000ms ...
- OpenJudge/Poj 2001 Shortest Prefixes
1.链接地址: http://bailian.openjudge.cn/practice/2001 http://poj.org/problem?id=2001 2.题目: Shortest Pref ...
- OpenJudge/Poj 2000 Gold Coins
1.链接地址: http://bailian.openjudge.cn/practice/2000 http://poj.org/problem?id=2000 2.题目: 总Time Limit: ...
- OpenJudge/Poj 1936 All in All
1.链接地址: http://poj.org/problem?id=1936 http://bailian.openjudge.cn/practice/1936 2.题目: All in All Ti ...
- OpenJudge/Poj 1661 帮助 Jimmy
1.链接地址: bailian.openjudge.cn/practice/1661 http://poj.org/problem?id=1661 2.题目: 总Time Limit: 1000ms ...
随机推荐
- 2015北京网络赛 A题 The Cats' Feeding Spots 暴力
The Cats' Feeding Spots Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://hihocoder.com/contest/acm ...
- 最全面的Android Intent机制讲解
对于大型软件开发经验较少的程序员来说,这可能是一个不太容易理解的抽象概念,因为它与我们平常使用的简单函数调用,或者通过库调用接口的方式不太一样.在 Intent 的使用中你看不到直接的函数调用,相对函 ...
- php递归无限极分类
递归无限级分类有几种形式,我这里仅仅举例比較经常使用的三种: 第一种:返回有排序的数组: <?php $data = array( 1 => array( 'id' => 1, 'p ...
- SAP-SD-ABAP-VMOD 查找和应用SD模块用户出口(user exit) 好方法 .
针对 SD 模块,有一个专门管理 user-exit 的开发包 VMOD , 只要用tcode: se80 查看它, 会发现绝大部分的 SD 要相关的 user-exit 都能在这找到.
- Android(java)学习笔记124:Android权限大全
访问登记属性 android.permission.ACCESS_CHECKIN_PROPERTIES读取或写入登记check-in数据库属性表的权限 获取错略位置 android.permissio ...
- Android_listView_Listener
layout.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" x ...
- Linux批量替换文件内容
问题描述:现在需要将rack1目录下*.send文件中的"-ip="替换成“-localIp=10.0.0.1/n-ip=” 刚才那个批量文本内容替换,只能替换内存中的内容,并不会 ...
- RESTful HTTP实践
http://www.infoq.com/cn/articles/designing-restful-http-apps-roth 摘要: 本文对RESTful HTTP的基础原理做了一个概览,探讨了 ...
- Hibernate - 使用注解完成映射
除了使用XML配置来映射对象和数据库表,还可以使用注解来完成持久化.使用注解需要导入Hibernate Annotations扩展包 @Entity -加在类的前面,将类声明为持久化类. -javax ...
- background不能填充margin的问题
CSS2 中有5个主要的背景(background)属性,它们是: background-color: 指定填充背景的颜色.background-image: 引用图片作为背景.background- ...