Submission

Status:

PPPPP

Subtask/Task Score:

100/100

Score: 100

User: punzacp555

Problemset: หินงอก

Language: cpp

Time: 0.002 second

Submitted On: 2026-09-30 14:16:37

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

int main() {
    cin.tie(0)->sync_with_stdio(0);
    int n;
    cin >> n;

    int inp[n];
    int mx = INT_MIN;
    for(int& x : inp) cin >> x, mx = max(mx, x);

    for(int i=1; i<=mx; i++) {
        for(int x : inp) {
            int sz = x+x;
            if(i > x) {
                for(int j=0; j<sz; j++) cout << ' ';
            }else {
                for(int j=1; j<=sz; j++) {
                    // '\'
                    if(j == i) cout << char(92);
                    else if(j == sz-i+1) cout << '/';
                    else cout << ' ';
                }
            }
        }
        cout << "\n";
    }

    // for(int i=0; i<=97; i++) cout << i << ": " << char(i) << "\n";

    return 0;
}