mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-24 18:11:59 +00:00
parent
8ba6ad7ebc
commit
50fb86cd78
@ -2,43 +2,65 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
int n;
|
||||
string ans[15][10];
|
||||
|
||||
int main() {
|
||||
int n;
|
||||
cin >> n;
|
||||
ans[1][1] = "+ +\n +\n+ +\n";
|
||||
ans[2][1] = "+ +\n + +\n +\n + +\n+ +\n";
|
||||
ans[3][1] = "+ +\n + +\n + +\n +\n + +\n + +\n+ +\n";
|
||||
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";
|
||||
ans[6][1] = "+ +\n + +\n + +\n + +\n + +\n + +\n +\n + +\n + +\n + +\n + +\n + +\n+ +\n";
|
||||
ans[7][1] = "+ +\n + +\n + +\n + +\n + +\n + +\n + +\n +\n + +\n + +\n + +\n + +\n + +\n + +\n+ +\n";
|
||||
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";
|
||||
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";
|
||||
ans[2][2] = "+ +\n + +\n +\n +\n +\n";
|
||||
ans[3][2] = "+ +\n + +\n + +\n +\n +\n +\n +\n";
|
||||
ans[4][2] = "+ +\n + +\n + +\n + +\n +\n +\n +\n +\n +\n";
|
||||
ans[5][2] = "+ +\n + +\n + +\n + +\n + +\n +\n +\n +\n +\n +\n +\n";
|
||||
ans[6][2] = "+ +\n + +\n + +\n + +\n + +\n + +\n +\n +\n +\n +\n +\n +\n +\n";
|
||||
ans[7][2] = "+ +\n + +\n + +\n + +\n + +\n + +\n + +\n +\n +\n +\n +\n +\n +\n +\n +\n";
|
||||
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";
|
||||
ans[10][2] = "+ +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n + +\n +\n +\n +\n +\n +\n +\n +\n +\n +\n +\n +\n";
|
||||
ans[1][3] = "++ \n+ +\n++\n";
|
||||
ans[2][3] = "++++\n+ +\n+ +\n+ +\n++++\n";
|
||||
ans[3][3] = "++++++\n+ +\n+ +\n+ +\n+ +\n+ +\n++++++\n";
|
||||
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";
|
||||
ans[6][3] = "++++++++++++\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n++++++++++++\n";
|
||||
ans[7][3] = "++++++++++++++\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n++++++++++++++\n";
|
||||
ans[8][3] = "++++++++++++++++\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n+ +\n++++++++++++++++\n";
|
||||
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 << ans[n][1] << endl
|
||||
<< ans[n][2] << endl
|
||||
<< ans[n][3] << endl;
|
||||
for (int i = 0; i < n; i++) {
|
||||
for (int j = 0; j < i; j++) {
|
||||
cout << ' ';
|
||||
}
|
||||
cout << '+';
|
||||
for (int j = 1; j < 2 * n - 2 * i; j++) {
|
||||
cout << ' ';
|
||||
}
|
||||
cout << '+' << endl;
|
||||
}
|
||||
for (int i = 0; i < n; i++) {
|
||||
cout << ' ';
|
||||
}
|
||||
cout << '+' << endl;
|
||||
for (int i = n - 1; i >= 0; i--) {
|
||||
for (int j = 0; j < i; j++) {
|
||||
cout << ' ';
|
||||
}
|
||||
cout << '+';
|
||||
for (int j = 1; j < 2 * n - 2 * i; j++) {
|
||||
cout << ' ';
|
||||
}
|
||||
cout << '+' << endl;
|
||||
}
|
||||
cout << endl;
|
||||
for (int i = 0; i < n; i++) {
|
||||
for (int j = 0; j < i; j++) {
|
||||
cout << ' ';
|
||||
}
|
||||
cout << '+';
|
||||
for (int j = 1; j < 2 * n - 2 * i; j++) {
|
||||
cout << ' ';
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user