Submission
Status:
PPPPP
Subtask/Task Score:
100/100
Score: 100
User: NeolNWza007
Problemset: หินงอก
Language: cpp
Time: 0.002 second
Submitted On: 2025-10-13 22:19:20
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,maxv;cin>>n;
vector<int> arr;
vector<int> temp;
for(int i=0; i<n; i++){
int x;cin>>x;
if(i==0){
maxv=x;
}
if(x>maxv){
maxv=x;
}
arr.push_back(x);
temp.push_back(2*x);
}
//cout<<maxv<<endl;
for(int i=0; i<maxv; i++){
for(int j=0; j<n; j++){
if(arr[j]>0){
for(int k=0; k<i; k++)cout<<" ";
cout<<'\\';
for(int k=0; k<2*(arr[j]-1); k++)cout<<" ";
cout<<'/';
for(int k=0; k<i; k++)cout<<" ";
arr[j]--;
}else{
for(int k=0; k<temp[j]; k++){
cout<<" ";
}
}
}
cout<<endl;
}
return 0;
}