{"id":26458511,"url":"https://github.com/coletrammer/adventofcode","last_synced_at":"2026-04-22T23:33:46.073Z","repository":{"id":209991734,"uuid":"725431599","full_name":"coletrammer/adventofcode","owner":"coletrammer","description":"My solutions to Advent of Code","archived":false,"fork":false,"pushed_at":"2025-12-13T05:36:13.000Z","size":281,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-14T19:34:52.599Z","etag":null,"topics":["advent-of-code","cpp","rust"],"latest_commit_sha":null,"homepage":"https://adventofcode.com","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coletrammer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-11-30T05:58:41.000Z","updated_at":"2025-12-13T05:36:17.000Z","dependencies_parsed_at":"2025-12-13T14:06:40.145Z","dependency_job_id":null,"html_url":"https://github.com/coletrammer/adventofcode","commit_stats":null,"previous_names":["coletrammer/adventofcode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coletrammer/adventofcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coletrammer%2Fadventofcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coletrammer%2Fadventofcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coletrammer%2Fadventofcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coletrammer%2Fadventofcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coletrammer","download_url":"https://codeload.github.com/coletrammer/adventofcode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coletrammer%2Fadventofcode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32159957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T17:06:48.269Z","status":"ssl_error","status_checked_at":"2026-04-22T17:06:19.037Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["advent-of-code","cpp","rust"],"created_at":"2025-03-19T00:03:04.649Z","updated_at":"2026-04-22T23:33:46.066Z","avatar_url":"https://github.com/coletrammer.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent of Code Solutions\n\nThis repository contains my solutions to the [Advent of Code](https://adventofcode.com) challenges.\n\n## Table of Solution Completion\n\n| Year | Language | Number of Problems Solved | Score |\n| ---- | -------- | ------------------------- | ----- |\n| 2025 | C++      | 11/12                     | N/A   |\n| 2024 | C++      | 25/25                     | 0     |\n| 2023 | C++      | 25/25                     | 91    |\n| 2022 | Rust     | 25/25                     | 0     |\n| 2021 | Rust     | 8/25                      | 0     |\n| 2020 | C++      | 3/25                      | 0     |\n| 2019 | C++      | 1/25                      | 0     |\n\n## Placement on Leaderboards\n\nAfter 2024, there is no longer a global leaderboard.\n\n### 2025\n\n| Day | **Part A** | Time     | **Part B** | Time     |\n| --- | ---------- | -------- | ---------- | -------- |\n| 11  |            | 00:05:12 |            | 00:12:34 |\n| 10  |            | 00:17:07 |            | \u003e24h     |\n| 9   |            | 00:03:43 |            | 01:19:00 |\n| 8   |            | 00:30:29 |            | 00:47:54 |\n| 7   |            | 04:47:54 |            | 04:53:17 |\n| 6   |            | 00:02:39 |            | 00:11:53 |\n| 5   |            | 00:06:01 |            | 00:36:36 |\n| 4   |            | 00:02:57 |            | 00:04:15 |\n| 3   |            | 00:02:59 |            | 00:12:24 |\n| 2   |            | 00:05:28 |            | 00:16:27 |\n| 1   |            | 00:04:36 |            | 00:05:38 |\n\n### 2024\n\n| Day | **Part A** | Time     | Rank | Score | **Part B** | Time     | Rank | Score |\n| --- | ---------- | -------- | ---- | ----- | ---------- | -------- | ---- | ----- |\n| 25  |            | 00:16:12 | 1730 | 0     |            | 00:16:17 | 1402 | 0     |\n| 24  |            | 00:30:22 | 608  | 0     |            | 02:40:29 | 1414 | 0     |\n| 23  |            | 00:06:38 | 608  | 0     |            | 00:32:15 | 1400 | 0     |\n| 22  |            | 00:07:52 | 947  | 0     |            | 00:30:15 | 835  | 0     |\n| 21  |            | 01:40:48 | 1202 | 0     |            | 14:18:21 | 5789 | 0     |\n| 20  |            | 00:35:21 | 1755 | 0     |            | 00:45:16 | 882  | 0     |\n| 19  |            | 00:11:33 | 1537 | 0     |            | 00:12:31 | 901  | 0     |\n| 18  |            | 00:14:06 | 1400 | 0     |            | 00:29:34 | 2323 | 0     |\n| 17  |            | 00:22:54 | 1329 | 0     |            | 01:19:58 | 532  | 0     |\n| 16  |            | 00:12:34 | 669  | 0     |            | 00:55:36 | 1590 | 0     |\n| 15  |            | 00:13:41 | 353  | 0     |            | 01:12:24 | 1486 | 0     |\n| 14  |            | 00:24:05 | 2643 | 0     |            | 00:39:10 | 1295 | 0     |\n| 13  |            | 00:26:49 | 2903 | 0     |            | 00:41:12 | 1684 | 0     |\n| 12  |            | 00:07:14 | 424  | 0     |            | 02:05:21 | 4382 | 0     |\n| 11  |            | 00:16:27 | 4492 | 0     |            | 00:24:52 | 1853 | 0     |\n| 10  |            | 00:06:51 | 505  | 0     |            | 00:07:22 | 289  | 0     |\n| 9   |            | 00:10:24 | 461  | 0     |            | 00:21:50 | 262  | 0     |\n| 8   |            | 00:09:15 | 588  | 0     |            | 00:17:19 | 918  | 0     |\n| 7   |            | 00:07:05 | 822  | 0     |            | 00:09:59 | 736  | 0     |\n| 6   |            | 00:07:22 | 620  | 0     |            | 00:20:07 | 741  | 0     |\n| 5   |            | 00:05:55 | 466  | 0     |            | 00:12:17 | 564  | 0     |\n| 4   |            | 00:15:26 | 2955 | 0     |            | 00:19:39 | 1648 | 0     |\n| 3   |            | 00:09:42 | 4020 | 0     |            | 00:12:34 | 1687 | 0     |\n| 2   |            | 00:04:06 | 262  | 0     |            | 00:06:26 | 261  | 0     |\n| 1   |            | 00:04:00 | 1348 | 0     |            | 00:05:27 | 917  | 0     |\n\n### 2023\n\n| Day | **Part A** | Time     | Rank | Score | **Part B** | Time     | Rank  | Score |\n| --- | ---------- | -------- | ---- | ----- | ---------- | -------- | ----- | ----- |\n| 25  |            | 01:39:20 | 2154 | 0     |            | 01:39:24 | 1825  | 0     |\n| 24  |            | 00:40:14 | 871  | 0     |            | 03:53:52 | 1784  | 0     |\n| 23  |            | 00:06:13 | 25   | 76    |            | 02:30:44 | 1810  | 0     |\n| 22  |            | 01:25:16 | 2029 | 0     |            | 01:38:47 | 1630  | 0     |\n| 21  |            | 00:10:06 | 774  | 0     |            | 20:06:45 | 7843  | 0     |\n| 20  |            | 00:47:15 | 850  | 0     |            | 00:59:15 | 296   | 0     |\n| 19  |            | 00:21:30 | 840  | 0     |            | 01:01:33 | 989   | 0     |\n| 18  |            | 00:14:48 | 435  | 0     |            | 03:19:33 | 3918  | 0     |\n| 17  |            | 00:24:14 | 451  | 0     |            | 00:30:38 | 414   | 0     |\n| 16  |            | 00:23:50 | 1014 | 0     |            | 00:30:50 | 999   | 0     |\n| 15  |            | 00:03:07 | 377  | 0     |            | 00:23:21 | 1314  | 0     |\n| 14  |            | 00:06:03 | 349  | 0     |            | 00:33:08 | 791   | 0     |\n| 13  |            | 00:10:58 | 206  | 0     |            | 00:13:17 | 86    | 15    |\n| 12  |            | 00:13:28 | 351  | 0     |            | 15:15:22 | 11962 | 0     |\n| 11  |            | 00:16:28 | 1442 | 0     |            | 00:22:34 | 1247  | 0     |\n| 10  |            | 00:30:53 | 1425 | 0     |            | 02:57:26 | 4042  | 0     |\n| 9   |            | 00:06:15 | 391  | 0     |            | 00:10:15 | 649   | 0     |\n| 8   |            | 00:10:08 | 2342 | 0     |            | 00:22:27 | 935   | 0     |\n| 7   |            | 00:48:45 | 5358 | 0     |            | 01:19:15 | 5448  | 0     |\n| 6   |            | 00:11:31 | 3410 | 0     |            | 00:19:28 | 4343  | 0     |\n| 5   |            | 00:41:34 | 5078 | 0     |            | 01:36:57 | 3297  | 0     |\n| 4   |            | 00:07:29 | 1838 | 0     |            | 00:16:50 | 1544  | 0     |\n| 3   |            | 00:11:27 | 410  | 0     |            | 00:18:16 | 390   | 0     |\n| 2   |            | 00:10:06 | 1291 | 0     |            | 00:11:12 | 721   | 0     |\n| 1   |            | 00:08:18 | 4103 | 0     |            | 00:15:54 | 1155  | 0     |\n\n### 2022\n\n| Day | **Part A** | Time     | Rank   | Score | **Part B** | Time     | Rank   | Score |\n| --- | ---------- | -------- | ------ | ----- | ---------- | -------- | ------ | ----- |\n| 25  |            | 00:29:04 | 1265   | 0     |            | 00:29:13 | 1070   | 0     |\n| 24  |            | 00:26:27 | 163    | 0     |            | 00:34:07 | 211    | 0     |\n| 23  |            | 00:46:27 | 1039   | 0     |            | 00:48:15 | 869    | 0     |\n| 22  |            | 00:53:54 | 1298   | 0     |            | \u003e24h     | 7565   | 0     |\n| 21  |            | 00:24:23 | 2513   | 0     |            | 01:10:00 | 2145   | 0     |\n| 20  |            | 00:45:41 | 1170   | 0     |            | 01:03:15 | 1220   | 0     |\n| 19  |            | \u003e24h     | 11606  | 0     |            | \u003e24h     | 11715  | 0     |\n| 18  |            | \u003e24h     | 22983  | 0     |            | \u003e24h     | 18743  | 0     |\n| 17  |            | 01:00:05 | 1373   | 0     |            | 01:16:38 | 588    | 0     |\n| 16  |            | 01:33:07 | 1313   | 0     |            | 01:53:01 | 444    | 0     |\n| 15  |            | 00:19:33 | 594    | 0     |            | 00:51:03 | 820    | 0     |\n| 14  |            | 00:29:47 | 1764   | 0     |            | 00:35:09 | 1553   | 0     |\n| 13  |            | 00:35:49 | 2440   | 0     |            | 00:47:39 | 2415   | 0     |\n| 12  |            | 00:17:03 | 727    | 0     |            | 00:20:08 | 703    | 0     |\n| 11  |            | \u003e24h     | 47528  | 0     |            | \u003e24h     | 40069  | 0     |\n| 10  |            | 18:39:38 | 49715  | 0     |            | 18:46:07 | 45542  | 0     |\n| 9   |            | 00:20:30 | 2047   | 0     |            | 00:30:48 | 1361   | 0     |\n| 8   |            | 00:11:57 | 1218   | 0     |            | 00:15:21 | 387    | 0     |\n| 7   |            | 00:32:24 | 2336   | 0     |            | 00:36:58 | 1916   | 0     |\n| 6   |            | 00:41:00 | 16304  | 0     |            | 00:41:32 | 15196  | 0     |\n| 5   |            | 00:12:54 | 967    | 0     |            | 00:17:42 | 1403   | 0     |\n| 4   |            | 00:26:24 | 10765  | 0     |            | 00:27:28 | 8959   | 0     |\n| 3   |            | 01:22:31 | 17075  | 0     |            | 01:30:25 | 15172  | 0     |\n| 2   |            | 00:09:12 | 2428   | 0     |            | 00:13:53 | 2068   | 0     |\n| 1   |            | 22:20:54 | 125928 | 0     |            | 22:27:10 | 120889 | 0     |\n\n## Running the Solutions\n\nSince I created separate repositories for the years 2021 and 2022, they have been added as git submodules. Additionally,\nthe 2023 solutions depend on my own C++ libraries, which are also included as git submodules. To clone this repository\nwith the submodules, use the following command:\n\n```bash\ngit clone --recurse-submodules https://github.com/ColeTrammer/adventofcode.git\n```\n\n### C++ Code Organization\n\nThe source code is located in the `src` directory. Each day has a solution file `$year/$day.cpp`, in a directory of the\nform `01`, `02`, etc.\n\n```bash\ncmake --preset clang_release_default\ncmake --build --preset clang_release_default\n\nexport PATH=\"$(realpath ./build/clang/release):$PATH\"\nexport DAY=01\nexport YEAR=2023\n\naoc -y $YEAR -d $DAY\n```\n\nThe input files are located in the `input` directory. The solution by default reads a file named\n`input/$YEAR/input_$DAY.txt` in the current working directory, but can be changed by passing the path to the input file\nas a command line argument:\n\n```bash\naoc -y $YEAR -d $DAY -i input.txt\n```\n\nTo get the solution to part b, pass the `-b` flag:\n\n```bash\naoc -y $YEAR -d $DAY -b\n```\n\nTo run against the problem provided sample input (named `$YEAR/test_$DAY.txt`), pass the `-t` flag:\n\n```bash\naoc -y $YEAR -d $DAY -t\n```\n\n### Utility Scripts\n\nThe `scripts` directory contains a number of utility scripts for interacting with the advent of code website. The\nscripts require an environment variable named `AOC_SESSION` to be set to the value of the `session` cookie on the advent\nof code website. The scripts perform the following functions:\n\n| Script Name   | Description                                                                                    |\n| ------------- | ---------------------------------------------------------------------------------------------- |\n| `download.sh` | Downloads the input file for the given year and day.                                           |\n| `new.sh`      | Add source code and input stubs for solving a new problem day.                                 |\n| `open.sh`     | Opens the advent of code website for the given year, day and part in the default browser.      |\n| `start.sh`    | Calls `new.sh`, and then `open.sh` and `download.sh` as soon as the problem becomes available. |\n| `submit.sh`   | Submits the solution for the given year and day. The solution is provided on stdin.            |\n\n### 2022 Past Solutions\n\nThe rust solutions for 2022 are located in the `adventofcode2022` directory. Each day has its own rust project, named\n`day01`, `day02`, etc. To compile and run a solution, use the following commands:\n\n```bash\nDAY=01\ncd adventofcode2022/day$DAY\ncargo update # This may be required if the Cargo.lock file is out of date\ncargo run --release\n```\n\nThe input files are located in the `adventofcode2022/day$DAY/input.txt` file. The solution defaults to reading a file\nnamed `input.txt` in the current working directory, but can be changed by passing the path to the input file as a\ncommand line argument:\n\n```bash\ncargo run --release -- --input input.txt\n```\n\nTo get the solution for part b, pass the `--part-b` flag:\n\n```bash\ncargo run --release -- --part-b\n```\n\nTo run against the problem provided sample input (named `test.txt`), pass the `--test` flag:\n\n```bash\ncargo run --release -- --test\n```\n\n### 2021 Past Solutions\n\nThe rust solutions for 2021 are located in the `adventofcode2021` directory. Each day has its own rust project, named `day1`,\n`day2`, etc. To compile and run a solution, use the following commands:\n\n```bash\nDAY=1\ncd adventofcode2021/day$DAY\ncargo update # This may be required if the Cargo.lock file is out of date\ncargo run --release\n```\n\nThe input files are located in the `adventofcode2021/day$DAY/input.txt` file. The solutions are hard-coded to read a\nfile named `input.txt` in the current working directory.\n\n### 2020 Past Solutions\n\nThe C++ solutions for 2020 are located in the `adventofcode2020` directory. The solutions files are named `1.cpp`, `2.cpp`,\netc. To compile and run a solution, use the following commands:\n\n```bash\nDAY=1\ncmake -S . -B build -G Ninja\ncmake --build build\n./build/$DAY\n```\n\nThe input files are hardcoded as strings in the source code.\n\n## License\n\nThis repository is licensed under the MIT license. See the [LICENSE](LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoletrammer%2Fadventofcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoletrammer%2Fadventofcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoletrammer%2Fadventofcode/lists"}