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.

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;
}
目录
相关文章
|
人工智能
POJ 2531
初学dfs参考别人代码,如有雷同,见怪不怪。#include using namespace std; int aa[25][25]; int maxa=0; int step[25]={0},n; void dfs(int a,int b) { int t=b; step...
681 0
|
人工智能 BI
poj-3185-开关问题
描述   牛一行20他们喝的水碗。碗可以那么(面向正确的为清凉水)或颠倒的(一个位置而没有水)。他们希望所有20个水碗那么,因此用宽鼻子翻碗。   嘴太宽,他们不仅翻转一碗还碗的碗两侧(总共三个或三个——在两端的情况下碗——两碗)。
790 0
|
机器学习/深度学习
|
人工智能 vr&ar
|
消息中间件 人工智能 JavaScript