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 ...
随机推荐
- 关于STM32下载问题的简单理解
首先STM32分为两种下载方式1.ISP(IN-SYSTEM-PROGRAMMING在线编程) 2.JTAG 这里简单谈谈对ISP下载的理解: ISP下载是51单片机,STM等单片机比较常见的一种下 ...
- 使用CATransition实现页面的“从左向右” “从右向左”的动画
-(void)initView{ UISwipeGestureRecognizer *left_gesture=[[UISwipeGestureRecognizer alloc]initWithTar ...
- IIS 之 失败请求跟踪规则
若想使用此功能需先启动如下图的Windows功能: 利用失败请求跟踪功能,可以在出现问题时捕获相应的XML格式的日志,从而无需重现该问题即可开始故障排除.此外,还可以定义应用程序的失败条件并配置要基于 ...
- java 获取本机ip地址
/** * 取当前系统站点本地地址 linux下 和 window下可用 * * @return */ public static String getLocalIP() { String sIP = ...
- Android界面刷新
Android的invalidate与postInvalidate都是用来刷新界面的,用法区别在于: 1)invalidate():实例化一个Handler对象,并重写handleMessage方法调 ...
- spring-boot + Ehcache without XML
http://stackoverflow.com/questions/21944202/using-ehcache-in-spring-4-without-xml 1.Ehcache配置类 @Conf ...
- ios webview 图片自适应屏幕宽度
//这个知识点主要是自己最近在尝试写后台接口 在移动端展示的时候需要用到这个知识点,在webViewDidFinishLoad方法里面执行一段js代码 拿到各个图片 判断其宽度是否大于当前手机屏幕尺寸 ...
- 关于iOS自定义返回按钮右滑返回手势失效的解决:
在viewDidLoad方法里面添加下面这一句代码即可 self.navigationController.interactivePopGestureRecognizer.delegate=(id)s ...
- IE兼容低版本
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><m ...
- nargin函数的用法
nargin是用来判断输入变量个数的函数,这样就可以针对不同的情况执行不同的功能.通常可以用他来设定一些默认值,如下面的函数. 函数文件examp.m:function fout=charray(a, ...