P16110 「o.OI R-1」Easy ver.
Background
It is guaranteed that this problem is not NP-complete.
Description
For an $n\times m$ grid graph, we give the following definitions: the rows are numbered from $1$ to $n$, and the columns are numbered from $1$ to $m$.
Each vertex can be denoted by $(i, j)$ using its row number $i$ and column number $j$.
There is an undirected edge between vertex $(i,j)$ and vertex $(i,j+1)$, where $1\le i\le n$ and $1\le j
Input Format
One line with two positive integers $n,m$.
Output Format
First output an $n$-row, $m$-column $\texttt{01}$ matrix. A $1$ at row $i$, column $j$ means that there is an edge between vertex $(i,j)$ and vertex $(i,j+1)$, and $0$ means that there is none. In particular, the $m$-th column must be $0$.
Then output another $n$-row, $m$-column $\texttt{01}$ matrix. A $1$ at row $i$, column $j$ means that there is an edge between vertex $(i,j)$ and vertex $(i+1,j)$, and $0$ means that there is none. In particular, the $n$-th row must be $0$.
**Every number in the output should be separated by spaces, and there should be no blank line between the two matrices.**
Any optimal scheme will be accepted.
Explanation/Hint
**Sample Explanation #1**
Obviously, the $1\times8$ grid graph has only one essentially different spanning tree.
**Sample Explanation #2**
Obviously, the $2\times2$ grid graph has only one essentially different spanning tree.
**Constraints**
**This problem uses bundled tests and a Special Judge.**
For all test data, $1\le n,m\leq 100$ is guaranteed.
| Subtask | $n$ | $m$ | Points |
| :----------: | :----------: | :----------: | :----------: |
| $0$ | $\leq 3$ | $\leq 3$ | $30$ |
| $1$ | $=1$ | $\leq 100$ | $10$ |
| $2$ | $\leq 100$ | $\leq 100$ | $60$ |
Translated by QwenWork