⚡ Build the skills to land top-paying quant jobs. Offer ends in 30d 01h 33m 39s30 days 1 hours 33 minutes 39 seconds.
Cut the 5×5 grid below into connected regions (cells are connected when they share an edge). Every region must be symmetric: some rotation (by 90°, 180° or 270°) or reflection (in a horizontal, vertical or diagonal line), other than doing nothing, carries the region exactly onto itself. A single cell counts as a symmetric region.
For a cell c in a region R, call a cell an opposite of c if some such symmetry of R moves c to it. The value of c is the length of the shortest walk inside R (steps between edge-neighbours) from c to its nearest opposite. A cell that some symmetry leaves where it is has value 0.
Every number in the grid must equal the value of its cell. Cells without a number may have any value.
Rows and columns are numbered 0 to 4 from the top-left corner.
0 1 2 3 4
+----+----+----+----+----+
0 | 8 | | | 2 | |
+----+----+----+----+----+
1 | 2 | 0 | 0 | 6 | |
+----+----+----+----+----+
2 | 4 | | | | |
+----+----+----+----+----+
3 | 2 | | | 2 | |
+----+----+----+----+----+
4 | 6 | | | 0 | 8 |
+----+----+----+----+----+Answer format: a single integer, the sum of the cubes of the areas of the regions in the completed grid.
Related Problems