zoj 2201 No Brainer
No Brainer
Time Limit: 2 Seconds Memory Limit: 65536 KB
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
。。。好水的题
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
int x, y;
int n;
cin >> n;
while(n--){
cin >> x >> y;
if(x >= y)
cout << "MMM BRAINS" << endl;
else
cout << "NO BRAINS" << endl;
}
return ;
}
zoj 2201 No Brainer的更多相关文章
- ZOJ题目分类
ZOJ题目分类初学者题: 1001 1037 1048 1049 1051 1067 1115 1151 1201 1205 1216 1240 1241 1242 1251 1292 1331 13 ...
- ZOJ 3891 K-hash
K-hash Time Limit: 2000ms Memory Limit: 131072KB This problem will be judged on ZJU. Original ID: 38 ...
- ZOJ People Counting
第十三届浙江省大学生程序设计竞赛 I 题, 一道模拟题. ZOJ 3944http://www.icpc.moe/onlinejudge/showProblem.do?problemCode=394 ...
- ZOJ 3686 A Simple Tree Problem
A Simple Tree Problem Time Limit: 3 Seconds Memory Limit: 65536 KB Given a rooted tree, each no ...
- ZOJ Problem Set - 1394 Polar Explorer
这道题目还是简单的,但是自己WA了好几次,总结下: 1.对输入的总结,加上上次ZOJ Problem Set - 1334 Basically Speaking ac代码及总结这道题目的总结 题目要求 ...
- ZOJ Problem Set - 1392 The Hardest Problem Ever
放了一个长长的暑假,可能是这辈子最后一个这么长的暑假了吧,呵呵...今天来实验室了,先找了zoj上面简单的题目练练手直接贴代码了,不解释,就是一道简单的密文转换问题: #include <std ...
- ZOJ Problem Set - 1049 I Think I Need a Houseboat
这道题目说白了是一道平面几何的数学问题,重在理解题目的意思: 题目说,弗雷德想买地盖房养老,但是土地每年会被密西西比河淹掉一部分,而且经调查是以半圆形的方式淹没的,每年淹没50平方英里,以初始水岸线为 ...
- ZOJ Problem Set - 1006 Do the Untwist
今天在ZOJ上做了道很简单的题目是关于加密解密问题的,此题的关键点就在于求余的逆运算: 比如假设都是正整数 A=(B-C)%D 则 B - C = D*n + A 其中 A < D 移项 B = ...
- ZOJ Problem Set - 1001 A + B Problem
ZOJ ACM题集,编译环境VC6.0 #include <stdio.h> int main() { int a,b; while(scanf("%d%d",& ...
随机推荐
- c语言读取一个文件夹下的全部文件(jpg / png 文件)
#include <cstdio> #include <cstring> #include <unistd.h> #include<dirent.h> ...
- 04.NopCommerce启用MiniProfiler调试
最近在调试NopCommerce的时候,常遇到一个地址不知道请求哪个路由(比如http://localhost/apparel-shoes,比如http://localhost/login)您能快速说 ...
- 动手实现 React-redux(四):mapDispatchToProps
在重构 ThemeSwitch 的时候我们发现,ThemeSwitch 除了需要 store 里面的数据以外,还需要 store 来 dispatch: ... // dispatch action ...
- img 标签访问图片返回403forbidden
做百度编辑器时,从秀米复制过来的文档,图片不无法加载,返回403的错 解决办法 解决这个问题只需要在头部添加一个meta <meta name="referrer" cont ...
- P1309 瑞士轮 未完成 60
题目背景 在双人对决的竞技性比赛,如乒乓球.羽毛球.国际象棋中,最常见的赛制是淘汰赛和循环赛.前者的特点是比赛场数少,每场都紧张刺激,但偶然性较高.后者的特点是较为公平,偶然性较低,但比赛过程往往十分 ...
- QQ面板拖拽(慕课网DOM事件探秘)(下)
2.鼠标事件坐标获取 function fnDown(event) { var event = event || window.event; var oDrag = document.getEleme ...
- JS正则匹配待重命名文件名
<script>var str = "123 - Copy(2).csv";var regExp = /^123( - Copy(\(\d+\))?)?.csv$/;d ...
- cyclic swapping algorithm
原文见:https://leetcode.com/problems/couples-holding-hands/discuss/113362/JavaC%2B%2B-O(N)-solution-usi ...
- swift Equatable 的缺省实现
Starting from Swift 4.1, all you have to is to conform to the Equatable protocol without the need of ...
- Using URL Schemes to Communicate with Apps
要素:1)通信双方:2)协议:3)支持机制(系统,进行协议注册):4)数据 https://developer.apple.com/library/content/documentation/iPho ...