Geographic Data Survey (I)
View as PDF
Submit solution
Points:
100
Time limit:
2.0s
Memory limit:
128M
Author:
Problem types
Allowed languages
Python 3
When sampling, it is usually necessary to report the locations where samples were taken. This task involves exploring the information you need on a map of size m*n. The first step requires your personnel to report all the exploration points. Finally, you need to consolidate this data and plot it on a map for researchers to observe the distribution of the explorations. Since this data can be quite extensive, manually recording it can be cumbersome, so you need to design a program to help you with this data recording.

Input Data
The input data will consist of several lines of information:
- The first line contains two numbers, representing the size of the map
. The first number is
m(integer), and the second number isn(integer), separated by a space. The map hasrows and
columns.
- The second line contains the number of probe data points
t(integer). - Following this, there will be
tlines of data, each representing a coordinate (x,y) on the map that has been probed. The first number ism(integer), and the second number isn(integer), separated by a comma,. Please note that the top coordinate of the map is (0,0). The maximum size of the map is 1000x1000. The limit for probe data is 1000 entries.
Output Data
Please output a complete map. If a position has not been probed, print
. at that position; if it has been probed, print * at that position.
Example Input 1
10 30
5
1,3
0,5
9,23
4,4
0,5
Example Output 1
.....*........................
...*..........................
..............................
..............................
....*.........................
..............................
..............................
..............................
..............................
.......................*......
Example Input 2
13 23
19
0,20
6,15
11,6
10,11
1,18
12,17
8,20
12,22
8,1
2,13
10,16
12,10
9,0
10,9
3,12
11,2
12,14
11,5
5,3
Example Output 2
....................*..
..................*....
.............*.........
............*..........
.......................
...*...................
...............*.......
.......................
.*..................*..
*......................
.........*.*....*......
..*..**................
..........*...*..*....*
Comments