Oblique Cuboid
Ограничения: время – 1s/2s, память – 64MiB Ввод: input.txt или стандартный ввод Вывод: output.txt или стандартный вывод
Послать решение Blockly Посылки Темы Где Обсудить (0)
In this problem, we will produce oblique projections of cuboids. A cuboid (also known as a
rectangular prism) is a solid figure bounded by six rectangular faces, and an oblique projection is
a method for producing (crude) two-dimensional drawings of three-dimensional figures. Mathematically,
a coordinate `(x,\ y,\ z)` in three-dimensional space appears at coordinate `(x+"az",\ y+"bz")`
in the two-dimensional drawing. If `a\ =\ b\ =\ 1`, the oblique projection is known as a `45°`
oblique projection.
Input Format
Each line of input contains three positive numbers `h\ >\ 0`, `w\ >\ 0`, `d\ >\ 0` representing the
height, width and depth of a cuboid in units. The front lower left corner of the cuboid is assumed
to be at coordinate `(0,\ 0,\ 0)` in three-dimensional space.
Output Format
For each line of input, output a `45°`
oblique projection of the cuboid, showing as asterisks the
points on its edges whose `x`-, `y`- and `z`-coordinates are whole numbers. In the output, two points
separated by one unit of height appear one line apart and two points separated by one unit of width
appear one column apart, as shown in the output samples.
Sample Input
5 7 3
4 12 5
1 1 1
3 3 3
Sample Output
********
** **
* * * *
******** *
* * * *
* ********
* * * *
** **
********
*************
** **
* * * *
* * * *
* *************
************* *
* * * *
* * * *
** **
*************
**
***
**
****
** **
* ** *
*******
* ** *
** **
****
Source: California State Polytechnic University Programming Contest, Winter 2008