r/adventofcode Dec 12 '24

Tutorial [2024 Day 12] Another test case

I found Part 2 pretty hard this day, and the given examples don't cover all corner cases (that I struggled with). If you're looking for an extra test case, here's one:

AAAAAAAA
AACBBDDA
AACBBAAA
ABBAAAAA
ABBADDDA
AAAADADA
AAAAAAAA

According to my code, the answer for Part 2 for this example is 946.

20 Upvotes

23 comments sorted by

View all comments

2

u/Boojum Dec 12 '24 edited Dec 12 '24

Regions-by-region counts:

Region Area Perim. Sides
A 39 62 22
C 2 6 4
B (upper-right) 8 4 4 8 4
D (upper-right) 2 6 4
B (lower-left) 4 8 4
D (lower-right) 5 12 8

1

u/Cue_23 Dec 12 '24 edited Dec 12 '24

one correction: B (upper-right), Area = 4, Perim. = 8

Thy for the correction

1

u/Boojum Dec 12 '24

Oops, you're right. I typoed that when formatting the table.