atcoder#ARC140E. [ARC140E] Not Equal Rectangle
[ARC140E] Not Equal Rectangle
Score : points
Problem Statement
We have a grid with squares. You will fill every square with an integer between and (inclusive). Let be the integer to be written in the square at the -th row from the top and -th column from the left.
Find a way to fill the squares to satisfy the condition below. It can be proved that, under the Constraints of this problem, such a way always exists.
- For any integers , it must not be the case that are all equal.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print one way to fill the squares to satisfy the condition, in the format below:
If there are multiple solutions, printing any of them will be accepted.
2 3
1 1 1
1 2 3
can be one of .
For any of them, the numbers written in the squares are not all equal, so this output satisfies the condition.