#arc175e. E - Three View Drawing
E - Three View Drawing
Score: points
问题陈述
将边长为 的立方体分割成 个更小的立方体,每个小立方体的边长为 ,并从中选择 个这样的小立方体。构建一种选择方式,使得从立方体的三个面垂直方向观察时,所有 个被选中的小立方体都是可见的,并且呈现出相同的形状。
为了精确地表述问题,我们将分割后每个小立方体与一个整数三元组 相关联。
构建并打印一组 个整数三元组 ,满足以下条件:
- $\left\lbrace (x_i, y_i) \, \middle| \, 1 \le i \le K \right\rbrace = \left\lbrace (y_i, z_i) \, \middle| \, 1 \le i \le K \right\rbrace = \left\lbrace (z_i, x_i) \, \middle| \, 1 \le i \le K \right\rbrace$
- 上述集合中包含 个元素。也就是说,对于 ,。
可以证明,对于满足约束条件的任何输入,都存在一个解决方案。
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
Divide a cube with a side length of into smaller cubes, each with a side length of , and select of these smaller cubes. Construct one way to select them so that, when viewed from any of the three directions perpendicular to the faces of the cubes, all selected cubes are visible and appear in the same shape.
To formulate the problem precisely, we associate each smaller cube after division with a triple of integers .
Construct and print one set of triples of integers that satisfy the following conditions.
- $\left\lbrace (x_i, y_i) \, \middle| \, 1 \le i \le K \right\rbrace = \left\lbrace (y_i, z_i) \, \middle| \, 1 \le i \le K \right\rbrace = \left\lbrace (z_i, x_i) \, \middle| \, 1 \le i \le K \right\rbrace$
- The set mentioned in the previous item has elements. That is, for .
It can be shown that a solution exists for any input satisfying the constraints.
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Output
Print your answer in the following format:
If multiple solutions exist, any of them will be accepted.
Sample Input 1
3 3
Sample Output 1
0 0 0
1 1 1
2 2 2
Sample Input 2
2 4
Sample Output 2
0 0 1
0 1 0
1 0 0
1 1 1
Sample Input 3
1 1
Sample Output 3
0 0 0