| 2024 ICPC ShaanXi Provincial Contest |
|---|
| Finished |
A $$$n \times m$$$ character matrix $$$a_{ij}$$$ is called a legal expression matrix if and only if it satisfies the following conditions:
The weight of a legal expression matrix is defined as the sum of the values obtained by evaluating the $$$n + m$$$ expressions formed by reading each row from left to right and each column from top to bottom.
Find the legal expression matrix of size $$$n \times m$$$ with the smallest weight. If there are multiple answers, you can output any of them.
We define a string $$$s$$$ as a legal expression as follows:
The input consists of a single line with two integers $$$n, m$$$ ($$$3 \leq n, m \leq 9$$$), separated by space, representing the number of rows and columns of the matrix.
Output $$$n$$$ lines, each containing $$$m$$$ characters. The $$$j$$$-th character of the $$$i$$$-th line, $$$a_{ij}$$$, represents the matrix with the smallest weight.
If there are multiple answers, you can output any one of them.
4 4
1111 1*11 11*1 1111
For the given example, the weight of the matrix is $$$4488$$$, and it can be proven that there is no matrix with a smaller weight.
| Name |
|---|


