- 大力出奇迹
- 两者最优下棋策略,体现为“在任意空位下子,对所有可能的结果,取最好的”。
#include <iostream>
#include <vector>
#include <cctype>
#include <string>
#include <stdio.h>
using namespace std;
#define N 3
bool AliceWin(const vector<vector<int> >& grid) {
for (int i = 0; i < N; ++i) {
if (grid[i][0] + grid[i][1] + grid[i][2] == 3 && (grid[i][0] ^ grid[i][1] ^ grid[i][2]) == 1)
return true;
if (grid[0][i] + grid[1][i] + grid[2][i] == 3 && (grid[0][i] ^ grid[1][i] ^ grid[