258 lines
9.4 KiB
Markdown
258 lines
9.4 KiB
Markdown
# aocpy
|
|
|
|
Solutions and utility script for Advent of Code challenges in Python.
|
|
|
|
## AoC 2015
|
|
|
|
- Day 1: 3:10
|
|
- Day 2: 5:24 :/
|
|
- Day 3: 7:26 ... :/
|
|
- Day 4: 5:11 ...
|
|
- Day 5: 14:05 o.O
|
|
- Day 6: 15:00
|
|
- Day 7: 17:00
|
|
- Day 8: 14:55
|
|
- Day 9: 13:48
|
|
- Day 10: 70:00 ... slow, but fun
|
|
- Day 11: 12:30
|
|
- Day 12: 6:03
|
|
- Day 13: 7:06 (would have been first by a minute, probably 70ish in 2023)
|
|
- Day 14: 27:45 ... that was weak, logic error for part 2 :/
|
|
- Day 15: 16:00 I should probably stop brute forcing these optimization problems
|
|
- Day 16: 19:00
|
|
- Day 17: 9:05
|
|
- Day 18: 10:39
|
|
- Day 19: Many days... yeah this one took me way too long to figure out
|
|
- Day 20: 10:54
|
|
- Day 21: 25:52 cute bug where I didn't consider that no armor is an option
|
|
- Day 22: That was bad. Did not know how to choose between dfs/bfs and logic errors.
|
|
- Day 23: 10:00
|
|
- Day 24: 20:00 ugly - recursive solution would be more elegant
|
|
- Day 25: 9:34
|
|
|
|
## AoC 2016
|
|
|
|
- Day 1: 29:00 That was emberassingly slow. Out of my rhythm?
|
|
- Day 2: 13:24 Getting back into it but still slow af, obviously.
|
|
- Day 3: 11:20 Ugly and slow.
|
|
- Day 4: 21:05 -__-
|
|
- Day 5: 29:35 -___-
|
|
- Day 6: 4:20 okay
|
|
- Day 7: 31:20 hmm
|
|
- Day 8: 14:50 meh
|
|
- Day 9: 26:00 okay
|
|
- Day 10: 23:07 okay
|
|
- Day 11: 75:00 -__-
|
|
- Day 12: 10:05 okay
|
|
- Day 13: 9:43 okayish
|
|
- Day 14: 120:00 struggled with this one (example incorrect?)
|
|
- Day 15: Trial and error. Should use CRT instead.
|
|
- Day 16: 14:11
|
|
- Day 17: 45:00 didn't follow instructions... focus!
|
|
- Day 18: 9:43
|
|
- Day 19: 90:00 that wasn't easy for me
|
|
- Day 20: 67:00
|
|
- Day 21: 32:33
|
|
- Day 22: 90:00
|
|
- Day 23: 60:00
|
|
- Day 24: 48:00
|
|
- Day 25: 6:45
|
|
|
|
## AoC 2017
|
|
|
|
- Day 1: 7:30
|
|
- Day 2: 6:15
|
|
- Day 3: 75:00 hmm should have been way quicker
|
|
- Day 4: 3:02
|
|
- Day 5: 6:13
|
|
- Day 6: 8:37
|
|
- Day 7: 19:22
|
|
- Day 8: 8:15
|
|
- Day 9: 6:10
|
|
- Day 10: 55:00
|
|
- Day 11: 66:06
|
|
- Day 12: 6:44
|
|
- Day 13: 120:00
|
|
- Day 14: 17:48
|
|
- Day 15: 11:40
|
|
- Day 16: 13:16
|
|
- Day 17: 55:00
|
|
- Day 18: 23:00
|
|
- Day 19: 45:00
|
|
- Day 20: 9:55 (would have been 10th)
|
|
- Day 21: 90:00
|
|
- Day 22: 25:00
|
|
- Day 23: Multiple days... but super fun.
|
|
- Day 24: 15:45 (48th)
|
|
- Day 25: 41:00
|
|
|
|
## AoC 2018
|
|
|
|
- Day 1: 1:49 (2nd)
|
|
- Day 2: 10:53
|
|
- Day 3: 6:16 (24th)
|
|
- Day 4: 25:16
|
|
- Day 5: 17:03
|
|
- Day 6: 1:10:29
|
|
- Day 7: 20:15
|
|
- Day 8: 18:35
|
|
- Day 9: 1:17:52
|
|
- Day 10: 19:14
|
|
- Day 11: 22:52
|
|
- Day 12: 180:00
|
|
- Day 13: 73:09
|
|
- Day 14: 20:48
|
|
- Day 15: 185:11
|
|
- Day 16: 36:10
|
|
- Day 17: 180:00
|
|
- Day 18: 24:04
|
|
- Day 19: days, super fun, but hard for me
|
|
- Day 20:
|
|
- Day 21: 28:40 (16th - brute force but still not so bad)
|
|
- Day 22: 185:00 (should not have been so slow but was fun)
|
|
- Day 23:
|
|
|
|
## AoC 2019
|
|
|
|
- Day 1: 4:25 (copy and paste error, no leaderboard)
|
|
- Day 2: 7:07 (19th)
|
|
- Day 3: 10:46 (37th)
|
|
- Day 4: 8:48 (just too slow, no leaderboard)
|
|
- Day 5: 34:24 (that wasn't hard at all)
|
|
- Day 6: 23:17 (so slow, no leaderboard)
|
|
- Day 7: 72:17 (I found that one challenging, 30:33 would have been required for leaderboard)
|
|
- Day 8: 08:55 (54th)
|
|
- Day 9: 115:00 (Try to read next time.)
|
|
- Day 10: 76:00 (This wasn't easy for me. Fun, though.)
|
|
- Day 11: 21:04 (Too slow, but fun.)
|
|
- Day 12: days (Took me a while to get the right idea.)
|
|
- Day 13: >120:00 (Just struggling so much for some reason.)
|
|
- Day 14: >120:00 (Hmm, wasn't that hard either.)
|
|
- Day 15: >120:00 (I am really weak at the moment.)
|
|
- Day 16: days (Wow. Just too hard for me to solve quickly?)
|
|
- Day 17: days (Fun but too tricky for me to be fast.)
|
|
- Day 18: days (Slow and slow algorithm.)
|
|
- Day 19: 40:00 (Way too slow! Oversight error. Come on.)
|
|
- Day 20: days (Not actually that hard but I struggled for no reason.)
|
|
- Day 21: days (But it was super fun!)
|
|
- Day 22:
|
|
|
|
## AoC 2020
|
|
|
|
- Day 1: 2:48 (people weren't able to submit because of a website outage)
|
|
- Day 2: 4:47 (no leaderboard, you can tell it's getting faster)
|
|
- Day 3: 7:06 (way too slow, lol; time to take it seriously)
|
|
- Day 4: 14:30 (yo, I am just too slow)
|
|
- Day 5: 11:53 (not competitive)
|
|
- Day 6: 4:11 (75th, finally on the leaderboard)
|
|
- Day 7: 24:39 (bad)
|
|
- Day 8: 6:26 (43th, tied George Hotz :)
|
|
- Day 9: 7:37 (choked bad)
|
|
- Day 10: 34:27 (so weak)
|
|
- Day 11: 21:05 (hmmm, I rally have to analyze why I am so slow)
|
|
- Day 12: 21:52 (just slow again for an easy problem)
|
|
- Day 13: 18:00 (I don't really understand the CRT to be honest)
|
|
- Day 14: 40:26 (Made a bunch of mistakes even misunderstanding Python)
|
|
- Day 15: 17:57 (Too slow for an easy one like this)
|
|
- Day 16: 33:00 (Not too unhappy really.)
|
|
- Day 17: 10:00 (40th)
|
|
- Day 18: 80:00 (I am struggling with stuff where parsing is involved)
|
|
- Day 19: 78:00 (Should have been faster)
|
|
- Day 20: 95:00 (Lot's of code)
|
|
- Day 21: 23:02 (Simply to slow)
|
|
- Day 22: 45:49 (Simple and too slow)
|
|
- Day 23: 105:00 (Sad)
|
|
- Day 24: 15:38 (Close to leaderboard)
|
|
- Day 25: 14:40 (Way too slow)
|
|
|
|
## AoC 2022
|
|
|
|
Done with this. Overall everything is solvable. It's more about consistency
|
|
and focus. Of course, learning more algorithms and techniques helps.
|
|
|
|
**Times:**
|
|
|
|
- Day 1: 7:52 ... so slow brah :/ top 100 required 2:05...
|
|
- Day 2: 22:30 ... I mistyped the first and second was just bad top 100 would
|
|
have been 6:16 (doable?)
|
|
- Day 3: 13:08 actually decent but top 100 required 5:24
|
|
- Day 4: 7:08 but top 100 required 3:33 still okay
|
|
- Day 5: 11:56 but 7:58 for top 100... getting better?
|
|
- Day 6: 3:50 but 2:25 for leaderboard :D
|
|
- Day 7: 27:55 and 14:47 for leaderboard; okay, I would say
|
|
- Day 8: 61:00 and 10:00 for leaderboard; I need template code for searching
|
|
coordinate systems
|
|
- Day 9: 58:00 and 7:32 for leaderboard; I need code for 2D stuff
|
|
- Day 10: 25:20 and 12:17 for leaderboard; okay, okay
|
|
- Day 11: 45:00 and 18:00 for leaderboard; arg, it was doable man
|
|
- Day 12: 39:45 and 9:46 for leaderboard; the people are ready for their
|
|
searches :D
|
|
- Day 13: 44:00 and 12:56 for leaderboard; these people are just good,
|
|
seriously
|
|
- Day 14: 35:00 and 14:54; I just have to get that much quicker... 2D code!
|
|
- Day 15: 150:00 and 27:00; I didn't use Manhattan dist initially, lot's of
|
|
debugging
|
|
- Day 16: 52:00 and 64:00; ARE YOU SAYING I WOULD HAVE MADE THE
|
|
LEADERBOARD?!?!?!?!?!?!?!
|
|
- Day 17: Second one was fun with having to detect the repetition.
|
|
- Day 18: 12:00 and 32:00; really straightforward and of course way too slow.
|
|
- Day 19: Slow. (2024-09-13 improved with help from hyper neutrino.)
|
|
- Day 20: Struggled way too much.
|
|
- Day 21: Straightforward and relatively fast.
|
|
- Day 22: Very hard and wasn't able to do hands free. Even the best guys took
|
|
over an hour.
|
|
- Day 23: Super straightforward, but took me way longer than it should have
|
|
because I loose focus and make silly errors. Like back in Middleschool.
|
|
- Day 24: Easy. Should have been faster, but no crazy mistakes. Still way too
|
|
slow for something easy like this.
|
|
- Day 25: Quickly solved via constraint solver. Actual solution much simpler. Don't know
|
|
if I would have been able to figure it out.
|
|
|
|
|
|
## AoC 2023
|
|
|
|
- Day 1: 40:00 (I don't know what I am doing.)
|
|
- Day 2: 14:15 (Okay, but far way from leaderboard.)
|
|
- Day 3: 1st 20:00, 2nd 70:00... (I had a logic error that took me a while to
|
|
find.)
|
|
- Day 4: 1st 9:06, 2nd 22:31; it wasn't hard but I didn't think quick enough :/
|
|
- Day 5: 1st 25:00, 2nd 1:55:00; Required patience and accuracy
|
|
- Day 6: 13:54; I was slow because I thought it is much harder?
|
|
- Day 7: 75:00; leaderboard 16:00... that was just bad; no excuse
|
|
- Day 8: 25:00; I was doing pretty decent here.
|
|
- Day 9: 57:00; my input parse function did not consider negative values...
|
|
- Day 10: 180:00; this one was hard for me.
|
|
- Day 11: 68:00; okay but not elegant and way too slow ofc; x-ray solution
|
|
would have been neat
|
|
- Day 12: 52:00 and 22:00 for leaderboard; had the right idea and I am good at
|
|
this type of problem
|
|
- Day 13: 90:00; pretty straightforward but way too slow
|
|
- Day 14: 5:55 for first and then 48:00; straightforward but slow, ofc
|
|
- Day 15: 4:30 and 31:20; more reading comprehension than programming
|
|
- Day 16: 00:27:30 745; best placement so far, of course still horribly slow
|
|
- Day 17: a couple of hours; I realized that I need A* after a while; reused
|
|
implementation from Project Euler but improved with heapq which was super fun
|
|
- Day 18: a couple of hours; I realized that I need shoelace algo for part two
|
|
but didn't realize that I have to compute the outer edges for a while and
|
|
after I did, I still got clockwise/counter-clockwise issues. They could have
|
|
made it meaner by using different clock directions for example and input.
|
|
- Day 19: This one was pretty straightforward and required the interval
|
|
technique we applied earlier.
|
|
- Day 20: Part 2 was tough. I had the right idea of printing out the periods of
|
|
the input conjunction gate pretty early, but then messed up the
|
|
implementation and thought it wasn't gonna work. Spent a half day thinking up
|
|
something else before returning to the idea and it worked flawlessly.
|
|
- Day 21: Part 1 was straightforward, but part 2 maybe the hardest problem this
|
|
year.
|
|
- Day 22: Not too hard, but definitely way too slow for leaderboard.
|
|
- Day 23: I found this fun because it required some creativity for part 2. Slow
|
|
af, of course.
|
|
- Day 24: Solve problem with sympy. I first used numpy to solve part 1 and it
|
|
was much faster than using sympy, but I lost that solution when switching to
|
|
sympy. Takes about three minutes to run for part 1 and then part 2 is under a
|
|
second.
|
|
- Day 25: I cheeky solved this by plotting the graph and manually removing the
|
|
nodes. I should probably try to write an algorith that does that, but meh.
|
|
Manually plotting requires matplotlib and networkx packages.
|
|
|