Submission
Status:
PPPPP
Subtask/Task Score:
100/100
Score: 100
User: TonnamSora
Problemset: หินงอก
Language: cpp
Time: 0.002 second
Submitted On: 2025-09-25 21:50:14
#include <iostream>
#include <math.h>
#include <string.h>
using namespace std;
int main(){
int N;
cin >> N;
int n[N];
int max = -1;
for(int i = 0; i < N; i++){
cin >> n[i];
if(n[i] > max){
max = n[i];
}
}
int size = n[0];
for(int j = 0; j < max; j++){
for(int i = 0; i < N; i++){
for(int k = 0; k < n[i]; k++){
if(j == k){
cout << '\\';
}
else{
cout << " ";
}
}
for(int k = 0; k < n[i]; k++){
if(j + k == n[i] - 1){
cout << '/';
}
else{
cout << " ";
}
}
}
/*for(int k = 0; k < n[1]; k++){
if(j == k){
cout << '\\';
}
else{
cout << " ";
}
}
for(int k = 0; k < n[1]; k++){
if(j + k == n[1] - 1){
cout << '/';
}
else{
cout << " ";
}
}
for(int k = 0; k < n[2]; k++){
if(j == k){
cout << '\\';
}
else{
cout << " ";
}
}
for(int k = 0; k < n[2]; k++){
if(j + k == n[2] - 1){
cout << '/';
}
else{
cout << " ";
}
}*/
cout << "\n";
}
}