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.

17 lines
611 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#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;
}