Submission
Status:
PPxPP
Subtask/Task Score:
80/100
Score: 80
User: Sunsblad
Problemset: หินงอก
Language: cpp
Time: 0.004 second
Submitted On: 2026-10-03 21:55:44
#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
int a;
cin>>a;
int tmp;
vector<string> v(15, string(30 * a, ' '));
bool down = true;
int cont = 0;
for(int k = 0; k < a; k++){
cin>>tmp;
int j = 0;
for(int i = cont ; i < 2 * tmp + cont; i++){
if(down && (j < tmp - 1)){
v[j][i] = '\\';
j++;
}else if(down && j < tmp){
v[j][i] = '\\';
down = false;
}else if(!down && j > 0){
v[j][i] = '/';
j--;
}else if(!down && j == 0){
v[j][i] = '/';
down = true;
cont += 2 * tmp;
i = 2000000000;
}
}
}
for(int i = 0; i < v.size(); i++){
for(int j = 0; j < v[i].size();j++)
{
cout<<v[i][j];
}
cout<<'\n';
}
}