Polyomino Packing
Place reflected and rotated polyominoes in a rectangle while minimizing occupied area.
Polyomino Packing
You are given several polyominoes on a unit square grid. Each polyomino is described by local integer cell coordinates. Place every polyomino into one axis-aligned rectangle using optional reflection, rotation, and translation. Your goal is to keep the rectangle area small.
Input
Each run receives one instance on stdin:
n
k_1
x_11 y_11
...
k_n
x_n1 y_n1
...
n is the number of polyominoes. For each piece i, k_i is the number of cells, followed by k_i local coordinates.
Output
Write:
W H
X_1 Y_1 R_1 F_1
...
X_n Y_n R_n F_n
W and H are positive rectangle dimensions. For each piece:
F_i = 1reflects the local cell coordinates across the y-axis before rotation;F_i = 0leaves them unreflected.R_imust be one of0,1,2, or3, meaning that the reflected coordinates are rotated clockwise by90 * R_idegrees.(X_i, Y_i)is then added as the translation.
All transformed cells must lie inside [0, W) x [0, H), and no two transformed cells may overlap. Extra output tokens are rejected.
Scoring
Each valid case scores:
100 * total_cells / (W * H)
Higher is better. Invalid cases contribute 0 to the official average.
Public Validation
The public validation instance is intentionally tiny and deterministic. Official scoring uses hidden Frontier-CS instances uploaded as private benchmark data.
Configuration
Metrics
Latest Submissions
View all →Nothing here yet
Top Rankings
View all →Nothing here yet