diff options
Diffstat (limited to '2025/README.md')
| -rw-r--r-- | 2025/README.md | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/2025/README.md b/2025/README.md index ece1c89..c72c8a5 100644 --- a/2025/README.md +++ b/2025/README.md | |||
| @@ -6,3 +6,46 @@ from standard input if no argument is provided. | |||
| 6 | Example | 6 | Example |
| 7 | 7 | ||
| 8 | `python 01/a.py 01/input.txt` | 8 | `python 01/a.py 01/input.txt` |
| 9 | |||
| 10 | ## Personal times | ||
| 11 | |||
| 12 | ``` | ||
| 13 | Day -Part 1- -Part 2- | ||
| 14 | 3 00:05:02 00:16:09 | ||
| 15 | 2 00:10:36 00:11:55 | ||
| 16 | 1 00:06:20 00:50:41 | ||
| 17 | ``` | ||
| 18 | |||
| 19 | ## Daily comments (spoilers!) | ||
| 20 | |||
| 21 | ### Day 1: Secret Entrance | ||
| 22 | |||
| 23 | Part 1 was easy. Well, I misread the statement and got it wrong twice, | ||
| 24 | but that's on me. | ||
| 25 | |||
| 26 | Then I kept getting part 2 wrong, and I have no idea what I was doing wrong. | ||
| 27 | Sure, at first I made some mistakes related to landing on zero at the | ||
| 28 | end of a movement. But for at least 6-7 times I found a mistake, fixed, | ||
| 29 | my code would solve the example case correctly but my answer on the real | ||
| 30 | input was wrong. At some point I started rewriting the code in alternative | ||
| 31 | ways hoping to get a different answer, and one of those versions worked. | ||
| 32 | Still no idea why. | ||
| 33 | |||
| 34 | So in the end it took me more than 40 minutes to solve part 2. Great start! | ||
| 35 | |||
| 36 | ### Day 1: Secret Entrance | ||
| 37 | |||
| 38 | I misread the statement for part 1 and I accidentally solved part 2 first. | ||
| 39 | I re-read the problem description, fixed my code, submitted it, and then | ||
| 40 | I just had to press `Ctrl+Z` (actually `u` on vi...) enough times to solve | ||
| 41 | part 2. | ||
| 42 | |||
| 43 | ### Day 3: Lobby | ||
| 44 | |||
| 45 | My solution for part 1 is ad-hoc and not very good. I should have thought | ||
| 46 | about it a bit longer, the general solution isn't much harder to find. | ||
| 47 | |||
| 48 | For part 2 I used recursion with memorization (using Python's | ||
| 49 | `functools.cache`), which is fast enough. But later Chiara pointed | ||
| 50 | out to me that actually the solution is quite trivially greedy; I | ||
| 51 | implemented the greedy version in `b-alt.py`. | ||
