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",& ...
随机推荐
- 创建表规范 lob 字段
ORAClce 11g 提供如下特性: BasicfileOracle10g 及之前版本被称为basicfile Securefile11g中新增securefile 优点:集中写入缓存(WGC),4 ...
- 149 Max Points on a Line 直线上最多的点数
给定二维平面上有 n 个点,求最多有多少点在同一条直线上. 详见:https://leetcode.com/problems/max-points-on-a-line/description/ Jav ...
- python_函数进阶(5)
第1章 函数有用信息1.1 login.__doc__1.2 login.__name__第2章 装饰器的进阶2.1 带参数的装饰器2.2 多个装饰器装饰一个函数2.3 开放封闭原则 第3章 可迭代对 ...
- PHP的知识点总结1
PHP 基础知识总结 2015-06-03 分类: 编程技术 PHP 代表 PHP: Hypertext Preprocessor PHP 文件可包含文本.HTML.JavaScript代码和 P ...
- hash 【模板】
hash 功能: hash一般用于快速判断两个或多个字符串是否匹配. 实现 : 想一想,如果比较两个数子的话是很方便的很快,那么我们把整个字符串看成一个大数. 它是base进制的len位数.但 ...
- vmware桥接模式下主机有多个网卡导致虚拟机网络不通
桥接模式下,vmware会绑定一个物理网卡,因此有多个物理网卡时就要注意当前绑定的物理网卡.打开如下vmware菜单 可以看到VMnet0是桥接模式用的,然后他可以选择绑定一个物理网卡,注意要正确选择 ...
- iOS 二维码扫描 通过ZBar ZXing等第三方库
扫描二维码的开源库有很多如 ZBar.ZXing等 ZBar的使用方法: 下载ZBar SDK 地址https://github.com/bmorton/ZBarSDK ZBarSDK是一个开源的SD ...
- java实现斐波那契的两种方法
package com.ywx.count; /** * 斐波那契数列(地推方式要比递归方式的效率要高) * @author Vashon(yangwenxue) * date:20150320 */ ...
- react基础语法(三)组件的创建和复合组件
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- gulp自动化构建工具使用
gulpfile.js: var gulp = require("gulp"); var imagemin = require("gulp-imagemin") ...