Summary for those just joining us:
Advent of Code is an annual Christmas themed coding challenge that runs from December 1st until christmas. Each day the coding problems get progressively harder. We have a leaderboard and pretty good turnout, so feel free to hop in at any time and show your stuff!
Whether you have a single line monstrosity or a beautiful phone book sized stack of OOP code, you can export it in a nice little image for sharing at https://carbon.vercel.app
What did you think about today's problem?
Our Code is 2416137-393b284c (No need to share your profile, you have the option to join anonymously if you don't want us to see your github)
Jump in the discussion.
No email address required.
Stunning insight that this is manhattan distance the rest is hideous but idc, would iterating through the 'blank_' set be better than walking along the path?
Jump in the discussion.
No email address required.
More options
Context
Jump in the discussion.
No email address required.
He knew what he was doing using those words, I was halfway through a distance matrix when it clicked for me.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Part 2 made it much easier. I didn't think to reason that way in Part 1 and was doing string replacement, which is not fun in Nim, took me forever. That fricker kinda shapes your perspective on the solution in the way he words the problem.
Part 1:
Part 2:
Jump in the discussion.
No email address required.
Missing a cool function from Python? Just copy it![:marseygigachad: :marseygigachad:](https://i.rdrama.net/e/marseygigachad.webp)
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Jump in the discussion.
No email address required.
Is your distance taxicab metric?
Jump in the discussion.
No email address required.
Yes. I learned it as the manhattan distance, but it's just
d = |x_1 - x_2| + |y_1 - y_2|
We add the expansion to the vertical and horizontal distance times however many rows/columns without galaxies we cross over.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
unwashed. Change
dis
for p1 and p2Jump in the discussion.
No email address required.
More options
Context
That was a fun one
Jump in the discussion.
No email address required.
More options
Context
Not gonna bother cleaning this up. This whole 999,999 not 1,000,000 really threw me off at first.
Jump in the discussion.
No email address required.
More options
Context
No issues today, got the distance just being (x2-x1)+(y2-y1) immediately thank god.
For part 2 just replaced all the empty rows and columns with a third character and incremented by 1M whenever I encountered one.
Pretty gentle, was nice
Jump in the discussion.
No email address required.
More options
Context
I would have gotten such a good time if I realized that np.where returned ypts,xpts![:marseydepressed: :marseydepressed:](https://i.rdrama.net/e/marseydepressed.webp)
Jump in the discussion.
No email address required.
More options
Context
This one wasn't too bad at all because I could already guess right away what part 2 was going to be, so I never bothered with maintaining a sparse grid.
Jump in the discussion.
No email address required.
More options
Context
That was so much easier than yesterday which is good, because I have real, paying work I should be doing on a fricking Monday.
Jump in the discussion.
No email address required.
More options
Context
darn my first reaction was to unironically have an array length in the millions lmaoo
Jump in the discussion.
No email address required.
More options
Context
ah man I remember seeing a video on this, some algorithm that solved for smoother lines on a pixelated screen
Jump in the discussion.
No email address required.
You do NOT need that lmao. It's just the taxicab distance (|dx| + |dy|)
Jump in the discussion.
No email address required.
yeah i realized after looking at it again lol I'm paranoid about random curveballs now
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
Snapshots:
https://carbon.vercel.app:
ghostarchive.org
archive.org
archive.ph (click to archive)
https://adventofcode.com/2023:
ghostarchive.org
archive.org
archive.ph (click to archive)
Jump in the discussion.
No email address required.
More options
Context