#abc230c. C - X drawing
C - X drawing
Score : points
问题描述
存在一个 的网格,其中包含水平行和垂直列,所有方格最初都被涂成白色。令 表示第 行第 列的方格。
Takahashi 拥有两个整数 和 ,它们都在 到 (包括两端点)之间。他将执行以下操作:
- 对于每一个满足 的整数 ,将 涂成黑色。
- 对于每一个满足 的整数 ,将 涂成黑色。
在这些操作之后,请找出网格中方格 的颜色,条件是 且 。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
There is an grid with horizontal rows and vertical columns, where all squares are initially painted white. Let denote the square at the -th row and -th column.
Takahashi has integers and , which are between and (inclusive). He will do the following operations.
- For every integer such that , paint black.
- For every integer such that , paint black.
In the grid after these operations, find the color of each square such that and .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print lines.
Each line should contain a string of length consisting of #
and .
. The -th character of the string in the -th line should be #
to represent that is painted black, and .
to represent that is white.
Sample Input 1
5 3 2
1 5 1 5
Sample Output 1
...#.
#.#..
.#...
#.#..
...#.
The first operation paints the four squares , , , black, and the second paints the four squares , , , black.
Thus, the above output should be printed, since , , , .
Sample Input 2
5 3 3
4 5 2 5
Sample Output 2
#.#.
...#
The operations paint the nine squares , , , , , , , , .
Thus, the above output should be printed, since , , , .
Sample Input 3
1000000000000000000 999999999999999999 999999999999999999
999999999999999998 1000000000000000000 999999999999999998 1000000000000000000
Sample Output 3
#.#
.#.
#.#
Note that the input may not fit into a -bit integer type.
update @ 2024/3/10 10:03:12
相关
在下列比赛中: