0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-08 20:38:47 +00:00

A. 信友队

https://xjoi.net/contest/detail/828859
This commit is contained in:
Baoshuo Ren 2021-08-08 22:20:46 +08:00 committed by Baoshuo Ren
parent 8ba6ad7ebc
commit 50fb86cd78
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

View File

@ -2,43 +2,65 @@
using namespace std; using namespace std;
int n;
string ans[15][10];
int main() { int main() {
int n;
cin >> n; cin >> n;
ans[1][1] = "+ +\n +\n+ +\n"; for (int i = 0; i < n; i++) {
ans[2][1] = "+ +\n + +\n +\n + +\n+ +\n"; for (int j = 0; j < i; j++) {
ans[3][1] = "+ +\n + +\n + +\n +\n + +\n + +\n+ +\n"; cout << ' ';
ans[4][1] = "+ +\n + +\n + +\n + +\n +\n + +\n + +\n + +\n+ +\n"; }
ans[5][1] = "+ +\n + +\n + +\n + +\n + +\n +\n + +\n + +\n + +\n + +\n+ +\n"; cout << '+';
ans[6][1] = "+ +\n + +\n + +\n + +\n + +\n + +\n +\n + +\n + +\n + +\n + +\n + +\n+ +\n"; for (int j = 1; j < 2 * n - 2 * i; j++) {
ans[7][1] = "+ +\n + +\n + +\n + +\n + +\n + +\n + +\n +\n + +\n + +\n + +\n + +\n + +\n + +\n+ +\n"; cout << ' ';
ans[8][1] = "+ +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n+ +\n"; }
ans[9][1] = "+ +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n+ +\n"; cout << '+' << endl;
ans[10][1] = "+ +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n+ +\n"; }
ans[1][2] = "+ +\n +\n +\n"; for (int i = 0; i < n; i++) {
ans[2][2] = "+ +\n + +\n +\n +\n +\n"; cout << ' ';
ans[3][2] = "+ +\n + +\n + +\n +\n +\n +\n +\n"; }
ans[4][2] = "+ +\n + +\n + +\n + +\n +\n +\n +\n +\n +\n"; cout << '+' << endl;
ans[5][2] = "+ +\n + +\n + +\n + +\n + +\n +\n +\n +\n +\n +\n +\n"; for (int i = n - 1; i >= 0; i--) {
ans[6][2] = "+ +\n + +\n + +\n + +\n + +\n + +\n +\n +\n +\n +\n +\n +\n +\n"; for (int j = 0; j < i; j++) {
ans[7][2] = "+ +\n + +\n + +\n + +\n + +\n + +\n + +\n +\n +\n +\n +\n +\n +\n +\n +\n"; cout << ' ';
ans[8][2] = "+ +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n +\n +\n +\n +\n +\n +\n +\n +\n +\n"; }
ans[9][2] = "+ +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n +\n +\n +\n +\n +\n +\n +\n +\n +\n +\n"; cout << '+';
ans[10][2] = "+ +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n +\n +\n +\n +\n +\n +\n +\n +\n +\n +\n +\n"; for (int j = 1; j < 2 * n - 2 * i; j++) {
ans[1][3] = "++ \n+ +\n++\n"; cout << ' ';
ans[2][3] = "++++\n+ +\n+ +\n+ +\n++++\n"; }
ans[3][3] = "++++++\n+ +\n+ +\n+ +\n+ +\n+ +\n++++++\n"; cout << '+' << endl;
ans[4][3] = "++++++++\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n++++++++\n"; }
ans[5][3] = "++++++++++\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n++++++++++\n"; cout << endl;
ans[6][3] = "++++++++++++\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n++++++++++++\n"; for (int i = 0; i < n; i++) {
ans[7][3] = "++++++++++++++\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n++++++++++++++\n"; for (int j = 0; j < i; j++) {
ans[8][3] = "++++++++++++++++\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n++++++++++++++++\n"; cout << ' ';
ans[9][3] = "++++++++++++++++++\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n++++++++++++++++++\n"; }
ans[10][3] = "++++++++++++++++++++\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n++++++++++++++++++++\n"; cout << '+';
cout << ans[n][1] << endl for (int j = 1; j < 2 * n - 2 * i; j++) {
<< ans[n][2] << endl cout << ' ';
<< ans[n][3] << endl; }
cout << '+' << endl;
}
for (int i = 0; i <= n; i++) {
for (int j = 0; j < n; j++) {
cout << ' ';
}
cout << '+' << endl;
}
cout << endl;
for (int i = 0; i < n * 2; i++) {
cout << '+';
}
cout << endl;
for (int i = 1; i < n * 2; i++) {
cout << '+';
for (int i = 1; i < n * 2; i++) {
cout << ' ';
}
cout << '+' << endl;
}
for (int i = 0; i < n * 2; i++) {
cout << '+';
}
cout << endl;
return 0; return 0;
} }