概述
单纯的模拟
#include <cstdio>
#include <cstring>
char mat[2005][1005];
int main()
{
int n, t;
int now_r = 1002, now_c = 0;
int up = 1002, down = 1002;
scanf("%d", &n);
memset(mat, ' ', sizeof(mat));
for(int i = 0; i < n; i++)
{
scanf("%d", &t);
for(int j = 0; j < t; j++)
{
if(i & 1) mat[now_r][now_c] = '\', now_r++;
else mat[now_r][now_c] = '/', now_r--;
now_c++;
}
if(i & 1) now_r--;
else now_r++;
if(up > now_r) up = now_r;
if(down < now_r) down = now_r;
}
for(int i = 0; i < 2005; i++)
mat[i][now_c] = '