POJ 2027 No Brainer

简介: POJ 2027 No Brainer

Problem 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


简单的比大小。。。

#include <stdio.h>
#include <stdlib.h>
int main(){
    int c;
    scanf("%d",&c);
    while(c--){
            int x,y;
    scanf("%d %d",&x,&y);
    if(x<y)
        printf("NO BRAINS\n");
    else
        printf("MMM BRAINS\n");
    }
    return 0;
}
目录
相关文章
|
8月前
|
算法
Wormholes—POJ3259
Wormholes—POJ3259
|
容器
POJ 3640 Conformity
POJ 3640 Conformity
62 0
|
算法框架/工具
POJ 2262 Goldbach's Conjecture
POJ 2262 Goldbach's Conjecture
146 0
poj 2299 求逆序数
http://poj.org/problem?id=2299 #include using namespace std; int aa[500010],bb[500010]; long long s=0; void merge(int l,int m,int r) { ...
809 0
poj-1008-玛雅历
Description 上周末,M.A. Ya教授对古老的玛雅有了一个重大发现。从一个古老的节绳(玛雅人用于记事的工具)中,教授发现玛雅人使用了一个一年有365天的叫做Haab的历法。这个Haab历法拥有19个月,在开始的18个月,一个月有20天,月份的名字分别是pop, no, zip, zotz, tzec, xul, yoxkin, mol, chen, yax, zac, ceh, mac, kankin, muan, pax, koyab, cumhu。
890 0
POJ 2487 Stamps
Description Background Everybody hates Raymond. He’s the largest stamp collector on planet earth and because of that he always makes fun of all the others at the stamp collector parties.
1072 0
POJ 2262 Goldbach&#39;s Conjecture
Problem Description In 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the foll...
1018 0
|
算法 计算机视觉
最小割-poj-2914
poj-2914-Minimum Cut Description Given an undirected graph, in which two vertices can be connected by multiple edges, what is the size of the minimum cut of the graph? i.e. how many edges must b
1569 0

热门文章

最新文章