Files
python/LuoGu/RuMen/P1917.cpp
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

17 lines
627 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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