Submission
Status:
PPPPP
Subtask/Task Score:
100/100
Score: 100
User: mik
Problemset: หินงอก
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-10 17:17:05
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false),cin.tie(NULL);
int n,mx=0; cin >> n;
int h[n];
for (int i=0;i<n;i++){
cin >> h[i];
if (mx<h[i]) mx = h[i];
}
for (int i=0;i<mx;i++){
for (int k=0;k<n;k++){
if (i<h[k]){
for (int j=0;j<2*h[k];j++){
if (j==i) cout << '\\';
else if (j==2*h[k]-i-1) cout << '/';
else cout << ' ';
}
}
else {
for (int j=0;j<2*h[k];j++){
cout << ' ';
}
}
}
cout << '\n';
}
return 0;
}