Codeforces Round 249 (Div. 2)
C
Cardiogram
Codeforces
1600
原题
← BD →
翻译中…

In this problem, your task is to use ASCII graphics to paint a cardiogram.

翻译中…

A cardiogram is a polyline with the following corners:

翻译中…

image

翻译中…

That is, a cardiogram is fully defined by a sequence of positive integers $*a*_{1}, *a*_{2}, ..., *a*_{*n*}$.

翻译中…

Your task is to paint a cardiogram by given sequence $*a*_{*i*}$.

翻译中…

Input

翻译中…

The first line contains integer $*n*$ $(2 ≤ *n* ≤ 1000)$. The next line contains the sequence of integers $*a*_{1}, *a*_{2}, ..., *a*_{*n*}$ $(1 ≤ *a*_{*i*} ≤ 1000)$. It is guaranteed that the sum of all $*a*_{*i*}$ doesn't exceed $1000$.

翻译中…

Output

翻译中…

Print $*max* |*y*_{*i*} - *y*_{*j*}|$ lines (where $*y*_{*k*}$ is the $*y*$ coordinate of the $*k*$-th point of the polyline), in each line print image characters. Each character must equal either «$/$» (slash), « $\$ » (backslash), « » (space). The printed image must be the image of the given polyline. Please study the test samples for better understanding of how to print a cardiogram.

翻译中…

Note that in this problem the checker checks your answer taking spaces into consideration. Do not print any extra characters. Remember that the wrong answer to the first pretest doesn't give you a penalty.

翻译中…

Note

翻译中…

Due to the technical reasons the answers for the samples cannot be copied from the statement. We've attached two text documents with the answers below.

翻译中…

http://assets.codeforces.com/rounds/435/1.txt

翻译中…

http://assets.codeforces.com/rounds/435/2.txt

翻译中…

样例

Input #1
5
3 1 2 5 1
Output #1
      / \
   / \ /   \
  /       \
 /         \
          \ / 
InputCopy OutputCopy
Input #2
3
1 5 1
Output #2
 / \
  \
   \
    \
     \ / 
InputCopy OutputCopy
题目信息
题号
435C
时间限制
1 s
内存限制
256 MB
标签
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。