You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#include <bits/stdc++.h>
|
|
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
//此题只需分析一下,就知道uim只要走到第1行第2格、第2行第1、3格,第3行第2格就必输。
|
|
|
|
|
int i, cou;
|
|
|
|
|
char a[10]; //所有的棋子
|
|
|
|
|
int main() {
|
|
|
|
|
ios::sync_with_stdio(false); //读入输出优化的强迫症
|
|
|
|
|
for (i = 1; i <= 9; i++) {
|
|
|
|
|
cin >> a[i];
|
|
|
|
|
if (a[i] != '-')cou++;//棋子数
|
|
|
|
|
}
|
|
|
|
|
if (a[2] == 'X' || a[4] == 'X' || a[6] == 'X' || a[8] == 'X')cout << "xiaoa will win." << endl;//暴力判断
|
|
|
|
|
else cout << "Dont know." << endl;//其他直接输“dont know”
|
|
|
|
|
cout << cou << endl;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|