模拟
#include <iostream>
#include <cstring>
#include <cstdio>
#include <algorithm>
using namespace std;
int n,a[1100];
char mp[10000][10000];
int main()
{
scanf("%d",&n);
int X=0,Y=0,high=0,low=0;
for(int i=0;i<n;i++)
{
scanf("%d",a+i);
X+=a[i];
Y+=a[i]*(i%2==0?1:-1);
high=max(Y,high);
low=min(Y,low);
}
int x=high,y=0;
memset(mp,32,sizeof(mp));
for(int i=0;i<n;i++)
{
for(int j=0;j<a[i];j++)
{
if(i%2==0)
{
mp[x][y]='/';
y++; x--;
}
else
{
mp[x][y]='\\';
y++; x++;
}
}
if(i%2==0) x++; else x--;
}
for(int i=1;i<=high-low;i++)
{
for(int j=0;j<X;j++)
{
printf("%c",mp[i][j]);
}
putchar(10);
}
return 0;
}