{"id":21992604,"url":"https://github.com/tecc/aoc2021","last_synced_at":"2025-08-15T23:14:09.438Z","repository":{"id":130676146,"uuid":"433975425","full_name":"tecc/AOC2021","owner":"tecc","description":"Advent of Code 2021 - https://adventofcode.com","archived":false,"fork":false,"pushed_at":"2021-12-03T18:40:11.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T03:32:54.500Z","etag":null,"topics":["advent-of-code","advent-of-code-2021","adventofcode","adventofcode2021","aoc"],"latest_commit_sha":null,"homepage":"","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/tecc.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-01T20:30:32.000Z","updated_at":"2023-03-01T01:52:30.000Z","dependencies_parsed_at":"2023-06-03T21:30:43.580Z","dependency_job_id":null,"html_url":"https://github.com/tecc/AOC2021","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tecc/AOC2021","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecc%2FAOC2021","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecc%2FAOC2021/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecc%2FAOC2021/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecc%2FAOC2021/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tecc","download_url":"https://codeload.github.com/tecc/AOC2021/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecc%2FAOC2021/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270644765,"owners_count":24621332,"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","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","advent-of-code-2021","adventofcode","adventofcode2021","aoc"],"created_at":"2024-11-29T20:14:16.042Z","updated_at":"2025-08-15T23:14:09.412Z","avatar_url":"https://github.com/tecc.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## WARNING: THIS REPOSITORY SPOILS SOLUTIONS FOR PROBLEMS. DO *NOT* VIEW THE CODE IF YOU HAVE NOT SOLVED IT YOURSELF.\n\nWith that out of the way..\n\n\n# Advent of Code 2021\n\nThis is my crack at the Advent of Code 2021.\n\nJust some general solutions and whatnot.\n\nFor those who want to see the results in action, I will add instructions for the usage of each solution.\n\n## Command-line usage of each solution\n\n\n### Day 1: Sonar Sweep\n\nAll input for both of them is read from STDIN.\n\nFor example:\n\n```sh\n# For a file as the input (in this case the file is \"./day1/sample.txt\")\ncat ./day1/sample.txt | ./build/day1-puzzle1\ncat ./day1/sample.txt | ./build/day1-puzzle2\n```\n\nNote that the solution for the second puzzle (`day1-puzzle2`) can be configured to use N-length windows.\nThis is done by modifying the `#define WIDTH 3` line in [puzzle2.cpp](./day1/puzzle2.cpp).\nDefining it as `1` will yield the same output as the solution for puzzle 1 (`day1-puzzle1`).\n\n\n### Day 2: Dive!\n\nFor this one there is only one executable.\nUse the `day2` programme.\n\nThe programme reads the instructions and executes them accordingly. \nTo enable the aim found in the second puzzle, pass either the `--enable-aim` or `-a` argument.\n\nExample usage:\n```sh\n# For a file as the input (in this case the file is \"./day2/sample.txt\")\ncat ./day2/sample.txt | ./build/day2\n# The usage with aim mode is the same, except for an extra `--enable-aim` argument\ncat ./day2/sample.txt | ./build/day2 --enable-aim\n```\n\n\n### Day 3: Binary Diagnostic\n\nUse the `day3-puzzle1` programme for the first puzzle, and `day3-puzzle2` for the second.\n\nThe input method is the same as the last two.\n\nExample usage:\n```sh\ncat ./day3/sample.txt | ./build/day3-puzzle1\ncat ./day3/sample.txt | ./build/day3-puzzle2\n```\n\n\n## Licence\n\nAll code in this repository is licensed under the MIT licence.\nRead the full licence text in the [LICENCE file](./LICENCE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftecc%2Faoc2021","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftecc%2Faoc2021","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftecc%2Faoc2021/lists"}