DWITE Online Computer Programming Contest, October 2008, Problem 1
A classic draw some ASCII patterns problem, turned onto its horizontal side. Let's draw some hills, of various heights.
The input will contain 5 lines, integers .
The output will contain 5 lines, the scene generated, as described below.
Background is drawn with .
. Hills are triangles in shape, height specified by input, and are drawn with x
. Refer to sample input.
Sample Input
1
2
3
0
4
Sample Output
.................
.............x...
......x.....xxx..
..x..xxx...xxxxx.
xxxxxxxxx.xxxxxxx
Problem Resource: DWITE
Comments