Challenge #115 [Difficult] Pack-o-Tron 5000
C#
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Properties
.gitignore
AreaComparer.cs
BinComparer.cs
Extensions.cs
FreeRectChoiceHeuristic.cs
HeightComparer.cs
MaxRectsBinPack.cs
Pack-O-Tron.csproj
PaddedStringFormatInfo.cs
Program.cs
README.md
Rect.cs
WidthComparer.cs
boxes.png
boxes.txt
random.png
test.txt

README.md

Pack-O-Tron

Challenge #115 [Difficult] Pack-o-Tron 5000

Input

4 4
4 2
8 3
7 1
6 6
2 3
3 2
4 3

Generates this 11x11 map with 95% efficiency.

0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 1
5 5 5 5 6 6 7 7 1
5 5 5 5 6 6 7 7 1
5 5 5 5 6 6 7 7 1
5 5 5 5 6 6 . . 1
2 2 2 2 2 2 3 3 3
2 2 2 2 2 2 3 3 3
2 2 2 2 2 2 3 3 3
2 2 2 2 2 2 3 3 3
2 2 2 2 2 2 4 4 4
2 2 2 2 2 2 4 4 4

Using this input from /u/Cosmologicon this output is created in 200ms using a 206x206 grid (93,6% efficiency) Visualization.

It also can create random boxes, which might look like this: Random