2020 CCPC-Wannafly Winter Camp Day3 E

两个人都希望火山哥赢,不断地翻棋子可以知道:最左上角那个棋子,不管翻哪里,都会跟着反转。
所以结论是根据最左上角棋子的初始状态判断输赢。
博弈赛神仙

#include <iostream>
#include <algorithm>
using namespace std;
const int maxn = 505;
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    while(t--)
    {
        int n, m;
        cin >> n >> m;
        char map[maxn][maxn];
        for(int i = 1 ; i <= n; i++)
        {                                                                                                                                                                                                         
            for(int j = 1; j <= m; j++)
            {
                cin >> map[i][j];
            }
        }
        if(map[1][1] == '0')
            cout << "aoligei" << endl;
        else
            cout << "call" << endl;
    }
    return 0;
}

发布了11 篇原创文章 · 获赞 0 · 访问量 628

猜你喜欢

转载自blog.csdn.net/weixin_43934344/article/details/104015724