Submission
Status:
PxxPx
Subtask/Task Score:
40/100
Score: 40
User: Sense.exe
Problemset: หินงอก
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-02 06:54:35
#include <bits/stdc++.h>
using namespace std;
int main() {
int n,h;
cin >> n;
int rows = 0;
int cols = 0;
int sum=0;
int mx=-1;
vector<vector<char>> v(100,vector<char>(100,' '));
for(int i=0; i<n; i++) {
cin >> h;
sum+=h;
rows=0;
mx = max(mx,h);
for(int j=0; j<h; j++) {
v[rows][cols] = '\\';
cols++;
rows++;
}
for(int j=0; j<h; j++) {
rows--;
v[rows][cols] = '/';
cols++;
}
}
for(int i=0; i<mx; i++) {
for(int j=0; j<sum*2; j++) {
cout << v[i][j];
}
cout << "\n";
}
}