0044. Polyhedra
Имя входного файла: | hedra.in |
Имя выходного файла: | hedra.out |
Ограничение по времени: | 1 s |
Ограничение по памяти: | 64 megabytes |
One can construct only five Platonic polyhedra in 3D-space: tetrahedron, cube, octahedron, dodecahedron and icosahedron. Your task is to do so.
Input file
The input file contains desired number of vertices in the polyhedron n (4, 6, 8, 12 or 20).
Output file
The first line of the output file contains number n. The next n lines contain coordinates of vertices – three numbers on each (xi yi zi), separated by spaces, displayed with 6 digits after decimal point. The polyhedron must be inscribed in a sphere of radius 1 with centre in (0, 0, 0).
Examples:
hedra.in | hedra.out |
---|---|
8 | 8 -0.577350 -0.577350 -0.577350 0.577350 -0.577350 -0.577350 -0.577350 0.577350 -0.577350 0.577350 0.577350 -0.577350 -0.577350 -0.577350 0.577350 0.577350 -0.577350 0.577350 -0.577350 0.577350 0.577350 0.577350 0.577350 0.577350 |
Источник: Petrozavodsk training camp, Summer 2002. Conclusive contest
Автор: Andrew Lopatin, Nick Durov
Обсудить Отправить решение
Версия для печати