smoothie-web Problems Contests Ranking About

# BSSPC 2019 P2 - Drawing

## Problem Statement

Drawing can be hard.

Devin is trying to draw a picture on his computer, but he does not know how to use a graphics editor.

Help him out by making a program to turn his instructions into a picture!

## Input Specification

The first line will contain the integer $X$ and $Y$ ($1 \le X, Y \le 100$), with $X$ being the width of the canvas, and $Y$ being the height.

The second line will contain the integer $N$ ($1 \le N < 10000$), which is the number of spots on the canvas he wants you to fill in.

The following N lines will contain the integers $x$ and $y$, and character $c$, where $x$ and $y$ is the location on the canvas Devin wants you to fill, and $c$ is the character to put at that spot.

Note: The locations given ($x$ and $y$) start at 0, with $(0, 0)$ being the top-left most corner. $x$ is the location along the width of the canvas, and $y$ is the location along the height of the canvas.

## Output Specification

Display the full canvas. Be sure to also output spaces where there is no character being filled.

## Sample Input #1

5 1
3
0 0 a
2 0 r
4 0 t


a r t

## Sample Input #2

8 3
15
3 0 _
1 1 _
2 1 [
3 1 _
4 1 ]
5 1 =
6 1 =
7 1 =
0 2 (
1 2 _
2 2 _
3 2 _
4 2 _
5 2 _
6 2 )


## Sample Output #2

   _
_[_]===
(_____)