{"id":16867184,"url":"https://github.com/webern/aoc2021","last_synced_at":"2025-03-18T17:51:11.242Z","repository":{"id":88144019,"uuid":"433926741","full_name":"webern/aoc2021","owner":"webern","description":"Advent of Code 2021","archived":false,"fork":false,"pushed_at":"2021-12-20T17:59:21.000Z","size":100,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-24T21:26:43.411Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webern.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-01T17:42:43.000Z","updated_at":"2023-03-08T16:23:19.000Z","dependencies_parsed_at":"2023-07-23T19:46:23.946Z","dependency_job_id":null,"html_url":"https://github.com/webern/aoc2021","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webern%2Faoc2021","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webern%2Faoc2021/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webern%2Faoc2021/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webern%2Faoc2021/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webern","download_url":"https://codeload.github.com/webern/aoc2021/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244274575,"owners_count":20427125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T14:53:06.707Z","updated_at":"2025-03-18T17:51:11.210Z","avatar_url":"https://github.com/webern.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent of Code 2021\n\nThis is the first time I have tried this.\nI'm doing this in Rust.\nToday is day 2, we'll see how long I can keep up.\n\n### Days 1-4\n\nI did these, but hadn't started journaling yet.\n\n### Day 5\n\nUh oh, today is the December 6th but I'm working on day 5.\nI'm falling behind.\nPart 1 took a while and is probably inefficient (it creates a grid like the example);\n\nUh oh, I just finished Day 5 Part 2 and now it's December 7th.\nNo time to clean it up, must press on 😅.\n\n### Day 6\n\nDay 6, which I did on December 7th, was easier for me.\nThe key insight is to model the lifecycle of the blowfish in a vector of size 9.\n\n### Day 7\n\nYay I did day 7 on December 7 so I am caught up.\n\nAt first, I thought that we needed only return the *position* that was best to align the crab submarines on.\nFor this, I thought there might be some optimization utilizing mode and a tiebreaker using the average.\nThen I got wrong answers because I was supposed to be returning the fuel cost.\nAnyway, my solution is brute force, though I did at least look up the formula for triangular numbers (my CPU was able to brute force that as well, but it took a while).\n\n### Day 8\n\nUgh. Day 8 kicked my ass.\nI'll have to decide tomorrow whether to try and continue or not.\n\n### Day 9\n\nMuch easier than day 8.\nI think my answer is O(n).\nThough I touch each cell multiple times, there is a constant maximum number of times that I can interact with each cell.\n\n### Day 10\n\nFairly easy, and I actually did it on December 9th, yay.\n\n### Day 11\n\nIt took me a while, as usual, but the flashing octopus problem was not hard.\n\n### Day 12\n\nI've fallen behind again, it's the 13th, and I finished day 12.\nGraph with depth first search.\nAlways takes me forever to get graph DFS right.\n\n### Day 13\n\nHaving fallen behind, I've only done the input parsing for day 13 on the 13th, but I need to call it a night.\n\n...two days later...\n\nFinished day 13 on the 15th. My answer looks like this:\n\n```text\n###..#....#..#.####...##.###....##.####.\n#..#.#....#..#.#.......#.#..#....#.#....\n###..#....####.###.....#.#..#....#.###..\n#..#.#....#..#.#.......#.###.....#.#....\n#..#.#....#..#.#....#..#.#....#..#.#....\n###..####.#..#.#.....##..#.....##..#....\n```\n\nI entered `BLHFJPJF` which apparently is the right answer.\n\n### Day 14\n\nNot done :(\n\n### Day 15\n\nNot done :(\n\n### Day 16\n\nGot it.\nThis was fun, it reminds me of [MIDI](https://github.com/webern/midi_file).\nIt took me *forever* though.\nIt's 2:02 AM and I'm getting too sleep-deprived. 😩\nWay too late to clean it up, so it's a mess.\n\n### Retrospective\n\nThis was fun but I can't keep up, too much going on.\nPart of the initial motivation was that I would do *all* of the Advent of Code.\nNow that this is seemingly not possible I find myself unmotivated to any more of it.\nMaybe I can get 'em all in 2022!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebern%2Faoc2021","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebern%2Faoc2021","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebern%2Faoc2021/lists"}