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 · 訪問量 1741
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章