The following image depicts a $5\times5\times5$ cube. Insert any number of the pictured 3D-tetromino pieces into the cube to satisfy the conditions listed below. Pieces may be rotated in any direction. (Remember, these are three-dimensional objects so use the Z-axis as well!)
The resulting space must satisfy the following rules:
- Pieces cannot be adjacent to each other, but may touch at a corner or along edges.
- All uncoloured cells must be orthogonally connected.
- Cells with numbers must be uncoloured. The numbers give the total lengths of the runs of coloured cells, of the same colour, starting immediately adjacent to the number and extending outwards from it.
- A numbered cell cannot be orthogonally adjacent to a cell of a different colour.
Inspired by Statue View: Tetrominoes and its follow-up puzzles.
The number 4 cannot have 4 vertical pieces around it, one of these pieces will clash with the 6.
It cannot have 3 vertical pieces, since one of them will clash with the topmost number 3. Given the space, it must have 2 horizontal pieces in it's plane and one on top and bottom. So we know the top of the 4 is blue. This limits the sides of the 6, and by the pigeonhole principle certain squares must be orange. The only valid configuration of an orange piece that leaves room for the red piece is:
The red pieces can be filled in immediately
We can now find that the purple piece fits in only one way: This lets us go back and fill in the remaining blue pieces:
There are two ways that the green piece can fit, but only one way will give us room to place the remaining orange pieces:
Then adding in enough squares to make the 6:
And finally the orange piece at the bottom completes it: