Back
Close
  • 4

Learning Opportunities

This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.

Statement

 Goal

Tʀɪᴛᴏɴ SᴘᴀᴄᴇWᴏʀᴋs manufactures microscopic beads of a lightweight trinium alloy with a brittle isometric crystalline structure. When suspended in water or other solvents, the beads serve as a chemical catalyst in industrial production of certain neutronium compounds.

Due to the high price of trinium, R&D is investigating different geometric forms to reduce the materials cost, improve the efficacy of the catalytic reaction, and potentially expand the market.

To evaluate each design proposal, a sliced schematic for the 3D metal printer will be presented, where each character represents one cubic micron of space, either o as empty or # to denote material. Every candidate shape is completely connected and structurally sound, but will typically be hollow with one or more cavities.

____________ ₁
1 2 3 4 5 |`. —_—_—_—_—_⟍²₃
##### ##### ##### ##### ##### |!.`. —_—_—_—_—_⟍⁴₅
##### #ooo# #ooo# #ooo# ##### |'!!.`————————————.
##### #ooo# #ooo# #ooo# ##### |!.'!| |
##### #ooo# #ooo# #ooo# ##### |'!!.| |
##### ##### ##### ##### ##### |!.'!| 5 x 5 |
`!!.| |
Schematic `!| |
`————————————'

Commercial Product

Determine the surface area along the form's exterior, the volume of solid material, and the bulk volume including any interior void. Report to four decimal places the relative activity as the ratio of exterior surface area to solid volume, and the relative density as the ratio of solid to bulk volume.

As illustrated in the example, the current bead is a hollow cube with a 5 micron side length. This has a surface area of 25 for each of six sides, or 150 square microns in total. The solid volume is 125 - 27 = 98, and the bulk volume 125 cubic microns. So the relative activity is 150 / 98 ≈ 1.5306, and the relative density is 98 / 125 = 0.7840.

Since the trinium alloy has a physical density around 1.3 g/mL, this makes the square beads neutrally buoyant in saline water. While this is less ideal than distilled water, larger cubes with lower density also have lower activity. Your team is optimistic that some proposals could improve not only the buoyancy, but also the proportion of reactive surface.

..........._______________________....
........../\ 1\....
........./ \______________________\....
......../ / /.....
......./ / /.......
....../ / /.........
...../ / _______________/_______....
..../ / /\ 2\....
.../ / / \______________________\....
../ / / / /.....
./ / / / _______________ /.......
.\ / / / / /.../ / /.........
..\/_______/ / /______/.../ / /...........
........../ / /....._____/___/___/_________....
......../ / /_____/\ 3\....
....../ / / / \______________________\....
..../ / /_____/ / /.....
...\ / / / _______________ /.......
...\/_________/ / /____/...../ / /.........
............/ / /..._______/___/___/_______....
........../ / /.../\ 4\....
......../ / /___/ \______________________\....
....../ / / / / /.....
..../ / /___/ / _______________ /.......
...\ / / / / /.../ / /.........
...\/_______/ / /______/.../ / /...........
........../ / /........../ / /.............
......../ / /__________/ / /...............
....../ / / _____/___/_____________...
..../ / /_________/\ 5\..
...\ / / \______________________\.
...\/_____________/ / /.
................/ / /..
............../ / /...
............/ / /....
........../ / 5 × 5 /.....
......../ / square /......
....../ / /.......
..../ / /........
...\ / /.........
...\/______________________/..........

Material Slices
Input
Line 1: Three space-separated integers L, W, and H for the length, width, and height of the schematic
Next L lines: A string row of o and # characters for each slice (of which there are H, each of length W, separated by spaces)
Output
Line 1: Two space-separated values for the activity and density, rounded and printed to four decimals
Constraints
0 < HWL < 20
Example
Input
5 5 5
##### ##### ##### ##### #####
##### #ooo# #ooo# #ooo# #####
##### #ooo# #ooo# #ooo# #####
##### #ooo# #ooo# #ooo# #####
##### ##### ##### ##### #####
Output
1.5306 0.7840

A higher resolution is required to access the IDE