Submission
Status:
PPPPP
Subtask/Task Score:
100/100
Score: 100
User: fillhavertz
Problemset: หินงอก
Language: cpp
Time: 0.003 second
Submitted On: 2025-10-05 11:38:22
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n,sum =0,max=0;
cin>>n;
bool dir =0;
vector<int> a(n),r(n,0),c(n,0);
for(int i = 0;i<n;i++) {cin>>a[i],sum +=a[i]*2;
if(a[i]>max) max = a[i];
}
for(int col = 0;col<max;col++){
for(int i = 0;i<n;i++){
for(int j=0;j<a[i]*2;j++){
if((col==j)&&(col+j<a[i]*2)) cout << "\\";
else if((col+j == (a[i]*2)-1)&&col<a[i]) cout <<"/";
else cout<<" ";
}
}
cout<<endl;
}
}