aoc

My solutions for the Advent of Code
git clone https://git.tronto.net/aoc
Download | Log | Files | Refs | README

commit 31c9f59a5f8946e8d90f2aad96e065ab4b496b67
parent 2329b38f531bc93de6e682e1af9e995072c6175c
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Wed,  3 Dec 2025 13:24:27 +0100

Add comments and personal times to READMEs

Diffstat:
M2023/README.md | 37+++++++++++++++++++++++++++++++++++++
M2024/README.md | 37+++++++++++++++++++++++++++++++++++++
M2025/README.md | 43+++++++++++++++++++++++++++++++++++++++++++
3 files changed, 117 insertions(+), 0 deletions(-)

diff --git a/2023/README.md b/2023/README.md @@ -20,3 +20,40 @@ My solutions read from stdin, so run the e.g. with ``` $ ./a.out <in.txt ``` + +## Personal times + +Note: New problems come out at 6am in my time zone. At some point in +mid-December I started waking up early to try and solve the problem +before work, but I could not always do it. On the weekend of December +16-17 I was busy and I could not solve any problem at all. Regarding +day 21, I just found it very hard and could not finish it within a day. + +``` + --------Part 1-------- --------Part 2-------- +Day Time Rank Score Time Rank Score + 25 06:11:14 4908 0 06:11:45 3911 0 + 24 03:00:50 3858 0 14:11:15 4807 0 + 23 02:02:06 3632 0 05:26:44 3292 0 + 22 00:45:32 876 0 01:02:38 853 0 + 21 00:23:53 2444 0 >24h 9076 0 + 20 01:47:17 3220 0 10:22:26 6402 0 + 19 08:16:48 13555 0 09:44:24 8192 0 + 18 14:34:39 17373 0 >24h 16383 0 + 17 >24h 17185 0 >24h 16114 0 + 16 >24h 26299 0 >24h 25438 0 + 15 00:13:49 4618 0 00:55:28 4721 0 + 14 00:16:47 2605 0 13:11:16 17486 0 + 13 01:38:27 6390 0 01:45:34 4662 0 + 12 00:45:36 3242 0 04:07:11 4066 0 + 11 01:33:57 8963 0 01:34:56 7427 0 + 10 02:58:19 9963 0 05:57:09 7684 0 + 9 02:38:53 13677 0 02:40:25 13016 0 + 8 00:27:21 7503 0 13:29:53 34979 0 + 7 01:56:33 11510 0 02:02:06 8448 0 + 6 01:53:38 16676 0 01:55:44 15724 0 + 5 03:24:25 18975 0 05:14:50 10799 0 + 4 03:04:29 26854 0 03:16:07 20315 0 + 3 03:38:55 17900 0 03:55:42 14753 0 + 2 03:44:00 24942 0 03:47:48 23122 0 + 1 03:14:59 28047 0 03:25:34 16991 0 diff --git a/2024/README.md b/2024/README.md @@ -39,3 +39,40 @@ terminate the input. For second part you can edit the file `dayNNb.cpp` and run `make btest` and `make brun`. + +## Personal times + +Note: New problems come out at 6am in my time zone. This year I often +(but not always) woke up a little earlier than 6am to start working on the +problem as soon as possible. Times longer than 3-4 hours mean that I could +not finish it before work, and I had to come back to it in the evening. + +``` + --------Part 1-------- --------Part 2-------- +Day Time Rank Score Time Rank Score + 25 00:54:10 4422 0 00:54:16 3269 0 + 24 11:44:35 15839 0 18:35:30 8732 0 + 23 00:18:38 2083 0 01:53:35 4086 0 + 22 01:04:02 4637 0 02:51:45 4681 0 + 21 02:19:57 1984 0 02:53:08 1143 0 + 20 00:41:17 2132 0 01:07:13 1603 0 + 19 00:24:23 3105 0 00:31:20 2456 0 + 18 00:30:40 3511 0 00:34:02 2739 0 + 17 00:29:54 2025 0 02:36:06 2128 0 + 16 00:56:46 3612 0 03:34:41 5061 0 + 15 02:08:45 7410 0 03:05:07 4474 0 + 14 00:23:18 2528 0 02:35:21 6607 0 + 13 00:22:24 2299 0 00:39:37 1593 0 + 12 00:27:28 3133 0 06:45:37 10514 0 + 11 00:46:47 9102 0 01:03:57 5013 0 + 10 00:12:16 1480 0 00:14:06 1130 0 + 9 00:14:06 962 0 00:34:43 888 0 + 8 01:30:36 9024 0 01:48:47 8635 0 + 7 01:43:27 10720 0 01:51:28 9649 0 + 6 00:51:16 9051 0 01:20:33 5290 0 + 5 01:20:49 12872 0 02:03:28 12064 0 + 4 01:55:28 15951 0 02:07:56 13646 0 + 3 01:37:48 19772 0 01:58:16 16711 0 + 2 00:32:58 10110 0 00:48:07 7148 0 + 1 03:23:24 19153 0 03:28:40 17929 0 +``` diff --git a/2025/README.md b/2025/README.md @@ -6,3 +6,46 @@ from standard input if no argument is provided. Example `python 01/a.py 01/input.txt` + +## Personal times + +``` +Day -Part 1- -Part 2- + 3 00:05:02 00:16:09 + 2 00:10:36 00:11:55 + 1 00:06:20 00:50:41 +``` + +## Daily comments (spoilers!) + +### Day 1: Secret Entrance + +Part 1 was easy. Well, I misread the statement and got it wrong twice, +but that's on me. + +Then I kept getting part 2 wrong, and I have no idea what I was doing wrong. +Sure, at first I made some mistakes related to landing on zero at the +end of a movement. But for at least 6-7 times I found a mistake, fixed, +my code would solve the example case correctly but my answer on the real +input was wrong. At some point I started rewriting the code in alternative +ways hoping to get a different answer, and one of those versions worked. +Still no idea why. + +So in the end it took me more than 40 minutes to solve part 2. Great start! + +### Day 1: Secret Entrance + +I misread the statement for part 1 and I accidentally solved part 2 first. +I re-read the problem description, fixed my code, submitted it, and then +I just had to press `Ctrl+Z` (actually `u` on vi...) enough times to solve +part 2. + +### Day 3: Lobby + +My solution for part 1 is ad-hoc and not very good. I should have thought +about it a bit longer, the general solution isn't much harder to find. + +For part 2 I used recursion with memorization (using Python's +`functools.cache`), which is fast enough. But later Chiara pointed +out to me that actually the solution is quite trivially greedy; I +implemented the greedy version in `b-alt.py`.