兩個人都希望火山哥贏,不斷地翻棋子可以知道:最左上角那個棋子,不管翻哪裏,都會跟着反轉。
所以結論是根據最左上角棋子的初始狀態判斷輸贏。
博弈賽神仙
#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;
}