Submission

Status:

-----

Subtask/Task Score:

0/100

Score: 0

User: Kittipon

Problemset: กังหันสี่ทิศ

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-03 21:49:25

#include <bits/stdc++.h>
using namespace std;

int n;
char b[55][105];
string a = "abcdefghijklmnopqrstuvwuxyz";
int st1,st11,st2,st22,st3,st33,st4,st44;

int main(){
    cin >> n;
    st22 = n*2-2;
    st3 = n*2-2;
    st4 = n*2-2;
    st44 = n*2-2;
    int sr11 = n*2;
    int sr22 = (n*2)+n*2-2;
    int sr33 = n*2;
    int sr44 = (n*2)+n*2-2;
    for(int i = n-1;i >= 0;i--){
        b[st1][st11++] = a[i];
        b[st2][st22--] = a[i];
        b[st3][st33++] = a[i];
        b[st4][st44--] = a[i];
        b[st1++][sr11++] = '*';
        b[st2++][sr22--] = '*';
        b[st3--][sr33++] = '*';
        b[st4--][sr44--] = '*'; 
    }
    for(int i = 0;i < n*2-1;i++){
        for(int j = 0;j < (n*2+1)+n*2;j++){
            if((b[i][j] >= 'a'&& b[i][j] <= 'z')|| b[i][j] == '*'){
                cout << b[i][j];
            }else{
                cout << " ";
            }
            
        }
        cout << '\n';
    }
    
}