시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 512 MB | 88 | 46 | 39 | 50.649% |
Josip used to code in Logo. He loved to draw pictures, but those days are sadly over. Nostalgic, he decided to draw a line that represents the net worth of his company over a period of n days.
For each of the n days, he knows if the net worth of his company increased by one unit (represented by '+'), decreased by one unit (represented by '-'), or remained the same (represented by '=') during that day. Before the first day, the net worth was equal to zero.
Josip will draw the line in a big infinite matrix of characters. Indices of matrix rows grow upwards, and indices of columns grow to the right. For the i-th day he will draw some character in the i-th column. The character and the index of the row are decided by the following rules:
All other cells are filled with '.'.
Your task is to output the minimal matrix that contains the whole line, i.e. contains all characters '/', '\' and '_' that Josip drew.
The first line contains an integer n (1 ≤ n ≤ 100), the number of days.
The second line contains a string of n characters '+', '-' and '=' that represents how the company’s net worth changed over the given period.
Output the described matrix.
7 ++---==
./\.... /..\... ....\__
5 +=+=+
..._/ ._/.. /....
4 --=+
\... .\_/