Submission
Status:
PPPPP
Subtask/Task Score:
100/100
Score: 100
User: patsa_v
Problemset: หินงอก
Language: cpp
Time: 0.002 second
Submitted On: 2026-10-05 16:17:48
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int arr[n];
int p = 0;
for(int i=0;i<n;i++){
int x;
cin >> x;
arr[i] = x;
p = p + x;
}
int mx = 0;
for(int i=0;i<n;i++){
mx = max(mx,arr[i]);
}
for(int i=0;i<mx;i++){
for(int k=0;k<n;k++){
int x = 2*arr[k];
for(int j=0;j<x;j++){
if(i==j && i < arr[k] && j < arr[k]){
cout << "\\";
}else if(i+j == 2*arr[k] -1 && j >= arr[k] ){
cout << "/";
}else{
cout << " ";
}
}
}
cout << "\n";
}
return 0;
}