DWITE Online Computer Programming Contest
October 2008
Problem 1
LaNDscAPE ii
A classic draw some ASCII patterns problem, turned onto it's horizontal side. Lets draw some hills, of various heights.
The input file DATA1.txt will contain 5 lines, integers 0 <= N <= 5
The output file OUT1.txt will contain 5 lines, the scene generated, as described below.
Background is drawn with . (period)s, hills are triangles in shape, height specified by input, and are drawn with letter x. Refer to sample input.
Sample Input:
1 2 3 0 4
Sample Output:
................. .............x... ......x.....xxx.. ..x..xxx...xxxxx. xxxxxxxxx.xxxxxxx