一、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".

二、题解

        只做为工作记录,不多说。

三、Java代码

import java.util.Scanner; 

public class Main {

    public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
int n,i,a,b;
n=cin.nextInt();
for(i=1;i<=n;i++){
a=cin.nextInt();
b=cin.nextInt();
if(a>=b)
System.out.println("MMM BRAINS");
else
System.out.println("NO BRAINS");
}
}
}

版权声明:本文为博主原创文章,未经博主允许不得转载。

POJ 2017 No Brainer(超级水题)的更多相关文章

  1. poj 3080 Blue Jeans(水题 暴搜)

    题目:http://poj.org/problem?id=3080 水题,暴搜 #include <iostream> #include<cstdio> #include< ...

  2. POJ 3984 - 迷宫问题 - [BFS水题]

    题目链接:http://poj.org/problem?id=3984 Description 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, ...

  3. poj 1007:DNA Sorting(水题,字符串逆序数排序)

    DNA Sorting Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 80832   Accepted: 32533 Des ...

  4. poj 1004:Financial Management(水题,求平均数)

    Financial Management Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 126087   Accepted: ...

  5. POJ 3176 Cow Bowling (水题DP)

    题意:给定一个金字塔,第 i 行有 i 个数,从最上面走下来,只能相邻的层数,问你最大的和. 析:真是水题,学过DP的都会,就不说了. 代码如下: #include <cstdio> #i ...

  6. poj 1658 Eva's Problem(水题)

    一.Description Eva的家庭作业里有很多数列填空练习.填空练习的要求是:已知数列的前四项,填出第五项.因为已经知道这些数列只可能是等差或等比数列,她决定写一个程序来完成这些练习. Inpu ...

  7. ACM: POJ 1401 Factorial-数论专题-水题

    POJ 1401 Factorial Time Limit:1500MS     Memory Limit:65536KB     64bit IO Format:%lld & %llu   ...

  8. POJ 1986 DIstance Query LCA水题

    给出一棵树,对于每一个询问,给出2个节点,输出2个节点的距离. 输入中有字母,那个是没有用的,不用管. 思路: 0.选择编号为1的节点作为树的root (注意:有些题的边是单向的,这时候我们要根据节点 ...

  9. poj 1936 All in All(水题)

    题目链接:http://poj.org/problem?id=1936 思路分析:字符串子序列查找问题,设置两个指针,一个指向子序列,另一个指向待查找的序列,查找个字符串一次即可判断.算法时间复杂度O ...

随机推荐

  1. 九度OJ 1261:寻找峰值点 (基础题)

    时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:500 解决:37 题目描述: 给定一个整数序列,该整数序列存在着这几种可能:先递增后递减.先递减后递增.全递减.全递增. 请找出那个最大值的 ...

  2. 九度OJ 1201:二叉排序树 (二叉树)

    时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:4894 解决:2062 题目描述: 输入一系列整数,建立二叉排序数,并进行前序,中序,后序遍历. 输入: 输入第一行包括一个整数n(1< ...

  3. 20179209《Linux内核原理与分析》第十一周作业

    Nmap配合Metasploit进行端口扫描 1.Nmap扫描器基本使用 1.1简介 Nmap(Network Mapper)最早是Linux下的网络扫描嗅探器.其基本功能有三个: 探测一组主机是否在 ...

  4. Webpack探索【5】--- plugins详解

    本文主要讲plugins相关内容. https://gitbook.cn/gitchat/column/59e065f64f7fbe555e479204/topic/59e96d87a35cf44e1 ...

  5. host更新

    http://alsohosts.herokuapp.com/ google镜像站https://goge.ml/

  6. 网络的分层协议总结(转发:https://www.cnblogs.com/Zhang-wj/p/5907534.html)

    网络的分层协议总结 OSI七层模型OSI 中的层            功能                                                        TCP/IP ...

  7. Navicat Premium试用期破解方法(转)

    转载网址https://blog.csdn.net/Jason_Julie/article/details/82864187 1.按步骤安装Navicat Premium,如果没有可以去官网下载:ht ...

  8. CodeForces - 580C Kefa and Park 【BFS】

    题目链接 http://codeforces.com/problemset/problem/580/C 题意 根节点是 1 然后所有的叶子结点都是饭店 从根节点到叶子结点的路径上 如果存在 大于m 个 ...

  9. python 删除文件中指定行

    代码适用情况:xml文件,循环出现某几行,根据这几行中的某个字段删掉这几行这段代码的作用删除jenkins中config.xml中在自动生成pipline报错的时的回滚 start = '<se ...

  10. Ansible playbook练习

    示例1:创建用户的Playbook --- - name: create user hosts: openstack gather_facts: false tasks: - name: create ...