~/algor $ cat problems/matritsa-shaxmat-taxtasi
Chessboard
Easy
1000 ms
128 MB
21%
Two positive integers $n$ and $m$ are given. Fill an $n \times m$ matrix in a chessboard pattern ($0$ and $1$ alternate, $0$ in the top-left corner) and print it.
Input
One line with two positive integers: $n$ and $m$.
Output
$n$ lines with $m$ space-separated numbers ($0$ or $1$) each.
Note
$1 \le n, m \le 200$
Examples
Input #1
2 3
Output #1
0 1 0 1 0 1
Input #2
1 1
Output #2
0