AtCoder Grand Contest 075
A
Divide Grid
AtCoder
⌀ 1837
原题
←B →
翻译中…

Problem Statement

翻译中…

There is an $N \times N$ grid. The cell at the $i$-th row from the top and $j$-th column from the left is called $(i,j)$.

翻译中…

For each way of writing $0$ or $1$ in each cell, define $f(X)$ as follows:

翻译中…
  • The number of ways to move from a cell with $X$ written on it to another cell with $X$ written on it by repeating the operation "move to the right adjacent cell or move to the down adjacent cell" one or more times.
翻译中…

Construct one way of writing that satisfies $f(0) = f(1)$. It is guaranteed that a solution exists under the constraints of this problem.

翻译中…

Constraints

翻译中…
  • $1 \le N \le 500$
翻译中…

Input

翻译中…

The input is given from Standard Input in the following format:

翻译中…

N

翻译中…

Output

翻译中…

Output $N$ lines. The $i$-th line $(1 \le i \le N)$ should contain the digits to be written in $(i,1),(i,2),\dots,(i,N)$ in this order without spaces.

翻译中…

样例

Input #1
2
Output #1
01
01
There is one way, shown below, to perform operations satisfying the condition for $f(0)$, so $f(0) = 1$. - Start from $(1,1)$ and move to $(2,1)$. There is one way, shown below, to perform operations satisfying the condition for $f(1)$, so $f(1) = 1$. - Start from $(1,2)$ and move to $(2,2)$. Since $f(0) = f(1)$, the condition is satisfied.
Input #2
6
Output #2
100111
101000
100010
011101
010000
110001
题目信息
题号
agc075_a
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。