Commit Graph

31 Commits

Author SHA1 Message Date
17518fdb35 Day 24
Very, very shamelessly stolen from the r/adventofcode main thread where everyone was using this "Z3" library to solve equations. I'm not good at math, and this problem feels more like Advent of Linear Algebra than Code. Although it appears that Z3 doesn't work on mac since I had to switch back to my desktop PC for this one :(.
2023-12-24 12:56:21 -06:00
c31f1b06b7 Day 23
Having some serious grid/pathfinding fatigue here. Part 2 is slow, but, like...I'm fine with it.
2023-12-23 15:51:45 -06:00
d9d330b710 Day 22
Part 2 is a brute-forced hack (7 seconds on my machine) but I'm not sure I want to spend the time to find a better solution.
2023-12-22 21:00:57 -06:00
bf16614487 Day 21
I solved part 1 the naive way and was reasonably happy with it. I was successfully using that solution with some negative-modulus junk to brute force part 2 (I could get the correct answer for the example data's smaller number of steps), but there was no way it was completing in a reasonable amount of time or without blowing all my RAM. I was at a complete loss for how to solve part 2 the "smart" way, so I learned from this video: https://www.youtube.com/watch?v=9UOMZSL0JTg

I understand why this works now, but I was not going to be getting it on my own (nor did I really want to spend the time it would have taken me to attempt to arrive at a similar solution).
2023-12-21 09:50:37 -06:00
11fc463922 Day 20 2023-12-20 00:59:40 -06:00
677ae62853 Day 19 2023-12-19 19:25:19 -06:00
3dfa53e3ff Day 18
Also added missed flavor text from day 17
2023-12-18 16:56:43 -06:00
278611c6f9 Day 17 2023-12-18 10:37:22 -06:00
c4ece0f35e Day 16
Part 2 is slower than I'd like, but completes in less than a second on this laptop.
2023-12-16 14:40:32 -06:00
adc2c2b658 Day 15
Not sure how I feel about this one. I don't mind a "day off" of sorts, but there were just so. many. words in the puzzle that boiled down to such a straightforward implementation. I guess this is practice of "implement detailed requirements exactly to spec" or something.
2023-12-15 22:43:36 -06:00
42e1a27806 Improve day 14 part 2 runtime
I realized I was looking for the third occurrence when the second works just as well.
2023-12-14 23:05:46 -06:00
91fcf39e17 Add missing flavor texts 2023-12-14 23:05:03 -06:00
7c66d81b89 Day 14
I'm decently happy with this. Probably could be better, but I'm good for now.
2023-12-14 22:58:51 -06:00
b71f1dc5b2 Spruce up day 10 visuals a bit
Add some more constants to help with making things look good and unicode-y.
2023-12-14 21:18:56 -06:00
27628abd48 Day 12
Part 1 was my own, but was far, far too slow for part 2. I couldn't find a way to optimize it and didn't want to get stuck on the day forever, so I cribbed a solution from a Reddit post explaining a much faster way to solve it.
2023-12-14 21:17:37 -06:00
de681b23e7 Day 13 2023-12-13 10:47:00 -06:00
bbf18aac9f Day 11
I've got an off-by-one in ExpandGrid that only seems to affect expanding by more than one. I don't know what that is yet.
2023-12-11 11:51:33 -06:00
59637e4eff Better day 10 renderer
This adds constants for box-type-drawing characters and expands the logger's support for printing colored chunks without needing a newline. The result is quite nice! Credit to r/adventofcode for the idea :)
2023-12-10 12:21:38 -06:00
4cac4bd164 Day 10
I needed some help on part 2. Solving for enclosed points in a polygon is...not my forte.
2023-12-10 01:11:26 -06:00
a98c34a9df Day 9
Alright then. Not quite the difficulty I was expecting from a weekend problem this year.
2023-12-09 09:12:38 -06:00
1da4a195aa Day 8
This one felt good. And I hit a new personal best on the global leaderboard of 562/404.
2023-12-07 23:31:57 -06:00
0ba5d244f5 Day 7
I probably should have just tried replacing the J's with every possible card, but alas...this terrible thing works.
2023-12-07 21:13:13 -06:00
11a8465853 Day 6
Thanks for the reprieve.
2023-12-06 07:47:14 -06:00
a64c43e2e6 Day 5
I...I know there's a way to map all the ranges together to build intersections and make a smart decision about this, but I just...don't really want to do that. This brute force approach finishes in about 55 seconds in Debug and 5 seconds in Release on my PC in a single thread, which...is fine. For now.
2023-12-05 01:29:37 -06:00
a1a833f9a1 Day 4
This is more what I was expecting for the first few days.
2023-12-04 08:24:42 -06:00
828f89cca2 Fix ReadAllText
I guess I've either never used this or only used it for one-line files because it was only ever returning the last line of the file.
2023-12-03 14:41:34 -06:00
411898e9f4 Much better day 3 solution
This moves all the actual handling to the parse function (so that part 2 can run on its own instead of requiring part 1 to fill its data structure for it). Now each part is just operating on the segment of the parsed data that is appropriate to it, and we can much more efficiently handle gears as we come across numbers instead of trying to search for numbers after finding a gear.
2023-12-03 14:29:01 -06:00
47dec863e7 Day 3
I have a much more robust idea for part 2, but I don't feel like implementing it tonight.
2023-12-03 01:12:50 -06:00
89d4713467 Day 2 2023-12-02 08:41:15 -06:00
7c6694af02 Day 1
It's messy and it took me a frighteningly long time to get part 2 correct (not a good sign...) but it is finished.
2023-11-30 23:59:59 -06:00
4547803969 Initial commit, prep 2023-11-22 15:06:15 -06:00