L - OOXX Game

#include<cstdio>
#include<cstring>
#include<iostream>
using namespace std;
int main()
{//也就是考奇数偶数
    int t;
    int k=0;
    scanf("%d",&t);
    while(t--)
    {
        int n,m;
        int tem=0;
        char s;
        int i,j;
        scanf("%d%d",&n,&m);
        for(i=0; i<n; i++)
        {
            for(j=0; j<m; j++)
            {
                cin>>s;//用cin输入就不用考虑回车
                if(s=='O')
                    tem++;
            }
        }
        k++;
        if(tem%2!=0)printf("Case %d: Maze\n",k);
        else printf("Case %d: Fat brother\n",k);
    }
    return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_41374539/article/details/81209265
l