You are given a rectangular grid with dimensions 50 x 50 and a supply of rectangular tiles of various sizes. Your goal is to earn as many points as possible by placing tiles on the grid.

Rules:1. Tiles cannot overlap or extend outside the grid.2. Tiles must line up with the grid lines, so they can only be rotated by 90 degrees.3. A M x N tile placed on the grid will give you P = NM - (N+M) points (ie. area - semiperimeter)4. For every tile dimension that is not a factor of 50, you earn 2 bonus point (for placing that tile). So a M x N tile will give you P+4 points if neither N nor M is a factor of 50.

Cradarc wrote:Impressive Jaap! I only managed to get one with 17 squares left with graph paper. I didn't think it was possible to fill all 2500. If you ran a computer algorithm, do you mind sharing the code?