1 条题解
-
1
参考答案:
#include<iostream> #include<string> using namespace std; int main() { int n; while (cin >> n) { char a[1000][5]; int i, j; for (i = 1; i < n + 1; ++i) scanf("%s", a[i]); for (i = 1; i < n + 1; ++i) { if (a[i][0] == 'O' && a[i][1] == 'O') { a[i][0] = '+', a[i][1] = '+'; cout << "YES" << endl; break; } if (a[i][3] == 'O' && a[i][4] == 'O') { a[i][3] = '+', a[i][4] = '+'; cout << "YES" << endl; break; } } if (i == n + 1) cout << "NO" << endl; else { for (i = 1; i < n + 1; ++i) { for (j = 0; j < 5; ++j) { cout << a[i][j]; } cout << endl; } } } return 0; }
- 1
信息
- ID
- 5432
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 1
- 标签
- 递交数
- 6
- 已通过
- 4
- 上传者