Divide Grid

AtCoder
IDagc075_a
Time2000ms
Memory256MB
Difficulty
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$ [samples]
Samples
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
API Response (JSON)
{
  "problem": {
    "name": "Divide Grid",
    "description": {
      "content": "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: ",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "agc075_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "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)$.\nFor each way of writing $0$ or $1$ in each cell, define $f(X)$ as follows:\n\n...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments