#P8924. 「GMOI R1-T1」Perfect Math Class
「GMOI R1-T1」Perfect Math Class
Problem Description
Index gives you a function as follows:
Draw its graph (where * means the graph passes through that point, and . means it does not) on a grid of size , where the range of is and the range of is .
Specifically, you need to output an character matrix. If the function passes through an integer point , then output * at the position that is the -th column from left to right and the -th row from bottom to top; otherwise output ..
Input Format
The first line contains three integers .
The second line contains integers, where the -th integer represents .
Output Format
Output a total of lines, each containing characters, which is the graph of the function. Specifically, output * at the position that is the -th column from left to right and the -th row from bottom to top if and only if the function passes through ; otherwise output ..
5 5 1
0 1
....*
...*.
..*..
.*...
*....
8 8 1
0 2
........
...*....
........
..*.....
........
.*......
........
*.......
Hint
Explanation for Sample :
The function is . Obviously, when , it passes through the integer points .
For of the testdata, and . Each test point is equally weighted.
| Test Point | Special Property | |||
|---|---|---|---|---|
Translated by ChatGPT 5