Submission

Status:

PPPPP

Subtask/Task Score:

100/100

Score: 100

User: porpeang

Problemset: หินงอก

Language: cpp

Time: 0.002 second

Submitted On: 2026-10-03 00:08:45

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

int main(){
    int a=0,b=0,c=0,d=0,e=0;
    cin>>a;
    int max_len = 0;
    vector<int>ve;
    for(int i=0;i<a;i++){
        cin>>b;
        ve.push_back(b);
        if(b > max_len) max_len = b;
    }
    for(int r = 1; r <= max_len; r++){
        for(int j = 0; j < a; j++){
            int L = ve[j];
            if(r <= L){
                for(int w = 0; w < r - 1; w++) cout << " ";
                cout << "\\";
                for(int w = 0; w < 2 * (L - r); w++) cout << " ";
                cout << "/";
                for(int w = 0; w < r - 1; w++) cout << " ";
            }
            else {
                for(int w = 0; w < 2 * L; w++) cout << " ";
            }
        }
        cout << '\n';
    }
}