▲ 14 ▼ Advent of Code 2024 - Historian goes looking for history in all the wrong places (adventofcode.com) submitted 2 years ago by Architeuthis@awful.systems to c/notawfultech@awful.systems 54 comments fedilink hide all child comments copy pasting the rules from last year's thread: Rules: no spoilers. The other rules are made up aswe go along. Share code by link to a forge, home page, pastebin (Eric Wastl has one here) or code section in a comment.
[–] gerikson@awful.systems 4 points 2 years ago (1 child) day 8 part 2Eric added some 0s in the grid which fucked up my existence code, sneaky devil permalink fedilink source parent hideshow 1 child comment replies: [–] Architeuthis@awful.systems [S] 2 points 2 years ago* (last edited 2 years ago) I almost got done in by floating point arithmetic, I think 8-2 commentaryUsed the coordinates of every two same type frequences to create the ilnear equation (y = ax + b) and then fed it all the matrix coordinates to see which belonged to the line. To get the correct number of antinodes I had to check for |y - ax - b| < 0.0001, otherwise I got around 20 too few. permalink fedilink source parent
[–] Architeuthis@awful.systems [S] 2 points 2 years ago* (last edited 2 years ago) I almost got done in by floating point arithmetic, I think 8-2 commentaryUsed the coordinates of every two same type frequences to create the ilnear equation (y = ax + b) and then fed it all the matrix coordinates to see which belonged to the line. To get the correct number of antinodes I had to check for |y - ax - b| < 0.0001, otherwise I got around 20 too few. permalink fedilink source parent