diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..7247f688 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,21 @@ +version: 2 +updates: + # Maintain dependencies for GitHub Actions +- package-ecosystem: "github-actions" + directory: "/" + labels: + - "dependencies" + - "github_actions" + - "automerge" + schedule: + interval: "daily" + +- package-ecosystem: pip + directory: "/" + labels: + - "dependencies" + - "python" + - "automerge" + schedule: + interval: daily + time: "04:00" diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 00000000..1a49943c --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,31 @@ +name: automerge +on: + pull_request: + types: + - labeled + - unlabeled + - synchronize + - opened + - edited + - ready_for_review + - reopened + - unlocked + pull_request_review: + types: + - submitted + check_suite: + types: + - completed + status: {} +jobs: + automerge: + runs-on: ubuntu-latest + steps: + - name: automerge + uses: "pascalgn/automerge-action@v0.15.6" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + MERGE_LABELS: automerge + MERGE_REMOVE_LABELS: automerge + MERGE_RETRIES: "60" + MERGE_RETRY_SLEEP: "15000" diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml new file mode 100644 index 00000000..5ca327a9 --- /dev/null +++ b/.github/workflows/tox.yml @@ -0,0 +1,40 @@ +name: Python Run Tox + +on: [pull_request] + +jobs: + build: + name: Python Tests + runs-on: ubuntu-22.04 + strategy: + max-parallel: 4 + matrix: + python-version: ['3.12'] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox + # Following step is required for python 3.9: Build depenencies are missing + sudo apt-get update && sudo apt-get install libxml2-dev libxslt-dev python3-dev -y + + - name: Run linters in tox + run: tox -e linters + + - name: Test with tox + # Run tox using the version of Python in `PATH` + run: tox -e py + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + file: ./coverage.xml + fail_ci_if_error: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 45343055..7ca489e8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,10 +2,10 @@ repos: - repo: https://github.com/ambv/black - rev: 23.7.0 + rev: 23.12.0 hooks: - id: black - language_version: 'python3.10' + language_version: 'python3.12' - repo: https://github.com/pycqa/flake8 rev: 6.1.0 @@ -14,12 +14,12 @@ repos: args: ["--ignore", "E203,W503"] - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-yaml - id: end-of-file-fixer @@ -31,7 +31,7 @@ repos: language_version: python3 - repo: https://github.com/asottile/pyupgrade - rev: v3.10.1 + rev: v3.15.0 hooks: - id: pyupgrade args: [ "--py311-plus" ] diff --git a/LICENSE b/LICENSE index 59d2d3c0..8719d665 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 Roel Adriaans +Copyright (c) 2020-2023 Roel Adriaans Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 6df6c31a..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include requirements.txt -recursive-include src *.txt *.json diff --git a/README.md b/README.md index ac212058..43e47cd0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# Advent of Code 2016 +# Advent of Code 2016, 2019, 2020, 2021, 2022 and ... -Advent of Code 2016 with tests and utils etc. -Created as part of Python Discords Revival of Code +Advent of Code for some years with tests and utils etc. +Code is in src/adventofcode, tests are in tests/ ## Todo @@ -10,11 +10,12 @@ Created as part of Python Discords Revival of Code ## Create a new day You can use the adventofcode script to create the scaffolding and download the -input file for that day. +input file for that day. If no year is given, the current year is set as a default. +A default year can also be stored in `.env`. An example: - adventofcode --create 20 + adventofcode --year 2023 --create 20 ### Env variables @@ -23,6 +24,8 @@ Create a file `.env` with the content: ```ini # Store the session key here AOC_SESSION = "" +# Select the year. If None, the current year is used. +AOC_YEAR = None ``` The variable `AOC_SESSION` is the cookie from . This is available @@ -31,27 +34,26 @@ in your browser after you've logged in. ## Cookiecutter To create a new day with the CookieCutter version run the command from the -`advent2016` directory. +`adventofcode` directory. + +Preferred option is to use the `adventofcode` util, since this util also downloads the solution data. + +To use cookiecutter: ```shell script cookiecutter template -f ``` Answer the questions: -* `advendofcode2016` : Accept default answer. This installs the result in the current directory -* `day` : Answer with day you're working on, with leading zero. Eg: 07, 10, 31. -* `directory_name`, `file_name`, `class_name` : Accept default answer +* `adventofcode` : Accept default answer. This installs the result in the current directory. +* `day` : Answer with the day you're working on, with leading zero. Eg: 07, 10, 31. +* `year` : Answer with the year you're working on, eg 2023. +* `directory_name`, `file_name`, `class_name` : Accept default answer. This will create the correct files in the `src` and `tests` directories. The `-f` option is required to make the files in the current subdirectory. When the project supports modules this is probably no longer needed. -The new solution still have to be added to the `main.py` file. - -### Cookiecutter Todo - -* Nothing at the moment - ## Install Install the application with: diff --git a/poetry.lock b/poetry.lock index 704e1c8c..860a9cca 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,32 +1,14 @@ # This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. -[[package]] -name = "adventofcodeutils" -version = "0.2.2" -description = "This repository contains some utils used by my advent of code projects. " -optional = false -python-versions = "^3.11" -files = [] -develop = false - -[package.dependencies] -attrs = "^23.1.0" - -[package.source] -type = "git" -url = "https://github.com/RoelAdriaans/adventofcodeutils.git" -reference = "HEAD" -resolved_reference = "0a4b6b3060d281fa5b515348906736c328a70dfa" - [[package]] name = "anytree" -version = "2.9.0" +version = "2.12.1" description = "Powerful and Lightweight Python Tree Data Structure with various plugins" optional = false python-versions = ">=3.7.2,<4" files = [ - {file = "anytree-2.9.0-py3-none-any.whl", hash = "sha256:7f1ad0f9b225705b780ea0593c8ff52af05df9428e7cc34b9379b879fa462663"}, - {file = "anytree-2.9.0.tar.gz", hash = "sha256:06f7bc294293da2755f4699cc5da5c92d9182a5cfae2842c83fb56f02bd427c8"}, + {file = "anytree-2.12.1-py3-none-any.whl", hash = "sha256:5ea9e61caf96db1e5b3d0a914378d2cd83c269dfce1fb8242ce96589fa3382f0"}, + {file = "anytree-2.12.1.tar.gz", hash = "sha256:244def434ccf31b668ed282954e5d315b4e066c4940b94aff4a7962d85947830"}, ] [package.dependencies] @@ -34,17 +16,22 @@ six = "*" [[package]] name = "arrow" -version = "1.2.3" +version = "1.3.0" description = "Better dates & times for Python" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "arrow-1.2.3-py3-none-any.whl", hash = "sha256:5a49ab92e3b7b71d96cd6bfcc4df14efefc9dfa96ea19045815914a6ab6b1fe2"}, - {file = "arrow-1.2.3.tar.gz", hash = "sha256:3934b30ca1b9f292376d9db15b19446088d12ec58629bc3f0da28fd55fb633a1"}, + {file = "arrow-1.3.0-py3-none-any.whl", hash = "sha256:c728b120ebc00eb84e01882a6f5e7927a53960aa990ce7dd2b10f39005a67f80"}, + {file = "arrow-1.3.0.tar.gz", hash = "sha256:d4540617648cb5f895730f1ad8c82a65f2dad0166f57b75f3ca54759c4d67a85"}, ] [package.dependencies] python-dateutil = ">=2.7.0" +types-python-dateutil = ">=2.8.10" + +[package.extras] +doc = ["doc8", "sphinx (>=7.0.0)", "sphinx-autobuild", "sphinx-autodoc-typehints", "sphinx_rtd_theme (>=1.3.0)"] +test = ["dateparser (==1.*)", "pre-commit", "pytest", "pytest-cov", "pytest-mock", "pytz (==2021.1)", "simplejson (==3.*)"] [[package]] name = "attrs" @@ -98,33 +85,33 @@ chardet = ">=3.0.2" [[package]] name = "black" -version = "23.7.0" +version = "23.12.0" description = "The uncompromising code formatter." optional = false python-versions = ">=3.8" files = [ - {file = "black-23.7.0-cp310-cp310-macosx_10_16_arm64.whl", hash = "sha256:5c4bc552ab52f6c1c506ccae05681fab58c3f72d59ae6e6639e8885e94fe2587"}, - {file = "black-23.7.0-cp310-cp310-macosx_10_16_universal2.whl", hash = "sha256:552513d5cd5694590d7ef6f46e1767a4df9af168d449ff767b13b084c020e63f"}, - {file = "black-23.7.0-cp310-cp310-macosx_10_16_x86_64.whl", hash = "sha256:86cee259349b4448adb4ef9b204bb4467aae74a386bce85d56ba4f5dc0da27be"}, - {file = "black-23.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:501387a9edcb75d7ae8a4412bb8749900386eaef258f1aefab18adddea1936bc"}, - {file = "black-23.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:fb074d8b213749fa1d077d630db0d5f8cc3b2ae63587ad4116e8a436e9bbe995"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_arm64.whl", hash = "sha256:b5b0ee6d96b345a8b420100b7d71ebfdd19fab5e8301aff48ec270042cd40ac2"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_universal2.whl", hash = "sha256:893695a76b140881531062d48476ebe4a48f5d1e9388177e175d76234ca247cd"}, - {file = "black-23.7.0-cp311-cp311-macosx_10_16_x86_64.whl", hash = "sha256:c333286dc3ddca6fdff74670b911cccedacb4ef0a60b34e491b8a67c833b343a"}, - {file = "black-23.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:831d8f54c3a8c8cf55f64d0422ee875eecac26f5f649fb6c1df65316b67c8926"}, - {file = "black-23.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:7f3bf2dec7d541b4619b8ce526bda74a6b0bffc480a163fed32eb8b3c9aed8ad"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_arm64.whl", hash = "sha256:f9062af71c59c004cd519e2fb8f5d25d39e46d3af011b41ab43b9c74e27e236f"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_universal2.whl", hash = "sha256:01ede61aac8c154b55f35301fac3e730baf0c9cf8120f65a9cd61a81cfb4a0c3"}, - {file = "black-23.7.0-cp38-cp38-macosx_10_16_x86_64.whl", hash = "sha256:327a8c2550ddc573b51e2c352adb88143464bb9d92c10416feb86b0f5aee5ff6"}, - {file = "black-23.7.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1c6022b86f83b632d06f2b02774134def5d4d4f1dac8bef16d90cda18ba28a"}, - {file = "black-23.7.0-cp38-cp38-win_amd64.whl", hash = "sha256:27eb7a0c71604d5de083757fbdb245b1a4fae60e9596514c6ec497eb63f95320"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_arm64.whl", hash = "sha256:8417dbd2f57b5701492cd46edcecc4f9208dc75529bcf76c514864e48da867d9"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_universal2.whl", hash = "sha256:47e56d83aad53ca140da0af87678fb38e44fd6bc0af71eebab2d1f59b1acf1d3"}, - {file = "black-23.7.0-cp39-cp39-macosx_10_16_x86_64.whl", hash = "sha256:25cc308838fe71f7065df53aedd20327969d05671bac95b38fdf37ebe70ac087"}, - {file = "black-23.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:642496b675095d423f9b8448243336f8ec71c9d4d57ec17bf795b67f08132a91"}, - {file = "black-23.7.0-cp39-cp39-win_amd64.whl", hash = "sha256:ad0014efc7acf0bd745792bd0d8857413652979200ab924fbf239062adc12491"}, - {file = "black-23.7.0-py3-none-any.whl", hash = "sha256:9fd59d418c60c0348505f2ddf9609c1e1de8e7493eab96198fc89d9f865e7a96"}, - {file = "black-23.7.0.tar.gz", hash = "sha256:022a582720b0d9480ed82576c920a8c1dde97cc38ff11d8d8859b3bd6ca9eedb"}, + {file = "black-23.12.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:67f19562d367468ab59bd6c36a72b2c84bc2f16b59788690e02bbcb140a77175"}, + {file = "black-23.12.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:bbd75d9f28a7283b7426160ca21c5bd640ca7cd8ef6630b4754b6df9e2da8462"}, + {file = "black-23.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:593596f699ca2dcbbbdfa59fcda7d8ad6604370c10228223cd6cf6ce1ce7ed7e"}, + {file = "black-23.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:12d5f10cce8dc27202e9a252acd1c9a426c83f95496c959406c96b785a92bb7d"}, + {file = "black-23.12.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e73c5e3d37e5a3513d16b33305713237a234396ae56769b839d7c40759b8a41c"}, + {file = "black-23.12.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ba09cae1657c4f8a8c9ff6cfd4a6baaf915bb4ef7d03acffe6a2f6585fa1bd01"}, + {file = "black-23.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ace64c1a349c162d6da3cef91e3b0e78c4fc596ffde9413efa0525456148873d"}, + {file = "black-23.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:72db37a2266b16d256b3ea88b9affcdd5c41a74db551ec3dd4609a59c17d25bf"}, + {file = "black-23.12.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:fdf6f23c83078a6c8da2442f4d4eeb19c28ac2a6416da7671b72f0295c4a697b"}, + {file = "black-23.12.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:39dda060b9b395a6b7bf9c5db28ac87b3c3f48d4fdff470fa8a94ab8271da47e"}, + {file = "black-23.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7231670266ca5191a76cb838185d9be59cfa4f5dd401b7c1c70b993c58f6b1b5"}, + {file = "black-23.12.0-cp312-cp312-win_amd64.whl", hash = "sha256:193946e634e80bfb3aec41830f5d7431f8dd5b20d11d89be14b84a97c6b8bc75"}, + {file = "black-23.12.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:bcf91b01ddd91a2fed9a8006d7baa94ccefe7e518556470cf40213bd3d44bbbc"}, + {file = "black-23.12.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:996650a89fe5892714ea4ea87bc45e41a59a1e01675c42c433a35b490e5aa3f0"}, + {file = "black-23.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bdbff34c487239a63d86db0c9385b27cdd68b1bfa4e706aa74bb94a435403672"}, + {file = "black-23.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:97af22278043a6a1272daca10a6f4d36c04dfa77e61cbaaf4482e08f3640e9f0"}, + {file = "black-23.12.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ead25c273adfad1095a8ad32afdb8304933efba56e3c1d31b0fee4143a1e424a"}, + {file = "black-23.12.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c71048345bdbced456cddf1622832276d98a710196b842407840ae8055ade6ee"}, + {file = "black-23.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81a832b6e00eef2c13b3239d514ea3b7d5cc3eaa03d0474eedcbbda59441ba5d"}, + {file = "black-23.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:6a82a711d13e61840fb11a6dfecc7287f2424f1ca34765e70c909a35ffa7fb95"}, + {file = "black-23.12.0-py3-none-any.whl", hash = "sha256:a7c07db8200b5315dc07e331dda4d889a56f6bf4db6a9c2a526fa3166a81614f"}, + {file = "black-23.12.0.tar.gz", hash = "sha256:330a327b422aca0634ecd115985c1c7fd7bdb5b5a2ef8aa9888a82e2ebe9437a"}, ] [package.dependencies] @@ -136,30 +123,30 @@ platformdirs = ">=2" [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)"] +d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "cachetools" -version = "5.3.1" +version = "5.3.2" description = "Extensible memoizing collections and decorators" optional = false python-versions = ">=3.7" files = [ - {file = "cachetools-5.3.1-py3-none-any.whl", hash = "sha256:95ef631eeaea14ba2e36f06437f36463aac3a096799e876ee55e5cdccb102590"}, - {file = "cachetools-5.3.1.tar.gz", hash = "sha256:dce83f2d9b4e1f732a8cd44af8e8fab2dbe46201467fc98b3ef8f269092bf62b"}, + {file = "cachetools-5.3.2-py3-none-any.whl", hash = "sha256:861f35a13a451f94e301ce2bec7cac63e881232ccce7ed67fab9b5df4d3beaa1"}, + {file = "cachetools-5.3.2.tar.gz", hash = "sha256:086ee420196f7b2ab9ca2db2520aca326318b68fe5ba8bc4d49cca91add450f2"}, ] [[package]] name = "certifi" -version = "2023.7.22" +version = "2023.11.17" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"}, - {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"}, + {file = "certifi-2023.11.17-py3-none-any.whl", hash = "sha256:e036ab49d5b79556f99cfc2d9320b34cfbe5be05c5871b51de9329f0603b0474"}, + {file = "certifi-2023.11.17.tar.gz", hash = "sha256:9b469f3a900bf28dc19b8cfbf8019bf47f7fdd1a65a1d4ffb98fc14166beb4d1"}, ] [[package]] @@ -186,86 +173,101 @@ files = [ [[package]] name = "charset-normalizer" -version = "3.2.0" +version = "3.3.2" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7.0" files = [ - {file = "charset-normalizer-3.2.0.tar.gz", hash = "sha256:3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b87549028f680ca955556e3bd57013ab47474c3124dc069faa0b6545b6c9710"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7c70087bfee18a42b4040bb9ec1ca15a08242cf5867c58726530bdf3945672ed"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a103b3a7069b62f5d4890ae1b8f0597618f628b286b03d4bc9195230b154bfa9"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94aea8eff76ee6d1cdacb07dd2123a68283cb5569e0250feab1240058f53b623"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:db901e2ac34c931d73054d9797383d0f8009991e723dab15109740a63e7f902a"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0dac0ff919ba34d4df1b6131f59ce95b08b9065233446be7e459f95554c0dc8"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:193cbc708ea3aca45e7221ae58f0fd63f933753a9bfb498a3b474878f12caaad"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09393e1b2a9461950b1c9a45d5fd251dc7c6f228acab64da1c9c0165d9c7765c"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:baacc6aee0b2ef6f3d308e197b5d7a81c0e70b06beae1f1fcacffdbd124fe0e3"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:bf420121d4c8dce6b889f0e8e4ec0ca34b7f40186203f06a946fa0276ba54029"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:c04a46716adde8d927adb9457bbe39cf473e1e2c2f5d0a16ceb837e5d841ad4f"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:aaf63899c94de41fe3cf934601b0f7ccb6b428c6e4eeb80da72c58eab077b19a"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d62e51710986674142526ab9f78663ca2b0726066ae26b78b22e0f5e571238dd"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-win32.whl", hash = "sha256:04e57ab9fbf9607b77f7d057974694b4f6b142da9ed4a199859d9d4d5c63fe96"}, - {file = "charset_normalizer-3.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:48021783bdf96e3d6de03a6e39a1171ed5bd7e8bb93fc84cc649d11490f87cea"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4957669ef390f0e6719db3613ab3a7631e68424604a7b448f079bee145da6e09"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:46fb8c61d794b78ec7134a715a3e564aafc8f6b5e338417cb19fe9f57a5a9bf2"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f779d3ad205f108d14e99bb3859aa7dd8e9c68874617c72354d7ecaec2a054ac"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f25c229a6ba38a35ae6e25ca1264621cc25d4d38dca2942a7fce0b67a4efe918"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2efb1bd13885392adfda4614c33d3b68dee4921fd0ac1d3988f8cbb7d589e72a"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f30b48dd7fa1474554b0b0f3fdfdd4c13b5c737a3c6284d3cdc424ec0ffff3a"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:246de67b99b6851627d945db38147d1b209a899311b1305dd84916f2b88526c6"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bd9b3b31adcb054116447ea22caa61a285d92e94d710aa5ec97992ff5eb7cf3"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:8c2f5e83493748286002f9369f3e6607c565a6a90425a3a1fef5ae32a36d749d"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3170c9399da12c9dc66366e9d14da8bf7147e1e9d9ea566067bbce7bb74bd9c2"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7a4826ad2bd6b07ca615c74ab91f32f6c96d08f6fcc3902ceeedaec8cdc3bcd6"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:3b1613dd5aee995ec6d4c69f00378bbd07614702a315a2cf6c1d21461fe17c23"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9e608aafdb55eb9f255034709e20d5a83b6d60c054df0802fa9c9883d0a937aa"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-win32.whl", hash = "sha256:f2a1d0fd4242bd8643ce6f98927cf9c04540af6efa92323e9d3124f57727bfc1"}, - {file = "charset_normalizer-3.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:681eb3d7e02e3c3655d1b16059fbfb605ac464c834a0c629048a30fad2b27489"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c57921cda3a80d0f2b8aec7e25c8aa14479ea92b5b51b6876d975d925a2ea346"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41b25eaa7d15909cf3ac4c96088c1f266a9a93ec44f87f1d13d4a0e86c81b982"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f058f6963fd82eb143c692cecdc89e075fa0828db2e5b291070485390b2f1c9c"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a7647ebdfb9682b7bb97e2a5e7cb6ae735b1c25008a70b906aecca294ee96cf4"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eef9df1eefada2c09a5e7a40991b9fc6ac6ef20b1372abd48d2794a316dc0449"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e03b8895a6990c9ab2cdcd0f2fe44088ca1c65ae592b8f795c3294af00a461c3"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ee4006268ed33370957f55bf2e6f4d263eaf4dc3cfc473d1d90baff6ed36ce4a"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c4983bf937209c57240cff65906b18bb35e64ae872da6a0db937d7b4af845dd7"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:3bb7fda7260735efe66d5107fb7e6af6a7c04c7fce9b2514e04b7a74b06bf5dd"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:72814c01533f51d68702802d74f77ea026b5ec52793c791e2da806a3844a46c3"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:70c610f6cbe4b9fce272c407dd9d07e33e6bf7b4aa1b7ffb6f6ded8e634e3592"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-win32.whl", hash = "sha256:a401b4598e5d3f4a9a811f3daf42ee2291790c7f9d74b18d75d6e21dda98a1a1"}, - {file = "charset_normalizer-3.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:c0b21078a4b56965e2b12f247467b234734491897e99c1d51cee628da9786959"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:95eb302ff792e12aba9a8b8f8474ab229a83c103d74a750ec0bd1c1eea32e669"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1a100c6d595a7f316f1b6f01d20815d916e75ff98c27a01ae817439ea7726329"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6339d047dab2780cc6220f46306628e04d9750f02f983ddb37439ca47ced7149"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4b749b9cc6ee664a3300bb3a273c1ca8068c46be705b6c31cf5d276f8628a94"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a38856a971c602f98472050165cea2cdc97709240373041b69030be15047691f"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f87f746ee241d30d6ed93969de31e5ffd09a2961a051e60ae6bddde9ec3583aa"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89f1b185a01fe560bc8ae5f619e924407efca2191b56ce749ec84982fc59a32a"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e1c8a2f4c69e08e89632defbfabec2feb8a8d99edc9f89ce33c4b9e36ab63037"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2f4ac36d8e2b4cc1aa71df3dd84ff8efbe3bfb97ac41242fbcfc053c67434f46"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a386ebe437176aab38c041de1260cd3ea459c6ce5263594399880bbc398225b2"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:ccd16eb18a849fd8dcb23e23380e2f0a354e8daa0c984b8a732d9cfaba3a776d"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:e6a5bf2cba5ae1bb80b154ed68a3cfa2fa00fde979a7f50d6598d3e17d9ac20c"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:45de3f87179c1823e6d9e32156fb14c1927fcc9aba21433f088fdfb555b77c10"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-win32.whl", hash = "sha256:1000fba1057b92a65daec275aec30586c3de2401ccdcd41f8a5c1e2c87078706"}, - {file = "charset_normalizer-3.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:8b2c760cfc7042b27ebdb4a43a4453bd829a5742503599144d54a032c5dc7e9e"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:855eafa5d5a2034b4621c74925d89c5efef61418570e5ef9b37717d9c796419c"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:203f0c8871d5a7987be20c72442488a0b8cfd0f43b7973771640fc593f56321f"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e857a2232ba53ae940d3456f7533ce6ca98b81917d47adc3c7fd55dad8fab858"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e86d77b090dbddbe78867a0275cb4df08ea195e660f1f7f13435a4649e954e5"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fb39a81950ec280984b3a44f5bd12819953dc5fa3a7e6fa7a80db5ee853952"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2dee8e57f052ef5353cf608e0b4c871aee320dd1b87d351c28764fc0ca55f9f4"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8700f06d0ce6f128de3ccdbc1acaea1ee264d2caa9ca05daaf492fde7c2a7200"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1920d4ff15ce893210c1f0c0e9d19bfbecb7983c76b33f046c13a8ffbd570252"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c1c76a1743432b4b60ab3358c937a3fe1341c828ae6194108a94c69028247f22"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f7560358a6811e52e9c4d142d497f1a6e10103d3a6881f18d04dbce3729c0e2c"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:c8063cf17b19661471ecbdb3df1c84f24ad2e389e326ccaf89e3fb2484d8dd7e"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:cd6dbe0238f7743d0efe563ab46294f54f9bc8f4b9bcf57c3c666cc5bc9d1299"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1249cbbf3d3b04902ff081ffbb33ce3377fa6e4c7356f759f3cd076cc138d020"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-win32.whl", hash = "sha256:6c409c0deba34f147f77efaa67b8e4bb83d2f11c8806405f76397ae5b8c0d1c9"}, - {file = "charset_normalizer-3.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:7095f6fbfaa55defb6b733cfeb14efaae7a29f0b59d8cf213be4e7ca0b857b80"}, - {file = "charset_normalizer-3.2.0-py3-none-any.whl", hash = "sha256:8e098148dd37b4ce3baca71fb394c81dc5d9c7728c95df695d2dca218edf40e6"}, + {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"}, + {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"}, + {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"}, + {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"}, + {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"}, + {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"}, + {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"}, + {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"}, ] [[package]] @@ -293,15 +295,78 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +[[package]] +name = "contourpy" +version = "1.2.0" +description = "Python library for calculating contours of 2D quadrilateral grids" +optional = false +python-versions = ">=3.9" +files = [ + {file = "contourpy-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0274c1cb63625972c0c007ab14dd9ba9e199c36ae1a231ce45d725cbcbfd10a8"}, + {file = "contourpy-1.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ab459a1cbbf18e8698399c595a01f6dcc5c138220ca3ea9e7e6126232d102bb4"}, + {file = "contourpy-1.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fdd887f17c2f4572ce548461e4f96396681212d858cae7bd52ba3310bc6f00f"}, + {file = "contourpy-1.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d16edfc3fc09968e09ddffada434b3bf989bf4911535e04eada58469873e28e"}, + {file = "contourpy-1.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1c203f617abc0dde5792beb586f827021069fb6d403d7f4d5c2b543d87edceb9"}, + {file = "contourpy-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b69303ceb2e4d4f146bf82fda78891ef7bcd80c41bf16bfca3d0d7eb545448aa"}, + {file = "contourpy-1.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:884c3f9d42d7218304bc74a8a7693d172685c84bd7ab2bab1ee567b769696df9"}, + {file = "contourpy-1.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4a1b1208102be6e851f20066bf0e7a96b7d48a07c9b0cfe6d0d4545c2f6cadab"}, + {file = "contourpy-1.2.0-cp310-cp310-win32.whl", hash = "sha256:34b9071c040d6fe45d9826cbbe3727d20d83f1b6110d219b83eb0e2a01d79488"}, + {file = "contourpy-1.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:bd2f1ae63998da104f16a8b788f685e55d65760cd1929518fd94cd682bf03e41"}, + {file = "contourpy-1.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:dd10c26b4eadae44783c45ad6655220426f971c61d9b239e6f7b16d5cdaaa727"}, + {file = "contourpy-1.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5c6b28956b7b232ae801406e529ad7b350d3f09a4fde958dfdf3c0520cdde0dd"}, + {file = "contourpy-1.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ebeac59e9e1eb4b84940d076d9f9a6cec0064e241818bcb6e32124cc5c3e377a"}, + {file = "contourpy-1.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:139d8d2e1c1dd52d78682f505e980f592ba53c9f73bd6be102233e358b401063"}, + {file = "contourpy-1.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1e9dc350fb4c58adc64df3e0703ab076f60aac06e67d48b3848c23647ae4310e"}, + {file = "contourpy-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:18fc2b4ed8e4a8fe849d18dce4bd3c7ea637758c6343a1f2bae1e9bd4c9f4686"}, + {file = "contourpy-1.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:16a7380e943a6d52472096cb7ad5264ecee36ed60888e2a3d3814991a0107286"}, + {file = "contourpy-1.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8d8faf05be5ec8e02a4d86f616fc2a0322ff4a4ce26c0f09d9f7fb5330a35c95"}, + {file = "contourpy-1.2.0-cp311-cp311-win32.whl", hash = "sha256:67b7f17679fa62ec82b7e3e611c43a016b887bd64fb933b3ae8638583006c6d6"}, + {file = "contourpy-1.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:99ad97258985328b4f207a5e777c1b44a83bfe7cf1f87b99f9c11d4ee477c4de"}, + {file = "contourpy-1.2.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:575bcaf957a25d1194903a10bc9f316c136c19f24e0985a2b9b5608bdf5dbfe0"}, + {file = "contourpy-1.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9e6c93b5b2dbcedad20a2f18ec22cae47da0d705d454308063421a3b290d9ea4"}, + {file = "contourpy-1.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:464b423bc2a009088f19bdf1f232299e8b6917963e2b7e1d277da5041f33a779"}, + {file = "contourpy-1.2.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:68ce4788b7d93e47f84edd3f1f95acdcd142ae60bc0e5493bfd120683d2d4316"}, + {file = "contourpy-1.2.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d7d1f8871998cdff5d2ff6a087e5e1780139abe2838e85b0b46b7ae6cc25399"}, + {file = "contourpy-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e739530c662a8d6d42c37c2ed52a6f0932c2d4a3e8c1f90692ad0ce1274abe0"}, + {file = "contourpy-1.2.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:247b9d16535acaa766d03037d8e8fb20866d054d3c7fbf6fd1f993f11fc60ca0"}, + {file = "contourpy-1.2.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:461e3ae84cd90b30f8d533f07d87c00379644205b1d33a5ea03381edc4b69431"}, + {file = "contourpy-1.2.0-cp312-cp312-win32.whl", hash = "sha256:1c2559d6cffc94890b0529ea7eeecc20d6fadc1539273aa27faf503eb4656d8f"}, + {file = "contourpy-1.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:491b1917afdd8638a05b611a56d46587d5a632cabead889a5440f7c638bc6ed9"}, + {file = "contourpy-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5fd1810973a375ca0e097dee059c407913ba35723b111df75671a1976efa04bc"}, + {file = "contourpy-1.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:999c71939aad2780f003979b25ac5b8f2df651dac7b38fb8ce6c46ba5abe6ae9"}, + {file = "contourpy-1.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b7caf9b241464c404613512d5594a6e2ff0cc9cb5615c9475cc1d9b514218ae8"}, + {file = "contourpy-1.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:266270c6f6608340f6c9836a0fb9b367be61dde0c9a9a18d5ece97774105ff3e"}, + {file = "contourpy-1.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbd50d0a0539ae2e96e537553aff6d02c10ed165ef40c65b0e27e744a0f10af8"}, + {file = "contourpy-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11f8d2554e52f459918f7b8e6aa20ec2a3bce35ce95c1f0ef4ba36fbda306df5"}, + {file = "contourpy-1.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ce96dd400486e80ac7d195b2d800b03e3e6a787e2a522bfb83755938465a819e"}, + {file = "contourpy-1.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6d3364b999c62f539cd403f8123ae426da946e142312a514162adb2addd8d808"}, + {file = "contourpy-1.2.0-cp39-cp39-win32.whl", hash = "sha256:1c88dfb9e0c77612febebb6ac69d44a8d81e3dc60f993215425b62c1161353f4"}, + {file = "contourpy-1.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:78e6ad33cf2e2e80c5dfaaa0beec3d61face0fb650557100ee36db808bfa6843"}, + {file = "contourpy-1.2.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:be16975d94c320432657ad2402f6760990cb640c161ae6da1363051805fa8108"}, + {file = "contourpy-1.2.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b95a225d4948b26a28c08307a60ac00fb8671b14f2047fc5476613252a129776"}, + {file = "contourpy-1.2.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:0d7e03c0f9a4f90dc18d4e77e9ef4ec7b7bbb437f7f675be8e530d65ae6ef956"}, + {file = "contourpy-1.2.0.tar.gz", hash = "sha256:171f311cb758de7da13fc53af221ae47a5877be5a0843a9fe150818c51ed276a"}, +] + +[package.dependencies] +numpy = ">=1.20,<2.0" + +[package.extras] +bokeh = ["bokeh", "selenium"] +docs = ["furo", "sphinx (>=7.2)", "sphinx-copybutton"] +mypy = ["contourpy[bokeh,docs]", "docutils-stubs", "mypy (==1.6.1)", "types-Pillow"] +test = ["Pillow", "contourpy[test-no-images]", "matplotlib"] +test-no-images = ["pytest", "pytest-cov", "pytest-xdist", "wurlitzer"] + [[package]] name = "cookiecutter" -version = "2.3.0" +version = "2.5.0" description = "A command-line utility that creates projects from project templates, e.g. creating a Python package project from a Python package project template." optional = false python-versions = ">=3.7" files = [ - {file = "cookiecutter-2.3.0-py3-none-any.whl", hash = "sha256:7e87944757c6e9f8729cf89a4139b6a35ab4d6dcbc6ae3e7d6360d44ad3ad383"}, - {file = "cookiecutter-2.3.0.tar.gz", hash = "sha256:942a794981747f6d7f439d6e49d39dc91a9a641283614160c93c474c72c29621"}, + {file = "cookiecutter-2.5.0-py3-none-any.whl", hash = "sha256:8aa2f12ed11bc05628651e9dc4353a10571dd9908aaaaeec959a2b9ea465a5d2"}, + {file = "cookiecutter-2.5.0.tar.gz", hash = "sha256:e61e9034748e3f41b8bd2c11f00d030784b48711c4d5c42363c50989a65331ec"}, ] [package.dependencies] @@ -316,77 +381,92 @@ rich = "*" [[package]] name = "coverage" -version = "7.3.0" +version = "7.3.2" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.8" files = [ - {file = "coverage-7.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:db76a1bcb51f02b2007adacbed4c88b6dee75342c37b05d1822815eed19edee5"}, - {file = "coverage-7.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c02cfa6c36144ab334d556989406837336c1d05215a9bdf44c0bc1d1ac1cb637"}, - {file = "coverage-7.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:477c9430ad5d1b80b07f3c12f7120eef40bfbf849e9e7859e53b9c93b922d2af"}, - {file = "coverage-7.3.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ce2ee86ca75f9f96072295c5ebb4ef2a43cecf2870b0ca5e7a1cbdd929cf67e1"}, - {file = "coverage-7.3.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68d8a0426b49c053013e631c0cdc09b952d857efa8f68121746b339912d27a12"}, - {file = "coverage-7.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b3eb0c93e2ea6445b2173da48cb548364f8f65bf68f3d090404080d338e3a689"}, - {file = "coverage-7.3.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:90b6e2f0f66750c5a1178ffa9370dec6c508a8ca5265c42fbad3ccac210a7977"}, - {file = "coverage-7.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:96d7d761aea65b291a98c84e1250cd57b5b51726821a6f2f8df65db89363be51"}, - {file = "coverage-7.3.0-cp310-cp310-win32.whl", hash = "sha256:63c5b8ecbc3b3d5eb3a9d873dec60afc0cd5ff9d9f1c75981d8c31cfe4df8527"}, - {file = "coverage-7.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:97c44f4ee13bce914272589b6b41165bbb650e48fdb7bd5493a38bde8de730a1"}, - {file = "coverage-7.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:74c160285f2dfe0acf0f72d425f3e970b21b6de04157fc65adc9fd07ee44177f"}, - {file = "coverage-7.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b543302a3707245d454fc49b8ecd2c2d5982b50eb63f3535244fd79a4be0c99d"}, - {file = "coverage-7.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad0f87826c4ebd3ef484502e79b39614e9c03a5d1510cfb623f4a4a051edc6fd"}, - {file = "coverage-7.3.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:13c6cbbd5f31211d8fdb477f0f7b03438591bdd077054076eec362cf2207b4a7"}, - {file = "coverage-7.3.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fac440c43e9b479d1241fe9d768645e7ccec3fb65dc3a5f6e90675e75c3f3e3a"}, - {file = "coverage-7.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:3c9834d5e3df9d2aba0275c9f67989c590e05732439b3318fa37a725dff51e74"}, - {file = "coverage-7.3.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4c8e31cf29b60859876474034a83f59a14381af50cbe8a9dbaadbf70adc4b214"}, - {file = "coverage-7.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7a9baf8e230f9621f8e1d00c580394a0aa328fdac0df2b3f8384387c44083c0f"}, - {file = "coverage-7.3.0-cp311-cp311-win32.whl", hash = "sha256:ccc51713b5581e12f93ccb9c5e39e8b5d4b16776d584c0f5e9e4e63381356482"}, - {file = "coverage-7.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:887665f00ea4e488501ba755a0e3c2cfd6278e846ada3185f42d391ef95e7e70"}, - {file = "coverage-7.3.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d000a739f9feed900381605a12a61f7aaced6beae832719ae0d15058a1e81c1b"}, - {file = "coverage-7.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:59777652e245bb1e300e620ce2bef0d341945842e4eb888c23a7f1d9e143c446"}, - {file = "coverage-7.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c9737bc49a9255d78da085fa04f628a310c2332b187cd49b958b0e494c125071"}, - {file = "coverage-7.3.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5247bab12f84a1d608213b96b8af0cbb30d090d705b6663ad794c2f2a5e5b9fe"}, - {file = "coverage-7.3.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2ac9a1de294773b9fa77447ab7e529cf4fe3910f6a0832816e5f3d538cfea9a"}, - {file = "coverage-7.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:85b7335c22455ec12444cec0d600533a238d6439d8d709d545158c1208483873"}, - {file = "coverage-7.3.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:36ce5d43a072a036f287029a55b5c6a0e9bd73db58961a273b6dc11a2c6eb9c2"}, - {file = "coverage-7.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:211a4576e984f96d9fce61766ffaed0115d5dab1419e4f63d6992b480c2bd60b"}, - {file = "coverage-7.3.0-cp312-cp312-win32.whl", hash = "sha256:56afbf41fa4a7b27f6635bc4289050ac3ab7951b8a821bca46f5b024500e6321"}, - {file = "coverage-7.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:7f297e0c1ae55300ff688568b04ff26b01c13dfbf4c9d2b7d0cb688ac60df479"}, - {file = "coverage-7.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ac0dec90e7de0087d3d95fa0533e1d2d722dcc008bc7b60e1143402a04c117c1"}, - {file = "coverage-7.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:438856d3f8f1e27f8e79b5410ae56650732a0dcfa94e756df88c7e2d24851fcd"}, - {file = "coverage-7.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1084393c6bda8875c05e04fce5cfe1301a425f758eb012f010eab586f1f3905e"}, - {file = "coverage-7.3.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:49ab200acf891e3dde19e5aa4b0f35d12d8b4bd805dc0be8792270c71bd56c54"}, - {file = "coverage-7.3.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a67e6bbe756ed458646e1ef2b0778591ed4d1fcd4b146fc3ba2feb1a7afd4254"}, - {file = "coverage-7.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8f39c49faf5344af36042b293ce05c0d9004270d811c7080610b3e713251c9b0"}, - {file = "coverage-7.3.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:7df91fb24c2edaabec4e0eee512ff3bc6ec20eb8dccac2e77001c1fe516c0c84"}, - {file = "coverage-7.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:34f9f0763d5fa3035a315b69b428fe9c34d4fc2f615262d6be3d3bf3882fb985"}, - {file = "coverage-7.3.0-cp38-cp38-win32.whl", hash = "sha256:bac329371d4c0d456e8d5f38a9b0816b446581b5f278474e416ea0c68c47dcd9"}, - {file = "coverage-7.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:b859128a093f135b556b4765658d5d2e758e1fae3e7cc2f8c10f26fe7005e543"}, - {file = "coverage-7.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fc0ed8d310afe013db1eedd37176d0839dc66c96bcfcce8f6607a73ffea2d6ba"}, - {file = "coverage-7.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61260ec93f99f2c2d93d264b564ba912bec502f679793c56f678ba5251f0393"}, - {file = "coverage-7.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:97af9554a799bd7c58c0179cc8dbf14aa7ab50e1fd5fa73f90b9b7215874ba28"}, - {file = "coverage-7.3.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3558e5b574d62f9c46b76120a5c7c16c4612dc2644c3d48a9f4064a705eaee95"}, - {file = "coverage-7.3.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37d5576d35fcb765fca05654f66aa71e2808d4237d026e64ac8b397ffa66a56a"}, - {file = "coverage-7.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:07ea61bcb179f8f05ffd804d2732b09d23a1238642bf7e51dad62082b5019b34"}, - {file = "coverage-7.3.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:80501d1b2270d7e8daf1b64b895745c3e234289e00d5f0e30923e706f110334e"}, - {file = "coverage-7.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:4eddd3153d02204f22aef0825409091a91bf2a20bce06fe0f638f5c19a85de54"}, - {file = "coverage-7.3.0-cp39-cp39-win32.whl", hash = "sha256:2d22172f938455c156e9af2612650f26cceea47dc86ca048fa4e0b2d21646ad3"}, - {file = "coverage-7.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:60f64e2007c9144375dd0f480a54d6070f00bb1a28f65c408370544091c9bc9e"}, - {file = "coverage-7.3.0-pp38.pp39.pp310-none-any.whl", hash = "sha256:5492a6ce3bdb15c6ad66cb68a0244854d9917478877a25671d70378bdc8562d0"}, - {file = "coverage-7.3.0.tar.gz", hash = "sha256:49dbb19cdcafc130f597d9e04a29d0a032ceedf729e41b181f51cd170e6ee865"}, + {file = "coverage-7.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d872145f3a3231a5f20fd48500274d7df222e291d90baa2026cc5152b7ce86bf"}, + {file = "coverage-7.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:310b3bb9c91ea66d59c53fa4989f57d2436e08f18fb2f421a1b0b6b8cc7fffda"}, + {file = "coverage-7.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f47d39359e2c3779c5331fc740cf4bce6d9d680a7b4b4ead97056a0ae07cb49a"}, + {file = "coverage-7.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aa72dbaf2c2068404b9870d93436e6d23addd8bbe9295f49cbca83f6e278179c"}, + {file = "coverage-7.3.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:beaa5c1b4777f03fc63dfd2a6bd820f73f036bfb10e925fce067b00a340d0f3f"}, + {file = "coverage-7.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:dbc1b46b92186cc8074fee9d9fbb97a9dd06c6cbbef391c2f59d80eabdf0faa6"}, + {file = "coverage-7.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:315a989e861031334d7bee1f9113c8770472db2ac484e5b8c3173428360a9148"}, + {file = "coverage-7.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d1bc430677773397f64a5c88cb522ea43175ff16f8bfcc89d467d974cb2274f9"}, + {file = "coverage-7.3.2-cp310-cp310-win32.whl", hash = "sha256:a889ae02f43aa45032afe364c8ae84ad3c54828c2faa44f3bfcafecb5c96b02f"}, + {file = "coverage-7.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:c0ba320de3fb8c6ec16e0be17ee1d3d69adcda99406c43c0409cb5c41788a611"}, + {file = "coverage-7.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ac8c802fa29843a72d32ec56d0ca792ad15a302b28ca6203389afe21f8fa062c"}, + {file = "coverage-7.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:89a937174104339e3a3ffcf9f446c00e3a806c28b1841c63edb2b369310fd074"}, + {file = "coverage-7.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e267e9e2b574a176ddb983399dec325a80dbe161f1a32715c780b5d14b5f583a"}, + {file = "coverage-7.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2443cbda35df0d35dcfb9bf8f3c02c57c1d6111169e3c85fc1fcc05e0c9f39a3"}, + {file = "coverage-7.3.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4175e10cc8dda0265653e8714b3174430b07c1dca8957f4966cbd6c2b1b8065a"}, + {file = "coverage-7.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0cbf38419fb1a347aaf63481c00f0bdc86889d9fbf3f25109cf96c26b403fda1"}, + {file = "coverage-7.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:5c913b556a116b8d5f6ef834038ba983834d887d82187c8f73dec21049abd65c"}, + {file = "coverage-7.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1981f785239e4e39e6444c63a98da3a1db8e971cb9ceb50a945ba6296b43f312"}, + {file = "coverage-7.3.2-cp311-cp311-win32.whl", hash = "sha256:43668cabd5ca8258f5954f27a3aaf78757e6acf13c17604d89648ecc0cc66640"}, + {file = "coverage-7.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10c39c0452bf6e694511c901426d6b5ac005acc0f78ff265dbe36bf81f808a2"}, + {file = "coverage-7.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:4cbae1051ab791debecc4a5dcc4a1ff45fc27b91b9aee165c8a27514dd160836"}, + {file = "coverage-7.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:12d15ab5833a997716d76f2ac1e4b4d536814fc213c85ca72756c19e5a6b3d63"}, + {file = "coverage-7.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c7bba973ebee5e56fe9251300c00f1579652587a9f4a5ed8404b15a0471f216"}, + {file = "coverage-7.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fe494faa90ce6381770746077243231e0b83ff3f17069d748f645617cefe19d4"}, + {file = "coverage-7.3.2-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6e9589bd04d0461a417562649522575d8752904d35c12907d8c9dfeba588faf"}, + {file = "coverage-7.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d51ac2a26f71da1b57f2dc81d0e108b6ab177e7d30e774db90675467c847bbdf"}, + {file = "coverage-7.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:99b89d9f76070237975b315b3d5f4d6956ae354a4c92ac2388a5695516e47c84"}, + {file = "coverage-7.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:fa28e909776dc69efb6ed975a63691bc8172b64ff357e663a1bb06ff3c9b589a"}, + {file = "coverage-7.3.2-cp312-cp312-win32.whl", hash = "sha256:289fe43bf45a575e3ab10b26d7b6f2ddb9ee2dba447499f5401cfb5ecb8196bb"}, + {file = "coverage-7.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:7dbc3ed60e8659bc59b6b304b43ff9c3ed858da2839c78b804973f613d3e92ed"}, + {file = "coverage-7.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f94b734214ea6a36fe16e96a70d941af80ff3bfd716c141300d95ebc85339738"}, + {file = "coverage-7.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:af3d828d2c1cbae52d34bdbb22fcd94d1ce715d95f1a012354a75e5913f1bda2"}, + {file = "coverage-7.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:630b13e3036e13c7adc480ca42fa7afc2a5d938081d28e20903cf7fd687872e2"}, + {file = "coverage-7.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c9eacf273e885b02a0273bb3a2170f30e2d53a6d53b72dbe02d6701b5296101c"}, + {file = "coverage-7.3.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d8f17966e861ff97305e0801134e69db33b143bbfb36436efb9cfff6ec7b2fd9"}, + {file = "coverage-7.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b4275802d16882cf9c8b3d057a0839acb07ee9379fa2749eca54efbce1535b82"}, + {file = "coverage-7.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:72c0cfa5250f483181e677ebc97133ea1ab3eb68645e494775deb6a7f6f83901"}, + {file = "coverage-7.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:cb536f0dcd14149425996821a168f6e269d7dcd2c273a8bff8201e79f5104e76"}, + {file = "coverage-7.3.2-cp38-cp38-win32.whl", hash = "sha256:307adb8bd3abe389a471e649038a71b4eb13bfd6b7dd9a129fa856f5c695cf92"}, + {file = "coverage-7.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:88ed2c30a49ea81ea3b7f172e0269c182a44c236eb394718f976239892c0a27a"}, + {file = "coverage-7.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b631c92dfe601adf8f5ebc7fc13ced6bb6e9609b19d9a8cd59fa47c4186ad1ce"}, + {file = "coverage-7.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d3d9df4051c4a7d13036524b66ecf7a7537d14c18a384043f30a303b146164e9"}, + {file = "coverage-7.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f7363d3b6a1119ef05015959ca24a9afc0ea8a02c687fe7e2d557705375c01f"}, + {file = "coverage-7.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2f11cc3c967a09d3695d2a6f03fb3e6236622b93be7a4b5dc09166a861be6d25"}, + {file = "coverage-7.3.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:149de1d2401ae4655c436a3dced6dd153f4c3309f599c3d4bd97ab172eaf02d9"}, + {file = "coverage-7.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3a4006916aa6fee7cd38db3bfc95aa9c54ebb4ffbfc47c677c8bba949ceba0a6"}, + {file = "coverage-7.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9028a3871280110d6e1aa2df1afd5ef003bab5fb1ef421d6dc748ae1c8ef2ebc"}, + {file = "coverage-7.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9f805d62aec8eb92bab5b61c0f07329275b6f41c97d80e847b03eb894f38d083"}, + {file = "coverage-7.3.2-cp39-cp39-win32.whl", hash = "sha256:d1c88ec1a7ff4ebca0219f5b1ef863451d828cccf889c173e1253aa84b1e07ce"}, + {file = "coverage-7.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b4767da59464bb593c07afceaddea61b154136300881844768037fd5e859353f"}, + {file = "coverage-7.3.2-pp38.pp39.pp310-none-any.whl", hash = "sha256:ae97af89f0fbf373400970c0a21eef5aa941ffeed90aee43650b81f7d7f47637"}, + {file = "coverage-7.3.2.tar.gz", hash = "sha256:be32ad29341b0170e795ca590e1c07e81fc061cb5b10c74ce7203491484404ef"}, ] [package.extras] toml = ["tomli"] +[[package]] +name = "cycler" +version = "0.12.1" +description = "Composable style cycles" +optional = false +python-versions = ">=3.8" +files = [ + {file = "cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30"}, + {file = "cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c"}, +] + +[package.extras] +docs = ["ipython", "matplotlib", "numpydoc", "sphinx"] +tests = ["pytest", "pytest-cov", "pytest-xdist"] + [[package]] name = "distlib" -version = "0.3.7" +version = "0.3.8" description = "Distribution utilities" optional = false python-versions = "*" files = [ - {file = "distlib-0.3.7-py2.py3-none-any.whl", hash = "sha256:2e24928bc811348f0feb63014e97aaae3037f2cf48712d51ae61df7fd6075057"}, - {file = "distlib-0.3.7.tar.gz", hash = "sha256:9dafe54b34a028eafd95039d5e5d4851a13734540f1331060d31c9916e7147a8"}, + {file = "distlib-0.3.8-py2.py3-none-any.whl", hash = "sha256:034db59a0b96f8ca18035f36290806a9a6e6bd9d1ff91e45a7f172eb17e51784"}, + {file = "distlib-0.3.8.tar.gz", hash = "sha256:1530ea13e350031b6312d8580ddb6b27a104275a31106523b8f123787f494f64"}, ] [[package]] @@ -405,28 +485,94 @@ testing = ["hatch", "pre-commit", "pytest", "tox"] [[package]] name = "filelock" -version = "3.12.2" +version = "3.13.1" description = "A platform independent file lock." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" +files = [ + {file = "filelock-3.13.1-py3-none-any.whl", hash = "sha256:57dbda9b35157b05fb3e58ee91448612eb674172fab98ee235ccb0b5bee19a1c"}, + {file = "filelock-3.13.1.tar.gz", hash = "sha256:521f5f56c50f8426f5e03ad3b281b490a87ef15bc6c526f168290f0c7148d44e"}, +] + +[package.extras] +docs = ["furo (>=2023.9.10)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.24)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.3.2)", "diff-cover (>=8)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)", "pytest-timeout (>=2.2)"] +typing = ["typing-extensions (>=4.8)"] + +[[package]] +name = "fonttools" +version = "4.46.0" +description = "Tools to manipulate font files" +optional = false +python-versions = ">=3.8" files = [ - {file = "filelock-3.12.2-py3-none-any.whl", hash = "sha256:cbb791cdea2a72f23da6ac5b5269ab0a0d161e9ef0100e653b69049a7706d1ec"}, - {file = "filelock-3.12.2.tar.gz", hash = "sha256:002740518d8aa59a26b0c76e10fb8c6e15eae825d34b6fdf670333fd7b938d81"}, + {file = "fonttools-4.46.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d4e69e2c7f93b695d2e6f18f709d501d945f65c1d237dafaabdd23cd935a5276"}, + {file = "fonttools-4.46.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:25852f0c63df0af022f698464a4a80f7d1d5bd974bcd22f995f6b4ad198e32dd"}, + {file = "fonttools-4.46.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:adab73618d0a328b203a0e242b3eba60a2b5662d9cb2bd16ed9c52af8a7d86af"}, + {file = "fonttools-4.46.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2cf923a4a556ab4cc4c52f69a4a2db624cf5a2cf360394368b40c5152fe3321e"}, + {file = "fonttools-4.46.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:87c214197712cc14fd2a4621efce2a9c501a77041232b789568149a8a3161517"}, + {file = "fonttools-4.46.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:156ae342a1ed1fe38e180de471e98fbf5b2b6ae280fa3323138569c4ca215844"}, + {file = "fonttools-4.46.0-cp310-cp310-win32.whl", hash = "sha256:c506e3d3a9e898caee4dc094f34b49c5566870d5a2d1ca2125f0a9f35ecc2205"}, + {file = "fonttools-4.46.0-cp310-cp310-win_amd64.whl", hash = "sha256:f8bc3973ed58893c4107993e0a7ae34901cb572b5e798249cbef35d30801ffd4"}, + {file = "fonttools-4.46.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:982f69855ac258260f51048d9e0c53c5f19881138cc7ca06deb38dc4b97404b6"}, + {file = "fonttools-4.46.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2c23c59d321d62588620f2255cf951270bf637d88070f38ed8b5e5558775b86c"}, + {file = "fonttools-4.46.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0e94244ec24a940ecfbe5b31c975c8a575d5ed2d80f9a280ce3b21fa5dc9c34"}, + {file = "fonttools-4.46.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1a9f9cdd7ef63d1b8ac90db335762451452426b3207abd79f60da510cea62da5"}, + {file = "fonttools-4.46.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ca9eceebe70035b057ce549e2054cad73e95cac3fe91a9d827253d1c14618204"}, + {file = "fonttools-4.46.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8be6adfa4e15977075278dd0a0bae74dec59be7b969b5ceed93fb86af52aa5be"}, + {file = "fonttools-4.46.0-cp311-cp311-win32.whl", hash = "sha256:7b5636f5706d49f13b6d610fe54ee662336cdf56b5a6f6683c0b803e23d826d2"}, + {file = "fonttools-4.46.0-cp311-cp311-win_amd64.whl", hash = "sha256:49ea0983e55fd7586a809787cd4644a7ae471e53ab8ddc016f9093b400e32646"}, + {file = "fonttools-4.46.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:7b460720ce81773da1a3e7cc964c48e1e11942b280619582a897fa0117b56a62"}, + {file = "fonttools-4.46.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:8bee9f4fc8c99824a424ae45c789ee8c67cb84f8e747afa7f83b7d3cef439c3b"}, + {file = "fonttools-4.46.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d3d7b96aba96e05e8c911ce2dfc5acc6a178b8f44f6aa69371ab91aa587563da"}, + {file = "fonttools-4.46.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e6aeb5c340416d11a3209d75c48d13e72deea9e1517837dd1522c1fd1f17c11"}, + {file = "fonttools-4.46.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c779f8701deedf41908f287aeb775b8a6f59875ad1002b98ac6034ae4ddc1b7b"}, + {file = "fonttools-4.46.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ce199227ce7921eaafdd4f96536f16b232d6b580ce74ce337de544bf06cb2752"}, + {file = "fonttools-4.46.0-cp312-cp312-win32.whl", hash = "sha256:1c9937c4dd1061afd22643389445fabda858af5e805860ec3082a4bc07c7a720"}, + {file = "fonttools-4.46.0-cp312-cp312-win_amd64.whl", hash = "sha256:a9fa52ef8fd14d7eb3d813e1451e7ace3e1eebfa9b7237d3f81fee8f3de6a114"}, + {file = "fonttools-4.46.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:c94564b1f3b5dd87e73577610d85115b1936edcc596deaf84a31bbe70e17456b"}, + {file = "fonttools-4.46.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a4a50a1dfad7f7ba5ca3f99cc73bf5cdac67ceade8e4b355a877521f20ad1b63"}, + {file = "fonttools-4.46.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:89c2c520f9492844ecd6316d20c6c7a157b5c0cb73a1411b3db28ee304f30122"}, + {file = "fonttools-4.46.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5b7905fd68eacb7cc56a13139da5c312c45baae6950dd00b02563c54508a041"}, + {file = "fonttools-4.46.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8485cc468288e213f31afdaf1fdda3c79010f542559fbba936a54f4644df2570"}, + {file = "fonttools-4.46.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:87c3299da7da55394fb324349db0ede38114a46aafd0e7dfcabfecd28cdd94c3"}, + {file = "fonttools-4.46.0-cp38-cp38-win32.whl", hash = "sha256:f5f1423a504ccc329efb5aa79738de83d38c072be5308788dde6bd419969d7f5"}, + {file = "fonttools-4.46.0-cp38-cp38-win_amd64.whl", hash = "sha256:6d4a4ebcc76e30898ff3296ea786491c70e183f738319ae2629e0d44f17ece42"}, + {file = "fonttools-4.46.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c9a0e422ab79e5cb2b47913be6a4b5fd20c4c7ac34a24f3691a4e099e965e0b8"}, + {file = "fonttools-4.46.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:13ac0cba2fc63fa4b232f2a7971f35f35c6eaf10bd1271fa96d4ce6253a8acfd"}, + {file = "fonttools-4.46.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:795150d5edc595e1a2cfb3d65e8f4f3d027704fc2579f8990d381bef6b188eb6"}, + {file = "fonttools-4.46.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d00fc63131dcac6b25f50a5a129758438317e54e3ce5587163f7058de4b0e933"}, + {file = "fonttools-4.46.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3033b55f401a622de2630b3982234d97219d89b058607b87927eccb0f922313c"}, + {file = "fonttools-4.46.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e26e7fb908ae4f622813e7cb32cd2db6c24e3122bb3b98f25e832a2fe0e7e228"}, + {file = "fonttools-4.46.0-cp39-cp39-win32.whl", hash = "sha256:2d0eba685938c603f2f648dfc0aadbf8c6a4fe1c7ca608c2970a6ef39e00f254"}, + {file = "fonttools-4.46.0-cp39-cp39-win_amd64.whl", hash = "sha256:5200b01f463d97cc2b7ff8a1e3584151f4413e98cb8419da5f17d1dbb84cc214"}, + {file = "fonttools-4.46.0-py3-none-any.whl", hash = "sha256:5b627ed142398ea9202bd752c04311592558964d1a765fb2f78dc441a05633f4"}, + {file = "fonttools-4.46.0.tar.gz", hash = "sha256:2ae45716c27a41807d58a9f3f59983bdc8c0a46cb259e4450ab7e196253a9853"}, ] [package.extras] -docs = ["furo (>=2023.5.20)", "sphinx (>=7.0.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "diff-cover (>=7.5)", "pytest (>=7.3.1)", "pytest-cov (>=4.1)", "pytest-mock (>=3.10)", "pytest-timeout (>=2.1)"] +all = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "fs (>=2.2.0,<3)", "lxml (>=4.0,<5)", "lz4 (>=1.7.4.2)", "matplotlib", "munkres", "scipy", "skia-pathops (>=0.5.0)", "sympy", "uharfbuzz (>=0.23.0)", "unicodedata2 (>=15.1.0)", "xattr", "zopfli (>=0.1.4)"] +graphite = ["lz4 (>=1.7.4.2)"] +interpolatable = ["munkres", "scipy"] +lxml = ["lxml (>=4.0,<5)"] +pathops = ["skia-pathops (>=0.5.0)"] +plot = ["matplotlib"] +repacker = ["uharfbuzz (>=0.23.0)"] +symfont = ["sympy"] +type1 = ["xattr"] +ufo = ["fs (>=2.2.0,<3)"] +unicode = ["unicodedata2 (>=15.1.0)"] +woff = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "zopfli (>=0.1.4)"] [[package]] name = "identify" -version = "2.5.27" +version = "2.5.33" description = "File identification library for Python" optional = false python-versions = ">=3.8" files = [ - {file = "identify-2.5.27-py2.py3-none-any.whl", hash = "sha256:fdb527b2dfe24602809b2201e033c2a113d7bdf716db3ca8e3243f735dcecaba"}, - {file = "identify-2.5.27.tar.gz", hash = "sha256:287b75b04a0e22d727bc9a41f0d4f3c1bcada97490fa6eabb5b28f0e9097e733"}, + {file = "identify-2.5.33-py2.py3-none-any.whl", hash = "sha256:d40ce5fcd762817627670da8a7d8d8e65f24342d14539c59488dc603bf662e34"}, + {file = "identify-2.5.33.tar.gz", hash = "sha256:161558f9fe4559e1557e1bff323e8631f6a0e4837f7497767c1782832f16b62d"}, ] [package.extras] @@ -434,13 +580,13 @@ license = ["ukkonen"] [[package]] name = "idna" -version = "3.4" +version = "3.6" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" files = [ - {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, - {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, + {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, + {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, ] [[package]] @@ -456,20 +602,17 @@ files = [ [[package]] name = "isort" -version = "5.12.0" +version = "5.13.2" description = "A Python utility / library to sort Python imports." optional = false python-versions = ">=3.8.0" files = [ - {file = "isort-5.12.0-py3-none-any.whl", hash = "sha256:f84c2818376e66cf843d497486ea8fed8700b340f308f076c6fb1229dff318b6"}, - {file = "isort-5.12.0.tar.gz", hash = "sha256:8bef7dde241278824a6d83f44a544709b065191b95b6e50894bdc722fcba0504"}, + {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, + {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, ] [package.extras] -colors = ["colorama (>=0.4.3)"] -pipfile-deprecated-finder = ["pip-shims (>=0.5.2)", "pipreqs", "requirementslib"] -plugins = ["setuptools"] -requirements-deprecated-finder = ["pip-api", "pipreqs"] +colors = ["colorama (>=0.4.6)"] [[package]] name = "jinja2" @@ -488,6 +631,119 @@ MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] +[[package]] +name = "kiwisolver" +version = "1.4.5" +description = "A fast implementation of the Cassowary constraint solver" +optional = false +python-versions = ">=3.7" +files = [ + {file = "kiwisolver-1.4.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:05703cf211d585109fcd72207a31bb170a0f22144d68298dc5e61b3c946518af"}, + {file = "kiwisolver-1.4.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:146d14bebb7f1dc4d5fbf74f8a6cb15ac42baadee8912eb84ac0b3b2a3dc6ac3"}, + {file = "kiwisolver-1.4.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6ef7afcd2d281494c0a9101d5c571970708ad911d028137cd558f02b851c08b4"}, + {file = "kiwisolver-1.4.5-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:9eaa8b117dc8337728e834b9c6e2611f10c79e38f65157c4c38e9400286f5cb1"}, + {file = "kiwisolver-1.4.5-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ec20916e7b4cbfb1f12380e46486ec4bcbaa91a9c448b97023fde0d5bbf9e4ff"}, + {file = "kiwisolver-1.4.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:39b42c68602539407884cf70d6a480a469b93b81b7701378ba5e2328660c847a"}, + {file = "kiwisolver-1.4.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aa12042de0171fad672b6c59df69106d20d5596e4f87b5e8f76df757a7c399aa"}, + {file = "kiwisolver-1.4.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2a40773c71d7ccdd3798f6489aaac9eee213d566850a9533f8d26332d626b82c"}, + {file = "kiwisolver-1.4.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:19df6e621f6d8b4b9c4d45f40a66839294ff2bb235e64d2178f7522d9170ac5b"}, + {file = "kiwisolver-1.4.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:83d78376d0d4fd884e2c114d0621624b73d2aba4e2788182d286309ebdeed770"}, + {file = "kiwisolver-1.4.5-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:e391b1f0a8a5a10ab3b9bb6afcfd74f2175f24f8975fb87ecae700d1503cdee0"}, + {file = "kiwisolver-1.4.5-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:852542f9481f4a62dbb5dd99e8ab7aedfeb8fb6342349a181d4036877410f525"}, + {file = "kiwisolver-1.4.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59edc41b24031bc25108e210c0def6f6c2191210492a972d585a06ff246bb79b"}, + {file = "kiwisolver-1.4.5-cp310-cp310-win32.whl", hash = "sha256:a6aa6315319a052b4ee378aa171959c898a6183f15c1e541821c5c59beaa0238"}, + {file = "kiwisolver-1.4.5-cp310-cp310-win_amd64.whl", hash = "sha256:d0ef46024e6a3d79c01ff13801cb19d0cad7fd859b15037aec74315540acc276"}, + {file = "kiwisolver-1.4.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:11863aa14a51fd6ec28688d76f1735f8f69ab1fabf388851a595d0721af042f5"}, + {file = "kiwisolver-1.4.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8ab3919a9997ab7ef2fbbed0cc99bb28d3c13e6d4b1ad36e97e482558a91be90"}, + {file = "kiwisolver-1.4.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fcc700eadbbccbf6bc1bcb9dbe0786b4b1cb91ca0dcda336eef5c2beed37b797"}, + {file = "kiwisolver-1.4.5-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dfdd7c0b105af050eb3d64997809dc21da247cf44e63dc73ff0fd20b96be55a9"}, + {file = "kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76c6a5964640638cdeaa0c359382e5703e9293030fe730018ca06bc2010c4437"}, + {file = "kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bbea0db94288e29afcc4c28afbf3a7ccaf2d7e027489c449cf7e8f83c6346eb9"}, + {file = "kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ceec1a6bc6cab1d6ff5d06592a91a692f90ec7505d6463a88a52cc0eb58545da"}, + {file = "kiwisolver-1.4.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:040c1aebeda72197ef477a906782b5ab0d387642e93bda547336b8957c61022e"}, + {file = "kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f91de7223d4c7b793867797bacd1ee53bfe7359bd70d27b7b58a04efbb9436c8"}, + {file = "kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:faae4860798c31530dd184046a900e652c95513796ef51a12bc086710c2eec4d"}, + {file = "kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:b0157420efcb803e71d1b28e2c287518b8808b7cf1ab8af36718fd0a2c453eb0"}, + {file = "kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:06f54715b7737c2fecdbf140d1afb11a33d59508a47bf11bb38ecf21dc9ab79f"}, + {file = "kiwisolver-1.4.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fdb7adb641a0d13bdcd4ef48e062363d8a9ad4a182ac7647ec88f695e719ae9f"}, + {file = "kiwisolver-1.4.5-cp311-cp311-win32.whl", hash = "sha256:bb86433b1cfe686da83ce32a9d3a8dd308e85c76b60896d58f082136f10bffac"}, + {file = "kiwisolver-1.4.5-cp311-cp311-win_amd64.whl", hash = "sha256:6c08e1312a9cf1074d17b17728d3dfce2a5125b2d791527f33ffbe805200a355"}, + {file = "kiwisolver-1.4.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:32d5cf40c4f7c7b3ca500f8985eb3fb3a7dfc023215e876f207956b5ea26632a"}, + {file = "kiwisolver-1.4.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f846c260f483d1fd217fe5ed7c173fb109efa6b1fc8381c8b7552c5781756192"}, + {file = "kiwisolver-1.4.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5ff5cf3571589b6d13bfbfd6bcd7a3f659e42f96b5fd1c4830c4cf21d4f5ef45"}, + {file = "kiwisolver-1.4.5-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7269d9e5f1084a653d575c7ec012ff57f0c042258bf5db0954bf551c158466e7"}, + {file = "kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da802a19d6e15dffe4b0c24b38b3af68e6c1a68e6e1d8f30148c83864f3881db"}, + {file = "kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3aba7311af82e335dd1e36ffff68aaca609ca6290c2cb6d821a39aa075d8e3ff"}, + {file = "kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:763773d53f07244148ccac5b084da5adb90bfaee39c197554f01b286cf869228"}, + {file = "kiwisolver-1.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2270953c0d8cdab5d422bee7d2007f043473f9d2999631c86a223c9db56cbd16"}, + {file = "kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d099e745a512f7e3bbe7249ca835f4d357c586d78d79ae8f1dcd4d8adeb9bda9"}, + {file = "kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:74db36e14a7d1ce0986fa104f7d5637aea5c82ca6326ed0ec5694280942d1162"}, + {file = "kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:7e5bab140c309cb3a6ce373a9e71eb7e4873c70c2dda01df6820474f9889d6d4"}, + {file = "kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:0f114aa76dc1b8f636d077979c0ac22e7cd8f3493abbab152f20eb8d3cda71f3"}, + {file = "kiwisolver-1.4.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:88a2df29d4724b9237fc0c6eaf2a1adae0cdc0b3e9f4d8e7dc54b16812d2d81a"}, + {file = "kiwisolver-1.4.5-cp312-cp312-win32.whl", hash = "sha256:72d40b33e834371fd330fb1472ca19d9b8327acb79a5821d4008391db8e29f20"}, + {file = "kiwisolver-1.4.5-cp312-cp312-win_amd64.whl", hash = "sha256:2c5674c4e74d939b9d91dda0fae10597ac7521768fec9e399c70a1f27e2ea2d9"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:3a2b053a0ab7a3960c98725cfb0bf5b48ba82f64ec95fe06f1d06c99b552e130"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3cd32d6c13807e5c66a7cbb79f90b553642f296ae4518a60d8d76243b0ad2898"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:59ec7b7c7e1a61061850d53aaf8e93db63dce0c936db1fda2658b70e4a1be709"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:da4cfb373035def307905d05041c1d06d8936452fe89d464743ae7fb8371078b"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2400873bccc260b6ae184b2b8a4fec0e4082d30648eadb7c3d9a13405d861e89"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:1b04139c4236a0f3aff534479b58f6f849a8b351e1314826c2d230849ed48985"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:4e66e81a5779b65ac21764c295087de82235597a2293d18d943f8e9e32746265"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:7931d8f1f67c4be9ba1dd9c451fb0eeca1a25b89e4d3f89e828fe12a519b782a"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:b3f7e75f3015df442238cca659f8baa5f42ce2a8582727981cbfa15fee0ee205"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:bbf1d63eef84b2e8c89011b7f2235b1e0bf7dacc11cac9431fc6468e99ac77fb"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:4c380469bd3f970ef677bf2bcba2b6b0b4d5c75e7a020fb863ef75084efad66f"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-win32.whl", hash = "sha256:9408acf3270c4b6baad483865191e3e582b638b1654a007c62e3efe96f09a9a3"}, + {file = "kiwisolver-1.4.5-cp37-cp37m-win_amd64.whl", hash = "sha256:5b94529f9b2591b7af5f3e0e730a4e0a41ea174af35a4fd067775f9bdfeee01a"}, + {file = "kiwisolver-1.4.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:11c7de8f692fc99816e8ac50d1d1aef4f75126eefc33ac79aac02c099fd3db71"}, + {file = "kiwisolver-1.4.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:53abb58632235cd154176ced1ae8f0d29a6657aa1aa9decf50b899b755bc2b93"}, + {file = "kiwisolver-1.4.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:88b9f257ca61b838b6f8094a62418421f87ac2a1069f7e896c36a7d86b5d4c29"}, + {file = "kiwisolver-1.4.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3195782b26fc03aa9c6913d5bad5aeb864bdc372924c093b0f1cebad603dd712"}, + {file = "kiwisolver-1.4.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fc579bf0f502e54926519451b920e875f433aceb4624a3646b3252b5caa9e0b6"}, + {file = "kiwisolver-1.4.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5a580c91d686376f0f7c295357595c5a026e6cbc3d77b7c36e290201e7c11ecb"}, + {file = "kiwisolver-1.4.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cfe6ab8da05c01ba6fbea630377b5da2cd9bcbc6338510116b01c1bc939a2c18"}, + {file = "kiwisolver-1.4.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:d2e5a98f0ec99beb3c10e13b387f8db39106d53993f498b295f0c914328b1333"}, + {file = "kiwisolver-1.4.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:a51a263952b1429e429ff236d2f5a21c5125437861baeed77f5e1cc2d2c7c6da"}, + {file = "kiwisolver-1.4.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:3edd2fa14e68c9be82c5b16689e8d63d89fe927e56debd6e1dbce7a26a17f81b"}, + {file = "kiwisolver-1.4.5-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:74d1b44c6cfc897df648cc9fdaa09bc3e7679926e6f96df05775d4fb3946571c"}, + {file = "kiwisolver-1.4.5-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:76d9289ed3f7501012e05abb8358bbb129149dbd173f1f57a1bf1c22d19ab7cc"}, + {file = "kiwisolver-1.4.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:92dea1ffe3714fa8eb6a314d2b3c773208d865a0e0d35e713ec54eea08a66250"}, + {file = "kiwisolver-1.4.5-cp38-cp38-win32.whl", hash = "sha256:5c90ae8c8d32e472be041e76f9d2f2dbff4d0b0be8bd4041770eddb18cf49a4e"}, + {file = "kiwisolver-1.4.5-cp38-cp38-win_amd64.whl", hash = "sha256:c7940c1dc63eb37a67721b10d703247552416f719c4188c54e04334321351ced"}, + {file = "kiwisolver-1.4.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:9407b6a5f0d675e8a827ad8742e1d6b49d9c1a1da5d952a67d50ef5f4170b18d"}, + {file = "kiwisolver-1.4.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:15568384086b6df3c65353820a4473575dbad192e35010f622c6ce3eebd57af9"}, + {file = "kiwisolver-1.4.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0dc9db8e79f0036e8173c466d21ef18e1befc02de8bf8aa8dc0813a6dc8a7046"}, + {file = "kiwisolver-1.4.5-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:cdc8a402aaee9a798b50d8b827d7ecf75edc5fb35ea0f91f213ff927c15f4ff0"}, + {file = "kiwisolver-1.4.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6c3bd3cde54cafb87d74d8db50b909705c62b17c2099b8f2e25b461882e544ff"}, + {file = "kiwisolver-1.4.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:955e8513d07a283056b1396e9a57ceddbd272d9252c14f154d450d227606eb54"}, + {file = "kiwisolver-1.4.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:346f5343b9e3f00b8db8ba359350eb124b98c99efd0b408728ac6ebf38173958"}, + {file = "kiwisolver-1.4.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b9098e0049e88c6a24ff64545cdfc50807818ba6c1b739cae221bbbcbc58aad3"}, + {file = "kiwisolver-1.4.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:00bd361b903dc4bbf4eb165f24d1acbee754fce22ded24c3d56eec268658a5cf"}, + {file = "kiwisolver-1.4.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7b8b454bac16428b22560d0a1cf0a09875339cab69df61d7805bf48919415901"}, + {file = "kiwisolver-1.4.5-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:f1d072c2eb0ad60d4c183f3fb44ac6f73fb7a8f16a2694a91f988275cbf352f9"}, + {file = "kiwisolver-1.4.5-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:31a82d498054cac9f6d0b53d02bb85811185bcb477d4b60144f915f3b3126342"}, + {file = "kiwisolver-1.4.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6512cb89e334e4700febbffaaa52761b65b4f5a3cf33f960213d5656cea36a77"}, + {file = "kiwisolver-1.4.5-cp39-cp39-win32.whl", hash = "sha256:9db8ea4c388fdb0f780fe91346fd438657ea602d58348753d9fb265ce1bca67f"}, + {file = "kiwisolver-1.4.5-cp39-cp39-win_amd64.whl", hash = "sha256:59415f46a37f7f2efeec758353dd2eae1b07640d8ca0f0c42548ec4125492635"}, + {file = "kiwisolver-1.4.5-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:5c7b3b3a728dc6faf3fc372ef24f21d1e3cee2ac3e9596691d746e5a536de920"}, + {file = "kiwisolver-1.4.5-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:620ced262a86244e2be10a676b646f29c34537d0d9cc8eb26c08f53d98013390"}, + {file = "kiwisolver-1.4.5-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:378a214a1e3bbf5ac4a8708304318b4f890da88c9e6a07699c4ae7174c09a68d"}, + {file = "kiwisolver-1.4.5-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aaf7be1207676ac608a50cd08f102f6742dbfc70e8d60c4db1c6897f62f71523"}, + {file = "kiwisolver-1.4.5-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:ba55dce0a9b8ff59495ddd050a0225d58bd0983d09f87cfe2b6aec4f2c1234e4"}, + {file = "kiwisolver-1.4.5-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:fd32ea360bcbb92d28933fc05ed09bffcb1704ba3fc7942e81db0fd4f81a7892"}, + {file = "kiwisolver-1.4.5-pp38-pypy38_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5e7139af55d1688f8b960ee9ad5adafc4ac17c1c473fe07133ac092310d76544"}, + {file = "kiwisolver-1.4.5-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:dced8146011d2bc2e883f9bd68618b8247387f4bbec46d7392b3c3b032640126"}, + {file = "kiwisolver-1.4.5-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c9bf3325c47b11b2e51bca0824ea217c7cd84491d8ac4eefd1e409705ef092bd"}, + {file = "kiwisolver-1.4.5-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:5794cf59533bc3f1b1c821f7206a3617999db9fbefc345360aafe2e067514929"}, + {file = "kiwisolver-1.4.5-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e368f200bbc2e4f905b8e71eb38b3c04333bddaa6a2464a6355487b02bb7fb09"}, + {file = "kiwisolver-1.4.5-pp39-pypy39_pp73-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e5d706eba36b4c4d5bc6c6377bb6568098765e990cfc21ee16d13963fab7b3e7"}, + {file = "kiwisolver-1.4.5-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:85267bd1aa8880a9c88a8cb71e18d3d64d2751a790e6ca6c27b8ccc724bcd5ad"}, + {file = "kiwisolver-1.4.5-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:210ef2c3a1f03272649aff1ef992df2e724748918c4bc2d5a90352849eb40bea"}, + {file = "kiwisolver-1.4.5-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:11d011a7574eb3b82bcc9c1a1d35c1d7075677fdd15de527d91b46bd35e935ee"}, + {file = "kiwisolver-1.4.5.tar.gz", hash = "sha256:e57e563a57fb22a142da34f38acc2fc1a5c864bc29ca1517a88abc963e60d6ec"}, +] + [[package]] name = "markdown-it-py" version = "3.0.0" @@ -571,6 +827,54 @@ files = [ {file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"}, ] +[[package]] +name = "matplotlib" +version = "3.8.2" +description = "Python plotting package" +optional = false +python-versions = ">=3.9" +files = [ + {file = "matplotlib-3.8.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:09796f89fb71a0c0e1e2f4bdaf63fb2cefc84446bb963ecdeb40dfee7dfa98c7"}, + {file = "matplotlib-3.8.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6f9c6976748a25e8b9be51ea028df49b8e561eed7809146da7a47dbecebab367"}, + {file = "matplotlib-3.8.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b78e4f2cedf303869b782071b55fdde5987fda3038e9d09e58c91cc261b5ad18"}, + {file = "matplotlib-3.8.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e208f46cf6576a7624195aa047cb344a7f802e113bb1a06cfd4bee431de5e31"}, + {file = "matplotlib-3.8.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:46a569130ff53798ea5f50afce7406e91fdc471ca1e0e26ba976a8c734c9427a"}, + {file = "matplotlib-3.8.2-cp310-cp310-win_amd64.whl", hash = "sha256:830f00640c965c5b7f6bc32f0d4ce0c36dfe0379f7dd65b07a00c801713ec40a"}, + {file = "matplotlib-3.8.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:d86593ccf546223eb75a39b44c32788e6f6440d13cfc4750c1c15d0fcb850b63"}, + {file = "matplotlib-3.8.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:9a5430836811b7652991939012f43d2808a2db9b64ee240387e8c43e2e5578c8"}, + {file = "matplotlib-3.8.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9576723858a78751d5aacd2497b8aef29ffea6d1c95981505877f7ac28215c6"}, + {file = "matplotlib-3.8.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5ba9cbd8ac6cf422f3102622b20f8552d601bf8837e49a3afed188d560152788"}, + {file = "matplotlib-3.8.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:03f9d160a29e0b65c0790bb07f4f45d6a181b1ac33eb1bb0dd225986450148f0"}, + {file = "matplotlib-3.8.2-cp311-cp311-win_amd64.whl", hash = "sha256:3773002da767f0a9323ba1a9b9b5d00d6257dbd2a93107233167cfb581f64717"}, + {file = "matplotlib-3.8.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:4c318c1e95e2f5926fba326f68177dee364aa791d6df022ceb91b8221bd0a627"}, + {file = "matplotlib-3.8.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:091275d18d942cf1ee9609c830a1bc36610607d8223b1b981c37d5c9fc3e46a4"}, + {file = "matplotlib-3.8.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b0f3b8ea0e99e233a4bcc44590f01604840d833c280ebb8fe5554fd3e6cfe8d"}, + {file = "matplotlib-3.8.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7b1704a530395aaf73912be741c04d181f82ca78084fbd80bc737be04848331"}, + {file = "matplotlib-3.8.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:533b0e3b0c6768eef8cbe4b583731ce25a91ab54a22f830db2b031e83cca9213"}, + {file = "matplotlib-3.8.2-cp312-cp312-win_amd64.whl", hash = "sha256:0f4fc5d72b75e2c18e55eb32292659cf731d9d5b312a6eb036506304f4675630"}, + {file = "matplotlib-3.8.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:deaed9ad4da0b1aea77fe0aa0cebb9ef611c70b3177be936a95e5d01fa05094f"}, + {file = "matplotlib-3.8.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:172f4d0fbac3383d39164c6caafd3255ce6fa58f08fc392513a0b1d3b89c4f89"}, + {file = "matplotlib-3.8.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7d36c2209d9136cd8e02fab1c0ddc185ce79bc914c45054a9f514e44c787917"}, + {file = "matplotlib-3.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5864bdd7da445e4e5e011b199bb67168cdad10b501750367c496420f2ad00843"}, + {file = "matplotlib-3.8.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ef8345b48e95cee45ff25192ed1f4857273117917a4dcd48e3905619bcd9c9b8"}, + {file = "matplotlib-3.8.2-cp39-cp39-win_amd64.whl", hash = "sha256:7c48d9e221b637c017232e3760ed30b4e8d5dfd081daf327e829bf2a72c731b4"}, + {file = "matplotlib-3.8.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:aa11b3c6928a1e496c1a79917d51d4cd5d04f8a2e75f21df4949eeefdf697f4b"}, + {file = "matplotlib-3.8.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d1095fecf99eeb7384dabad4bf44b965f929a5f6079654b681193edf7169ec20"}, + {file = "matplotlib-3.8.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:bddfb1db89bfaa855912261c805bd0e10218923cc262b9159a49c29a7a1c1afa"}, + {file = "matplotlib-3.8.2.tar.gz", hash = "sha256:01a978b871b881ee76017152f1f1a0cbf6bd5f7b8ff8c96df0df1bd57d8755a1"}, +] + +[package.dependencies] +contourpy = ">=1.0.1" +cycler = ">=0.10" +fonttools = ">=4.22.0" +kiwisolver = ">=1.3.1" +numpy = ">=1.21,<2" +packaging = ">=20.0" +pillow = ">=8" +pyparsing = ">=2.3.1" +python-dateutil = ">=2.7" + [[package]] name = "mdurl" version = "0.1.2" @@ -620,69 +924,158 @@ setuptools = "*" [[package]] name = "numpy" -version = "1.25.2" +version = "1.26.2" description = "Fundamental package for array computing in Python" optional = false python-versions = ">=3.9" files = [ - {file = "numpy-1.25.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:db3ccc4e37a6873045580d413fe79b68e47a681af8db2e046f1dacfa11f86eb3"}, - {file = "numpy-1.25.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:90319e4f002795ccfc9050110bbbaa16c944b1c37c0baeea43c5fb881693ae1f"}, - {file = "numpy-1.25.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dfe4a913e29b418d096e696ddd422d8a5d13ffba4ea91f9f60440a3b759b0187"}, - {file = "numpy-1.25.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f08f2e037bba04e707eebf4bc934f1972a315c883a9e0ebfa8a7756eabf9e357"}, - {file = "numpy-1.25.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bec1e7213c7cb00d67093247f8c4db156fd03075f49876957dca4711306d39c9"}, - {file = "numpy-1.25.2-cp310-cp310-win32.whl", hash = "sha256:7dc869c0c75988e1c693d0e2d5b26034644399dd929bc049db55395b1379e044"}, - {file = "numpy-1.25.2-cp310-cp310-win_amd64.whl", hash = "sha256:834b386f2b8210dca38c71a6e0f4fd6922f7d3fcff935dbe3a570945acb1b545"}, - {file = "numpy-1.25.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c5462d19336db4560041517dbb7759c21d181a67cb01b36ca109b2ae37d32418"}, - {file = "numpy-1.25.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c5652ea24d33585ea39eb6a6a15dac87a1206a692719ff45d53c5282e66d4a8f"}, - {file = "numpy-1.25.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d60fbae8e0019865fc4784745814cff1c421df5afee233db6d88ab4f14655a2"}, - {file = "numpy-1.25.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:60e7f0f7f6d0eee8364b9a6304c2845b9c491ac706048c7e8cf47b83123b8dbf"}, - {file = "numpy-1.25.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:bb33d5a1cf360304754913a350edda36d5b8c5331a8237268c48f91253c3a364"}, - {file = "numpy-1.25.2-cp311-cp311-win32.whl", hash = "sha256:5883c06bb92f2e6c8181df7b39971a5fb436288db58b5a1c3967702d4278691d"}, - {file = "numpy-1.25.2-cp311-cp311-win_amd64.whl", hash = "sha256:5c97325a0ba6f9d041feb9390924614b60b99209a71a69c876f71052521d42a4"}, - {file = "numpy-1.25.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b79e513d7aac42ae918db3ad1341a015488530d0bb2a6abcbdd10a3a829ccfd3"}, - {file = "numpy-1.25.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:eb942bfb6f84df5ce05dbf4b46673ffed0d3da59f13635ea9b926af3deb76926"}, - {file = "numpy-1.25.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e0746410e73384e70d286f93abf2520035250aad8c5714240b0492a7302fdca"}, - {file = "numpy-1.25.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7806500e4f5bdd04095e849265e55de20d8cc4b661b038957354327f6d9b295"}, - {file = "numpy-1.25.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8b77775f4b7df768967a7c8b3567e309f617dd5e99aeb886fa14dc1a0791141f"}, - {file = "numpy-1.25.2-cp39-cp39-win32.whl", hash = "sha256:2792d23d62ec51e50ce4d4b7d73de8f67a2fd3ea710dcbc8563a51a03fb07b01"}, - {file = "numpy-1.25.2-cp39-cp39-win_amd64.whl", hash = "sha256:76b4115d42a7dfc5d485d358728cdd8719be33cc5ec6ec08632a5d6fca2ed380"}, - {file = "numpy-1.25.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:1a1329e26f46230bf77b02cc19e900db9b52f398d6722ca853349a782d4cff55"}, - {file = "numpy-1.25.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c3abc71e8b6edba80a01a52e66d83c5d14433cbcd26a40c329ec7ed09f37901"}, - {file = "numpy-1.25.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:1b9735c27cea5d995496f46a8b1cd7b408b3f34b6d50459d9ac8fe3a20cc17bf"}, - {file = "numpy-1.25.2.tar.gz", hash = "sha256:fd608e19c8d7c55021dffd43bfe5492fab8cc105cc8986f813f8c3c048b38760"}, + {file = "numpy-1.26.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:3703fc9258a4a122d17043e57b35e5ef1c5a5837c3db8be396c82e04c1cf9b0f"}, + {file = "numpy-1.26.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cc392fdcbd21d4be6ae1bb4475a03ce3b025cd49a9be5345d76d7585aea69440"}, + {file = "numpy-1.26.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:36340109af8da8805d8851ef1d74761b3b88e81a9bd80b290bbfed61bd2b4f75"}, + {file = "numpy-1.26.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bcc008217145b3d77abd3e4d5ef586e3bdfba8fe17940769f8aa09b99e856c00"}, + {file = "numpy-1.26.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:3ced40d4e9e18242f70dd02d739e44698df3dcb010d31f495ff00a31ef6014fe"}, + {file = "numpy-1.26.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b272d4cecc32c9e19911891446b72e986157e6a1809b7b56518b4f3755267523"}, + {file = "numpy-1.26.2-cp310-cp310-win32.whl", hash = "sha256:22f8fc02fdbc829e7a8c578dd8d2e15a9074b630d4da29cda483337e300e3ee9"}, + {file = "numpy-1.26.2-cp310-cp310-win_amd64.whl", hash = "sha256:26c9d33f8e8b846d5a65dd068c14e04018d05533b348d9eaeef6c1bd787f9919"}, + {file = "numpy-1.26.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b96e7b9c624ef3ae2ae0e04fa9b460f6b9f17ad8b4bec6d7756510f1f6c0c841"}, + {file = "numpy-1.26.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:aa18428111fb9a591d7a9cc1b48150097ba6a7e8299fb56bdf574df650e7d1f1"}, + {file = "numpy-1.26.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06fa1ed84aa60ea6ef9f91ba57b5ed963c3729534e6e54055fc151fad0423f0a"}, + {file = "numpy-1.26.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:96ca5482c3dbdd051bcd1fce8034603d6ebfc125a7bd59f55b40d8f5d246832b"}, + {file = "numpy-1.26.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:854ab91a2906ef29dc3925a064fcd365c7b4da743f84b123002f6139bcb3f8a7"}, + {file = "numpy-1.26.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f43740ab089277d403aa07567be138fc2a89d4d9892d113b76153e0e412409f8"}, + {file = "numpy-1.26.2-cp311-cp311-win32.whl", hash = "sha256:a2bbc29fcb1771cd7b7425f98b05307776a6baf43035d3b80c4b0f29e9545186"}, + {file = "numpy-1.26.2-cp311-cp311-win_amd64.whl", hash = "sha256:2b3fca8a5b00184828d12b073af4d0fc5fdd94b1632c2477526f6bd7842d700d"}, + {file = "numpy-1.26.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:a4cd6ed4a339c21f1d1b0fdf13426cb3b284555c27ac2f156dfdaaa7e16bfab0"}, + {file = "numpy-1.26.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5d5244aabd6ed7f312268b9247be47343a654ebea52a60f002dc70c769048e75"}, + {file = "numpy-1.26.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a3cdb4d9c70e6b8c0814239ead47da00934666f668426fc6e94cce869e13fd7"}, + {file = "numpy-1.26.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa317b2325f7aa0a9471663e6093c210cb2ae9c0ad824732b307d2c51983d5b6"}, + {file = "numpy-1.26.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:174a8880739c16c925799c018f3f55b8130c1f7c8e75ab0a6fa9d41cab092fd6"}, + {file = "numpy-1.26.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f79b231bf5c16b1f39c7f4875e1ded36abee1591e98742b05d8a0fb55d8a3eec"}, + {file = "numpy-1.26.2-cp312-cp312-win32.whl", hash = "sha256:4a06263321dfd3598cacb252f51e521a8cb4b6df471bb12a7ee5cbab20ea9167"}, + {file = "numpy-1.26.2-cp312-cp312-win_amd64.whl", hash = "sha256:b04f5dc6b3efdaab541f7857351aac359e6ae3c126e2edb376929bd3b7f92d7e"}, + {file = "numpy-1.26.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4eb8df4bf8d3d90d091e0146f6c28492b0be84da3e409ebef54349f71ed271ef"}, + {file = "numpy-1.26.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1a13860fdcd95de7cf58bd6f8bc5a5ef81c0b0625eb2c9a783948847abbef2c2"}, + {file = "numpy-1.26.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64308ebc366a8ed63fd0bf426b6a9468060962f1a4339ab1074c228fa6ade8e3"}, + {file = "numpy-1.26.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baf8aab04a2c0e859da118f0b38617e5ee65d75b83795055fb66c0d5e9e9b818"}, + {file = "numpy-1.26.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d73a3abcac238250091b11caef9ad12413dab01669511779bc9b29261dd50210"}, + {file = "numpy-1.26.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b361d369fc7e5e1714cf827b731ca32bff8d411212fccd29ad98ad622449cc36"}, + {file = "numpy-1.26.2-cp39-cp39-win32.whl", hash = "sha256:bd3f0091e845164a20bd5a326860c840fe2af79fa12e0469a12768a3ec578d80"}, + {file = "numpy-1.26.2-cp39-cp39-win_amd64.whl", hash = "sha256:2beef57fb031dcc0dc8fa4fe297a742027b954949cabb52a2a376c144e5e6060"}, + {file = "numpy-1.26.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:1cc3d5029a30fb5f06704ad6b23b35e11309491c999838c31f124fee32107c79"}, + {file = "numpy-1.26.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94cc3c222bb9fb5a12e334d0479b97bb2df446fbe622b470928f5284ffca3f8d"}, + {file = "numpy-1.26.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:fe6b44fb8fcdf7eda4ef4461b97b3f63c466b27ab151bec2366db8b197387841"}, + {file = "numpy-1.26.2.tar.gz", hash = "sha256:f65738447676ab5777f11e6bbbdb8ce11b785e105f690bc45966574816b6d3ea"}, ] [[package]] name = "packaging" -version = "23.1" +version = "23.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.7" files = [ - {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"}, - {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, + {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, + {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, +] + +[[package]] +name = "parse" +version = "1.20.0" +description = "parse() is the opposite of format()" +optional = false +python-versions = "*" +files = [ + {file = "parse-1.20.0-py2.py3-none-any.whl", hash = "sha256:5e171b001452fa9f004c5a58a93525175468daf69b493e9fa915347ed7ff6968"}, + {file = "parse-1.20.0.tar.gz", hash = "sha256:bd28bae37714b45d5894d77160a16e2be36b64a3b618c81168b3684676aa498b"}, ] [[package]] name = "pathspec" -version = "0.11.2" +version = "0.12.1" description = "Utility library for gitignore style pattern matching of file paths." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" +files = [ + {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, + {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, +] + +[[package]] +name = "pillow" +version = "10.1.0" +description = "Python Imaging Library (Fork)" +optional = false +python-versions = ">=3.8" files = [ - {file = "pathspec-0.11.2-py3-none-any.whl", hash = "sha256:1d6ed233af05e679efb96b1851550ea95bbb64b7c490b0f5aa52996c11e92a20"}, - {file = "pathspec-0.11.2.tar.gz", hash = "sha256:e0d8d0ac2f12da61956eb2306b69f9469b42f4deb0f3cb6ed47b9cce9996ced3"}, + {file = "Pillow-10.1.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:1ab05f3db77e98f93964697c8efc49c7954b08dd61cff526b7f2531a22410106"}, + {file = "Pillow-10.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6932a7652464746fcb484f7fc3618e6503d2066d853f68a4bd97193a3996e273"}, + {file = "Pillow-10.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5f63b5a68daedc54c7c3464508d8c12075e56dcfbd42f8c1bf40169061ae666"}, + {file = "Pillow-10.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0949b55eb607898e28eaccb525ab104b2d86542a85c74baf3a6dc24002edec2"}, + {file = "Pillow-10.1.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:ae88931f93214777c7a3aa0a8f92a683f83ecde27f65a45f95f22d289a69e593"}, + {file = "Pillow-10.1.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:b0eb01ca85b2361b09480784a7931fc648ed8b7836f01fb9241141b968feb1db"}, + {file = "Pillow-10.1.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d27b5997bdd2eb9fb199982bb7eb6164db0426904020dc38c10203187ae2ff2f"}, + {file = "Pillow-10.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7df5608bc38bd37ef585ae9c38c9cd46d7c81498f086915b0f97255ea60c2818"}, + {file = "Pillow-10.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:41f67248d92a5e0a2076d3517d8d4b1e41a97e2df10eb8f93106c89107f38b57"}, + {file = "Pillow-10.1.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:1fb29c07478e6c06a46b867e43b0bcdb241b44cc52be9bc25ce5944eed4648e7"}, + {file = "Pillow-10.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2cdc65a46e74514ce742c2013cd4a2d12e8553e3a2563c64879f7c7e4d28bce7"}, + {file = "Pillow-10.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50d08cd0a2ecd2a8657bd3d82c71efd5a58edb04d9308185d66c3a5a5bed9610"}, + {file = "Pillow-10.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:062a1610e3bc258bff2328ec43f34244fcec972ee0717200cb1425214fe5b839"}, + {file = "Pillow-10.1.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:61f1a9d247317fa08a308daaa8ee7b3f760ab1809ca2da14ecc88ae4257d6172"}, + {file = "Pillow-10.1.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:a646e48de237d860c36e0db37ecaecaa3619e6f3e9d5319e527ccbc8151df061"}, + {file = "Pillow-10.1.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:47e5bf85b80abc03be7455c95b6d6e4896a62f6541c1f2ce77a7d2bb832af262"}, + {file = "Pillow-10.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a92386125e9ee90381c3369f57a2a50fa9e6aa8b1cf1d9c4b200d41a7dd8e992"}, + {file = "Pillow-10.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:0f7c276c05a9767e877a0b4c5050c8bee6a6d960d7f0c11ebda6b99746068c2a"}, + {file = "Pillow-10.1.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:a89b8312d51715b510a4fe9fc13686283f376cfd5abca8cd1c65e4c76e21081b"}, + {file = "Pillow-10.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:00f438bb841382b15d7deb9a05cc946ee0f2c352653c7aa659e75e592f6fa17d"}, + {file = "Pillow-10.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3d929a19f5469b3f4df33a3df2983db070ebb2088a1e145e18facbc28cae5b27"}, + {file = "Pillow-10.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9a92109192b360634a4489c0c756364c0c3a2992906752165ecb50544c251312"}, + {file = "Pillow-10.1.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:0248f86b3ea061e67817c47ecbe82c23f9dd5d5226200eb9090b3873d3ca32de"}, + {file = "Pillow-10.1.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:9882a7451c680c12f232a422730f986a1fcd808da0fd428f08b671237237d651"}, + {file = "Pillow-10.1.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:1c3ac5423c8c1da5928aa12c6e258921956757d976405e9467c5f39d1d577a4b"}, + {file = "Pillow-10.1.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:806abdd8249ba3953c33742506fe414880bad78ac25cc9a9b1c6ae97bedd573f"}, + {file = "Pillow-10.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:eaed6977fa73408b7b8a24e8b14e59e1668cfc0f4c40193ea7ced8e210adf996"}, + {file = "Pillow-10.1.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:fe1e26e1ffc38be097f0ba1d0d07fcade2bcfd1d023cda5b29935ae8052bd793"}, + {file = "Pillow-10.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7a7e3daa202beb61821c06d2517428e8e7c1aab08943e92ec9e5755c2fc9ba5e"}, + {file = "Pillow-10.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24fadc71218ad2b8ffe437b54876c9382b4a29e030a05a9879f615091f42ffc2"}, + {file = "Pillow-10.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa1d323703cfdac2036af05191b969b910d8f115cf53093125e4058f62012c9a"}, + {file = "Pillow-10.1.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:912e3812a1dbbc834da2b32299b124b5ddcb664ed354916fd1ed6f193f0e2d01"}, + {file = "Pillow-10.1.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:7dbaa3c7de82ef37e7708521be41db5565004258ca76945ad74a8e998c30af8d"}, + {file = "Pillow-10.1.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9d7bc666bd8c5a4225e7ac71f2f9d12466ec555e89092728ea0f5c0c2422ea80"}, + {file = "Pillow-10.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:baada14941c83079bf84c037e2d8b7506ce201e92e3d2fa0d1303507a8538212"}, + {file = "Pillow-10.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:2ef6721c97894a7aa77723740a09547197533146fba8355e86d6d9a4a1056b14"}, + {file = "Pillow-10.1.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:0a026c188be3b443916179f5d04548092e253beb0c3e2ee0a4e2cdad72f66099"}, + {file = "Pillow-10.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:04f6f6149f266a100374ca3cc368b67fb27c4af9f1cc8cb6306d849dcdf12616"}, + {file = "Pillow-10.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb40c011447712d2e19cc261c82655f75f32cb724788df315ed992a4d65696bb"}, + {file = "Pillow-10.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1a8413794b4ad9719346cd9306118450b7b00d9a15846451549314a58ac42219"}, + {file = "Pillow-10.1.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:c9aeea7b63edb7884b031a35305629a7593272b54f429a9869a4f63a1bf04c34"}, + {file = "Pillow-10.1.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:b4005fee46ed9be0b8fb42be0c20e79411533d1fd58edabebc0dd24626882cfd"}, + {file = "Pillow-10.1.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4d0152565c6aa6ebbfb1e5d8624140a440f2b99bf7afaafbdbf6430426497f28"}, + {file = "Pillow-10.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d921bc90b1defa55c9917ca6b6b71430e4286fc9e44c55ead78ca1a9f9eba5f2"}, + {file = "Pillow-10.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:cfe96560c6ce2f4c07d6647af2d0f3c54cc33289894ebd88cfbb3bcd5391e256"}, + {file = "Pillow-10.1.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:937bdc5a7f5343d1c97dc98149a0be7eb9704e937fe3dc7140e229ae4fc572a7"}, + {file = "Pillow-10.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1c25762197144e211efb5f4e8ad656f36c8d214d390585d1d21281f46d556ba"}, + {file = "Pillow-10.1.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:afc8eef765d948543a4775f00b7b8c079b3321d6b675dde0d02afa2ee23000b4"}, + {file = "Pillow-10.1.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:883f216eac8712b83a63f41b76ddfb7b2afab1b74abbb413c5df6680f071a6b9"}, + {file = "Pillow-10.1.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:b920e4d028f6442bea9a75b7491c063f0b9a3972520731ed26c83e254302eb1e"}, + {file = "Pillow-10.1.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c41d960babf951e01a49c9746f92c5a7e0d939d1652d7ba30f6b3090f27e412"}, + {file = "Pillow-10.1.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1fafabe50a6977ac70dfe829b2d5735fd54e190ab55259ec8aea4aaea412fa0b"}, + {file = "Pillow-10.1.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:3b834f4b16173e5b92ab6566f0473bfb09f939ba14b23b8da1f54fa63e4b623f"}, + {file = "Pillow-10.1.0.tar.gz", hash = "sha256:e6bf8de6c36ed96c86ea3b6e1d5273c53f46ef518a062464cd7ef5dd2cf92e38"}, ] +[package.extras] +docs = ["furo", "olefile", "sphinx (>=2.4)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinx-removed-in", "sphinxext-opengraph"] +tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"] + [[package]] name = "platformdirs" -version = "3.10.0" +version = "4.1.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "platformdirs-3.10.0-py3-none-any.whl", hash = "sha256:d7c24979f292f916dc9cbf8648319032f551ea8c49a4c9bf2fb556a02070ec1d"}, - {file = "platformdirs-3.10.0.tar.gz", hash = "sha256:b45696dab2d7cc691a3226759c0d3b00c47c8b6e293d96f6436f733303f77f6d"}, + {file = "platformdirs-4.1.0-py3-none-any.whl", hash = "sha256:11c8f37bcca40db96d8144522d925583bdb7a31f7b0e37e3ed4318400a8e2380"}, + {file = "platformdirs-4.1.0.tar.gz", hash = "sha256:906d548203468492d432bcb294d4bc2fff751bf84971fbb2c10918cc206ee420"}, ] [package.extras] @@ -691,13 +1084,13 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-co [[package]] name = "pluggy" -version = "1.2.0" +version = "1.3.0" description = "plugin and hook calling mechanisms for python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pluggy-1.2.0-py3-none-any.whl", hash = "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849"}, - {file = "pluggy-1.2.0.tar.gz", hash = "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"}, + {file = "pluggy-1.3.0-py3-none-any.whl", hash = "sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7"}, + {file = "pluggy-1.3.0.tar.gz", hash = "sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12"}, ] [package.extras] @@ -706,13 +1099,13 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" -version = "3.3.3" +version = "3.6.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "pre_commit-3.3.3-py2.py3-none-any.whl", hash = "sha256:10badb65d6a38caff29703362271d7dca483d01da88f9d7e05d0b97171c136cb"}, - {file = "pre_commit-3.3.3.tar.gz", hash = "sha256:a2256f489cd913d575c145132ae196fe335da32d91a8294b7afe6622335dd023"}, + {file = "pre_commit-3.6.0-py2.py3-none-any.whl", hash = "sha256:c255039ef399049a5544b6ce13d135caba8f2c28c3b4033277a788f434308376"}, + {file = "pre_commit-3.6.0.tar.gz", hash = "sha256:d30bad9abf165f7785c15a21a1f46da7d0677cb00ee7ff4c579fd38922efe15d"}, ] [package.dependencies] @@ -724,45 +1117,60 @@ virtualenv = ">=20.10.0" [[package]] name = "pygments" -version = "2.16.1" +version = "2.17.2" description = "Pygments is a syntax highlighting package written in Python." optional = false python-versions = ">=3.7" files = [ - {file = "Pygments-2.16.1-py3-none-any.whl", hash = "sha256:13fc09fa63bc8d8671a6d247e1eb303c4b343eaee81d861f3404db2935653692"}, - {file = "Pygments-2.16.1.tar.gz", hash = "sha256:1daff0494820c69bc8941e407aa20f577374ee88364ee10a98fdbe0aece96e29"}, + {file = "pygments-2.17.2-py3-none-any.whl", hash = "sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c"}, + {file = "pygments-2.17.2.tar.gz", hash = "sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"}, ] [package.extras] plugins = ["importlib-metadata"] +windows-terminal = ["colorama (>=0.4.6)"] + +[[package]] +name = "pyparsing" +version = "3.1.1" +description = "pyparsing module - Classes and methods to define and execute parsing grammars" +optional = false +python-versions = ">=3.6.8" +files = [ + {file = "pyparsing-3.1.1-py3-none-any.whl", hash = "sha256:32c7c0b711493c72ff18a981d24f28aaf9c1fb7ed5e9667c9e84e3db623bdbfb"}, + {file = "pyparsing-3.1.1.tar.gz", hash = "sha256:ede28a1a32462f5a9705e07aea48001a08f7cf81a021585011deba701581a0db"}, +] + +[package.extras] +diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pyproject-api" -version = "1.5.4" +version = "1.6.1" description = "API to interact with the python pyproject.toml based projects" optional = false python-versions = ">=3.8" files = [ - {file = "pyproject_api-1.5.4-py3-none-any.whl", hash = "sha256:ca462d457880340ceada078678a296ac500061cef77a040e1143004470ab0046"}, - {file = "pyproject_api-1.5.4.tar.gz", hash = "sha256:8d41f3f0c04f0f6a830c27b1c425fa66699715ae06d8a054a1c5eeaaf8bfb145"}, + {file = "pyproject_api-1.6.1-py3-none-any.whl", hash = "sha256:4c0116d60476b0786c88692cf4e325a9814965e2469c5998b830bba16b183675"}, + {file = "pyproject_api-1.6.1.tar.gz", hash = "sha256:1817dc018adc0d1ff9ca1ed8c60e1623d5aaca40814b953af14a9cf9a5cae538"}, ] [package.dependencies] packaging = ">=23.1" [package.extras] -docs = ["furo (>=2023.7.26)", "sphinx (<7.2)", "sphinx-autodoc-typehints (>=1.24)"] -testing = ["covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)", "setuptools (>=68)", "wheel (>=0.41.1)"] +docs = ["furo (>=2023.8.19)", "sphinx (<7.2)", "sphinx-autodoc-typehints (>=1.24)"] +testing = ["covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)", "setuptools (>=68.1.2)", "wheel (>=0.41.2)"] [[package]] name = "pytest" -version = "7.4.0" +version = "7.4.3" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.7" files = [ - {file = "pytest-7.4.0-py3-none-any.whl", hash = "sha256:78bf16451a2eb8c7a2ea98e32dc119fd2aa758f1d5d66dbf0a59d69a3969df32"}, - {file = "pytest-7.4.0.tar.gz", hash = "sha256:b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a"}, + {file = "pytest-7.4.3-py3-none-any.whl", hash = "sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac"}, + {file = "pytest-7.4.3.tar.gz", hash = "sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5"}, ] [package.dependencies] @@ -794,13 +1202,13 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale [[package]] name = "pytest-xdist" -version = "3.3.1" +version = "3.5.0" description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" optional = false python-versions = ">=3.7" files = [ - {file = "pytest-xdist-3.3.1.tar.gz", hash = "sha256:d5ee0520eb1b7bcca50a60a518ab7a7707992812c578198f8b44fdfac78e8c93"}, - {file = "pytest_xdist-3.3.1-py3-none-any.whl", hash = "sha256:ff9daa7793569e6a68544850fd3927cd257cc03a7ef76c95e86915355e82b5f2"}, + {file = "pytest-xdist-3.5.0.tar.gz", hash = "sha256:cbb36f3d67e0c478baa57fa4edc8843887e0f6cfc42d677530a36d7472b32d8a"}, + {file = "pytest_xdist-3.5.0-py3-none-any.whl", hash = "sha256:d075629c7e00b611df89f490a5063944bee7a4362a5ff11c7cc7824a03dfce24"}, ] [package.dependencies] @@ -940,13 +1348,13 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "rich" -version = "13.5.2" +version = "13.7.0" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = false python-versions = ">=3.7.0" files = [ - {file = "rich-13.5.2-py3-none-any.whl", hash = "sha256:146a90b3b6b47cac4a73c12866a499e9817426423f57c5a66949c086191a8808"}, - {file = "rich-13.5.2.tar.gz", hash = "sha256:fb9d6c0a0f643c99eed3875b5377a184132ba9be4d61516a55273d3554d75a39"}, + {file = "rich-13.7.0-py3-none-any.whl", hash = "sha256:6da14c108c4866ee9520bbffa71f6fe3962e193b7da68720583850cd4548e235"}, + {file = "rich-13.7.0.tar.gz", hash = "sha256:5cb5123b5cf9ee70584244246816e9114227e0b98ad9176eede6ad54bf5403fa"}, ] [package.dependencies] @@ -958,19 +1366,19 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"] [[package]] name = "setuptools" -version = "68.1.2" +version = "69.0.2" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-68.1.2-py3-none-any.whl", hash = "sha256:3d8083eed2d13afc9426f227b24fd1659489ec107c0e86cec2ffdde5c92e790b"}, - {file = "setuptools-68.1.2.tar.gz", hash = "sha256:3d4dfa6d95f1b101d695a6160a7626e15583af71a5f52176efa5d39a054d475d"}, + {file = "setuptools-69.0.2-py3-none-any.whl", hash = "sha256:1e8fdff6797d3865f37397be788a4e3cba233608e9b509382a2777d25ebde7f2"}, + {file = "setuptools-69.0.2.tar.gz", hash = "sha256:735896e78a4742605974de002ac60562d286fa8051a7e2299445e8e8fbb01aa6"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5,<=7.1.2)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] +testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.1)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "six" @@ -985,13 +1393,13 @@ files = [ [[package]] name = "soupsieve" -version = "2.4.1" +version = "2.5" description = "A modern CSS selector implementation for Beautiful Soup." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "soupsieve-2.4.1-py3-none-any.whl", hash = "sha256:1c1bfee6819544a3447586c889157365a27e10d88cde3ad3da0cf0ddf646feb8"}, - {file = "soupsieve-2.4.1.tar.gz", hash = "sha256:89d12b2d5dfcd2c9e8c22326da9d9aa9cb3dfab0a83a024f05704076ee8d35ea"}, + {file = "soupsieve-2.5-py3-none-any.whl", hash = "sha256:eaa337ff55a1579b6549dc679565eac1e3d000563bcb1c8ab0d0fefbc0c2cdc7"}, + {file = "soupsieve-2.5.tar.gz", hash = "sha256:5663d5a7b3bfaeee0bc4372e7fc48f9cff4940b3eec54a6451cc5299f1097690"}, ] [[package]] @@ -1007,29 +1415,29 @@ files = [ [[package]] name = "tox" -version = "4.10.0" +version = "4.11.4" description = "tox is a generic virtualenv management and test command line tool" optional = false python-versions = ">=3.8" files = [ - {file = "tox-4.10.0-py3-none-any.whl", hash = "sha256:e4a1b1438955a6da548d69a52350054350cf6a126658c20943261c48ed6d4c92"}, - {file = "tox-4.10.0.tar.gz", hash = "sha256:e041b2165375be690aca0ec4d96360c6906451380520e4665bf274f66112be35"}, + {file = "tox-4.11.4-py3-none-any.whl", hash = "sha256:2adb83d68f27116812b69aa36676a8d6a52249cb0d173649de0e7d0c2e3e7229"}, + {file = "tox-4.11.4.tar.gz", hash = "sha256:73a7240778fabf305aeb05ab8ea26e575e042ab5a18d71d0ed13e343a51d6ce1"}, ] [package.dependencies] cachetools = ">=5.3.1" chardet = ">=5.2" colorama = ">=0.4.6" -filelock = ">=3.12.2" +filelock = ">=3.12.3" packaging = ">=23.1" platformdirs = ">=3.10" -pluggy = ">=1.2" -pyproject-api = ">=1.5.3" +pluggy = ">=1.3" +pyproject-api = ">=1.6.1" virtualenv = ">=20.24.3" [package.extras] -docs = ["furo (>=2023.7.26)", "sphinx (>=7.1.2)", "sphinx-argparse-cli (>=1.11.1)", "sphinx-autodoc-typehints (>=1.24)", "sphinx-copybutton (>=0.5.2)", "sphinx-inline-tabs (>=2023.4.21)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] -testing = ["build[virtualenv] (>=0.10)", "covdefaults (>=2.3)", "detect-test-pollution (>=1.1.1)", "devpi-process (>=0.3.1)", "diff-cover (>=7.7)", "distlib (>=0.3.7)", "flaky (>=3.7)", "hatch-vcs (>=0.3)", "hatchling (>=1.18)", "psutil (>=5.9.5)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)", "pytest-xdist (>=3.3.1)", "re-assert (>=1.1)", "time-machine (>=2.12)", "wheel (>=0.41.1)"] +docs = ["furo (>=2023.8.19)", "sphinx (>=7.2.4)", "sphinx-argparse-cli (>=1.11.1)", "sphinx-autodoc-typehints (>=1.24)", "sphinx-copybutton (>=0.5.2)", "sphinx-inline-tabs (>=2023.4.21)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] +testing = ["build[virtualenv] (>=0.10)", "covdefaults (>=2.3)", "detect-test-pollution (>=1.1.1)", "devpi-process (>=1)", "diff-cover (>=7.7)", "distlib (>=0.3.7)", "flaky (>=3.7)", "hatch-vcs (>=0.3)", "hatchling (>=1.18)", "psutil (>=5.9.5)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)", "pytest-xdist (>=3.3.1)", "re-assert (>=1.1)", "time-machine (>=2.12)", "wheel (>=0.41.2)"] [[package]] name = "tqdm" @@ -1051,44 +1459,54 @@ notebook = ["ipywidgets (>=6)"] slack = ["slack-sdk"] telegram = ["requests"] +[[package]] +name = "types-python-dateutil" +version = "2.8.19.14" +description = "Typing stubs for python-dateutil" +optional = false +python-versions = "*" +files = [ + {file = "types-python-dateutil-2.8.19.14.tar.gz", hash = "sha256:1f4f10ac98bb8b16ade9dbee3518d9ace017821d94b057a425b069f834737f4b"}, + {file = "types_python_dateutil-2.8.19.14-py3-none-any.whl", hash = "sha256:f977b8de27787639986b4e28963263fd0e5158942b3ecef91b9335c130cb1ce9"}, +] + [[package]] name = "urllib3" -version = "2.0.4" +version = "2.1.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "urllib3-2.0.4-py3-none-any.whl", hash = "sha256:de7df1803967d2c2a98e4b11bb7d6bd9210474c46e8a0401514e3a42a75ebde4"}, - {file = "urllib3-2.0.4.tar.gz", hash = "sha256:8d22f86aae8ef5e410d4f539fde9ce6b2113a001bb4d189e0aed70642d602b11"}, + {file = "urllib3-2.1.0-py3-none-any.whl", hash = "sha256:55901e917a5896a349ff771be919f8bd99aff50b79fe58fec595eb37bbc56bb3"}, + {file = "urllib3-2.1.0.tar.gz", hash = "sha256:df7aa8afb0148fa78488e7899b2c59b5f4ffcfa82e6c54ccb9dd37c1d7b52d54"}, ] [package.extras] brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] [[package]] name = "virtualenv" -version = "20.24.3" +version = "20.25.0" description = "Virtual Python Environment builder" optional = false python-versions = ">=3.7" files = [ - {file = "virtualenv-20.24.3-py3-none-any.whl", hash = "sha256:95a6e9398b4967fbcb5fef2acec5efaf9aa4972049d9ae41f95e0972a683fd02"}, - {file = "virtualenv-20.24.3.tar.gz", hash = "sha256:e5c3b4ce817b0b328af041506a2a299418c98747c4b1e68cb7527e74ced23efc"}, + {file = "virtualenv-20.25.0-py3-none-any.whl", hash = "sha256:4238949c5ffe6876362d9c0180fc6c3a824a7b12b80604eeb8085f2ed7460de3"}, + {file = "virtualenv-20.25.0.tar.gz", hash = "sha256:bf51c0d9c7dd63ea8e44086fa1e4fb1093a31e963b86959257378aef020e1f1b"}, ] [package.dependencies] distlib = ">=0.3.7,<1" filelock = ">=3.12.2,<4" -platformdirs = ">=3.9.1,<4" +platformdirs = ">=3.9.1,<5" [package.extras] -docs = ["furo (>=2023.5.20)", "proselint (>=0.13)", "sphinx (>=7.0.1)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] +docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"] [metadata] lock-version = "2.0" -python-versions = "^3.11" -content-hash = "55b2e30a40c78c6fbb5ce945d91ad5258133073ae88bf1c9fa4234466f030e2b" +python-versions = "^3.12" +content-hash = "2b98e032334ea83224169fb7614efa20637723d82f89ff8596d5a53e08d6d5c1" diff --git a/pyproject.toml b/pyproject.toml index 1ed5b650..9b3f1923 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,37 +1,55 @@ [tool.poetry] -name = "adventofcode2016" +name = "adventofcode" version = "0.1.0" -description = "Advent of Code - 2016" +description = "Advent of Code - Roel Adriaans" authors = ["Roel Adriaans "] license = "MIT" +packages = [ + { include = "adventofcode", from="src" }, + { include = "adventofcode2016", from="src" }, + { include = "adventofcode2018", from="src" }, + { include = "adventofcode2019", from="src" }, + { include = "adventofcode2020", from="src" }, + { include = "adventofcode2021", from="src" }, + { include = "adventofcode2022", from="src" }, + { include = "adventofcode2023", from="src" } +] + [tool.poetry.dependencies] -python = "^3.11" -anytree = "^2.9.0" +python = "^3.12" +anytree = "^2.12.1" click = "^8.1.7" requests = "^2.31.0" beautifulsoup4 = "^4.12.2" tqdm = "^4.66.1" attrs = "^23.1.0" -numpy = "^1.25.2" -adventofcodeutils = {git = "https://github.com/RoelAdriaans/adventofcodeutils.git"} +numpy = "^1.26.2" more-itertools = "^10.1.0" regex-spm = "^1.0.0" +parse = "^1.20.0" +matplotlib = "^3.8.2" [tool.poetry.dev-dependencies] -black = "^23.7.0" -cookiecutter = "^2.3.0" -pytest = "^7.4.0" +black = "^23.12.0" +cookiecutter = "^2.5.0" +pytest = "^7.4.3" pytest-cov = "^4.1.0" -pytest-xdist = "^3.3.1" +pytest-xdist = "^3.5.0" python-dotenv = "^1.0.0" -tox = "^4.10.0" -pre-commit = "^3.3.3" -isort = "^5.12.0" +tox = "^4.11.4" +pre-commit = "^3.6.0" +isort = "^5.13.2" [tool.poetry.scripts] -adventofcode = "adventofcode2016.main:main" +adventofcode = "adventofcode.main:main" [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" + +[tool.bandit] +exclude_dirs = ["template"] + +[tool.bandit.assert_used] +skips = ["*/*_test.py", "*/test_*.py"] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 48318330..00000000 --- a/requirements.txt +++ /dev/null @@ -1,11 +0,0 @@ -anytree -black -Click -cookiecutter -matplotlib -numpy==1.19.3 -pytest -pytest-cov -pytest-xdist -tox -tqdm \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index cf44d6c4..00000000 --- a/setup.py +++ /dev/null @@ -1,18 +0,0 @@ -from setuptools import find_packages, setup - -with open("requirements.txt") as f: - requirements = f.read().splitlines() - -setup( - name="adventofcode2019", - author="Roel Adriaans", - author_email="roel@adriaans.org", - url="https://github.com/roeladriaans", - entry_points={"console_scripts": ["adventofcode = adventofcode2019.main:main"]}, - packages=find_packages(where="src", exclude=["tests.*", "test*"]), - package_dir={"": "src"}, - install_requires=requirements, - include_package_data=True, - use_scm_version=True, - setup_requires=["setuptools_scm"], -) diff --git a/src/adventofcode2016/solutions/__init__.py b/src/adventofcode/__init__.py similarity index 100% rename from src/adventofcode2016/solutions/__init__.py rename to src/adventofcode/__init__.py diff --git a/src/adventofcode2016/main.py b/src/adventofcode/main.py similarity index 78% rename from src/adventofcode2016/main.py rename to src/adventofcode/main.py index 09fd0463..e62b1809 100644 --- a/src/adventofcode2016/main.py +++ b/src/adventofcode/main.py @@ -3,6 +3,7 @@ import os import sys import timeit +from datetime import datetime from pathlib import Path import click @@ -14,12 +15,22 @@ logger = logging.getLogger(__name__) +# Load env values from .env file, or from environment variables if set +load_dotenv() + @click.command() @click.argument( "day", type=click.IntRange(1, 25), ) +@click.option( + "--year", + default=lambda: os.environ.get("AOC_YEAR", datetime.now().year), + type=click.IntRange(2016, 2025), + help="The year to run. Defaults to current year. Can be overriden in .env " + "by using value AOC_YEAR", +) @click.option( "--create", is_flag=True, @@ -50,7 +61,7 @@ help="Test the solution using timeit with timeit iterations", ) @click.option("-v", "--verbose", is_flag=True) -def main(day, create, force, submit, download, part, timeit_, verbose): +def main(day, year, create, force, submit, download, part, timeit_, verbose): """ Simple program that runs a module from the advent of code. DAY is an integer representing the day (1 - 25) that runs that day. @@ -76,31 +87,28 @@ def main(day, create, force, submit, download, part, timeit_, verbose): datefmt="%H:%M:%S", ) - # Load env values from .env file, or from environment variables if set - load_dotenv() - day = f"{int(day):02}" print( - f"Welcome to Advent of Code 2016 - {day=} - {part=} - {timeit_=} - " + f"Welcome to Advent of Code - {year=} - {day=} - {part=} - {timeit_=} - " f"{verbose=} - {create=}" ) if create: # Create a new solution ensure_correct_directory() - create_solution(force=force, day=day) - download_input_data(year="2016", day=day) + create_solution(force=force, year=year, day=day) + download_input_data(year=year, day=day) else: # Run a specific day if download: - download_input_data(year="2016", day=day) - run_solution(day=day, timeit_=timeit_, part=part, submit=submit) + download_input_data(year=year, day=day) + run_solution(year=year, day=day, timeit_=timeit_, part=part, submit=submit) def ensure_correct_directory(): """Make sure that we are in the correct directory: Main sources root""" - main_file = Path("src/adventofcode2016/main.py") + main_file = Path("src/adventofcode/main.py") if main_file.exists(): return True else: @@ -109,11 +117,11 @@ def ensure_correct_directory(): sys.exit(-65) -def create_solution(force, day): - print(f"Creating solution for {day} --") +def create_solution(force, year, day): + print(f"Creating solution for {year}-{day} --") # Check before we overwrite - import_path = f"adventofcode2016.solutions.day{day}" + import_path = f"adventofcode{year}.day{day}" logger.debug(f"Importing {import_path}") try: importlib.import_module(import_path) @@ -128,7 +136,7 @@ def create_solution(force, day): cookiecutter( "template/", no_input=True, - extra_context={"day": day}, + extra_context={"day": day, "year": year}, overwrite_if_exists=True, ) @@ -136,7 +144,7 @@ def create_solution(force, day): def _get_session(): session = os.environ.get("AOC_SESSION") if not session: - print("AOC_SESSION key is not set in envonrment or .env file") + print("AOC_SESSION key is not set in environment or .env file") sys.exit(-65) return session @@ -147,11 +155,12 @@ def download_input_data(year: str, day: str): r = requests.get( f"https://adventofcode.com/{year}/day/{day.lstrip('0')}/input", cookies={"session": _get_session()}, + timeout=30, ) if r.status_code != 200: print(f"Unable to download the input data. Response code {r.status_code}") if r.status_code == 500: - print("An internal server error accured. Is your session valid?") + print("An internal server error occurred. Is your session valid?") elif r.status_code == 404: print( "Solution not found: You are too early, or this day does not" @@ -165,17 +174,17 @@ def download_input_data(year: str, day: str): logger.debug(f"Received data, length {len(r.content)}") data_path = f"day_{day}/day{day}.txt" - root_dir = Path(__file__).parent - filename = root_dir / "solutions" / "data" / data_path + root_dir = Path(__file__).parent.parent + filename = root_dir / f"adventofcode{year}" / "data" / data_path with open(filename, "wb") as f: f.write(r.content) logger.info(f"Input data writen to {filename}") -def run_solution(day, timeit_, part, submit): +def run_solution(year, day, timeit_, part, submit): # Try to import the solution - import_path = f"adventofcode2016.solutions.day{day}" + import_path = f"adventofcode{year}.day{day}" data_path = f"day_{day}/day{day}.txt" logger.debug(f"Importing {import_path}") @@ -192,7 +201,7 @@ def run_solution(day, timeit_, part, submit): for _ in tqdm.trange(timeit_): time_prior = timeit.default_timer() - results = run_day(data_path, day, day_module, part, submit=False) + results = run_day(data_path, year, day, day_module, part, submit=False) time_after = timeit.default_timer() execution_times.append(time_after - time_prior) @@ -206,20 +215,20 @@ def run_solution(day, timeit_, part, submit): ) else: print("Results:") - print(run_day(data_path, day, day_module, part, submit)) + print(run_day(data_path, year, day, day_module, part, submit)) -def run_day(data_path, day, day_module, part, submit): +def run_day(data_path, year, day, day_module, part, submit): if part == "parta": result = run_parta(data_path, day, day_module) if submit: - submit_result(year=2016, day=day, part=part, result=result) + submit_result(year=year, day=day, part=part, result=result) return result elif part == "partb": result = run_partb(data_path, day, day_module) if submit: - submit_result(year=2016, day=day, part=part, result=result) + submit_result(year=year, day=day, part=part, result=result) return result else: @@ -254,6 +263,7 @@ def submit_result(year, day, part, result): url=post_url, data=data, cookies={"session": _get_session()}, + timeout=30, ) result = parse_result(r.text) diff --git a/src/adventofcode2016/utils/__init__.py b/src/adventofcode/utils/__init__.py similarity index 100% rename from src/adventofcode2016/utils/__init__.py rename to src/adventofcode/utils/__init__.py diff --git a/src/adventofcode2016/utils/abstract.py b/src/adventofcode/utils/abstract.py similarity index 67% rename from src/adventofcode2016/utils/abstract.py rename to src/adventofcode/utils/abstract.py index 7b3eaeb2..eade4de3 100644 --- a/src/adventofcode2016/utils/abstract.py +++ b/src/adventofcode/utils/abstract.py @@ -1,3 +1,4 @@ +import re from abc import ABC, abstractmethod from pathlib import Path @@ -30,8 +31,15 @@ def __call__(self, input_file: str) -> str | int: """ Give the input_text as parameter, process this and return the result """ - root_dir = Path(__file__).parent.parent - with open(root_dir / "solutions" / "data" / input_file) as f: + # Find the year from the class. Convert self to string, and extract the year + # after + year = re.findall(r"adventofcode(\d{4})", repr(self)) + if not year: + raise ValueError("Path not found") + else: + year = int(year[0]) + root_dir = Path(__file__).parent.parent.parent + with open(root_dir / f"adventofcode{year}" / "data" / input_file) as f: input_data = f.read() res = self.solve(input_data=input_data) return res diff --git a/src/adventofcode/utils/generic_search.py b/src/adventofcode/utils/generic_search.py new file mode 100644 index 00000000..ef49984e --- /dev/null +++ b/src/adventofcode/utils/generic_search.py @@ -0,0 +1,120 @@ +from __future__ import annotations + +from abc import ABC, abstractmethod +from collections.abc import Callable +from typing import TypeVar + +from adventofcode.utils.node import Node +from adventofcode.utils.priority_queue import PriorityQueue +from adventofcode.utils.queue import Queue +from adventofcode.utils.stack import Stack + +T = TypeVar("T") + +# @TODO: Make the container a protocol, or pep-0695? +Container = Queue | Stack + + +class Search(ABC): + @abstractmethod + def _get_container(self) -> Container: + """Return the base container for this class""" + raise NotImplementedError + + def search( + self, + initial: T, + goal_test: Callable[[T], bool], + successors: Callable[[T], list[T]], + explore_all: bool = False, + ) -> Node[T] | set[Node[T]] | None: + # frontier is where we've yet to go + # @TODO This is ugly, the base class has knowledge of + # the container implementation + frontier: Queue[Node[T]] | Stack[Node[T]] = self._get_container() + frontier.push(Node(initial, None)) + + # explored is where we've been + explored: set[T] = {initial} + + # All paths + all_paths: set[T] = set() + + # keep going while there is more to explore + while not frontier.empty: + current_node: Node[T] = frontier.pop() + current_state: T = current_node.state + + if goal_test(current_state): + if not explore_all: + # if we found the goal, we're done + return current_node + else: + # All paths are explored! Add this path and continue on + # If the goal is searched, do not find the children of the goal + all_paths.add(current_node) + continue + + # check where we can go next and haven't explored + for child in successors(current_state): + if child in explored: + # skip children we already explored + continue + explored.add(child) + frontier.push(Node(child, current_node)) + + if explore_all: + # Return all the pats we have found. Could be an empty set + return all_paths + else: + # went through everything and never found goal + return None + + +class DFS(Search): + """Perform a Depth-first search (DFS)""" + + def _get_container(self) -> Container: + return Stack() + + +class BFS(Search): + """Perform a Breadth-first search (BFS)""" + + def _get_container(self) -> Container: + return Queue() + + +class Astar: + @staticmethod + def astar( + initial: T, + goal_test: Callable[[T], bool], + successors: Callable[[T], list[T]], + heuristic: Callable[[T], float], + ) -> Node[T] | None: + # frontier is where we've yet to go + frontier: PriorityQueue[Node[T]] = PriorityQueue() + frontier.push(Node(initial, None, 0.0, heuristic(initial))) + + # explored is where we've been + explored: dict[T, float] = {initial: 0.0} + + # keep going while there is more to explore + while not frontier.empty: + current_node: Node[T] = frontier.pop() + current_state: T = current_node.state + # if we found the goal, we're done + if goal_test(current_state): + return current_node + # check where we can go next and haven't explored + for child in successors(current_state): + # 1 assumes a grid, need a cost function for more sophisticated apps + new_cost: float = current_node.cost + 1 + + if child not in explored or explored[child] > new_cost: + explored[child] = new_cost + frontier.push(Node(child, current_node, new_cost, heuristic(child))) + + # went through everything and never found goal + return None diff --git a/src/adventofcode/utils/graph.py b/src/adventofcode/utils/graph.py new file mode 100644 index 00000000..eb66ad78 --- /dev/null +++ b/src/adventofcode/utils/graph.py @@ -0,0 +1,89 @@ +from collections import defaultdict +from collections.abc import Iterator +from dataclasses import dataclass +from typing import Generic, TypeVar + +# The type of the nodes +V = TypeVar("V") + + +@dataclass +class Edge(Generic[V]): + u: V + v: V + + def __repr__(self) -> str: + return f"{self.u} -> {self.v}" + + def __hash__(self): + return hash((self.u, self.v)) + + +class Graph(Generic[V]): + """ + Very simple graph, enough for advent of code. + + Definitions, that I always forget: + - Nodes: The Vertices / items that are there + - Edges: The links between vertices + + """ + + def __init__(self, edges: Iterator[tuple[V, V]] | None = None): + """Create a new graph. + + If edges is given, the network is created based on the edges. + For example + + >>> g = Graph([("a", "b"), ("b", "c"), ("c", "a")]) + + Will create simple Graph with: + a <-> b + b <-> c + c <-> a + """ + + self._nodes: set[V] = set() + self._edges: defaultdict[V, list[Edge]] = defaultdict(list) + if edges: + self.add_from_list(edges) + + def add_node(self, node: V): + self._nodes.add(node) + + def add_edge(self, u: V, v: V): + self.add_node(u) + self.add_node(v) + new_edge = Edge(u, v) + self._edges[u].append(new_edge) + self._edges[v].append(new_edge) + + def add_from_list(self, edges: Iterator[tuple[V, V]]): + """Add edges based on a list""" + for edge in edges: + self.add_edge(*edge) + + def __repr__(self) -> str: + return f"Graph with {len(self.nodes)} nodes and {len(self.edges)} edges" + + @property + def edges(self) -> set[Edge]: + """Return all the unique edges""" + return {item for sublist in self._edges.values() for item in sublist} + + @property + def nodes(self) -> set[V]: + """Return all the nodes""" + return self._nodes + + def edges_from_node(self, node: V) -> list[Edge]: + """Return all the edges directly connected to node""" + return self._edges[node] + + def nodes_from_node(self, node: V) -> Iterator[V]: + """Return all the nodes directly connected to node""" + for edge in self._edges[node]: + if edge.v == node: + yield edge.u + else: + yield edge.v diff --git a/src/adventofcode/utils/node.py b/src/adventofcode/utils/node.py new file mode 100644 index 00000000..d7a34102 --- /dev/null +++ b/src/adventofcode/utils/node.py @@ -0,0 +1,41 @@ +from __future__ import annotations + +from typing import Generic, TypeVar + +T = TypeVar("T") + + +class Node(Generic[T]): + def __init__( + self, + state: T, + parent: Node | None, + cost: float = 0.0, + heuristic: float = 0.0, + ) -> None: + self.state: T = state + self.parent: Node | None = parent + self.cost: float = cost + self.heuristic: float = heuristic + + def __lt__(self, other: Node) -> bool: + return (self.cost + self.heuristic) < (other.cost + other.heuristic) + + def __repr__(self): + if self.parent: + parents = self.node_to_path(self) + return f"{repr(self.state)} <{self.cost}/{self.heuristic}> ({parents})" + else: + return f"{repr(self.state)} <{self.cost}/{self.heuristic}>" + + @staticmethod + def node_to_path(node: Node[T]) -> list[T]: + path: list[T] = [node.state] + + # work backwards from end to front + while node.parent is not None: + node = node.parent + path.append(node.state) + + path.reverse() + return path diff --git a/src/adventofcode2019/utils/advent_utils.py b/src/adventofcode/utils/parsing.py similarity index 55% rename from src/adventofcode2019/utils/advent_utils.py rename to src/adventofcode/utils/parsing.py index 8303a142..2e005a0f 100644 --- a/src/adventofcode2019/utils/advent_utils.py +++ b/src/adventofcode/utils/parsing.py @@ -1,7 +1,7 @@ -from typing import List +import re -def string_to_list_of_ints(input_string: str, split_string: str = ",") -> List[int]: +def string_to_list_of_ints(input_string: str, split_string: str = ",") -> list[int]: """ Split a string on `split_string` and return a list of integers @@ -13,7 +13,7 @@ def string_to_list_of_ints(input_string: str, split_string: str = ",") -> List[i return list_of_ints -def string_of_single_to_list_of_ints(input_string: str) -> List[int]: +def string_of_single_to_list_of_ints(input_string: str) -> list[int]: """ Split a string on `split_string` and return a list of integers @@ -22,3 +22,20 @@ def string_of_single_to_list_of_ints(input_string: str) -> List[int]: """ list_of_ints = list(map(int, input_string)) return list_of_ints + + +digits_re = re.compile(r"\d+") + + +def extract_digits_from_string(input_string: str) -> list[int]: + """Extract all the digits from a string. For example: + + >>> extract_digits_from_string("this 5 is a 6 plus 10") + [5, 6, 10] + + Does not support decimal: + + >>> extract_digits_from_string("4.5") + [4, 5] + """ + return list(map(int, digits_re.findall(input_string))) diff --git a/src/adventofcode/utils/point.py b/src/adventofcode/utils/point.py new file mode 100644 index 00000000..0c59284e --- /dev/null +++ b/src/adventofcode/utils/point.py @@ -0,0 +1,42 @@ +import attrs + + +@attrs.define +class XYZPoint: + x: int + y: int + z: int + + def __add__(self, other): + if not issubclass(type(other), XYZPoint): + raise ValueError("Cannot add incompatible types together") + return XYZPoint(x=self.x + other.x, y=self.y + other.y, z=self.z + other.z) + + def __getitem__(self, key): + return self.__getattribute__(key) + + def __hash__(self): + return hash((self.x, self.y, self.z)) + + def distance(self, other): + return abs(self.x - other.x) + abs(self.y - other.y) + abs(self.z - other.z) + + +@attrs.define +class XYPoint: + x: int + y: int + + def __add__(self, other): + if not issubclass(type(other), XYPoint): + raise ValueError("Cannot add incompatible types together") + return XYPoint(x=self.x + other.x, y=self.y + other.y) + + def __getitem__(self, key): + return self.__getattribute__(key) + + def __hash__(self): + return hash((self.x, self.y)) + + def distance(self, other): + return abs(self.x - other.x) + abs(self.y - other.y) diff --git a/src/adventofcode/utils/priority_queue.py b/src/adventofcode/utils/priority_queue.py new file mode 100644 index 00000000..3917a03d --- /dev/null +++ b/src/adventofcode/utils/priority_queue.py @@ -0,0 +1,30 @@ +from __future__ import annotations + +from heapq import heappop, heappush +from typing import Generic, TypeVar + +T = TypeVar("T") + + +class PriorityQueue(Generic[T]): + def __init__(self) -> None: + self._container: list[T] = [] + + @property + def empty(self) -> bool: + # not is true for empty container + return not self._container + + def push(self, item: T) -> None: + # in by priority + heappush(self._container, item) + + def pop(self) -> T: + # out by priority + return heappop(self._container) + + def __repr__(self) -> str: + return repr(self._container) + + def __len__(self) -> int: + return len(self._container) diff --git a/src/adventofcode/utils/queue.py b/src/adventofcode/utils/queue.py new file mode 100644 index 00000000..48c0d882 --- /dev/null +++ b/src/adventofcode/utils/queue.py @@ -0,0 +1,29 @@ +from __future__ import annotations + +from collections import deque +from typing import Generic, TypeVar + +T = TypeVar("T") + + +class Queue(Generic[T]): + def __init__(self) -> None: + self._container: deque[T] = deque() + + @property + def empty(self) -> bool: + # not is true for empty container + return not self._container + + def push(self, item: T) -> None: + self._container.append(item) + + def pop(self) -> T: + # FIFO + return self._container.popleft() + + def __repr__(self) -> str: + return repr(self._container) + + def __len__(self) -> int: + return len(self._container) diff --git a/src/adventofcode/utils/stack.py b/src/adventofcode/utils/stack.py new file mode 100644 index 00000000..c215b716 --- /dev/null +++ b/src/adventofcode/utils/stack.py @@ -0,0 +1,28 @@ +from __future__ import annotations + +from typing import Generic, TypeVar + +T = TypeVar("T") + + +class Stack(Generic[T]): + def __init__(self) -> None: + self._container: list[T] = [] + + @property + def empty(self) -> bool: + # not is true for empty container + return not self._container + + def push(self, item: T) -> None: + self._container.append(item) + + def pop(self) -> T: + # LIFO + return self._container.pop() + + def __repr__(self) -> str: + return repr(self._container) + + def __len__(self) -> int: + return len(self._container) diff --git a/src/adventofcode2016/solutions/data/day_01/day01.txt b/src/adventofcode2016/data/day_01/day01.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_01/day01.txt rename to src/adventofcode2016/data/day_01/day01.txt diff --git a/src/adventofcode2016/solutions/data/day_02/day02.txt b/src/adventofcode2016/data/day_02/day02.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_02/day02.txt rename to src/adventofcode2016/data/day_02/day02.txt diff --git a/src/adventofcode2016/solutions/data/day_02/day02_test.txt b/src/adventofcode2016/data/day_02/day02_test.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_02/day02_test.txt rename to src/adventofcode2016/data/day_02/day02_test.txt diff --git a/src/adventofcode2016/solutions/data/day_03/day03.txt b/src/adventofcode2016/data/day_03/day03.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_03/day03.txt rename to src/adventofcode2016/data/day_03/day03.txt diff --git a/src/adventofcode2016/solutions/data/day_03/day03_test.txt b/src/adventofcode2016/data/day_03/day03_test.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_03/day03_test.txt rename to src/adventofcode2016/data/day_03/day03_test.txt diff --git a/src/adventofcode2016/solutions/data/day_04/day04.txt b/src/adventofcode2016/data/day_04/day04.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_04/day04.txt rename to src/adventofcode2016/data/day_04/day04.txt diff --git a/src/adventofcode2016/solutions/data/day_04/day04_test.txt b/src/adventofcode2016/data/day_04/day04_test.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_04/day04_test.txt rename to src/adventofcode2016/data/day_04/day04_test.txt diff --git a/src/adventofcode2016/solutions/data/day_05/day05.txt b/src/adventofcode2016/data/day_05/day05.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_05/day05.txt rename to src/adventofcode2016/data/day_05/day05.txt diff --git a/src/adventofcode2016/solutions/data/day_06/day06.txt b/src/adventofcode2016/data/day_06/day06.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_06/day06.txt rename to src/adventofcode2016/data/day_06/day06.txt diff --git a/src/adventofcode2016/solutions/data/day_06/day06_test.txt b/src/adventofcode2016/data/day_06/day06_test.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_06/day06_test.txt rename to src/adventofcode2016/data/day_06/day06_test.txt diff --git a/src/adventofcode2016/solutions/data/day_07/day07.txt b/src/adventofcode2016/data/day_07/day07.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_07/day07.txt rename to src/adventofcode2016/data/day_07/day07.txt diff --git a/src/adventofcode2016/solutions/data/day_08/day08.txt b/src/adventofcode2016/data/day_08/day08.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_08/day08.txt rename to src/adventofcode2016/data/day_08/day08.txt diff --git a/src/adventofcode2016/solutions/data/day_09/day09.txt b/src/adventofcode2016/data/day_09/day09.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_09/day09.txt rename to src/adventofcode2016/data/day_09/day09.txt diff --git a/src/adventofcode2016/solutions/data/day_10/day10.txt b/src/adventofcode2016/data/day_10/day10.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_10/day10.txt rename to src/adventofcode2016/data/day_10/day10.txt diff --git a/src/adventofcode2016/solutions/data/day_10/day10_test.txt b/src/adventofcode2016/data/day_10/day10_test.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_10/day10_test.txt rename to src/adventofcode2016/data/day_10/day10_test.txt diff --git a/src/adventofcode2016/solutions/data/day_11/day11.txt b/src/adventofcode2016/data/day_11/day11.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_11/day11.txt rename to src/adventofcode2016/data/day_11/day11.txt diff --git a/src/adventofcode2016/solutions/data/day_11/day11_test.txt b/src/adventofcode2016/data/day_11/day11_test.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_11/day11_test.txt rename to src/adventofcode2016/data/day_11/day11_test.txt diff --git a/src/adventofcode2016/solutions/data/day_12/day12.txt b/src/adventofcode2016/data/day_12/day12.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_12/day12.txt rename to src/adventofcode2016/data/day_12/day12.txt diff --git a/src/adventofcode2016/solutions/data/day_12/day12_test.txt b/src/adventofcode2016/data/day_12/day12_test.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_12/day12_test.txt rename to src/adventofcode2016/data/day_12/day12_test.txt diff --git a/src/adventofcode2016/solutions/data/day_13/day13.txt b/src/adventofcode2016/data/day_13/day13.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_13/day13.txt rename to src/adventofcode2016/data/day_13/day13.txt diff --git a/src/adventofcode2016/solutions/data/day_14/day14.txt b/src/adventofcode2016/data/day_14/day14.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_14/day14.txt rename to src/adventofcode2016/data/day_14/day14.txt diff --git a/src/adventofcode2016/solutions/data/day_15/day15.txt b/src/adventofcode2016/data/day_15/day15.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_15/day15.txt rename to src/adventofcode2016/data/day_15/day15.txt diff --git a/src/adventofcode2016/solutions/data/day_15/day15_test.txt b/src/adventofcode2016/data/day_15/day15_test.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_15/day15_test.txt rename to src/adventofcode2016/data/day_15/day15_test.txt diff --git a/src/adventofcode2016/solutions/data/day_16/day16.txt b/src/adventofcode2016/data/day_16/day16.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_16/day16.txt rename to src/adventofcode2016/data/day_16/day16.txt diff --git a/src/adventofcode2016/solutions/data/day_17/day17.txt b/src/adventofcode2016/data/day_17/day17.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_17/day17.txt rename to src/adventofcode2016/data/day_17/day17.txt diff --git a/src/adventofcode2016/solutions/data/day_18/day18.txt b/src/adventofcode2016/data/day_18/day18.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_18/day18.txt rename to src/adventofcode2016/data/day_18/day18.txt diff --git a/src/adventofcode2016/solutions/data/day_18/day18_test.txt b/src/adventofcode2016/data/day_18/day18_test.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_18/day18_test.txt rename to src/adventofcode2016/data/day_18/day18_test.txt diff --git a/src/adventofcode2016/solutions/data/day_18/day18_test2.txt b/src/adventofcode2016/data/day_18/day18_test2.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_18/day18_test2.txt rename to src/adventofcode2016/data/day_18/day18_test2.txt diff --git a/src/adventofcode2016/solutions/data/day_19/day19.txt b/src/adventofcode2016/data/day_19/day19.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_19/day19.txt rename to src/adventofcode2016/data/day_19/day19.txt diff --git a/src/adventofcode2016/solutions/data/day_20/day20.txt b/src/adventofcode2016/data/day_20/day20.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_20/day20.txt rename to src/adventofcode2016/data/day_20/day20.txt diff --git a/src/adventofcode2016/solutions/data/day_20/day20_test.txt b/src/adventofcode2016/data/day_20/day20_test.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_20/day20_test.txt rename to src/adventofcode2016/data/day_20/day20_test.txt diff --git a/src/adventofcode2016/solutions/data/day_20/day20_test2.txt b/src/adventofcode2016/data/day_20/day20_test2.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_20/day20_test2.txt rename to src/adventofcode2016/data/day_20/day20_test2.txt diff --git a/src/adventofcode2016/solutions/data/day_21/day21.txt b/src/adventofcode2016/data/day_21/day21.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_21/day21.txt rename to src/adventofcode2016/data/day_21/day21.txt diff --git a/src/adventofcode2016/solutions/data/day_21/day21_test.txt b/src/adventofcode2016/data/day_21/day21_test.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_21/day21_test.txt rename to src/adventofcode2016/data/day_21/day21_test.txt diff --git a/src/adventofcode2016/solutions/data/day_22/day22.txt b/src/adventofcode2016/data/day_22/day22.txt similarity index 100% rename from src/adventofcode2016/solutions/data/day_22/day22.txt rename to src/adventofcode2016/data/day_22/day22.txt diff --git a/src/adventofcode2016/solutions/day01.py b/src/adventofcode2016/day01.py similarity index 96% rename from src/adventofcode2016/solutions/day01.py rename to src/adventofcode2016/day01.py index 930aa467..dd7a32f0 100644 --- a/src/adventofcode2016/solutions/day01.py +++ b/src/adventofcode2016/day01.py @@ -1,9 +1,9 @@ from __future__ import annotations import attrs -from adventofcodeutils.point import XYPoint -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.point import XYPoint @attrs.define(kw_only=True) diff --git a/src/adventofcode2016/solutions/day02.py b/src/adventofcode2016/day02.py similarity index 96% rename from src/adventofcode2016/solutions/day02.py rename to src/adventofcode2016/day02.py index dcef97b4..753bef9b 100644 --- a/src/adventofcode2016/solutions/day02.py +++ b/src/adventofcode2016/day02.py @@ -1,8 +1,7 @@ from collections import defaultdict -from adventofcodeutils.point import XYPoint - -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.point import XYPoint class Day02: diff --git a/src/adventofcode2016/solutions/day03.py b/src/adventofcode2016/day03.py similarity index 91% rename from src/adventofcode2016/solutions/day03.py rename to src/adventofcode2016/day03.py index c90ab09e..eefbc3e7 100644 --- a/src/adventofcode2016/solutions/day03.py +++ b/src/adventofcode2016/day03.py @@ -1,7 +1,7 @@ import itertools import re -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution class Day03: @@ -18,7 +18,9 @@ def _split_into_parts(input_data: str) -> list[list[int]]: res = [] for line in lines: m = re.match(find_digits_re, line) - assert m is not None + if not m: + raise ValueError(f"Match not found in {line}") + sides = [int(m.group(1)), int(m.group(2)), int(m.group(3))] res.append(sides) return res diff --git a/src/adventofcode2016/solutions/day04.py b/src/adventofcode2016/day04.py similarity index 93% rename from src/adventofcode2016/solutions/day04.py rename to src/adventofcode2016/day04.py index a1ab8803..69288fa7 100644 --- a/src/adventofcode2016/solutions/day04.py +++ b/src/adventofcode2016/day04.py @@ -5,7 +5,7 @@ import attrs -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution @attrs.define @@ -19,7 +19,9 @@ class Room: @classmethod def from_string(cls, input_string: str) -> Room: group = re.match(r"^([\w-]*)-(\d*)\[(\w*)\]$", input_string) - assert group + if not group: + raise ValueError(f"Match not found in {input_string}") + return cls(encrypted_name=group[1], sector_id=int(group[2]), checksum=group[3]) def is_valid(self) -> bool: diff --git a/src/adventofcode2016/solutions/day05.py b/src/adventofcode2016/day05.py similarity index 92% rename from src/adventofcode2016/solutions/day05.py rename to src/adventofcode2016/day05.py index 8c05bd62..23ffefa2 100644 --- a/src/adventofcode2016/solutions/day05.py +++ b/src/adventofcode2016/day05.py @@ -5,7 +5,7 @@ import attrs -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution @attrs.define @@ -22,7 +22,9 @@ def find_match(prefix: str, starting: int) -> MatchResult: non-zero number, and the current position""" position = starting while True: - pos_hash = hashlib.md5(f"{prefix}{position}".encode()).hexdigest() + pos_hash = hashlib.md5( + f"{prefix}{position}".encode(), usedforsecurity=False + ).hexdigest() if pos_hash[:5] == "00000": return MatchResult( hash=pos_hash, first_code=pos_hash[5], current_position=position diff --git a/src/adventofcode2016/solutions/day06.py b/src/adventofcode2016/day06.py similarity index 90% rename from src/adventofcode2016/solutions/day06.py rename to src/adventofcode2016/day06.py index 28a7e41f..45f278f1 100644 --- a/src/adventofcode2016/solutions/day06.py +++ b/src/adventofcode2016/day06.py @@ -2,7 +2,7 @@ from collections import Counter -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution class Day06: diff --git a/src/adventofcode2016/solutions/day07.py b/src/adventofcode2016/day07.py similarity index 98% rename from src/adventofcode2016/solutions/day07.py rename to src/adventofcode2016/day07.py index 231639c7..dc846816 100644 --- a/src/adventofcode2016/solutions/day07.py +++ b/src/adventofcode2016/day07.py @@ -5,7 +5,7 @@ import attrs -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution @attrs.define diff --git a/src/adventofcode2016/solutions/day08.py b/src/adventofcode2016/day08.py similarity index 96% rename from src/adventofcode2016/solutions/day08.py rename to src/adventofcode2016/day08.py index de18b91b..c8b7cf48 100644 --- a/src/adventofcode2016/solutions/day08.py +++ b/src/adventofcode2016/day08.py @@ -4,9 +4,9 @@ import attrs import numpy as np -from adventofcodeutils.parsing import extract_digits_from_string -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.parsing import extract_digits_from_string class Operation(Enum): diff --git a/src/adventofcode2016/solutions/day09.py b/src/adventofcode2016/day09.py similarity index 98% rename from src/adventofcode2016/solutions/day09.py rename to src/adventofcode2016/day09.py index 8e1d8747..719bbab4 100644 --- a/src/adventofcode2016/solutions/day09.py +++ b/src/adventofcode2016/day09.py @@ -1,6 +1,6 @@ from __future__ import annotations -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution class Day09: diff --git a/src/adventofcode2016/solutions/day10.py b/src/adventofcode2016/day10.py similarity index 96% rename from src/adventofcode2016/solutions/day10.py rename to src/adventofcode2016/day10.py index 2c481303..2170f104 100644 --- a/src/adventofcode2016/solutions/day10.py +++ b/src/adventofcode2016/day10.py @@ -5,9 +5,9 @@ from collections import defaultdict import attrs -from adventofcodeutils.parsing import extract_digits_from_string -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.parsing import extract_digits_from_string @attrs.define diff --git a/src/adventofcode2016/solutions/day11.py b/src/adventofcode2016/day11.py similarity index 98% rename from src/adventofcode2016/solutions/day11.py rename to src/adventofcode2016/day11.py index e7aa8bbf..6d811d55 100644 --- a/src/adventofcode2016/solutions/day11.py +++ b/src/adventofcode2016/day11.py @@ -2,9 +2,8 @@ import itertools -from adventofcodeutils.generic_search import BFS - -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.generic_search import BFS class FacilityState: diff --git a/src/adventofcode2016/solutions/day12.py b/src/adventofcode2016/day12.py similarity index 98% rename from src/adventofcode2016/solutions/day12.py rename to src/adventofcode2016/day12.py index cb43c5dc..5a1679ee 100644 --- a/src/adventofcode2016/solutions/day12.py +++ b/src/adventofcode2016/day12.py @@ -3,7 +3,7 @@ import logging from abc import ABC, abstractmethod -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution class Instruction(ABC): diff --git a/src/adventofcode2016/solutions/day13.py b/src/adventofcode2016/day13.py similarity index 97% rename from src/adventofcode2016/solutions/day13.py rename to src/adventofcode2016/day13.py index d1759d66..549d850b 100644 --- a/src/adventofcode2016/solutions/day13.py +++ b/src/adventofcode2016/day13.py @@ -5,9 +5,9 @@ from functools import cache import attrs -from adventofcodeutils.generic_search import Astar -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.generic_search import Astar @attrs.define(frozen=True) diff --git a/src/adventofcode2016/solutions/day14.py b/src/adventofcode2016/day14.py similarity index 88% rename from src/adventofcode2016/solutions/day14.py rename to src/adventofcode2016/day14.py index 4ea96bdf..a21b22a6 100644 --- a/src/adventofcode2016/solutions/day14.py +++ b/src/adventofcode2016/day14.py @@ -5,7 +5,7 @@ import logging import re -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution # Following regex will match 3 OR more matches three_char = re.compile(r"(\w)\1{2,}") @@ -18,9 +18,13 @@ class Day14: def find_hash(self, input_string: str) -> str: if self.stretched: for n in range(2017): - input_string = hashlib.md5(input_string.encode()).hexdigest() + input_string = hashlib.md5( + input_string.encode(), usedforsecurity=False + ).hexdigest() else: - input_string = hashlib.md5(input_string.encode()).hexdigest() + input_string = hashlib.md5( + input_string.encode(), usedforsecurity=False + ).hexdigest() return input_string def get_five_match(self, salt: str, start_index: int, letter: str) -> int: diff --git a/src/adventofcode2016/solutions/day15.py b/src/adventofcode2016/day15.py similarity index 91% rename from src/adventofcode2016/solutions/day15.py rename to src/adventofcode2016/day15.py index e38d549d..496671f7 100644 --- a/src/adventofcode2016/solutions/day15.py +++ b/src/adventofcode2016/day15.py @@ -1,9 +1,9 @@ from __future__ import annotations import attrs -from adventofcodeutils.parsing import extract_digits_from_string -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.parsing import extract_digits_from_string @attrs.define diff --git a/src/adventofcode2016/solutions/day16.py b/src/adventofcode2016/day16.py similarity index 96% rename from src/adventofcode2016/solutions/day16.py rename to src/adventofcode2016/day16.py index a6dbe4e1..b83d284a 100644 --- a/src/adventofcode2016/solutions/day16.py +++ b/src/adventofcode2016/day16.py @@ -2,7 +2,7 @@ from more_itertools import grouper -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution class Day16: diff --git a/src/adventofcode2016/solutions/day17.py b/src/adventofcode2016/day17.py similarity index 93% rename from src/adventofcode2016/solutions/day17.py rename to src/adventofcode2016/day17.py index 5e76b016..5b3029ac 100644 --- a/src/adventofcode2016/solutions/day17.py +++ b/src/adventofcode2016/day17.py @@ -6,15 +6,15 @@ from functools import cache import attrs -from adventofcodeutils.generic_search import DFS, Astar -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.generic_search import DFS, Astar @cache def md5(input_string: str) -> str: """Calculate md5""" - return hashlib.md5(input_string.encode()).hexdigest() + return hashlib.md5(input_string.encode(), usedforsecurity=False).hexdigest() @attrs.define(frozen=True) diff --git a/src/adventofcode2016/solutions/day18.py b/src/adventofcode2016/day18.py similarity index 97% rename from src/adventofcode2016/solutions/day18.py rename to src/adventofcode2016/day18.py index 9431e471..6c9c4998 100644 --- a/src/adventofcode2016/solutions/day18.py +++ b/src/adventofcode2016/day18.py @@ -2,7 +2,7 @@ import tqdm -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution SAFE = "." TRAP = "^" diff --git a/src/adventofcode2016/solutions/day19.py b/src/adventofcode2016/day19.py similarity index 93% rename from src/adventofcode2016/solutions/day19.py rename to src/adventofcode2016/day19.py index abc37904..6a0e3cf3 100644 --- a/src/adventofcode2016/solutions/day19.py +++ b/src/adventofcode2016/day19.py @@ -2,7 +2,7 @@ from collections import deque -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution class Day19: diff --git a/src/adventofcode2016/solutions/day20.py b/src/adventofcode2016/day20.py similarity index 91% rename from src/adventofcode2016/solutions/day20.py rename to src/adventofcode2016/day20.py index a6ea3ee6..d89c2d53 100644 --- a/src/adventofcode2016/solutions/day20.py +++ b/src/adventofcode2016/day20.py @@ -2,9 +2,8 @@ import logging -from adventofcodeutils.parsing import extract_digits_from_string - -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.parsing import extract_digits_from_string class Day20: diff --git a/src/adventofcode2016/solutions/day21.py b/src/adventofcode2016/day21.py similarity index 98% rename from src/adventofcode2016/solutions/day21.py rename to src/adventofcode2016/day21.py index a4ec958d..ec809fe4 100644 --- a/src/adventofcode2016/solutions/day21.py +++ b/src/adventofcode2016/day21.py @@ -4,7 +4,7 @@ import regex_spm -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution class Day21: diff --git a/src/adventofcode2016/solutions/day22.py b/src/adventofcode2016/day22.py similarity index 91% rename from src/adventofcode2016/solutions/day22.py rename to src/adventofcode2016/day22.py index 19d8b4dd..fd7de96d 100644 --- a/src/adventofcode2016/solutions/day22.py +++ b/src/adventofcode2016/day22.py @@ -1,9 +1,9 @@ from __future__ import annotations import attrs -from adventofcodeutils.parsing import extract_digits_from_string -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.parsing import extract_digits_from_string @attrs.define diff --git a/src/adventofcode2019/solutions/__init__.py b/src/adventofcode2018/__init__.py similarity index 100% rename from src/adventofcode2019/solutions/__init__.py rename to src/adventofcode2018/__init__.py diff --git a/src/adventofcode2018/data/day01/day_01_part01.txt b/src/adventofcode2018/data/day01/day_01_part01.txt new file mode 100644 index 00000000..1536c797 --- /dev/null +++ b/src/adventofcode2018/data/day01/day_01_part01.txt @@ -0,0 +1,1018 @@ +-9 ++7 ++5 +-13 ++6 ++14 +-5 +-10 +-10 +-12 ++2 ++5 ++2 +-6 +-12 ++1 ++13 ++5 ++3 +-15 +-12 ++4 +-11 ++10 +-5 +-14 +-6 ++2 +-9 +-18 ++8 +-1 ++12 ++9 ++5 +-9 ++14 ++3 +-4 +-16 ++14 ++14 ++13 +-7 +-19 ++12 +-9 ++5 ++21 +-7 ++19 +-2 ++14 ++18 ++17 ++4 ++11 +-16 +-5 +-6 +-7 +-2 +-1 +-2 +-1 ++14 +-17 ++5 ++13 ++8 +-6 ++15 ++2 ++16 +-7 +-6 ++11 ++10 ++17 ++13 +-7 ++17 +-18 ++2 ++8 +-17 ++16 ++4 ++7 ++4 +-10 +-10 ++8 ++16 +-13 +-19 +-12 +-12 ++10 +-5 ++21 +-12 +-17 ++6 +-19 ++18 +-10 ++3 +-19 ++7 ++16 +-12 ++6 ++15 +-4 ++9 ++5 ++17 +-16 +-4 +-8 ++2 ++8 ++5 +-6 ++9 ++2 ++17 ++15 +-6 ++9 ++18 ++6 ++18 +-5 +-3 ++17 ++7 +-10 +-5 ++4 +-6 ++3 +-12 +-15 +-16 +-16 ++18 ++16 +-14 +-9 ++12 +-13 +-2 ++5 ++16 +-15 ++7 ++9 ++8 +-11 +-8 +-15 ++13 ++11 ++18 +-15 +-5 ++10 ++14 +-13 ++16 ++2 ++19 ++17 ++17 +-12 ++17 ++8 +-4 +-12 +-11 +-12 +-4 ++15 ++5 ++9 +-18 +-14 +-8 ++13 ++19 ++2 +-11 ++5 ++5 +-3 ++6 ++9 ++12 ++19 +-15 +-12 +-6 ++22 ++2 +-4 ++16 +-11 ++18 ++6 ++14 ++1 +-3 +-10 ++6 +-10 ++12 ++7 ++1 +-11 ++13 +-17 ++19 ++16 ++1 +-12 +-14 ++8 ++16 +-11 ++10 ++7 ++5 +-6 ++5 ++8 ++2 +-4 ++8 ++5 +-10 ++7 ++5 ++4 ++13 ++15 ++12 ++12 +-14 ++6 +-12 ++2 +-8 ++16 ++5 ++10 ++18 +-2 ++16 ++2 +-11 +-13 ++19 ++9 ++12 ++18 ++14 ++17 ++9 +-13 ++25 +-27 ++18 ++4 ++16 ++5 +-15 ++13 ++15 +-16 ++12 ++23 +-12 +-8 +-19 +-10 ++24 ++16 ++6 +-15 ++26 +-16 +-13 ++7 ++25 ++12 ++19 ++14 ++16 +-5 +-12 +-22 +-17 +-20 +-6 +-32 +-2 +-18 +-10 +-11 +-26 ++10 +-17 +-8 +-17 +-8 ++9 +-16 +-14 +-19 ++17 ++19 ++2 ++20 ++19 +-13 +-7 ++19 +-14 +-15 +-5 ++3 +-19 +-6 +-11 +-2 ++15 ++13 +-8 +-12 +-22 +-9 +-14 ++15 +-17 +-1 +-13 ++9 ++17 ++15 +-7 ++13 ++2 ++15 +-6 ++17 ++14 ++8 ++24 +-19 +-10 ++26 +-31 +-18 +-9 ++11 +-15 ++20 ++22 ++2 ++20 ++18 ++10 +-16 +-20 +-32 ++27 ++33 +-12 +-13 ++14 +-20 +-80 +-11 ++6 +-19 +-13 +-5 +-9 ++5 ++13 +-8 +-17 +-14 +-10 +-16 +-5 +-11 ++6 ++6 +-9 +-13 +-4 +-20 ++13 ++3 ++15 ++4 ++18 ++3 +-13 +-7 ++11 +-20 +-6 ++18 ++13 +-23 ++13 +-17 +-18 +-5 ++7 ++8 +-13 +-23 +-18 ++14 ++2 ++7 +-1 ++5 +-16 +-15 ++7 +-8 ++10 +-16 +-10 +-22 ++3 ++18 ++8 +-6 +-4 ++7 ++24 +-8 +-22 ++27 ++15 ++1 +-14 +-47 +-22 +-10 ++48 +-56 +-41 +-9 ++73 ++79 +-9 ++48 +-11 ++36 ++6 +-16 ++20 ++10 ++13 +-20 ++12 ++9 ++3 ++4 ++9 +-12 ++15 ++2 ++19 ++8 ++16 ++13 +-19 +-23 ++10 +-18 ++12 ++20 ++3 ++12 +-17 +-8 ++20 ++3 ++8 ++2 +-17 +-13 +-18 +-8 +-28 ++7 ++1 ++4 +-1 +-29 ++131 +-4 ++8 +-27 +-32 ++14 +-16 +-10 +-77 +-31 ++160 +-115 +-130 +-103 ++930 ++75389 +-16 +-5 ++4 ++8 ++2 +-7 ++6 ++7 ++11 +-8 ++4 +-3 +-5 ++13 ++7 +-5 ++7 +-5 +-1 ++11 ++18 ++19 +-18 ++7 +-14 ++2 +-5 ++12 ++11 ++15 +-17 +-6 ++17 ++3 +-4 ++9 ++16 +-13 ++2 ++19 +-7 +-3 ++18 ++20 +-11 ++13 ++3 ++4 +-2 ++14 ++9 +-17 ++2 ++8 +-5 +-8 ++2 ++10 ++17 ++2 ++15 +-1 +-11 ++13 +-9 +-5 +-19 +-18 +-16 +-14 +-7 +-13 +-11 +-10 ++15 ++7 ++18 +-12 +-9 +-16 ++3 +-14 +-1 ++16 +-9 +-12 +-19 ++1 +-5 +-15 +-14 +-7 ++17 +-1 +-19 +-9 ++6 ++12 +-21 +-20 +-11 +-6 ++8 ++5 ++10 +-2 ++12 +-13 ++6 ++12 +-10 ++13 +-6 ++19 +-3 +-22 +-18 +-4 +-3 ++20 ++10 +-3 +-19 +-9 ++6 +-7 +-13 +-18 +-18 +-3 ++10 +-13 +-14 +-6 ++9 ++20 ++5 ++5 ++16 ++14 ++14 +-19 +-19 ++11 ++10 +-14 +-17 +-19 +-6 +-11 +-13 +-1 +-18 +-14 ++10 +-8 ++1 ++1 ++15 ++8 +-15 ++6 +-9 ++2 ++12 ++13 +-7 +-5 +-19 +-6 +-1 +-19 +-12 +-1 +-4 +-6 +-16 ++2 +-20 +-15 ++5 ++9 +-19 ++12 ++9 +-15 +-5 +-12 +-6 +-12 +-11 ++13 +-11 +-9 +-2 +-16 +-17 +-9 ++16 ++20 ++5 ++20 +-7 +-6 ++4 +-12 +-1 +-5 +-22 +-19 ++10 +-9 +-4 +-5 +-8 +-11 +-18 +-13 ++20 ++1 +-12 ++7 +-19 ++10 +-8 ++13 +-7 +-19 +-15 +-2 ++7 +-18 +-14 ++2 ++15 +-6 +-20 +-10 ++20 ++3 +-19 +-19 +-22 +-14 ++7 ++10 +-15 +-12 +-18 +-7 +-20 +-12 ++1 ++14 ++13 +-8 +-1 +-10 +-13 ++9 ++11 ++7 ++18 +-4 ++6 +-3 ++20 ++18 +-14 +-3 ++11 ++15 ++8 +-9 ++28 ++15 ++13 ++14 ++4 +-13 +-1 +-14 +-5 +-20 ++16 ++10 ++11 ++32 ++23 ++18 ++3 ++3 +-12 ++4 ++11 ++14 ++17 ++2 ++6 +-5 ++19 ++12 ++17 +-15 +-10 +-15 +-5 +-17 ++20 ++20 +-14 ++23 +-14 ++26 +-11 ++9 ++21 ++4 ++16 +-4 ++5 +-11 +-8 +-10 +-5 ++14 +-2 +-4 ++12 +-10 ++16 ++1 ++12 ++1 +-2 +-17 ++10 ++21 +-9 ++15 +-9 ++14 ++3 +-1 ++5 ++19 ++10 +-7 +-10 +-13 ++14 +-2 ++16 ++10 +-1 +-20 ++9 +-8 +-9 +-19 ++18 ++3 +-18 ++11 +-1 +-5 ++21 ++22 ++4 +-11 ++6 ++18 +-8 ++10 ++12 +-19 +-5 ++25 ++5 +-12 +-12 ++3 ++14 ++15 ++4 ++6 ++19 ++18 ++7 +-16 +-1 +-13 +-6 +-1 ++11 +-7 ++13 +-15 +-5 ++13 ++21 +-3 +-14 +-8 +-16 ++13 ++2 +-9 +-18 ++21 +-20 +-20 ++18 +-19 +-22 ++20 +-3 +-4 +-9 +-8 +-20 ++1 +-21 +-4 +-9 +-1 ++18 +-7 ++10 ++20 +-16 ++23 ++17 ++9 +-19 +-3 ++9 ++5 ++2 +-25 ++1 +-15 +-55 +-13 +-10 +-11 ++1 +-14 +-12 ++23 ++15 ++15 +-2 ++19 +-7 +-6 ++10 ++12 ++1 ++8 +-51 ++28 ++24 +-98 ++16 +-3 +-5 +-13 +-37 ++6 +-14 ++9 +-12 +-6 +-23 ++16 +-12 +-10 ++3 ++41 ++4 ++20 +-13 +-5 +-1 +-64 +-30 +-11 +-23 +-46 +-27 +-11 +-75223 diff --git a/src/adventofcode2018/data/day01/day_01_test.txt b/src/adventofcode2018/data/day01/day_01_test.txt new file mode 100644 index 00000000..2d76a488 --- /dev/null +++ b/src/adventofcode2018/data/day01/day_01_test.txt @@ -0,0 +1,28 @@ +-9 ++7 ++5 +-13 ++6 ++14 +-5 +-10 +-10 +-12 ++2 ++5 ++2 +-6 +-12 ++1 ++13 ++5 ++3 +-15 +-12 ++4 +-11 ++10 +-5 +-14 +-6 ++2 diff --git a/src/adventofcode2018/data/day02/day_02.txt b/src/adventofcode2018/data/day02/day_02.txt new file mode 100644 index 00000000..871b0e42 --- /dev/null +++ b/src/adventofcode2018/data/day02/day_02.txt @@ -0,0 +1,250 @@ +luojygedpvsthptkxiwnaorzmq +lucjqgedppsbhftkxiwnaorlmq +lucjmgefpvsbhftkxiwnaorziq +lucjvgedpvsbxftkxiwpaorzmq +lrcjygedjvmbhftkxiwnaorzmq +lucjygedpvsbhftkxiwnootzmu +eucjygedpvsbhftbxiwnaorzfq +lulnygedpvsbhftkxrwnaorzmq +lucsygedpvsohftkxqwnaorzmq +lucjyaedpvsnhftkxiwnaorzyq +lunjygedpvsohftkxiwnaorzmb +lucjxgedpvsbhrtkxiwnamrzmq +lucjygevpvsbhftkxcwnaorzma +lucjbgedpvsbhftrxiwnaoazmq +llcjygkdpvhbhftkxiwnaorzmq +lmcjygxdpvsbhftkxswnaorzmq +lucpygedpvsbhftkxiwraorzmc +lucjbgrdpvsblftkxiwnaorzmq +lucjfgedpvsbhftkxiwnaurzmv +lucjygenpvsbhytkxiwnaorgmq +luqjyredsvsbhftkxiwnaorzmq +lucjygedpvavhftkxiwnaorumq +gucjygedpvsbhkxkxiwnaorzmq +lucjygedpvsbhftkxlwnaordcq +lucjygedpvibhfqkxiwnaorzmm +lucjegedpvsbaftkxewnaorzmq +kucjygeqpvsbhfokxiwnaorzmq +lugjygedwvsbhftkxiwnatrzmq +lucjygedqvsbhftdxiwnayrzmq +lucjygekpvsbuftkxiwnaqrzmq +lucjygedpvsbhfbkxiwnaoozdq +lscjygedpvzchftkxiwnaorzmq +luckygedpvsbxftkxiwnaorvmq +luyjygedgvsbhptkxiwnaorzmq +lmcjygedpvsbhfckxiwnaodzmq +lucmygedwvybhftkxiwnaorzmq +lgcjhgedavsbhftkxiwnaorzmq +lucjugedpvsbhftkxiwmaoozmq +lucjygedpvybhftkxkwnaorumq +lucjygedpvzbhfakxiwnaorzpq +lucjygedpvsbhftyxzwnajrzmq +lucjygedpvsdhfakxiwnoorzmq +luyjygeopvhbhftkxiwnaorzmq +lucjygadpvsbhntkxiwnaorzmx +lucjygedzvsbhftkiiwuaorzmq +sucjygodpvsbhftkxiwuaorzmq +euijygydpvsbhftkxiwnaorzmq +lucjlgeduvsbhftkxicnaorzmq +lucjdgedpvsbhfgkxiwnhorzmq +lucjymedpvsbhotkxiqnaorzmq +lucjygmdpvsbhftkxywnairzmq +lucjggedpvsbhfxkxiqnaorzmq +sucjygedpvsbhftkxiwnaorjmv +lucjlgedpvsbhftkxiwnairzmg +lucjygedppubhftkxijnaorzmq +lucjyxedpvsvhftkxlwnaorzmq +lucjygedpvxbhftkfiwyaorzmq +lucjygedposbhftkniwnaorzmw +lucjygewpvsbhftgxiwnavrzmq +lucjynedpvsbmftkaiwnaorzmq +lucjyhedpvzbhftkxiwncorzmq +lucjygedpvsbhfikpiwnaoezmq +lupjypedpvsbhftkjiwnaorzmq +lucjygudpvsbhfwkxivnaorzmq +lucjygrdpvsbhatkxzwnaorzmq +lucjbgmdpvsbhftkxihnaorzmq +lucjmgedpvpbhftkxiwnaorcmq +lucjygedpvskhfukmiwnaorzmq +lucjygedgvsbhftkxiwnvprzmq +lucjzgedppsbhytkxiwnaorzmq +lfcjypedpvsbhftrxiwnaorzmq +lucjyqldphsbhftkxiwnaorzmq +lucjygedpvsbhftzxewnaorzqq +lucjygeapvsbhftkxiinoorzmq +lucjygedpvszhftguiwnaorzmq +luojygedpvsbhftkxawnaornmq +lucjygedpcsboetkxiwnaorzmq +lufjygedpvfbhftaxiwnaorzmq +luciygedpvsbhftkxhwaaorzmq +lucjygedpvnbhftkaiwnaorzmc +lucjygedpvsbhftkxiwcaorbdq +lucjygelpvsbhftaxiwsaorzmq +lujjygedpssbhftkxiwnaorzmr +ludjygedpvsbhftkxiynaorzmj +lukjygeedvsbhftkxiwnaorzmq +lucjqpedpvsbhftkxiwnaozzmq +jucjygedpvsbhftkxgwnaorqmq +llwjygedpvsbhetkxiwnaorzmq +rucjygedpvsbhftkxiwndorymq +lucjygedpvsbhftvxswnaorwmq +lucjygerpvsbhfykxiwnaormmq +lucjynedpvsbhftkxijnaorziq +ljcjygedpvrbhftkeiwnaorzmq +lucjygedpnsbhftkxiwhaornmq +lucjygadpvsbhftkxibnaorzqq +lucjqgedpvsihftkxiwnaorzdq +lucjygedpvsqhfttjiwnaorzmq +llcjygedsvsbhftkxiwwaorzmq +lfckygedpvsbhftkxiunaorzmq +lucjyeedpdsbhftkxiwnaotzmq +lucjygedpvsbhftkoiwnaoqzcq +huwjvgedpvsbhftkxiwnaorzmq +lucjygldpvsbdhtkxiwnaorzmq +lycxygedpvsbhftmxiwnaorzmq +lucjygedpvsbhftyxianvorzmq +lucuygedpdsbhqtkxiwnaorzmq +lucjyggdpvsbhftkxiwnavremq +lucjyggdpvsbkftkxiwnaorbmq +luchyqedpvsbhftixiwnaorzmq +lpcnygedpvsbhftkxzwnaorzmq +lucjygedpvsihftkxiwfaortmq +lucjygvdpvsbhgtkxiwnamrzmq +lucjygodpvrbhqtkxiwnaorzmq +lucjygedpfsbhftkxipnaorzma +lucjygedpvsbhftkxpcjaorzmq +lucjygodbmsbhftkxiwnaorzmq +lucjygedpvsbhftkxipnaogzmb +luxjygjdpvsbhltkxiwnaorzmq +lucxygedpvsbhftkxzwnaorjmq +luajygedpvsbhftzxiwaaorzmq +lhcjygedpvsqhftfxiwnaorzmq +lucjygecphsbhftkxiwnaprzmq +lucjygedpvsbhptkxifnaorqmq +lucjygedpvichftkpiwnaorzmq +lucjygedpcsbhstkxswnaorzmq +kucjygedpvsbhftkxiwbyorzmq +lfpjxgedpvsbhftkxiwnaorzmq +lucjytldpvsbhftkxiwdaorzmq +lufjygedpvfbhftbxiwnaorzmq +lucjygebpvgbhftkxipnaorzmq +luujygedpvdbhftkxiwnaorzmd +lucjygedpvsbhfbyxwwnaorzmq +lucjygedpvsbhftkxiwnaoqpmw +qucgygedpvsbhftkxiwnaortmq +ludjtgedpvsbhftkxiunaorzmq +lucjyiedovsbhftkxiwjaorzmq +lucjygedpysbjftoxiwnaorzmq +lumjygedpvsbuftkxiknaorzmq +lucjygedpvsbhfokxgonaorzmq +lucjygeqpvsbhftkfiwnaorzeq +lucjygedpvskhftkxiwntorkmq +luujygedpvsbhftkxiwraorzmt +lucwygedpvsbjftkxiwnaorzmj +jucjyfedcvsbhftkxiwnaorzmq +luujygedpnsehftkxiwnaorzmq +lucjygedpvszhfckxiwnaorzmi +lucjyredpvsbzftkpiwnaorzmq +lucjygedpvsbwfgkxiwnaorzoq +lucjygedpvgbhftkpiwnaorzms +lucjygedpvjbhftkxzwnaoizmq +vucjycedpvsbhftkxiwfaorzmq +luawygeapvsbhftkxiwnaorzmq +lucjygetpvsbhftkxiwnaafzmq +lucjvgedpvsbhftkxywnavrzmq +luolygedpvsbgftkxiwnaorzmq +likjygedpvsbhftkxiwnabrzmq +lucjygedovsbhftkxirpaorzmq +lucjygedphsshftkxqwnaorzmq +uuqjygewpvsbhftkxiwnaorzmq +lucjygedcvsbhftkxiwoarrzmq +lucnygedpvsbhfakxiwnaorzms +lucjygedpvsbhntkxiwnawrzmb +lucjygedpvsblfxkxivnaorzmq +lucjygedpvsghftkxiwnaawzmq +yucjygedpgsbhftkxiwnaorzbq +lucjyweapvsbhftkxiwnaoezmq +lucjygevpvsbyftcxiwnaorzmq +luejygedovsbhftkxiwnqorzmq +lucjyqedpvsbhfbkxiwnaorzms +lucjypedpvsbhftwxiwnhorzmq +lucjygedpvsbhmtkviwxaorzmq +lucjogedpvpbhftkxiwnaorqmq +lucjygedpvsbhztkxkwnaoazmq +lucjyaedpvsbcftkxiwnaorzhq +lucjygbdpvkbhftkxiznaorzmq +lucpygedpvzbhftkxfwnaorzmq +lucjmgedpcsbhftkxiwnaoezmq +lucjygedyvsbbftkxiwnnorzmq +lucjyyedpvsbhftuxiwnaonzmq +lucjygfdpvsbhutkxiwnaorzmt +uccjygedpvschftkxiwnaorzmq +lusjygedpvbbhqtkxiwnaorzmq +ducuygedpvsbhftkxiwnaorzyq +lucjygkdvwsbhftkxiwnaorzmq +cucjyyedpvsbhftkxiwnaerzmq +lucjygedavsbhftkxiwnkorzbq +lucjygedmvsyhftkxiwiaorzmq +lucjygeipvsbhfpkxiwnaorzpq +vucjugedvvsbhftkxiwnaorzmq +lucjyzedpvsbhftkxpwnaoozmq +lucjygedpvgbhftkxiwtaorzqq +lecjygedpvcwhftkxiwnaorzmq +lucjyghdpvsbhfcyxiwnaorzmq +lucjygedpvesqftkxiwnaorzmq +lucjyjehpvsbhftbxiwnaorzmq +lucjygedpvtbhdtkxignaorzmq +lucjygxdpgsbhftkxivnaorzmq +lucjygvdpvsbhftkpiwnaorzqq +lucjysedpvsbhftkxiwnalrzmc +lucjygedpvkbhjtkxiwnaorsmq +lucjygedpvsbvfgkxiwnaerzmq +lucjygedpvsihftkxilnaorzmu +lvcvygndpvsbhftkxiwnaorzmq +lucjysedpqsbhftkxiwnaordmq +lucsygeypvsbhftkwiwnaorzmq +lucjygewpotbhftkxiwnaorzmq +lucjysedpvsbhftkxiwnanrzmv +lucjygedpvsbhutkxiwnaoplmq +wucjygedpvsqbftkxiwnaorzmq +lacjygeepvsbhftkxiwnjorzmq +lucjygedpusyhftkxicnaorzmq +qucjyredpvsbhftkxiwnworzmq +lucjygedevsbhftkgiwnayrzmq +lucjygedpksbrftkliwnaorzmq +lucjygedpvsbhfgkxisnaorzeq +lucjygedpvhdhftkeiwnaorzmq +lucjsgedpvsboftkxiwnaorumq +luctygedpvsbhftouiwnaorzmq +lucjygedpvsjhfukjiwnaorzmq +lucjagrepvsbhftkxiwnaorzmq +lucjkgerpvsbhftkxiwnairzmq +turjygedpvsbnftkxiwnaorzmq +lbcjygedpvsbhftkdpwnaorzmq +lucpygedpvsbhftkxnwnoorzmq +jucjygedpvsbhbtkxicnaorzmq +lecjygedpvsbhftkriwnaogzmq +licjyvcdpvsbhftkxiwnaorzmq +lrcjygewpnsbhftkxiwnaorzmq +ltcxygedpvlbhftkxiwnaorzmq +luctygedpvhbhztkxiwnaorzmq +lucwygedplsbhfakxiwnaorzmq +lucjygedpnsbhftkxiwjaoezmq +lucpygedptsbhftkxiwnaorzmo +lucjygedpvibhqtkxiknaorzmq +lucjwgqdpvrbhftkxiwnaorzmq +lucjmgkdpvsbhftkxiwraorzmq +lucjygwupvsbhftkxiznaorzmq +lucjhgedpvobhftkxiwncorzmq +lucjygedpvsbhftkxiwnaohtmj +lucjygedpvsbeftkfiwnaorzyq +lucjygcdpvsbpftkhiwnaorzmq +lucjygedpmsbhftkxiwnkouzmq +oucjygedpvsbyftkximnaorzmq +lucjcgedpvsbhftkxywnforzmq +lfcjygedfvsbdftkxiwnaorzmq +ducjygedevsbhfttxiwnaorzmq +ldcjdgedpvsbhftkxiwnavrzmq +lucjymedmvsbhqtkxiwnaorzmq +lucjygedpvabhftkxiwnasrlmq +lucjygefpvsbhftkxmwnaorkmq diff --git a/src/adventofcode2018/data/day03/day_03.txt b/src/adventofcode2018/data/day03/day_03.txt new file mode 100644 index 00000000..9aee2f76 --- /dev/null +++ b/src/adventofcode2018/data/day03/day_03.txt @@ -0,0 +1,1357 @@ +#1 @ 872,519: 18x18 +#2 @ 309,394: 15x21 +#3 @ 655,494: 12x23 +#4 @ 298,689: 12x25 +#5 @ 88,316: 20x10 +#6 @ 461,76: 10x17 +#7 @ 413,502: 19x29 +#8 @ 440,834: 19x24 +#9 @ 964,907: 21x23 +#10 @ 398,72: 12x19 +#11 @ 260,39: 17x12 +#12 @ 410,568: 27x24 +#13 @ 220,304: 28x21 +#14 @ 921,334: 17x24 +#15 @ 203,366: 13x14 +#16 @ 123,904: 24x28 +#17 @ 361,924: 15x25 +#18 @ 63,475: 16x23 +#19 @ 856,389: 27x22 +#20 @ 805,35: 15x27 +#21 @ 544,395: 29x18 +#22 @ 597,522: 17x18 +#23 @ 202,885: 16x12 +#24 @ 546,636: 28x21 +#25 @ 872,224: 28x24 +#26 @ 5,649: 25x10 +#27 @ 446,895: 20x28 +#28 @ 447,764: 22x17 +#29 @ 797,721: 22x22 +#30 @ 262,528: 27x16 +#31 @ 381,531: 11x23 +#32 @ 672,580: 11x25 +#33 @ 885,889: 29x24 +#34 @ 830,749: 28x23 +#35 @ 484,635: 16x14 +#36 @ 693,619: 18x21 +#37 @ 246,652: 12x27 +#38 @ 760,346: 12x4 +#39 @ 667,154: 23x16 +#40 @ 58,695: 24x11 +#41 @ 662,250: 19x17 +#42 @ 401,950: 3x4 +#43 @ 529,596: 29x23 +#44 @ 71,768: 18x27 +#45 @ 474,562: 11x26 +#46 @ 328,100: 15x24 +#47 @ 825,386: 24x21 +#48 @ 564,706: 13x18 +#49 @ 347,152: 17x26 +#50 @ 827,921: 29x14 +#51 @ 580,230: 10x15 +#52 @ 929,459: 12x28 +#53 @ 48,841: 18x29 +#54 @ 383,356: 29x26 +#55 @ 921,38: 27x24 +#56 @ 895,382: 20x23 +#57 @ 676,91: 12x24 +#58 @ 687,10: 14x22 +#59 @ 352,189: 25x26 +#60 @ 578,500: 29x21 +#61 @ 248,32: 16x15 +#62 @ 158,950: 17x19 +#63 @ 193,726: 17x20 +#64 @ 213,673: 23x18 +#65 @ 633,739: 14x10 +#66 @ 482,741: 11x27 +#67 @ 143,670: 17x22 +#68 @ 397,889: 22x28 +#69 @ 855,733: 14x27 +#70 @ 12,537: 12x4 +#71 @ 32,65: 12x25 +#72 @ 527,755: 14x29 +#73 @ 560,69: 20x22 +#74 @ 550,257: 11x29 +#75 @ 65,46: 25x11 +#76 @ 661,767: 25x23 +#77 @ 236,252: 17x28 +#78 @ 950,964: 17x17 +#79 @ 304,746: 11x13 +#80 @ 818,320: 29x23 +#81 @ 509,370: 24x29 +#82 @ 344,949: 10x28 +#83 @ 22,636: 24x25 +#84 @ 237,50: 26x27 +#85 @ 353,950: 23x24 +#86 @ 177,425: 20x22 +#87 @ 374,122: 29x19 +#88 @ 606,383: 20x13 +#89 @ 162,935: 21x19 +#90 @ 129,460: 23x12 +#91 @ 169,207: 20x10 +#92 @ 209,883: 12x27 +#93 @ 718,379: 12x15 +#94 @ 79,656: 17x25 +#95 @ 933,492: 25x24 +#96 @ 387,891: 21x22 +#97 @ 360,312: 29x23 +#98 @ 737,879: 29x28 +#99 @ 969,337: 24x17 +#100 @ 737,135: 22x20 +#101 @ 278,798: 26x24 +#102 @ 71,837: 29x14 +#103 @ 34,620: 20x26 +#104 @ 509,787: 20x23 +#105 @ 586,245: 21x27 +#106 @ 779,126: 24x27 +#107 @ 571,197: 15x22 +#108 @ 592,431: 13x22 +#109 @ 834,30: 18x19 +#110 @ 745,618: 16x28 +#111 @ 89,31: 14x16 +#112 @ 54,529: 22x29 +#113 @ 900,906: 28x15 +#114 @ 119,818: 15x13 +#115 @ 200,865: 18x15 +#116 @ 953,158: 12x15 +#117 @ 606,65: 13x14 +#118 @ 481,505: 14x22 +#119 @ 317,201: 14x25 +#120 @ 246,771: 15x15 +#121 @ 277,269: 23x16 +#122 @ 686,1: 19x17 +#123 @ 388,162: 24x17 +#124 @ 945,671: 27x14 +#125 @ 599,504: 23x22 +#126 @ 927,725: 13x25 +#127 @ 468,513: 15x20 +#128 @ 556,325: 13x19 +#129 @ 526,273: 13x15 +#130 @ 123,245: 18x13 +#131 @ 191,869: 11x21 +#132 @ 954,648: 11x27 +#133 @ 962,963: 19x15 +#134 @ 768,127: 11x23 +#135 @ 814,365: 10x22 +#136 @ 349,748: 24x29 +#137 @ 345,553: 21x18 +#138 @ 401,888: 14x20 +#139 @ 342,879: 19x16 +#140 @ 248,707: 23x25 +#141 @ 559,707: 11x15 +#142 @ 778,93: 12x26 +#143 @ 690,904: 21x25 +#144 @ 358,92: 28x12 +#145 @ 618,591: 19x22 +#146 @ 727,834: 27x29 +#147 @ 401,219: 14x13 +#148 @ 791,443: 10x25 +#149 @ 633,248: 26x17 +#150 @ 231,660: 25x24 +#151 @ 935,121: 12x24 +#152 @ 177,935: 23x23 +#153 @ 822,778: 20x21 +#154 @ 972,929: 26x13 +#155 @ 87,957: 23x18 +#156 @ 663,595: 19x27 +#157 @ 523,819: 19x19 +#158 @ 209,714: 22x19 +#159 @ 644,216: 14x8 +#160 @ 459,794: 12x14 +#161 @ 560,926: 26x21 +#162 @ 200,860: 11x13 +#163 @ 535,250: 18x28 +#164 @ 246,436: 19x12 +#165 @ 100,7: 19x13 +#166 @ 927,325: 27x29 +#167 @ 512,160: 21x28 +#168 @ 647,858: 14x19 +#169 @ 45,646: 26x16 +#170 @ 48,55: 10x21 +#171 @ 520,608: 17x20 +#172 @ 676,64: 26x26 +#173 @ 668,51: 22x22 +#174 @ 268,323: 20x26 +#175 @ 626,798: 11x14 +#176 @ 595,47: 25x28 +#177 @ 703,655: 18x25 +#178 @ 701,900: 15x28 +#179 @ 907,336: 26x10 +#180 @ 801,327: 19x23 +#181 @ 378,444: 28x16 +#182 @ 205,123: 5x17 +#183 @ 903,595: 21x25 +#184 @ 767,138: 23x21 +#185 @ 963,370: 14x23 +#186 @ 685,508: 28x24 +#187 @ 425,609: 14x19 +#188 @ 643,312: 19x29 +#189 @ 263,409: 28x24 +#190 @ 194,604: 12x26 +#191 @ 956,812: 27x11 +#192 @ 346,777: 18x16 +#193 @ 417,0: 26x11 +#194 @ 537,213: 27x24 +#195 @ 257,523: 24x16 +#196 @ 240,448: 23x16 +#197 @ 440,761: 10x24 +#198 @ 76,20: 26x11 +#199 @ 778,205: 24x24 +#200 @ 107,752: 22x19 +#201 @ 366,626: 14x10 +#202 @ 342,695: 24x19 +#203 @ 67,925: 29x13 +#204 @ 267,615: 13x24 +#205 @ 530,595: 10x20 +#206 @ 219,967: 15x21 +#207 @ 351,76: 10x20 +#208 @ 585,236: 27x13 +#209 @ 323,548: 25x20 +#210 @ 270,337: 29x22 +#211 @ 257,425: 27x18 +#212 @ 670,304: 18x11 +#213 @ 252,652: 27x12 +#214 @ 567,413: 25x10 +#215 @ 117,696: 19x17 +#216 @ 925,914: 27x23 +#217 @ 394,343: 14x10 +#218 @ 661,166: 10x21 +#219 @ 469,920: 29x12 +#220 @ 54,400: 17x24 +#221 @ 814,184: 18x3 +#222 @ 205,260: 16x28 +#223 @ 810,181: 26x12 +#224 @ 265,342: 14x15 +#225 @ 785,674: 16x24 +#226 @ 810,515: 13x28 +#227 @ 767,861: 11x26 +#228 @ 277,296: 24x16 +#229 @ 20,555: 14x10 +#230 @ 591,806: 14x11 +#231 @ 96,568: 11x27 +#232 @ 387,447: 16x24 +#233 @ 333,696: 22x23 +#234 @ 890,598: 25x17 +#235 @ 427,698: 18x11 +#236 @ 421,322: 17x18 +#237 @ 179,188: 10x27 +#238 @ 894,915: 10x27 +#239 @ 110,838: 15x24 +#240 @ 640,831: 26x29 +#241 @ 107,209: 28x20 +#242 @ 68,910: 15x17 +#243 @ 227,318: 16x16 +#244 @ 576,552: 14x28 +#245 @ 854,527: 22x23 +#246 @ 676,89: 11x14 +#247 @ 280,16: 22x22 +#248 @ 871,406: 23x25 +#249 @ 389,396: 24x21 +#250 @ 299,615: 26x24 +#251 @ 215,516: 24x22 +#252 @ 512,602: 27x23 +#253 @ 520,737: 25x21 +#254 @ 199,198: 16x21 +#255 @ 897,450: 20x28 +#256 @ 602,173: 28x16 +#257 @ 635,22: 17x10 +#258 @ 913,765: 27x24 +#259 @ 194,319: 19x18 +#260 @ 566,550: 13x9 +#261 @ 394,433: 22x26 +#262 @ 620,354: 10x24 +#263 @ 87,44: 17x27 +#264 @ 655,585: 28x16 +#265 @ 140,666: 11x20 +#266 @ 395,47: 10x28 +#267 @ 10,878: 24x23 +#268 @ 775,820: 24x13 +#269 @ 613,875: 21x23 +#270 @ 717,465: 12x19 +#271 @ 957,607: 23x24 +#272 @ 509,845: 19x15 +#273 @ 324,798: 12x24 +#274 @ 526,406: 18x11 +#275 @ 500,525: 29x26 +#276 @ 141,386: 21x18 +#277 @ 899,780: 17x16 +#278 @ 266,412: 10x16 +#279 @ 501,298: 22x23 +#280 @ 86,392: 27x11 +#281 @ 366,878: 21x27 +#282 @ 582,114: 16x14 +#283 @ 633,282: 24x21 +#284 @ 581,769: 28x20 +#285 @ 176,696: 21x26 +#286 @ 761,902: 19x24 +#287 @ 199,764: 13x14 +#288 @ 685,909: 19x29 +#289 @ 291,364: 15x17 +#290 @ 541,903: 21x27 +#291 @ 286,478: 20x13 +#292 @ 752,925: 13x20 +#293 @ 300,655: 18x28 +#294 @ 548,234: 19x18 +#295 @ 300,553: 27x24 +#296 @ 838,49: 15x24 +#297 @ 953,623: 26x17 +#298 @ 642,212: 28x18 +#299 @ 85,684: 13x5 +#300 @ 732,83: 12x13 +#301 @ 589,678: 23x20 +#302 @ 591,235: 19x18 +#303 @ 487,579: 15x13 +#304 @ 430,608: 20x24 +#305 @ 685,163: 15x17 +#306 @ 225,324: 11x14 +#307 @ 584,51: 29x13 +#308 @ 725,382: 13x14 +#309 @ 301,804: 21x13 +#310 @ 966,68: 21x16 +#311 @ 351,125: 28x19 +#312 @ 75,384: 21x10 +#313 @ 558,77: 27x18 +#314 @ 601,617: 20x13 +#315 @ 699,884: 15x28 +#316 @ 138,237: 28x26 +#317 @ 234,663: 21x10 +#318 @ 650,556: 27x24 +#319 @ 130,970: 24x21 +#320 @ 884,348: 12x25 +#321 @ 368,145: 24x25 +#322 @ 52,38: 17x25 +#323 @ 118,843: 27x22 +#324 @ 641,812: 25x28 +#325 @ 176,617: 15x11 +#326 @ 609,592: 10x20 +#327 @ 647,336: 29x19 +#328 @ 173,286: 19x13 +#329 @ 542,684: 17x10 +#330 @ 102,621: 21x20 +#331 @ 235,956: 15x24 +#332 @ 59,910: 22x24 +#333 @ 398,65: 16x27 +#334 @ 912,870: 28x15 +#335 @ 80,311: 24x13 +#336 @ 91,1: 11x19 +#337 @ 265,17: 16x27 +#338 @ 524,816: 16x14 +#339 @ 553,687: 26x24 +#340 @ 456,639: 29x11 +#341 @ 603,539: 27x14 +#342 @ 524,8: 20x29 +#343 @ 212,377: 26x13 +#344 @ 161,914: 27x25 +#345 @ 467,571: 13x22 +#346 @ 433,148: 13x12 +#347 @ 287,779: 25x10 +#348 @ 82,762: 21x25 +#349 @ 255,300: 29x23 +#350 @ 671,716: 13x28 +#351 @ 261,892: 10x18 +#352 @ 501,373: 12x19 +#353 @ 962,215: 18x20 +#354 @ 596,110: 13x20 +#355 @ 57,830: 27x12 +#356 @ 903,215: 17x19 +#357 @ 609,943: 16x28 +#358 @ 81,959: 25x23 +#359 @ 843,405: 23x22 +#360 @ 579,304: 11x21 +#361 @ 765,718: 22x17 +#362 @ 386,833: 19x20 +#363 @ 569,433: 19x23 +#364 @ 352,186: 25x13 +#365 @ 657,491: 24x22 +#366 @ 487,669: 22x17 +#367 @ 825,15: 24x25 +#368 @ 350,129: 11x28 +#369 @ 300,28: 15x17 +#370 @ 263,645: 29x10 +#371 @ 79,857: 17x17 +#372 @ 514,13: 28x20 +#373 @ 431,459: 11x25 +#374 @ 85,221: 11x28 +#375 @ 757,645: 22x14 +#376 @ 151,326: 24x12 +#377 @ 98,10: 21x11 +#378 @ 904,873: 18x11 +#379 @ 756,605: 25x13 +#380 @ 599,422: 24x19 +#381 @ 420,146: 21x11 +#382 @ 64,264: 27x20 +#383 @ 870,832: 13x26 +#384 @ 604,45: 21x17 +#385 @ 854,893: 19x22 +#386 @ 109,749: 18x25 +#387 @ 843,24: 25x26 +#388 @ 198,504: 10x14 +#389 @ 282,332: 25x28 +#390 @ 611,584: 14x14 +#391 @ 811,607: 15x12 +#392 @ 125,671: 16x23 +#393 @ 387,396: 13x29 +#394 @ 190,248: 19x12 +#395 @ 200,431: 27x17 +#396 @ 674,168: 21x14 +#397 @ 572,378: 11x29 +#398 @ 900,186: 21x15 +#399 @ 653,903: 16x24 +#400 @ 964,207: 20x24 +#401 @ 916,325: 14x16 +#402 @ 894,330: 11x19 +#403 @ 583,294: 26x22 +#404 @ 893,616: 26x29 +#405 @ 626,329: 11x19 +#406 @ 816,895: 18x20 +#407 @ 888,389: 15x13 +#408 @ 617,291: 25x29 +#409 @ 435,697: 10x21 +#410 @ 104,91: 17x11 +#411 @ 370,931: 10x10 +#412 @ 163,187: 14x10 +#413 @ 453,714: 11x16 +#414 @ 408,669: 20x15 +#415 @ 563,572: 17x17 +#416 @ 299,519: 20x20 +#417 @ 969,966: 13x22 +#418 @ 728,76: 19x13 +#419 @ 976,894: 24x28 +#420 @ 492,640: 19x17 +#421 @ 258,325: 27x11 +#422 @ 742,152: 16x29 +#423 @ 588,499: 24x18 +#424 @ 685,47: 12x20 +#425 @ 295,380: 21x21 +#426 @ 829,447: 14x19 +#427 @ 66,20: 25x22 +#428 @ 824,901: 27x27 +#429 @ 238,260: 28x24 +#430 @ 357,629: 26x24 +#431 @ 700,530: 20x20 +#432 @ 738,351: 19x25 +#433 @ 541,902: 17x21 +#434 @ 118,129: 27x14 +#435 @ 886,854: 25x28 +#436 @ 14,209: 24x11 +#437 @ 846,404: 26x21 +#438 @ 939,150: 20x16 +#439 @ 938,702: 26x17 +#440 @ 4,207: 19x14 +#441 @ 595,900: 21x10 +#442 @ 463,477: 23x13 +#443 @ 433,463: 23x11 +#444 @ 773,407: 27x20 +#445 @ 894,772: 11x22 +#446 @ 918,766: 19x15 +#447 @ 886,771: 13x10 +#448 @ 664,140: 16x17 +#449 @ 259,599: 16x7 +#450 @ 82,855: 16x29 +#451 @ 213,358: 19x29 +#452 @ 555,899: 23x22 +#453 @ 487,369: 24x13 +#454 @ 41,524: 17x13 +#455 @ 694,431: 29x14 +#456 @ 707,680: 17x10 +#457 @ 216,126: 28x24 +#458 @ 888,242: 10x12 +#459 @ 653,254: 14x22 +#460 @ 587,252: 24x11 +#461 @ 593,939: 18x29 +#462 @ 432,511: 21x24 +#463 @ 167,75: 28x20 +#464 @ 599,874: 18x10 +#465 @ 857,596: 11x26 +#466 @ 673,153: 14x19 +#467 @ 175,87: 26x24 +#468 @ 921,560: 25x21 +#469 @ 717,160: 11x13 +#470 @ 201,306: 17x17 +#471 @ 229,449: 14x15 +#472 @ 698,288: 16x11 +#473 @ 644,122: 12x15 +#474 @ 611,609: 15x24 +#475 @ 125,399: 24x15 +#476 @ 498,546: 17x19 +#477 @ 351,618: 12x23 +#478 @ 752,902: 12x10 +#479 @ 342,632: 15x12 +#480 @ 342,142: 15x14 +#481 @ 346,966: 24x14 +#482 @ 579,125: 11x24 +#483 @ 440,511: 25x29 +#484 @ 930,919: 25x11 +#485 @ 489,573: 14x25 +#486 @ 543,888: 22x25 +#487 @ 975,915: 18x15 +#488 @ 32,678: 27x24 +#489 @ 759,944: 21x11 +#490 @ 39,722: 16x20 +#491 @ 62,925: 23x10 +#492 @ 507,311: 22x17 +#493 @ 710,424: 14x22 +#494 @ 614,493: 12x24 +#495 @ 397,943: 20x11 +#496 @ 855,21: 29x27 +#497 @ 518,532: 19x21 +#498 @ 179,73: 17x28 +#499 @ 896,126: 11x13 +#500 @ 424,253: 18x26 +#501 @ 122,203: 19x17 +#502 @ 67,750: 21x25 +#503 @ 733,372: 15x12 +#504 @ 929,576: 25x29 +#505 @ 43,909: 28x20 +#506 @ 115,509: 17x25 +#507 @ 205,94: 13x13 +#508 @ 380,75: 21x12 +#509 @ 272,753: 17x13 +#510 @ 114,285: 24x13 +#511 @ 762,794: 24x15 +#512 @ 966,207: 25x19 +#513 @ 847,653: 7x14 +#514 @ 518,131: 16x12 +#515 @ 661,940: 19x27 +#516 @ 166,919: 27x12 +#517 @ 171,327: 23x12 +#518 @ 204,111: 22x29 +#519 @ 235,339: 15x17 +#520 @ 245,5: 27x20 +#521 @ 638,295: 24x28 +#522 @ 494,288: 26x18 +#523 @ 887,92: 29x10 +#524 @ 574,65: 11x20 +#525 @ 677,583: 11x21 +#526 @ 722,661: 23x11 +#527 @ 74,386: 22x26 +#528 @ 939,727: 19x10 +#529 @ 375,422: 21x17 +#530 @ 658,559: 21x25 +#531 @ 803,585: 19x28 +#532 @ 465,706: 18x23 +#533 @ 920,314: 19x28 +#534 @ 915,574: 17x29 +#535 @ 459,676: 21x12 +#536 @ 199,953: 11x16 +#537 @ 280,432: 22x18 +#538 @ 691,671: 15x20 +#539 @ 843,743: 17x25 +#540 @ 140,194: 27x20 +#541 @ 633,807: 22x18 +#542 @ 187,300: 23x20 +#543 @ 858,156: 23x26 +#544 @ 954,406: 12x20 +#545 @ 753,99: 21x17 +#546 @ 118,582: 17x12 +#547 @ 794,683: 17x10 +#548 @ 201,667: 29x26 +#549 @ 46,521: 25x13 +#550 @ 843,735: 22x20 +#551 @ 254,254: 23x17 +#552 @ 309,667: 29x20 +#553 @ 426,285: 16x25 +#554 @ 556,392: 20x10 +#555 @ 144,49: 14x19 +#556 @ 251,248: 12x17 +#557 @ 191,604: 24x11 +#558 @ 515,949: 10x10 +#559 @ 452,645: 14x19 +#560 @ 71,949: 13x14 +#561 @ 730,408: 17x12 +#562 @ 218,734: 20x12 +#563 @ 276,234: 24x25 +#564 @ 914,755: 16x12 +#565 @ 27,222: 23x22 +#566 @ 904,783: 22x10 +#567 @ 709,625: 18x13 +#568 @ 324,426: 25x23 +#569 @ 127,707: 23x18 +#570 @ 8,295: 29x24 +#571 @ 484,11: 25x20 +#572 @ 346,310: 23x28 +#573 @ 86,364: 20x29 +#574 @ 967,372: 4x17 +#575 @ 775,158: 14x11 +#576 @ 444,62: 20x20 +#577 @ 159,327: 11x25 +#578 @ 626,466: 5x4 +#579 @ 314,473: 14x17 +#580 @ 840,714: 14x20 +#581 @ 870,922: 14x13 +#582 @ 287,779: 13x23 +#583 @ 861,901: 16x10 +#584 @ 749,329: 23x24 +#585 @ 914,790: 27x22 +#586 @ 59,646: 10x12 +#587 @ 763,420: 16x14 +#588 @ 480,82: 20x20 +#589 @ 186,641: 19x29 +#590 @ 30,159: 11x18 +#591 @ 585,629: 29x16 +#592 @ 130,464: 15x22 +#593 @ 632,9: 12x15 +#594 @ 216,965: 22x27 +#595 @ 28,538: 14x22 +#596 @ 669,538: 11x25 +#597 @ 753,847: 21x26 +#598 @ 445,498: 29x12 +#599 @ 533,511: 17x17 +#600 @ 344,422: 19x11 +#601 @ 58,850: 14x22 +#602 @ 225,268: 10x24 +#603 @ 969,920: 14x20 +#604 @ 654,159: 20x17 +#605 @ 55,859: 28x15 +#606 @ 917,927: 20x14 +#607 @ 756,585: 22x11 +#608 @ 51,638: 15x27 +#609 @ 568,379: 21x15 +#610 @ 129,277: 23x21 +#611 @ 20,362: 22x11 +#612 @ 398,948: 10x12 +#613 @ 950,627: 24x23 +#614 @ 536,556: 29x22 +#615 @ 461,490: 28x19 +#616 @ 248,208: 19x14 +#617 @ 261,45: 20x15 +#618 @ 195,72: 18x16 +#619 @ 923,560: 26x22 +#620 @ 175,900: 19x26 +#621 @ 482,62: 18x21 +#622 @ 756,143: 7x5 +#623 @ 478,767: 22x28 +#624 @ 274,902: 25x21 +#625 @ 126,224: 20x25 +#626 @ 964,624: 19x20 +#627 @ 111,294: 25x22 +#628 @ 656,345: 11x21 +#629 @ 251,449: 21x12 +#630 @ 700,416: 29x13 +#631 @ 102,277: 27x17 +#632 @ 881,292: 18x23 +#633 @ 61,0: 24x10 +#634 @ 136,975: 21x23 +#635 @ 99,839: 29x25 +#636 @ 195,516: 26x26 +#637 @ 839,670: 22x14 +#638 @ 652,242: 15x13 +#639 @ 210,202: 28x21 +#640 @ 594,171: 19x16 +#641 @ 113,753: 10x18 +#642 @ 538,943: 29x27 +#643 @ 318,651: 20x17 +#644 @ 235,238: 21x27 +#645 @ 705,514: 20x17 +#646 @ 118,757: 14x13 +#647 @ 128,159: 18x26 +#648 @ 288,660: 25x13 +#649 @ 519,676: 14x9 +#650 @ 754,808: 14x16 +#651 @ 421,32: 20x21 +#652 @ 660,351: 18x13 +#653 @ 241,163: 20x11 +#654 @ 140,293: 23x19 +#655 @ 490,410: 25x19 +#656 @ 506,590: 14x16 +#657 @ 261,46: 19x29 +#658 @ 539,787: 28x24 +#659 @ 349,548: 11x13 +#660 @ 293,19: 25x17 +#661 @ 275,380: 18x22 +#662 @ 52,513: 29x15 +#663 @ 37,169: 18x18 +#664 @ 43,150: 27x27 +#665 @ 343,333: 18x22 +#666 @ 797,371: 25x27 +#667 @ 611,57: 26x22 +#668 @ 727,900: 25x15 +#669 @ 128,3: 11x27 +#670 @ 483,734: 29x17 +#671 @ 427,405: 17x29 +#672 @ 863,626: 28x27 +#673 @ 519,172: 26x13 +#674 @ 585,407: 21x25 +#675 @ 225,266: 16x25 +#676 @ 977,113: 14x11 +#677 @ 544,579: 16x27 +#678 @ 890,592: 20x23 +#679 @ 74,914: 21x19 +#680 @ 45,530: 27x10 +#681 @ 191,757: 23x11 +#682 @ 59,226: 25x23 +#683 @ 74,303: 19x23 +#684 @ 463,305: 22x18 +#685 @ 915,749: 24x27 +#686 @ 923,89: 12x13 +#687 @ 620,5: 29x21 +#688 @ 933,710: 16x23 +#689 @ 299,915: 12x13 +#690 @ 458,30: 28x12 +#691 @ 674,127: 28x12 +#692 @ 321,817: 18x21 +#693 @ 788,464: 5x6 +#694 @ 411,19: 19x26 +#695 @ 981,58: 10x19 +#696 @ 101,71: 12x21 +#697 @ 67,245: 22x13 +#698 @ 251,41: 25x12 +#699 @ 667,337: 10x15 +#700 @ 624,751: 17x29 +#701 @ 626,819: 20x10 +#702 @ 730,826: 15x12 +#703 @ 740,914: 19x10 +#704 @ 946,163: 16x14 +#705 @ 85,334: 29x21 +#706 @ 848,754: 12x23 +#707 @ 642,740: 12x25 +#708 @ 840,40: 20x17 +#709 @ 232,190: 19x21 +#710 @ 419,194: 13x29 +#711 @ 647,720: 23x28 +#712 @ 723,528: 22x11 +#713 @ 408,557: 20x20 +#714 @ 906,553: 16x10 +#715 @ 336,223: 29x25 +#716 @ 954,288: 22x27 +#717 @ 145,439: 27x16 +#718 @ 272,740: 22x17 +#719 @ 709,842: 20x23 +#720 @ 774,723: 19x13 +#721 @ 562,548: 21x18 +#722 @ 944,161: 16x18 +#723 @ 303,346: 29x16 +#724 @ 583,245: 10x18 +#725 @ 98,14: 13x13 +#726 @ 811,542: 19x18 +#727 @ 117,353: 13x20 +#728 @ 429,62: 19x20 +#729 @ 147,53: 25x17 +#730 @ 481,523: 23x27 +#731 @ 517,932: 10x25 +#732 @ 472,518: 26x10 +#733 @ 6,384: 10x28 +#734 @ 597,693: 21x29 +#735 @ 403,892: 6x12 +#736 @ 338,703: 22x20 +#737 @ 451,54: 28x29 +#738 @ 690,224: 23x27 +#739 @ 493,500: 10x18 +#740 @ 180,68: 29x23 +#741 @ 645,881: 13x22 +#742 @ 640,641: 13x21 +#743 @ 113,700: 22x29 +#744 @ 83,331: 17x22 +#745 @ 30,907: 18x24 +#746 @ 205,854: 25x28 +#747 @ 654,518: 28x21 +#748 @ 784,462: 14x11 +#749 @ 83,678: 20x17 +#750 @ 545,583: 25x18 +#751 @ 533,805: 16x23 +#752 @ 545,497: 11x15 +#753 @ 687,549: 19x26 +#754 @ 521,693: 24x14 +#755 @ 484,725: 26x26 +#756 @ 660,52: 11x14 +#757 @ 776,399: 15x23 +#758 @ 15,304: 16x10 +#759 @ 721,647: 12x26 +#760 @ 196,439: 14x12 +#761 @ 749,8: 18x20 +#762 @ 926,45: 14x13 +#763 @ 752,136: 15x20 +#764 @ 294,632: 29x21 +#765 @ 389,404: 24x19 +#766 @ 306,963: 12x13 +#767 @ 280,947: 17x10 +#768 @ 329,99: 20x26 +#769 @ 733,843: 13x15 +#770 @ 408,157: 25x10 +#771 @ 82,353: 16x16 +#772 @ 423,14: 21x19 +#773 @ 924,331: 24x4 +#774 @ 384,155: 28x11 +#775 @ 394,223: 25x28 +#776 @ 791,465: 26x28 +#777 @ 873,852: 12x26 +#778 @ 767,307: 26x24 +#779 @ 475,62: 24x25 +#780 @ 260,621: 19x14 +#781 @ 483,367: 13x19 +#782 @ 668,294: 10x21 +#783 @ 373,350: 18x15 +#784 @ 713,535: 22x15 +#785 @ 335,536: 24x21 +#786 @ 427,627: 24x26 +#787 @ 140,138: 26x26 +#788 @ 874,506: 12x24 +#789 @ 541,80: 11x20 +#790 @ 471,32: 9x7 +#791 @ 39,732: 28x17 +#792 @ 377,565: 17x21 +#793 @ 659,949: 10x21 +#794 @ 226,955: 21x18 +#795 @ 60,566: 25x12 +#796 @ 203,253: 16x10 +#797 @ 451,800: 20x24 +#798 @ 194,862: 18x11 +#799 @ 916,857: 24x24 +#800 @ 116,277: 25x16 +#801 @ 474,714: 11x14 +#802 @ 453,289: 11x27 +#803 @ 879,80: 18x28 +#804 @ 307,811: 12x16 +#805 @ 755,341: 21x15 +#806 @ 675,512: 25x22 +#807 @ 555,676: 19x13 +#808 @ 549,241: 10x21 +#809 @ 432,282: 24x24 +#810 @ 744,9: 23x21 +#811 @ 669,760: 18x27 +#812 @ 577,797: 15x19 +#813 @ 232,348: 27x18 +#814 @ 915,230: 22x17 +#815 @ 922,329: 29x15 +#816 @ 447,629: 18x26 +#817 @ 911,389: 25x15 +#818 @ 850,752: 10x21 +#819 @ 313,222: 25x15 +#820 @ 492,545: 21x10 +#821 @ 131,880: 24x25 +#822 @ 491,590: 26x18 +#823 @ 66,279: 24x28 +#824 @ 529,865: 20x18 +#825 @ 650,155: 17x12 +#826 @ 529,159: 24x20 +#827 @ 650,552: 14x23 +#828 @ 703,897: 26x26 +#829 @ 441,591: 22x27 +#830 @ 901,221: 17x14 +#831 @ 539,199: 21x15 +#832 @ 115,236: 14x12 +#833 @ 32,229: 27x29 +#834 @ 263,93: 25x17 +#835 @ 917,450: 29x20 +#836 @ 420,5: 12x15 +#837 @ 544,480: 14x19 +#838 @ 10,534: 20x11 +#839 @ 918,141: 28x26 +#840 @ 683,130: 21x10 +#841 @ 690,163: 25x12 +#842 @ 646,18: 28x14 +#843 @ 501,725: 20x22 +#844 @ 372,546: 25x24 +#845 @ 613,302: 29x18 +#846 @ 78,920: 16x25 +#847 @ 935,473: 26x16 +#848 @ 533,28: 10x21 +#849 @ 107,624: 11x23 +#850 @ 820,649: 15x11 +#851 @ 572,420: 19x13 +#852 @ 725,449: 15x12 +#853 @ 183,953: 22x17 +#854 @ 651,324: 15x25 +#855 @ 500,486: 12x20 +#856 @ 692,886: 16x18 +#857 @ 451,761: 26x12 +#858 @ 938,610: 23x16 +#859 @ 260,447: 21x11 +#860 @ 434,647: 27x16 +#861 @ 253,4: 11x15 +#862 @ 400,430: 14x15 +#863 @ 723,813: 24x27 +#864 @ 607,539: 29x28 +#865 @ 856,459: 11x15 +#866 @ 310,957: 10x16 +#867 @ 262,882: 12x24 +#868 @ 355,244: 28x24 +#869 @ 421,672: 18x11 +#870 @ 645,739: 13x18 +#871 @ 61,759: 24x21 +#872 @ 447,300: 10x24 +#873 @ 64,920: 21x13 +#874 @ 595,248: 10x18 +#875 @ 202,75: 17x23 +#876 @ 882,478: 12x13 +#877 @ 637,939: 28x10 +#878 @ 949,513: 15x27 +#879 @ 577,444: 26x26 +#880 @ 760,315: 22x14 +#881 @ 271,837: 29x26 +#882 @ 969,287: 18x11 +#883 @ 784,378: 29x26 +#884 @ 483,366: 20x25 +#885 @ 46,55: 25x19 +#886 @ 386,831: 10x18 +#887 @ 464,916: 12x19 +#888 @ 766,578: 12x28 +#889 @ 510,26: 25x26 +#890 @ 442,389: 22x15 +#891 @ 764,449: 25x26 +#892 @ 798,718: 17x12 +#893 @ 327,701: 20x14 +#894 @ 641,734: 12x12 +#895 @ 267,934: 15x21 +#896 @ 241,262: 11x21 +#897 @ 792,417: 23x28 +#898 @ 122,531: 10x10 +#899 @ 827,388: 10x15 +#900 @ 282,762: 11x21 +#901 @ 420,608: 12x11 +#902 @ 576,934: 16x28 +#903 @ 257,593: 13x23 +#904 @ 122,122: 21x24 +#905 @ 916,401: 16x23 +#906 @ 908,195: 17x29 +#907 @ 801,887: 26x11 +#908 @ 262,919: 29x15 +#909 @ 515,303: 22x25 +#910 @ 259,756: 13x19 +#911 @ 127,593: 27x22 +#912 @ 508,651: 22x25 +#913 @ 456,772: 15x29 +#914 @ 624,78: 18x15 +#915 @ 333,888: 19x14 +#916 @ 799,48: 28x10 +#917 @ 864,766: 26x25 +#918 @ 589,528: 12x12 +#919 @ 34,597: 18x25 +#920 @ 511,235: 29x28 +#921 @ 114,887: 21x29 +#922 @ 69,950: 20x14 +#923 @ 254,173: 23x18 +#924 @ 342,595: 12x28 +#925 @ 960,594: 15x26 +#926 @ 236,242: 12x21 +#927 @ 350,122: 12x25 +#928 @ 877,466: 13x19 +#929 @ 10,640: 11x27 +#930 @ 762,646: 24x29 +#931 @ 469,768: 24x19 +#932 @ 673,15: 19x11 +#933 @ 316,826: 26x12 +#934 @ 82,688: 29x24 +#935 @ 759,782: 19x18 +#936 @ 705,521: 23x26 +#937 @ 201,742: 20x25 +#938 @ 769,604: 19x10 +#939 @ 32,913: 18x21 +#940 @ 737,93: 28x17 +#941 @ 37,509: 26x10 +#942 @ 179,444: 11x22 +#943 @ 692,280: 15x20 +#944 @ 496,807: 20x10 +#945 @ 670,584: 13x12 +#946 @ 127,942: 29x26 +#947 @ 642,943: 20x16 +#948 @ 832,70: 24x29 +#949 @ 625,321: 17x28 +#950 @ 924,266: 27x22 +#951 @ 792,203: 16x12 +#952 @ 867,726: 27x25 +#953 @ 207,357: 21x12 +#954 @ 200,817: 26x26 +#955 @ 509,738: 10x10 +#956 @ 550,77: 10x19 +#957 @ 755,328: 24x21 +#958 @ 738,887: 28x25 +#959 @ 76,921: 17x10 +#960 @ 868,620: 22x15 +#961 @ 892,859: 29x18 +#962 @ 672,543: 21x10 +#963 @ 167,390: 28x14 +#964 @ 130,878: 16x20 +#965 @ 155,435: 22x16 +#966 @ 554,90: 10x15 +#967 @ 363,419: 15x18 +#968 @ 167,619: 28x15 +#969 @ 887,309: 23x26 +#970 @ 926,760: 26x21 +#971 @ 529,532: 14x10 +#972 @ 309,679: 28x19 +#973 @ 747,524: 29x24 +#974 @ 837,707: 16x12 +#975 @ 285,737: 28x10 +#976 @ 704,676: 14x13 +#977 @ 122,688: 14x13 +#978 @ 907,846: 18x16 +#979 @ 907,899: 24x29 +#980 @ 44,535: 10x12 +#981 @ 481,741: 28x21 +#982 @ 555,588: 15x26 +#983 @ 693,246: 29x12 +#984 @ 502,584: 20x21 +#985 @ 137,261: 23x18 +#986 @ 568,83: 13x7 +#987 @ 818,653: 18x10 +#988 @ 631,760: 4x12 +#989 @ 301,236: 21x13 +#990 @ 658,569: 25x12 +#991 @ 862,348: 21x28 +#992 @ 303,485: 28x10 +#993 @ 523,380: 17x21 +#994 @ 717,168: 12x24 +#995 @ 759,586: 13x20 +#996 @ 65,417: 25x21 +#997 @ 850,292: 19x26 +#998 @ 559,308: 26x22 +#999 @ 322,468: 13x19 +#1000 @ 328,555: 25x21 +#1001 @ 703,479: 21x26 +#1002 @ 945,911: 17x6 +#1003 @ 754,116: 22x19 +#1004 @ 852,89: 19x19 +#1005 @ 806,733: 22x18 +#1006 @ 774,150: 10x27 +#1007 @ 412,230: 11x17 +#1008 @ 974,875: 21x24 +#1009 @ 356,153: 20x12 +#1010 @ 613,571: 10x26 +#1011 @ 443,831: 26x23 +#1012 @ 281,805: 19x10 +#1013 @ 956,161: 20x28 +#1014 @ 984,453: 6x8 +#1015 @ 569,244: 29x12 +#1016 @ 821,49: 11x18 +#1017 @ 902,562: 13x16 +#1018 @ 193,82: 20x23 +#1019 @ 969,803: 13x16 +#1020 @ 681,585: 23x15 +#1021 @ 930,98: 19x21 +#1022 @ 88,693: 13x19 +#1023 @ 845,650: 13x22 +#1024 @ 462,913: 27x21 +#1025 @ 357,752: 23x25 +#1026 @ 206,663: 22x24 +#1027 @ 619,511: 13x12 +#1028 @ 557,594: 6x11 +#1029 @ 128,807: 17x17 +#1030 @ 745,718: 26x26 +#1031 @ 822,23: 26x11 +#1032 @ 484,479: 26x25 +#1033 @ 409,194: 21x21 +#1034 @ 214,295: 22x10 +#1035 @ 31,623: 12x15 +#1036 @ 687,165: 12x19 +#1037 @ 707,528: 21x18 +#1038 @ 768,630: 20x23 +#1039 @ 655,892: 13x15 +#1040 @ 888,769: 14x12 +#1041 @ 835,47: 29x29 +#1042 @ 808,323: 16x14 +#1043 @ 400,218: 14x10 +#1044 @ 168,954: 11x25 +#1045 @ 69,225: 19x19 +#1046 @ 77,788: 16x15 +#1047 @ 407,426: 24x16 +#1048 @ 84,674: 12x10 +#1049 @ 712,422: 18x11 +#1050 @ 326,218: 18x23 +#1051 @ 853,734: 24x20 +#1052 @ 571,221: 18x26 +#1053 @ 783,445: 26x22 +#1054 @ 856,724: 17x22 +#1055 @ 728,99: 27x10 +#1056 @ 580,265: 22x28 +#1057 @ 186,276: 17x29 +#1058 @ 515,842: 26x23 +#1059 @ 577,696: 10x29 +#1060 @ 658,924: 18x19 +#1061 @ 309,527: 23x28 +#1062 @ 407,466: 26x16 +#1063 @ 84,972: 17x6 +#1064 @ 337,552: 13x18 +#1065 @ 745,733: 13x16 +#1066 @ 495,60: 17x16 +#1067 @ 507,135: 26x15 +#1068 @ 439,232: 13x27 +#1069 @ 586,227: 24x14 +#1070 @ 71,774: 12x22 +#1071 @ 520,92: 15x11 +#1072 @ 625,733: 13x25 +#1073 @ 616,360: 11x13 +#1074 @ 202,310: 16x22 +#1075 @ 115,249: 12x14 +#1076 @ 269,90: 26x11 +#1077 @ 120,203: 10x14 +#1078 @ 787,52: 21x29 +#1079 @ 899,114: 21x21 +#1080 @ 146,572: 27x15 +#1081 @ 774,424: 17x15 +#1082 @ 305,694: 13x29 +#1083 @ 523,406: 24x26 +#1084 @ 293,291: 25x26 +#1085 @ 830,662: 10x29 +#1086 @ 915,442: 10x21 +#1087 @ 369,935: 24x26 +#1088 @ 357,597: 16x22 +#1089 @ 352,780: 6x6 +#1090 @ 108,368: 17x29 +#1091 @ 487,804: 21x11 +#1092 @ 497,139: 23x24 +#1093 @ 936,174: 12x21 +#1094 @ 254,652: 20x10 +#1095 @ 75,406: 12x26 +#1096 @ 463,766: 14x20 +#1097 @ 100,459: 29x15 +#1098 @ 116,128: 13x13 +#1099 @ 292,585: 12x16 +#1100 @ 490,787: 25x13 +#1101 @ 91,557: 13x23 +#1102 @ 390,557: 17x10 +#1103 @ 342,421: 25x10 +#1104 @ 21,83: 21x13 +#1105 @ 923,141: 21x19 +#1106 @ 427,300: 28x26 +#1107 @ 550,618: 26x24 +#1108 @ 393,457: 22x10 +#1109 @ 126,838: 21x22 +#1110 @ 254,597: 25x12 +#1111 @ 466,905: 12x23 +#1112 @ 862,581: 16x28 +#1113 @ 938,60: 18x12 +#1114 @ 375,286: 15x13 +#1115 @ 740,775: 21x20 +#1116 @ 268,75: 26x17 +#1117 @ 613,615: 14x29 +#1118 @ 630,488: 29x13 +#1119 @ 401,527: 18x27 +#1120 @ 231,789: 27x24 +#1121 @ 642,483: 27x14 +#1122 @ 528,259: 25x10 +#1123 @ 825,884: 28x18 +#1124 @ 143,584: 26x21 +#1125 @ 502,602: 10x13 +#1126 @ 475,417: 25x14 +#1127 @ 369,904: 24x12 +#1128 @ 825,465: 12x25 +#1129 @ 741,76: 12x27 +#1130 @ 650,947: 28x15 +#1131 @ 723,405: 20x17 +#1132 @ 290,700: 20x15 +#1133 @ 469,756: 19x19 +#1134 @ 726,900: 24x25 +#1135 @ 436,487: 22x24 +#1136 @ 391,544: 11x27 +#1137 @ 196,697: 18x28 +#1138 @ 814,335: 24x15 +#1139 @ 520,416: 12x24 +#1140 @ 845,302: 10x16 +#1141 @ 282,298: 25x19 +#1142 @ 770,398: 23x27 +#1143 @ 130,209: 27x14 +#1144 @ 325,324: 24x12 +#1145 @ 650,951: 21x26 +#1146 @ 701,455: 26x10 +#1147 @ 559,86: 28x11 +#1148 @ 741,883: 16x13 +#1149 @ 509,95: 24x19 +#1150 @ 958,219: 17x11 +#1151 @ 85,17: 24x11 +#1152 @ 763,868: 14x29 +#1153 @ 109,921: 22x23 +#1154 @ 440,604: 13x10 +#1155 @ 230,198: 27x21 +#1156 @ 393,255: 18x25 +#1157 @ 471,322: 28x13 +#1158 @ 543,471: 27x10 +#1159 @ 49,243: 17x22 +#1160 @ 413,635: 13x21 +#1161 @ 69,572: 22x18 +#1162 @ 769,975: 25x18 +#1163 @ 594,102: 17x28 +#1164 @ 744,889: 20x10 +#1165 @ 676,743: 11x29 +#1166 @ 492,11: 12x18 +#1167 @ 393,232: 21x12 +#1168 @ 856,774: 14x22 +#1169 @ 247,256: 16x29 +#1170 @ 488,683: 14x21 +#1171 @ 526,244: 25x25 +#1172 @ 276,356: 27x13 +#1173 @ 514,655: 10x20 +#1174 @ 968,118: 16x10 +#1175 @ 187,284: 11x16 +#1176 @ 717,837: 28x24 +#1177 @ 533,548: 28x26 +#1178 @ 812,722: 22x12 +#1179 @ 441,286: 25x16 +#1180 @ 344,682: 10x26 +#1181 @ 859,733: 20x14 +#1182 @ 117,848: 21x13 +#1183 @ 439,12: 14x22 +#1184 @ 388,269: 10x23 +#1185 @ 350,144: 13x26 +#1186 @ 199,218: 13x13 +#1187 @ 765,767: 26x20 +#1188 @ 204,880: 12x26 +#1189 @ 265,574: 25x20 +#1190 @ 282,3: 25x29 +#1191 @ 247,367: 19x14 +#1192 @ 246,723: 18x26 +#1193 @ 650,117: 21x14 +#1194 @ 560,203: 13x10 +#1195 @ 850,457: 25x16 +#1196 @ 745,820: 23x13 +#1197 @ 230,267: 22x23 +#1198 @ 942,908: 24x17 +#1199 @ 53,494: 23x10 +#1200 @ 548,579: 25x11 +#1201 @ 387,538: 11x24 +#1202 @ 283,641: 17x11 +#1203 @ 925,40: 21x21 +#1204 @ 489,555: 20x23 +#1205 @ 565,284: 29x21 +#1206 @ 823,886: 20x23 +#1207 @ 344,414: 19x23 +#1208 @ 635,945: 25x17 +#1209 @ 38,511: 29x15 +#1210 @ 199,834: 21x14 +#1211 @ 783,105: 13x20 +#1212 @ 772,123: 24x14 +#1213 @ 294,588: 6x6 +#1214 @ 982,442: 12x26 +#1215 @ 766,749: 20x28 +#1216 @ 307,916: 26x28 +#1217 @ 115,687: 17x22 +#1218 @ 274,841: 13x13 +#1219 @ 291,256: 16x28 +#1220 @ 494,731: 29x11 +#1221 @ 130,12: 17x21 +#1222 @ 188,869: 18x17 +#1223 @ 939,164: 16x23 +#1224 @ 449,900: 8x14 +#1225 @ 330,922: 23x22 +#1226 @ 101,952: 20x13 +#1227 @ 78,2: 24x25 +#1228 @ 273,83: 21x12 +#1229 @ 950,345: 29x27 +#1230 @ 280,248: 22x20 +#1231 @ 555,380: 15x26 +#1232 @ 244,2: 19x17 +#1233 @ 790,374: 13x23 +#1234 @ 846,922: 27x14 +#1235 @ 682,807: 28x12 +#1236 @ 35,57: 29x13 +#1237 @ 215,226: 24x24 +#1238 @ 703,10: 25x15 +#1239 @ 690,66: 17x24 +#1240 @ 945,86: 22x18 +#1241 @ 27,170: 15x22 +#1242 @ 2,394: 15x29 +#1243 @ 166,334: 11x22 +#1244 @ 816,871: 16x19 +#1245 @ 223,782: 17x27 +#1246 @ 112,217: 20x21 +#1247 @ 76,2: 4x4 +#1248 @ 875,871: 16x21 +#1249 @ 11,371: 23x26 +#1250 @ 810,771: 14x19 +#1251 @ 914,759: 20x16 +#1252 @ 203,121: 11x24 +#1253 @ 396,412: 29x14 +#1254 @ 912,325: 28x10 +#1255 @ 75,344: 12x12 +#1256 @ 247,257: 12x13 +#1257 @ 253,343: 27x18 +#1258 @ 239,380: 21x11 +#1259 @ 645,135: 23x15 +#1260 @ 881,886: 28x18 +#1261 @ 162,379: 10x18 +#1262 @ 589,787: 23x10 +#1263 @ 437,315: 23x13 +#1264 @ 119,208: 10x21 +#1265 @ 299,760: 12x25 +#1266 @ 3,874: 29x13 +#1267 @ 470,667: 27x24 +#1268 @ 908,269: 21x10 +#1269 @ 92,490: 25x20 +#1270 @ 510,674: 28x15 +#1271 @ 906,902: 27x18 +#1272 @ 880,286: 14x27 +#1273 @ 80,464: 21x13 +#1274 @ 188,885: 19x15 +#1275 @ 541,762: 22x17 +#1276 @ 533,5: 25x26 +#1277 @ 748,963: 25x24 +#1278 @ 401,339: 14x23 +#1279 @ 19,611: 24x12 +#1280 @ 613,784: 25x28 +#1281 @ 897,295: 13x16 +#1282 @ 49,760: 14x24 +#1283 @ 65,738: 20x20 +#1284 @ 749,592: 14x28 +#1285 @ 491,780: 16x29 +#1286 @ 256,632: 25x23 +#1287 @ 589,430: 15x26 +#1288 @ 622,460: 29x14 +#1289 @ 345,634: 7x6 +#1290 @ 907,216: 16x26 +#1291 @ 877,140: 27x20 +#1292 @ 393,261: 12x19 +#1293 @ 881,346: 11x26 +#1294 @ 421,626: 14x24 +#1295 @ 104,8: 16x13 +#1296 @ 237,203: 10x12 +#1297 @ 685,291: 26x11 +#1298 @ 506,17: 27x16 +#1299 @ 570,396: 13x18 +#1300 @ 289,277: 13x28 +#1301 @ 116,505: 28x11 +#1302 @ 515,847: 17x22 +#1303 @ 411,209: 14x15 +#1304 @ 408,952: 27x20 +#1305 @ 331,793: 21x26 +#1306 @ 831,882: 19x18 +#1307 @ 302,560: 21x8 +#1308 @ 506,398: 29x11 +#1309 @ 433,387: 25x11 +#1310 @ 565,938: 27x13 +#1311 @ 205,330: 27x23 +#1312 @ 663,835: 12x20 +#1313 @ 845,398: 21x21 +#1314 @ 532,25: 28x25 +#1315 @ 533,757: 11x15 +#1316 @ 727,108: 14x17 +#1317 @ 658,68: 29x22 +#1318 @ 591,390: 19x17 +#1319 @ 583,248: 10x12 +#1320 @ 942,391: 23x22 +#1321 @ 683,778: 21x11 +#1322 @ 162,970: 27x11 +#1323 @ 709,818: 14x28 +#1324 @ 162,282: 14x27 +#1325 @ 898,441: 25x12 +#1326 @ 657,892: 13x26 +#1327 @ 584,226: 20x26 +#1328 @ 77,915: 28x20 +#1329 @ 449,714: 18x29 +#1330 @ 135,293: 24x28 +#1331 @ 773,826: 16x19 +#1332 @ 875,513: 17x14 +#1333 @ 99,135: 24x13 +#1334 @ 756,511: 11x20 +#1335 @ 756,755: 13x28 +#1336 @ 331,621: 22x19 +#1337 @ 592,905: 14x27 +#1338 @ 554,21: 24x27 +#1339 @ 214,244: 27x25 +#1340 @ 537,694: 18x15 +#1341 @ 955,539: 11x15 +#1342 @ 594,509: 16x27 +#1343 @ 978,953: 18x23 +#1344 @ 225,527: 28x11 +#1345 @ 760,83: 24x21 +#1346 @ 943,479: 13x22 +#1347 @ 670,278: 20x26 +#1348 @ 656,749: 14x25 +#1349 @ 850,417: 16x15 +#1350 @ 957,81: 24x16 +#1351 @ 331,914: 11x24 +#1352 @ 651,113: 28x19 +#1353 @ 240,198: 29x10 +#1354 @ 296,697: 21x10 +#1355 @ 782,134: 14x26 +#1356 @ 33,399: 27x13 +#1357 @ 275,416: 16x21 diff --git a/src/adventofcode2018/data/day04/day_04.txt b/src/adventofcode2018/data/day04/day_04.txt new file mode 100644 index 00000000..a3d72f74 --- /dev/null +++ b/src/adventofcode2018/data/day04/day_04.txt @@ -0,0 +1,986 @@ +[1518-08-29 00:24] falls asleep +[1518-08-06 00:20] falls asleep +[1518-03-12 00:21] falls asleep +[1518-06-17 00:45] wakes up +[1518-06-27 00:46] falls asleep +[1518-09-07 00:36] falls asleep +[1518-07-22 00:23] wakes up +[1518-05-18 00:35] falls asleep +[1518-09-27 00:40] wakes up +[1518-04-10 23:52] Guard #3559 begins shift +[1518-03-16 00:44] wakes up +[1518-05-16 00:23] wakes up +[1518-06-18 00:00] Guard #1499 begins shift +[1518-11-21 00:48] wakes up +[1518-05-19 00:29] falls asleep +[1518-03-20 23:58] Guard #73 begins shift +[1518-09-28 00:18] falls asleep +[1518-10-21 00:00] Guard #983 begins shift +[1518-05-19 00:57] wakes up +[1518-10-08 00:47] wakes up +[1518-05-04 00:19] falls asleep +[1518-07-30 00:30] falls asleep +[1518-05-04 00:22] wakes up +[1518-10-01 00:20] wakes up +[1518-03-24 23:47] Guard #2411 begins shift +[1518-06-19 00:00] Guard #1499 begins shift +[1518-09-15 00:38] falls asleep +[1518-07-26 00:50] falls asleep +[1518-06-13 00:00] Guard #3499 begins shift +[1518-08-30 00:03] Guard #983 begins shift +[1518-04-18 00:44] wakes up +[1518-07-09 00:53] falls asleep +[1518-06-09 00:02] falls asleep +[1518-10-09 23:56] Guard #3559 begins shift +[1518-04-15 23:46] Guard #313 begins shift +[1518-10-06 00:03] Guard #3499 begins shift +[1518-10-27 23:59] Guard #2617 begins shift +[1518-10-21 00:33] wakes up +[1518-03-23 00:47] falls asleep +[1518-07-21 00:31] wakes up +[1518-06-05 00:21] falls asleep +[1518-03-11 00:54] wakes up +[1518-05-06 00:11] wakes up +[1518-04-09 00:39] wakes up +[1518-06-10 00:00] Guard #919 begins shift +[1518-11-10 00:57] falls asleep +[1518-09-27 00:27] falls asleep +[1518-07-29 00:53] falls asleep +[1518-07-26 00:38] falls asleep +[1518-08-05 00:01] falls asleep +[1518-06-07 00:59] wakes up +[1518-11-22 00:39] falls asleep +[1518-11-17 00:58] wakes up +[1518-11-04 00:22] falls asleep +[1518-09-10 00:34] wakes up +[1518-04-11 00:25] wakes up +[1518-04-14 23:58] Guard #3203 begins shift +[1518-06-22 00:22] falls asleep +[1518-04-07 00:48] falls asleep +[1518-11-15 00:57] wakes up +[1518-05-24 23:56] Guard #983 begins shift +[1518-07-29 00:59] wakes up +[1518-11-15 00:05] falls asleep +[1518-11-22 00:02] Guard #3499 begins shift +[1518-11-01 00:46] wakes up +[1518-08-31 00:01] Guard #2411 begins shift +[1518-06-30 00:39] falls asleep +[1518-04-29 00:24] wakes up +[1518-04-12 23:54] Guard #2099 begins shift +[1518-05-04 00:48] falls asleep +[1518-09-25 00:49] falls asleep +[1518-09-21 00:28] falls asleep +[1518-04-25 00:44] falls asleep +[1518-04-13 00:43] falls asleep +[1518-08-24 00:16] falls asleep +[1518-07-02 00:43] wakes up +[1518-04-26 00:00] Guard #241 begins shift +[1518-06-26 00:29] falls asleep +[1518-04-17 00:47] wakes up +[1518-11-23 00:28] falls asleep +[1518-10-04 00:53] wakes up +[1518-11-20 00:46] falls asleep +[1518-06-28 00:37] wakes up +[1518-09-12 00:21] falls asleep +[1518-04-20 23:54] Guard #73 begins shift +[1518-03-21 23:57] Guard #1811 begins shift +[1518-07-04 00:48] wakes up +[1518-09-25 00:34] wakes up +[1518-04-13 00:35] wakes up +[1518-08-29 00:02] Guard #2657 begins shift +[1518-03-30 00:03] Guard #1811 begins shift +[1518-11-16 00:22] falls asleep +[1518-08-16 00:29] falls asleep +[1518-08-07 00:27] falls asleep +[1518-03-26 23:57] Guard #1091 begins shift +[1518-09-13 00:21] falls asleep +[1518-11-12 00:42] wakes up +[1518-05-14 00:01] Guard #1291 begins shift +[1518-03-21 00:39] falls asleep +[1518-04-23 00:22] falls asleep +[1518-09-19 00:05] falls asleep +[1518-04-02 00:42] falls asleep +[1518-04-27 00:39] wakes up +[1518-03-24 00:02] Guard #1033 begins shift +[1518-03-16 00:59] wakes up +[1518-05-11 23:50] Guard #3109 begins shift +[1518-04-18 00:06] falls asleep +[1518-08-31 00:33] wakes up +[1518-09-18 23:48] Guard #3559 begins shift +[1518-04-21 00:30] wakes up +[1518-10-07 00:44] wakes up +[1518-09-30 00:57] falls asleep +[1518-10-08 00:56] wakes up +[1518-06-19 00:37] wakes up +[1518-10-22 00:33] falls asleep +[1518-10-20 00:52] falls asleep +[1518-11-13 00:27] wakes up +[1518-07-05 00:11] falls asleep +[1518-08-17 00:48] wakes up +[1518-07-25 00:45] wakes up +[1518-05-01 23:59] Guard #3109 begins shift +[1518-07-31 00:10] falls asleep +[1518-05-26 00:54] falls asleep +[1518-08-10 23:57] Guard #3203 begins shift +[1518-06-26 00:06] falls asleep +[1518-09-24 00:12] falls asleep +[1518-04-11 00:01] falls asleep +[1518-06-01 00:02] Guard #2657 begins shift +[1518-06-30 23:49] Guard #241 begins shift +[1518-10-29 00:49] wakes up +[1518-06-12 00:44] wakes up +[1518-04-16 00:01] falls asleep +[1518-10-13 00:55] wakes up +[1518-05-21 00:28] falls asleep +[1518-06-21 00:17] falls asleep +[1518-06-05 00:47] falls asleep +[1518-05-10 00:19] falls asleep +[1518-09-05 00:04] falls asleep +[1518-04-23 00:12] falls asleep +[1518-07-16 00:56] wakes up +[1518-07-26 00:00] Guard #3499 begins shift +[1518-08-27 00:47] falls asleep +[1518-09-24 00:32] falls asleep +[1518-09-15 00:03] Guard #313 begins shift +[1518-11-21 00:04] Guard #3499 begins shift +[1518-07-11 00:49] wakes up +[1518-06-27 00:35] falls asleep +[1518-07-17 00:59] wakes up +[1518-05-13 00:10] falls asleep +[1518-09-28 00:04] Guard #3559 begins shift +[1518-10-03 00:00] Guard #313 begins shift +[1518-06-15 00:27] falls asleep +[1518-09-24 00:59] wakes up +[1518-10-29 23:50] Guard #983 begins shift +[1518-06-17 00:48] falls asleep +[1518-09-24 00:01] Guard #241 begins shift +[1518-05-28 23:56] Guard #2657 begins shift +[1518-04-17 00:00] Guard #1291 begins shift +[1518-05-29 00:34] wakes up +[1518-03-16 00:48] falls asleep +[1518-05-25 00:59] wakes up +[1518-04-11 00:42] falls asleep +[1518-06-02 23:59] Guard #241 begins shift +[1518-04-13 00:00] falls asleep +[1518-07-22 00:35] falls asleep +[1518-09-19 23:56] Guard #3109 begins shift +[1518-08-05 23:52] Guard #3449 begins shift +[1518-08-25 00:18] wakes up +[1518-07-14 23:57] Guard #2617 begins shift +[1518-05-08 00:19] falls asleep +[1518-10-11 00:02] Guard #2657 begins shift +[1518-03-21 00:22] falls asleep +[1518-06-23 00:10] falls asleep +[1518-05-28 00:41] falls asleep +[1518-09-01 00:02] Guard #3109 begins shift +[1518-09-13 00:43] wakes up +[1518-05-19 00:16] wakes up +[1518-10-03 00:59] wakes up +[1518-05-04 00:59] wakes up +[1518-06-15 00:53] falls asleep +[1518-07-16 00:09] falls asleep +[1518-08-11 00:48] falls asleep +[1518-08-15 00:00] Guard #823 begins shift +[1518-07-31 00:44] wakes up +[1518-04-28 23:51] Guard #73 begins shift +[1518-04-21 00:46] falls asleep +[1518-09-21 00:42] wakes up +[1518-05-27 00:26] falls asleep +[1518-08-23 00:04] Guard #3203 begins shift +[1518-07-13 00:01] falls asleep +[1518-08-14 00:01] falls asleep +[1518-07-10 00:50] wakes up +[1518-11-05 00:37] wakes up +[1518-08-12 00:58] wakes up +[1518-03-11 00:33] falls asleep +[1518-09-20 00:32] falls asleep +[1518-09-03 00:56] wakes up +[1518-03-21 00:40] wakes up +[1518-07-03 00:22] falls asleep +[1518-08-16 23:46] Guard #313 begins shift +[1518-10-31 00:00] Guard #919 begins shift +[1518-08-11 00:32] wakes up +[1518-08-25 23:58] Guard #1033 begins shift +[1518-09-01 23:57] Guard #2617 begins shift +[1518-06-17 00:53] wakes up +[1518-10-18 00:42] falls asleep +[1518-07-11 00:14] falls asleep +[1518-03-13 00:27] falls asleep +[1518-10-28 00:58] wakes up +[1518-07-31 00:01] Guard #3499 begins shift +[1518-04-22 00:49] wakes up +[1518-10-17 00:42] wakes up +[1518-03-14 00:02] Guard #1033 begins shift +[1518-08-09 00:38] falls asleep +[1518-04-26 23:58] Guard #3109 begins shift +[1518-05-09 00:34] falls asleep +[1518-11-09 23:57] Guard #2099 begins shift +[1518-05-22 00:28] falls asleep +[1518-08-08 00:28] wakes up +[1518-11-23 00:42] wakes up +[1518-09-16 00:19] falls asleep +[1518-04-08 00:12] falls asleep +[1518-10-03 00:47] wakes up +[1518-04-10 00:22] falls asleep +[1518-07-30 00:37] wakes up +[1518-11-16 00:47] wakes up +[1518-08-12 00:13] falls asleep +[1518-08-04 00:33] falls asleep +[1518-09-24 00:14] wakes up +[1518-09-13 00:56] wakes up +[1518-10-10 00:25] falls asleep +[1518-04-14 00:01] Guard #3559 begins shift +[1518-06-25 23:59] Guard #241 begins shift +[1518-07-19 00:02] falls asleep +[1518-03-15 00:01] Guard #1033 begins shift +[1518-09-18 00:15] falls asleep +[1518-11-09 00:35] falls asleep +[1518-08-22 00:11] falls asleep +[1518-10-07 23:59] Guard #2411 begins shift +[1518-08-02 23:59] Guard #3361 begins shift +[1518-06-26 00:53] wakes up +[1518-04-01 00:16] falls asleep +[1518-11-08 23:58] Guard #2617 begins shift +[1518-09-02 00:57] wakes up +[1518-07-06 00:46] falls asleep +[1518-07-21 00:17] falls asleep +[1518-05-01 00:58] wakes up +[1518-06-21 00:23] wakes up +[1518-07-01 00:47] wakes up +[1518-09-07 00:41] wakes up +[1518-05-05 00:34] wakes up +[1518-04-02 00:01] Guard #2099 begins shift +[1518-07-03 00:19] wakes up +[1518-06-01 00:39] falls asleep +[1518-04-06 00:08] falls asleep +[1518-08-24 00:01] Guard #2657 begins shift +[1518-07-01 23:51] Guard #3109 begins shift +[1518-08-13 00:04] Guard #2099 begins shift +[1518-08-09 00:34] wakes up +[1518-05-31 00:40] wakes up +[1518-06-26 00:45] falls asleep +[1518-06-26 23:59] Guard #983 begins shift +[1518-07-01 00:36] wakes up +[1518-03-24 00:26] falls asleep +[1518-04-19 00:55] falls asleep +[1518-04-06 00:09] wakes up +[1518-10-15 00:24] falls asleep +[1518-04-30 00:47] falls asleep +[1518-05-08 00:08] falls asleep +[1518-09-24 00:56] falls asleep +[1518-04-24 00:04] Guard #3361 begins shift +[1518-07-06 00:59] wakes up +[1518-06-24 00:28] wakes up +[1518-08-11 00:19] falls asleep +[1518-04-19 23:58] Guard #1291 begins shift +[1518-03-18 00:32] wakes up +[1518-10-23 00:04] falls asleep +[1518-10-19 00:04] Guard #3203 begins shift +[1518-04-05 00:31] wakes up +[1518-03-13 00:04] Guard #3449 begins shift +[1518-06-15 00:22] wakes up +[1518-03-26 00:10] falls asleep +[1518-07-07 00:34] wakes up +[1518-04-27 00:24] falls asleep +[1518-04-30 00:49] wakes up +[1518-04-17 00:18] falls asleep +[1518-09-11 00:20] falls asleep +[1518-05-07 00:56] wakes up +[1518-05-23 00:24] wakes up +[1518-03-28 00:44] wakes up +[1518-08-10 00:12] falls asleep +[1518-06-12 00:13] falls asleep +[1518-09-23 00:58] wakes up +[1518-08-29 00:59] wakes up +[1518-09-04 00:33] falls asleep +[1518-05-29 00:09] falls asleep +[1518-04-25 00:00] Guard #3203 begins shift +[1518-07-30 00:55] wakes up +[1518-10-31 23:57] Guard #983 begins shift +[1518-11-05 00:29] falls asleep +[1518-06-06 00:12] falls asleep +[1518-03-18 00:29] falls asleep +[1518-08-30 00:58] wakes up +[1518-11-08 00:13] wakes up +[1518-08-08 00:11] falls asleep +[1518-07-12 23:50] Guard #2099 begins shift +[1518-03-15 00:56] wakes up +[1518-06-07 00:39] falls asleep +[1518-11-02 00:29] wakes up +[1518-06-13 00:43] wakes up +[1518-07-21 23:47] Guard #2099 begins shift +[1518-10-12 00:38] wakes up +[1518-08-23 00:36] falls asleep +[1518-08-04 23:53] Guard #1091 begins shift +[1518-06-29 00:51] wakes up +[1518-03-28 00:10] falls asleep +[1518-10-20 00:23] falls asleep +[1518-11-12 00:04] Guard #2411 begins shift +[1518-04-17 00:59] wakes up +[1518-10-07 00:32] falls asleep +[1518-09-06 00:39] wakes up +[1518-03-27 00:34] falls asleep +[1518-05-27 00:53] wakes up +[1518-10-05 00:15] falls asleep +[1518-10-02 00:15] falls asleep +[1518-07-12 00:37] wakes up +[1518-07-16 23:57] Guard #983 begins shift +[1518-09-03 00:20] falls asleep +[1518-04-13 00:46] wakes up +[1518-06-14 23:50] Guard #983 begins shift +[1518-09-12 00:48] falls asleep +[1518-09-11 23:57] Guard #73 begins shift +[1518-07-26 00:51] wakes up +[1518-09-01 00:45] falls asleep +[1518-05-30 00:53] wakes up +[1518-08-09 00:28] falls asleep +[1518-10-03 00:29] falls asleep +[1518-09-02 00:49] wakes up +[1518-09-06 00:03] falls asleep +[1518-03-18 23:49] Guard #3449 begins shift +[1518-07-04 00:03] Guard #2411 begins shift +[1518-08-01 00:21] falls asleep +[1518-06-15 00:44] wakes up +[1518-11-22 23:56] Guard #3499 begins shift +[1518-06-14 00:08] falls asleep +[1518-08-01 00:03] Guard #1291 begins shift +[1518-05-26 00:56] wakes up +[1518-07-17 23:47] Guard #1091 begins shift +[1518-11-02 00:03] Guard #3559 begins shift +[1518-04-07 00:51] wakes up +[1518-06-03 00:56] wakes up +[1518-10-15 00:40] wakes up +[1518-07-29 00:40] falls asleep +[1518-06-25 00:18] falls asleep +[1518-08-06 00:51] falls asleep +[1518-05-23 00:11] falls asleep +[1518-09-10 23:59] Guard #2411 begins shift +[1518-08-23 00:59] wakes up +[1518-03-15 00:29] falls asleep +[1518-06-25 00:00] Guard #3499 begins shift +[1518-06-02 00:38] wakes up +[1518-07-25 00:29] falls asleep +[1518-04-19 00:49] wakes up +[1518-04-01 00:46] wakes up +[1518-11-10 23:49] Guard #241 begins shift +[1518-06-06 00:24] wakes up +[1518-07-04 00:22] falls asleep +[1518-05-28 00:54] wakes up +[1518-07-25 00:57] wakes up +[1518-03-30 00:54] falls asleep +[1518-11-10 00:58] wakes up +[1518-06-15 00:58] wakes up +[1518-03-25 23:58] Guard #1033 begins shift +[1518-08-10 00:00] Guard #3109 begins shift +[1518-11-05 23:48] Guard #73 begins shift +[1518-10-25 00:08] falls asleep +[1518-08-25 00:35] falls asleep +[1518-04-25 00:52] wakes up +[1518-04-05 23:57] Guard #2617 begins shift +[1518-09-20 00:55] falls asleep +[1518-08-11 00:52] wakes up +[1518-05-09 00:49] wakes up +[1518-08-02 00:38] wakes up +[1518-07-07 23:57] Guard #983 begins shift +[1518-09-29 00:42] wakes up +[1518-05-31 00:50] falls asleep +[1518-08-04 00:57] falls asleep +[1518-08-20 00:42] wakes up +[1518-10-28 00:57] falls asleep +[1518-11-20 00:54] wakes up +[1518-10-08 00:13] falls asleep +[1518-09-30 00:58] wakes up +[1518-07-18 23:53] Guard #3499 begins shift +[1518-03-15 23:50] Guard #1811 begins shift +[1518-07-23 00:33] falls asleep +[1518-08-26 00:35] wakes up +[1518-11-07 00:17] falls asleep +[1518-07-20 00:30] wakes up +[1518-10-13 23:52] Guard #2657 begins shift +[1518-05-21 00:31] wakes up +[1518-11-01 00:21] falls asleep +[1518-10-24 00:26] falls asleep +[1518-04-28 00:02] Guard #1811 begins shift +[1518-08-02 00:18] falls asleep +[1518-10-26 00:09] falls asleep +[1518-06-26 00:21] wakes up +[1518-11-17 00:48] falls asleep +[1518-08-28 00:45] falls asleep +[1518-09-08 00:26] wakes up +[1518-09-30 00:00] Guard #3499 begins shift +[1518-09-25 00:00] Guard #1091 begins shift +[1518-09-17 00:03] Guard #313 begins shift +[1518-05-11 00:10] falls asleep +[1518-11-18 00:32] wakes up +[1518-06-08 00:48] wakes up +[1518-08-06 00:00] falls asleep +[1518-09-23 00:06] falls asleep +[1518-05-25 00:29] falls asleep +[1518-08-31 00:22] falls asleep +[1518-07-11 00:55] falls asleep +[1518-11-10 00:50] falls asleep +[1518-04-28 00:33] falls asleep +[1518-11-13 00:05] falls asleep +[1518-07-25 00:49] falls asleep +[1518-04-07 00:14] falls asleep +[1518-09-05 23:50] Guard #3559 begins shift +[1518-03-31 23:58] Guard #3203 begins shift +[1518-07-24 00:03] Guard #823 begins shift +[1518-06-07 00:34] wakes up +[1518-05-15 00:19] falls asleep +[1518-04-09 00:05] falls asleep +[1518-07-30 00:06] falls asleep +[1518-10-17 00:01] Guard #3203 begins shift +[1518-06-19 00:45] falls asleep +[1518-05-16 00:20] falls asleep +[1518-08-22 00:33] wakes up +[1518-06-08 00:14] falls asleep +[1518-11-10 00:35] wakes up +[1518-08-19 00:50] wakes up +[1518-03-28 00:03] Guard #241 begins shift +[1518-07-23 00:04] Guard #2617 begins shift +[1518-06-13 00:26] falls asleep +[1518-05-08 23:56] Guard #2099 begins shift +[1518-03-22 23:50] Guard #3361 begins shift +[1518-08-21 23:58] Guard #313 begins shift +[1518-05-18 00:40] wakes up +[1518-04-29 00:01] falls asleep +[1518-08-08 00:54] wakes up +[1518-11-01 00:53] falls asleep +[1518-10-06 00:36] falls asleep +[1518-03-19 00:19] wakes up +[1518-05-28 00:11] falls asleep +[1518-04-03 00:04] Guard #313 begins shift +[1518-11-02 23:59] Guard #73 begins shift +[1518-03-24 00:42] wakes up +[1518-05-31 00:33] falls asleep +[1518-05-17 00:23] wakes up +[1518-08-08 00:41] falls asleep +[1518-09-22 00:08] falls asleep +[1518-11-01 00:31] wakes up +[1518-11-06 00:22] wakes up +[1518-04-08 23:51] Guard #3559 begins shift +[1518-11-11 00:39] wakes up +[1518-08-01 23:56] Guard #1033 begins shift +[1518-05-05 23:58] Guard #3499 begins shift +[1518-10-11 23:58] Guard #2099 begins shift +[1518-06-08 00:54] wakes up +[1518-05-23 00:21] falls asleep +[1518-04-04 00:22] falls asleep +[1518-05-26 00:02] Guard #919 begins shift +[1518-04-14 00:51] wakes up +[1518-07-20 00:13] falls asleep +[1518-07-07 00:02] Guard #2099 begins shift +[1518-10-18 00:15] falls asleep +[1518-09-09 23:58] Guard #241 begins shift +[1518-07-31 00:41] falls asleep +[1518-05-26 00:46] wakes up +[1518-11-09 00:39] wakes up +[1518-09-02 00:27] falls asleep +[1518-10-31 00:49] falls asleep +[1518-06-30 00:56] falls asleep +[1518-08-07 00:55] wakes up +[1518-06-06 23:59] Guard #3499 begins shift +[1518-03-24 00:58] wakes up +[1518-06-11 00:02] Guard #919 begins shift +[1518-06-11 00:14] falls asleep +[1518-07-17 00:41] wakes up +[1518-05-27 00:00] Guard #3499 begins shift +[1518-11-19 00:02] Guard #3109 begins shift +[1518-09-17 00:21] falls asleep +[1518-11-03 00:53] falls asleep +[1518-03-24 00:51] falls asleep +[1518-04-30 00:02] Guard #1499 begins shift +[1518-07-22 00:01] falls asleep +[1518-03-25 00:00] falls asleep +[1518-06-05 00:43] wakes up +[1518-06-05 00:56] falls asleep +[1518-08-24 00:35] wakes up +[1518-06-22 00:02] Guard #2411 begins shift +[1518-09-22 23:59] Guard #2657 begins shift +[1518-06-14 00:48] wakes up +[1518-07-09 00:00] Guard #3361 begins shift +[1518-10-20 00:53] wakes up +[1518-05-03 23:56] Guard #3559 begins shift +[1518-10-09 00:10] falls asleep +[1518-08-25 00:31] wakes up +[1518-06-10 00:57] wakes up +[1518-07-05 23:58] Guard #3361 begins shift +[1518-04-05 00:26] falls asleep +[1518-10-07 00:00] Guard #1811 begins shift +[1518-05-16 00:58] wakes up +[1518-08-25 00:11] falls asleep +[1518-04-24 00:58] wakes up +[1518-03-12 00:29] wakes up +[1518-05-07 00:35] wakes up +[1518-08-14 00:39] wakes up +[1518-08-16 00:36] wakes up +[1518-07-10 00:22] falls asleep +[1518-10-31 00:09] falls asleep +[1518-04-08 00:03] Guard #2411 begins shift +[1518-10-01 00:05] falls asleep +[1518-10-15 00:46] falls asleep +[1518-09-09 00:30] wakes up +[1518-03-14 00:50] wakes up +[1518-08-17 00:02] falls asleep +[1518-08-03 00:59] wakes up +[1518-03-26 00:56] wakes up +[1518-10-28 00:08] falls asleep +[1518-07-23 00:52] wakes up +[1518-05-15 00:49] wakes up +[1518-10-21 00:15] falls asleep +[1518-06-17 00:00] Guard #983 begins shift +[1518-05-07 00:52] falls asleep +[1518-08-31 00:58] wakes up +[1518-07-04 23:59] Guard #2099 begins shift +[1518-04-09 00:46] wakes up +[1518-06-03 00:36] falls asleep +[1518-05-06 00:06] falls asleep +[1518-04-07 00:01] Guard #1291 begins shift +[1518-06-17 00:15] falls asleep +[1518-09-24 00:53] wakes up +[1518-09-13 00:01] Guard #2099 begins shift +[1518-07-14 00:04] Guard #2579 begins shift +[1518-06-28 00:20] falls asleep +[1518-06-27 00:58] wakes up +[1518-05-02 00:19] falls asleep +[1518-04-19 00:44] falls asleep +[1518-08-09 00:45] wakes up +[1518-04-27 00:44] wakes up +[1518-07-15 00:53] wakes up +[1518-10-06 00:55] wakes up +[1518-09-08 00:25] falls asleep +[1518-06-03 00:55] falls asleep +[1518-05-28 00:43] wakes up +[1518-07-11 00:04] Guard #3559 begins shift +[1518-07-09 23:59] Guard #3499 begins shift +[1518-09-18 00:57] wakes up +[1518-11-14 00:01] falls asleep +[1518-10-08 23:58] Guard #1811 begins shift +[1518-04-12 00:50] wakes up +[1518-04-08 00:28] wakes up +[1518-04-10 00:59] wakes up +[1518-10-29 00:16] falls asleep +[1518-11-07 00:29] wakes up +[1518-08-13 23:50] Guard #2099 begins shift +[1518-10-10 00:49] wakes up +[1518-06-02 00:09] falls asleep +[1518-03-25 00:30] wakes up +[1518-09-04 23:46] Guard #2657 begins shift +[1518-03-30 23:58] Guard #1867 begins shift +[1518-05-03 00:04] falls asleep +[1518-11-19 00:50] falls asleep +[1518-07-08 00:37] wakes up +[1518-07-16 00:20] wakes up +[1518-08-27 00:31] falls asleep +[1518-04-15 00:23] wakes up +[1518-08-05 00:27] wakes up +[1518-07-05 00:13] wakes up +[1518-08-06 00:42] wakes up +[1518-05-28 00:03] Guard #3449 begins shift +[1518-04-14 00:13] falls asleep +[1518-10-16 00:45] falls asleep +[1518-07-29 00:00] Guard #1811 begins shift +[1518-05-24 00:57] wakes up +[1518-06-01 00:48] wakes up +[1518-09-12 00:29] wakes up +[1518-04-06 00:15] falls asleep +[1518-06-06 00:03] Guard #2657 begins shift +[1518-07-28 00:41] wakes up +[1518-09-30 00:39] falls asleep +[1518-06-30 00:59] wakes up +[1518-09-01 00:51] wakes up +[1518-08-04 00:59] wakes up +[1518-03-22 00:46] falls asleep +[1518-05-13 00:00] Guard #1499 begins shift +[1518-07-08 00:36] falls asleep +[1518-04-09 00:45] falls asleep +[1518-05-01 00:01] Guard #1499 begins shift +[1518-09-22 00:03] Guard #3559 begins shift +[1518-05-12 00:54] wakes up +[1518-11-04 00:57] wakes up +[1518-04-21 00:00] falls asleep +[1518-11-19 23:56] Guard #2617 begins shift +[1518-07-16 00:42] falls asleep +[1518-04-10 00:00] Guard #1811 begins shift +[1518-11-10 00:34] falls asleep +[1518-08-18 00:01] Guard #241 begins shift +[1518-08-04 00:45] wakes up +[1518-11-21 00:36] falls asleep +[1518-06-07 00:15] falls asleep +[1518-10-28 00:36] wakes up +[1518-07-15 23:57] Guard #2657 begins shift +[1518-06-29 00:46] falls asleep +[1518-03-17 00:54] wakes up +[1518-08-22 00:12] wakes up +[1518-11-20 00:26] wakes up +[1518-10-02 00:23] wakes up +[1518-07-26 00:43] wakes up +[1518-04-23 00:57] wakes up +[1518-04-22 23:57] Guard #2099 begins shift +[1518-03-21 00:46] falls asleep +[1518-04-04 00:30] wakes up +[1518-04-20 00:45] wakes up +[1518-08-31 00:47] falls asleep +[1518-09-16 00:34] wakes up +[1518-10-05 00:03] Guard #3499 begins shift +[1518-04-11 23:57] Guard #3499 begins shift +[1518-08-29 00:29] wakes up +[1518-10-13 00:43] falls asleep +[1518-07-12 00:29] falls asleep +[1518-05-08 00:55] wakes up +[1518-03-29 00:01] Guard #2579 begins shift +[1518-10-31 00:56] wakes up +[1518-11-17 00:49] wakes up +[1518-06-03 23:46] Guard #313 begins shift +[1518-05-02 00:48] wakes up +[1518-05-17 23:58] Guard #3499 begins shift +[1518-03-27 00:30] wakes up +[1518-09-21 00:02] Guard #2099 begins shift +[1518-05-22 00:30] wakes up +[1518-10-04 00:40] wakes up +[1518-03-23 00:49] wakes up +[1518-08-16 00:00] Guard #3361 begins shift +[1518-10-09 00:59] wakes up +[1518-03-30 00:48] wakes up +[1518-11-13 23:49] Guard #1811 begins shift +[1518-06-28 23:59] Guard #2657 begins shift +[1518-04-22 00:11] falls asleep +[1518-05-17 00:15] falls asleep +[1518-09-28 23:56] Guard #1811 begins shift +[1518-07-15 00:59] wakes up +[1518-09-26 23:59] Guard #3109 begins shift +[1518-03-14 00:56] falls asleep +[1518-08-06 00:11] wakes up +[1518-03-23 00:28] wakes up +[1518-11-07 23:52] Guard #3559 begins shift +[1518-10-14 00:44] wakes up +[1518-04-16 00:59] wakes up +[1518-07-20 00:00] Guard #241 begins shift +[1518-09-20 00:58] wakes up +[1518-05-01 00:49] falls asleep +[1518-05-15 00:03] Guard #241 begins shift +[1518-10-24 00:29] wakes up +[1518-10-03 23:59] Guard #2657 begins shift +[1518-10-24 00:47] wakes up +[1518-03-23 00:00] falls asleep +[1518-10-11 00:41] wakes up +[1518-08-28 00:03] Guard #983 begins shift +[1518-10-04 00:49] falls asleep +[1518-09-05 00:51] wakes up +[1518-04-03 00:58] wakes up +[1518-05-24 00:17] falls asleep +[1518-06-16 00:56] wakes up +[1518-06-20 23:57] Guard #3361 begins shift +[1518-06-27 00:37] wakes up +[1518-04-11 00:53] wakes up +[1518-03-24 00:41] falls asleep +[1518-04-05 00:01] Guard #2099 begins shift +[1518-06-14 00:00] Guard #3499 begins shift +[1518-03-27 00:44] wakes up +[1518-11-07 00:01] Guard #73 begins shift +[1518-09-25 00:55] wakes up +[1518-04-24 00:34] falls asleep +[1518-06-15 00:03] falls asleep +[1518-08-25 00:22] falls asleep +[1518-04-20 00:28] falls asleep +[1518-10-30 00:05] falls asleep +[1518-10-19 00:21] falls asleep +[1518-10-03 00:39] falls asleep +[1518-07-01 00:05] falls asleep +[1518-06-30 00:52] wakes up +[1518-04-26 00:40] wakes up +[1518-10-20 00:04] Guard #3203 begins shift +[1518-03-19 00:04] falls asleep +[1518-04-07 00:40] wakes up +[1518-05-05 00:55] wakes up +[1518-05-22 00:04] Guard #313 begins shift +[1518-06-08 23:47] Guard #241 begins shift +[1518-08-17 00:28] wakes up +[1518-06-17 00:25] wakes up +[1518-03-12 00:35] falls asleep +[1518-07-30 00:04] Guard #3109 begins shift +[1518-03-14 00:57] wakes up +[1518-07-11 00:56] wakes up +[1518-04-21 23:56] Guard #1811 begins shift +[1518-08-27 00:36] wakes up +[1518-06-09 00:53] wakes up +[1518-08-08 00:04] Guard #241 begins shift +[1518-03-22 00:58] wakes up +[1518-04-19 00:58] wakes up +[1518-04-18 00:00] Guard #1091 begins shift +[1518-09-28 00:48] wakes up +[1518-08-01 00:52] wakes up +[1518-03-19 00:29] falls asleep +[1518-04-04 00:02] Guard #983 begins shift +[1518-09-22 00:19] wakes up +[1518-06-15 23:59] Guard #1499 begins shift +[1518-05-10 00:29] wakes up +[1518-06-18 00:28] falls asleep +[1518-03-20 00:59] wakes up +[1518-08-26 00:15] falls asleep +[1518-10-24 00:01] Guard #3109 begins shift +[1518-07-15 00:57] falls asleep +[1518-06-05 00:59] wakes up +[1518-11-02 00:14] falls asleep +[1518-05-26 00:11] wakes up +[1518-11-04 23:56] Guard #3499 begins shift +[1518-10-08 00:53] falls asleep +[1518-09-25 00:25] falls asleep +[1518-09-25 23:56] Guard #3361 begins shift +[1518-06-24 00:04] Guard #1033 begins shift +[1518-05-07 00:04] Guard #1091 begins shift +[1518-08-18 00:29] falls asleep +[1518-09-13 00:47] falls asleep +[1518-04-02 00:53] wakes up +[1518-11-08 00:51] wakes up +[1518-09-02 23:56] Guard #3203 begins shift +[1518-08-06 00:55] wakes up +[1518-10-01 23:58] Guard #2411 begins shift +[1518-06-29 23:59] Guard #1811 begins shift +[1518-05-07 00:48] wakes up +[1518-11-12 00:37] falls asleep +[1518-10-16 00:00] Guard #2657 begins shift +[1518-07-07 00:29] falls asleep +[1518-07-17 00:45] falls asleep +[1518-11-01 00:57] wakes up +[1518-10-26 00:02] Guard #1291 begins shift +[1518-11-06 00:04] falls asleep +[1518-09-29 00:22] falls asleep +[1518-08-20 00:03] Guard #3499 begins shift +[1518-07-03 00:47] wakes up +[1518-05-01 00:25] wakes up +[1518-08-10 00:49] wakes up +[1518-03-13 00:55] wakes up +[1518-08-13 00:59] wakes up +[1518-06-08 00:53] falls asleep +[1518-07-17 00:06] falls asleep +[1518-06-25 00:41] wakes up +[1518-10-31 00:11] wakes up +[1518-05-05 00:32] falls asleep +[1518-06-23 00:40] wakes up +[1518-05-13 00:33] wakes up +[1518-04-17 00:53] falls asleep +[1518-05-01 00:09] falls asleep +[1518-03-14 00:22] falls asleep +[1518-10-27 00:01] Guard #1291 begins shift +[1518-06-04 00:01] falls asleep +[1518-10-16 00:50] wakes up +[1518-07-08 00:45] falls asleep +[1518-04-12 00:37] falls asleep +[1518-10-18 00:38] wakes up +[1518-09-14 00:10] falls asleep +[1518-07-01 00:40] falls asleep +[1518-11-08 00:20] falls asleep +[1518-03-30 00:59] wakes up +[1518-06-12 00:00] Guard #3499 begins shift +[1518-08-27 00:00] Guard #1291 begins shift +[1518-03-20 00:37] falls asleep +[1518-09-30 00:44] wakes up +[1518-09-20 00:43] wakes up +[1518-10-27 00:08] falls asleep +[1518-09-09 00:02] Guard #1091 begins shift +[1518-08-13 00:21] falls asleep +[1518-04-21 00:49] wakes up +[1518-11-16 23:56] Guard #919 begins shift +[1518-07-22 00:47] wakes up +[1518-10-03 00:50] falls asleep +[1518-09-26 00:50] wakes up +[1518-06-08 00:02] Guard #1811 begins shift +[1518-05-22 23:59] Guard #2617 begins shift +[1518-07-31 00:34] wakes up +[1518-10-22 23:52] Guard #313 begins shift +[1518-08-03 00:49] falls asleep +[1518-10-24 00:43] falls asleep +[1518-05-08 00:01] Guard #1033 begins shift +[1518-10-19 00:48] wakes up +[1518-10-13 00:04] Guard #1091 begins shift +[1518-07-18 00:18] wakes up +[1518-10-20 00:36] wakes up +[1518-10-04 00:33] falls asleep +[1518-05-08 00:11] wakes up +[1518-05-19 00:04] falls asleep +[1518-04-06 00:55] wakes up +[1518-08-10 00:38] wakes up +[1518-06-10 00:34] falls asleep +[1518-07-15 00:38] falls asleep +[1518-08-18 00:35] wakes up +[1518-03-27 00:18] falls asleep +[1518-08-10 00:45] falls asleep +[1518-07-30 00:22] wakes up +[1518-06-22 23:59] Guard #2657 begins shift +[1518-07-11 23:57] Guard #2617 begins shift +[1518-10-15 00:47] wakes up +[1518-08-25 00:02] Guard #1291 begins shift +[1518-06-24 00:12] falls asleep +[1518-03-16 23:57] Guard #2657 begins shift +[1518-10-18 00:02] Guard #2657 begins shift +[1518-05-11 00:58] wakes up +[1518-03-30 00:37] falls asleep +[1518-08-21 00:53] wakes up +[1518-07-09 00:57] wakes up +[1518-08-07 00:00] Guard #1499 begins shift +[1518-09-02 00:56] falls asleep +[1518-10-14 23:56] Guard #2099 begins shift +[1518-09-19 00:48] wakes up +[1518-05-30 00:04] Guard #1499 begins shift +[1518-11-11 00:04] falls asleep +[1518-03-21 00:57] wakes up +[1518-05-20 23:57] Guard #1811 begins shift +[1518-10-23 00:08] wakes up +[1518-07-02 23:57] Guard #1811 begins shift +[1518-10-28 23:58] Guard #241 begins shift +[1518-05-12 00:05] falls asleep +[1518-11-18 00:26] falls asleep +[1518-03-21 00:27] wakes up +[1518-07-29 00:50] wakes up +[1518-10-24 23:56] Guard #2657 begins shift +[1518-05-14 00:37] wakes up +[1518-08-04 00:00] Guard #1033 begins shift +[1518-06-20 00:52] wakes up +[1518-05-10 00:00] Guard #73 begins shift +[1518-08-19 00:02] Guard #1033 begins shift +[1518-03-16 00:03] falls asleep +[1518-03-12 00:03] Guard #2657 begins shift +[1518-06-22 00:48] wakes up +[1518-08-22 00:31] falls asleep +[1518-05-11 00:02] Guard #1811 begins shift +[1518-03-19 23:58] Guard #241 begins shift +[1518-04-10 00:53] falls asleep +[1518-10-21 23:57] Guard #919 begins shift +[1518-06-28 00:04] Guard #2657 begins shift +[1518-11-17 00:56] falls asleep +[1518-07-09 00:45] wakes up +[1518-06-11 00:44] wakes up +[1518-04-10 00:48] wakes up +[1518-11-01 00:37] falls asleep +[1518-05-20 00:36] falls asleep +[1518-05-23 23:56] Guard #1811 begins shift +[1518-04-18 23:56] Guard #3109 begins shift +[1518-05-31 00:02] Guard #2657 begins shift +[1518-05-17 00:00] Guard #241 begins shift +[1518-05-28 00:52] falls asleep +[1518-10-30 00:07] wakes up +[1518-08-30 00:26] falls asleep +[1518-03-17 23:57] Guard #241 begins shift +[1518-07-19 00:43] wakes up +[1518-08-09 00:03] Guard #3109 begins shift +[1518-09-11 00:41] wakes up +[1518-07-27 23:50] Guard #2099 begins shift +[1518-10-17 00:26] falls asleep +[1518-05-30 00:14] falls asleep +[1518-10-12 00:26] falls asleep +[1518-06-16 00:44] falls asleep +[1518-05-20 00:02] Guard #1033 begins shift +[1518-06-16 00:24] falls asleep +[1518-06-19 23:57] Guard #2411 begins shift +[1518-10-27 00:53] wakes up +[1518-06-10 00:53] falls asleep +[1518-05-05 00:43] falls asleep +[1518-09-04 00:03] Guard #2099 begins shift +[1518-05-23 00:14] wakes up +[1518-09-08 00:04] Guard #1291 begins shift +[1518-05-03 00:52] wakes up +[1518-07-25 00:03] Guard #1033 begins shift +[1518-07-08 00:59] wakes up +[1518-10-25 00:54] wakes up +[1518-11-08 00:00] falls asleep +[1518-06-20 00:47] falls asleep +[1518-05-08 00:49] wakes up +[1518-11-15 23:59] Guard #3109 begins shift +[1518-06-18 00:55] wakes up +[1518-03-11 00:04] Guard #1499 begins shift +[1518-08-29 00:44] falls asleep +[1518-05-16 00:28] falls asleep +[1518-11-03 23:56] Guard #1291 begins shift +[1518-04-26 00:18] falls asleep +[1518-07-21 00:00] Guard #919 begins shift +[1518-08-21 00:04] falls asleep +[1518-10-14 00:05] falls asleep +[1518-06-19 00:57] wakes up +[1518-08-27 00:54] wakes up +[1518-09-13 23:56] Guard #1499 begins shift +[1518-08-20 23:48] Guard #3559 begins shift +[1518-09-30 23:50] Guard #313 begins shift +[1518-08-20 00:37] falls asleep +[1518-07-18 00:03] falls asleep +[1518-04-23 00:17] wakes up +[1518-05-14 00:17] falls asleep +[1518-06-20 00:27] falls asleep +[1518-06-01 23:59] Guard #241 begins shift +[1518-06-05 00:52] wakes up +[1518-06-26 00:37] wakes up +[1518-05-28 00:14] wakes up +[1518-11-12 23:49] Guard #3449 begins shift +[1518-11-10 00:53] wakes up +[1518-06-05 00:00] Guard #983 begins shift +[1518-10-26 00:45] wakes up +[1518-11-03 00:55] wakes up +[1518-09-10 00:31] falls asleep +[1518-05-31 00:56] wakes up +[1518-11-14 00:31] wakes up +[1518-06-20 00:43] wakes up +[1518-06-09 00:45] falls asleep +[1518-10-18 00:48] wakes up +[1518-07-30 00:43] falls asleep +[1518-08-12 00:04] Guard #2657 begins shift +[1518-09-15 00:59] wakes up +[1518-05-07 00:16] falls asleep +[1518-09-14 00:56] wakes up +[1518-08-25 00:45] wakes up +[1518-04-07 00:55] falls asleep +[1518-07-13 00:32] wakes up +[1518-03-24 00:28] wakes up +[1518-11-22 00:40] wakes up +[1518-09-12 00:59] wakes up +[1518-03-12 00:47] wakes up +[1518-09-17 23:59] Guard #1291 begins shift +[1518-05-26 00:40] falls asleep +[1518-04-07 00:57] wakes up +[1518-03-17 00:48] falls asleep +[1518-09-10 00:56] wakes up +[1518-06-16 00:29] wakes up +[1518-09-04 00:41] wakes up +[1518-05-02 23:53] Guard #241 begins shift +[1518-08-17 00:43] falls asleep +[1518-09-17 00:59] wakes up +[1518-09-07 00:01] Guard #3499 begins shift +[1518-10-11 00:29] falls asleep +[1518-05-18 23:53] Guard #3109 begins shift +[1518-07-02 00:00] falls asleep +[1518-04-03 00:06] falls asleep +[1518-05-04 23:58] Guard #2657 begins shift +[1518-06-03 00:48] wakes up +[1518-06-10 00:48] wakes up +[1518-09-09 00:06] falls asleep +[1518-06-04 00:32] wakes up +[1518-08-19 00:32] falls asleep +[1518-06-17 00:31] falls asleep +[1518-11-17 23:59] Guard #1811 begins shift +[1518-04-27 00:43] falls asleep +[1518-05-26 00:06] falls asleep +[1518-07-03 00:07] falls asleep +[1518-05-16 00:00] Guard #983 begins shift +[1518-07-26 23:57] Guard #1867 begins shift +[1518-10-22 00:36] wakes up +[1518-09-10 00:39] falls asleep +[1518-05-20 00:59] wakes up +[1518-09-26 00:20] falls asleep +[1518-05-07 00:38] falls asleep +[1518-10-05 00:53] wakes up +[1518-07-05 00:39] falls asleep +[1518-11-20 00:09] falls asleep +[1518-03-19 00:34] wakes up +[1518-11-14 23:47] Guard #1291 begins shift +[1518-06-19 00:14] falls asleep +[1518-09-15 23:58] Guard #2617 begins shift +[1518-08-28 00:46] wakes up +[1518-07-28 00:04] falls asleep +[1518-11-19 00:57] wakes up +[1518-04-15 00:17] falls asleep +[1518-05-08 00:52] falls asleep +[1518-10-03 00:32] wakes up +[1518-07-05 00:51] wakes up +[1518-06-09 00:16] wakes up +[1518-04-28 00:43] wakes up +[1518-07-09 00:38] falls asleep diff --git a/src/adventofcode2018/data/day05/day_05.txt b/src/adventofcode2018/data/day05/day_05.txt new file mode 100644 index 00000000..4d4b7033 --- /dev/null +++ b/src/adventofcode2018/data/day05/day_05.txt @@ -0,0 +1 @@ +XxSsdDIijNnJACszZScZfFhHQyYrRqzdXTtxDEeNnGgOaAcCMcCLlMmogQeEqGgFfGyYuUOIiYyhHlLmUulAUKkudDOoDdaLGRrgoDdDdGgRruUhJLljQqdwWDZzHXxppPTwWCcZzDmfFlLPpdDSsgGtFfTEeTOotyYMOGgkJjKZUuQdNnDhHvVntKkTNqTjJeEVkZzttTYyTDdIiRrqQyYYyxbBXLlKHhvtYyzoKMmiIkaAUvVuvEejoOJUuQoOLlLloOxoOXaAqYYXxyzMmZyoOVhHIiIKfFkiIKAaUukRrKQqASsakLgGlGgLxXhHmcCzZxXMWdUulLJjDwnNYkKFfZzpPVuUvHhbQqIiLRrlEeVvBQJjlLGgjYyJoAalxXuUqgGQLQqOqNJjzZnyOusSUeEFfodcLuUlCcCIiNnGgaADVwWGgvZtTewWENnSszBKkDdeEYytTzpPsSjJpPZkNnIiPpDIideEcCKCcNABbKnpPGgtTNqQGgklLtTuUgGQqaNnnVveEgjJJEejGkKziIAaZmMbopPOgDdGubBIiUZGgzuUoOkMYymvBbVPpmMqQKDdCiDdIcpDjHhIiqQJLlFCcfqxXwWQd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DdRYyxXcCTthZzHUukoBbOiIVyFfYvgUuHhsSGvVjuUJVFfvzpPqgGQjJUuxEejJJsSFfUtTujqQkSsKhBrRbNyYZznjiIEcRrQnNqZzNnCeBbJHPpaSiIsATtaPZPpgGzyYlLyyrRvgGVLhHXxzZlYKVvhPpHpPIikMfFFLlfJLRrHWwGjJgegGCrRcEPLlNaAnpPpCsSdbBDIvVluUSsLiJuUSDdsjcGgMmuUvasSbBaAAIiUuTfFnNtHnNhNxXnFfRroOVniINhRqQrwWWwvqQvmMDdLlCcuFfUzZVVBboXxRrOlIimdDYyMtTUuJKktNNnnbBsmMEeSTwelLEWjVvWzZLlwobBpPIijJdDYyKkOWUuwJjyYAaxXxXIfFizZnNEVnNpPvQRrqeQnNMmqghHcXxXxCWwlLGTIAaUuTttTitltiIvVWwIiTAarRZzQNnoOqxXlLsSmMiOosSEegGQqdeEjJKkuUKkCaAKkCcbBcHfFeEhSseEPVvKklLYyGgpDdcCtSsglLrTtRGPphHNnuUfFeAaEnNWwNnPPpOokKcCCcmtTsSGPpgMa diff --git a/src/adventofcode2018/data/day_06/day06.txt b/src/adventofcode2018/data/day_06/day06.txt new file mode 100644 index 00000000..0e936e97 --- /dev/null +++ b/src/adventofcode2018/data/day_06/day06.txt @@ -0,0 +1,50 @@ +137, 282 +229, 214 +289, 292 +249, 305 +90, 289 +259, 316 +134, 103 +96, 219 +92, 308 +269, 59 +141, 132 +71, 200 +337, 350 +40, 256 +236, 105 +314, 219 +295, 332 +114, 217 +43, 202 +160, 164 +245, 303 +339, 277 +310, 316 +164, 44 +196, 335 +228, 345 +41, 49 +84, 298 +43, 51 +158, 347 +121, 51 +176, 187 +213, 120 +174, 133 +259, 263 +210, 205 +303, 233 +265, 98 +359, 332 +186, 340 +132, 99 +174, 153 +206, 142 +341, 162 +180, 166 +152, 249 +221, 118 +95, 227 +152, 186 +72, 330 diff --git a/src/adventofcode2018/data/day_07/day07.txt b/src/adventofcode2018/data/day_07/day07.txt new file mode 100644 index 00000000..32aaad7b --- /dev/null +++ b/src/adventofcode2018/data/day_07/day07.txt @@ -0,0 +1,101 @@ +Step S must be finished before step G can begin. +Step E must be finished before step T can begin. +Step G must be finished before step A can begin. +Step P must be finished before step Z can begin. +Step L must be finished before step Z can begin. +Step F must be finished before step H can begin. +Step D must be finished before step Y can begin. +Step J must be finished before step Y can begin. +Step N must be finished before step O can begin. +Step R must be finished before step Y can begin. +Step Y must be finished before step W can begin. +Step U must be finished before step T can begin. +Step H must be finished before step W can begin. +Step T must be finished before step Z can begin. +Step Q must be finished before step B can begin. +Step O must be finished before step Z can begin. +Step K must be finished before step W can begin. +Step M must be finished before step C can begin. +Step A must be finished before step Z can begin. +Step C must be finished before step X can begin. +Step I must be finished before step V can begin. +Step V must be finished before step W can begin. +Step W must be finished before step X can begin. +Step Z must be finished before step B can begin. +Step X must be finished before step B can begin. +Step D must be finished before step M can begin. +Step S must be finished before step Z can begin. +Step A must be finished before step B can begin. +Step V must be finished before step Z can begin. +Step Q must be finished before step Z can begin. +Step O must be finished before step W can begin. +Step S must be finished before step E can begin. +Step L must be finished before step B can begin. +Step P must be finished before step Y can begin. +Step K must be finished before step M can begin. +Step W must be finished before step Z can begin. +Step Y must be finished before step Q can begin. +Step J must be finished before step M can begin. +Step U must be finished before step H can begin. +Step Y must be finished before step U can begin. +Step D must be finished before step A can begin. +Step C must be finished before step V can begin. +Step G must be finished before step J can begin. +Step O must be finished before step C can begin. +Step P must be finished before step H can begin. +Step M must be finished before step B can begin. +Step T must be finished before step C can begin. +Step A must be finished before step W can begin. +Step C must be finished before step B can begin. +Step Q must be finished before step I can begin. +Step O must be finished before step A can begin. +Step N must be finished before step H can begin. +Step Q must be finished before step C can begin. +Step G must be finished before step W can begin. +Step V must be finished before step X can begin. +Step A must be finished before step V can begin. +Step S must be finished before step C can begin. +Step O must be finished before step M can begin. +Step E must be finished before step L can begin. +Step D must be finished before step V can begin. +Step P must be finished before step N can begin. +Step O must be finished before step I can begin. +Step P must be finished before step K can begin. +Step N must be finished before step A can begin. +Step A must be finished before step X can begin. +Step L must be finished before step A can begin. +Step L must be finished before step T can begin. +Step I must be finished before step X can begin. +Step N must be finished before step C can begin. +Step N must be finished before step W can begin. +Step Y must be finished before step M can begin. +Step R must be finished before step A can begin. +Step O must be finished before step X can begin. +Step G must be finished before step T can begin. +Step S must be finished before step P can begin. +Step E must be finished before step M can begin. +Step E must be finished before step A can begin. +Step E must be finished before step W can begin. +Step F must be finished before step D can begin. +Step U must be finished before step C can begin. +Step R must be finished before step Z can begin. +Step A must be finished before step C can begin. +Step F must be finished before step K can begin. +Step L must be finished before step V can begin. +Step F must be finished before step T can begin. +Step W must be finished before step B can begin. +Step Y must be finished before step A can begin. +Step D must be finished before step T can begin. +Step S must be finished before step V can begin. +Step Y must be finished before step O can begin. +Step K must be finished before step B can begin. +Step N must be finished before step V can begin. +Step Y must be finished before step I can begin. +Step Z must be finished before step X can begin. +Step E must be finished before step B can begin. +Step P must be finished before step O can begin. +Step D must be finished before step R can begin. +Step Q must be finished before step X can begin. +Step E must be finished before step K can begin. +Step J must be finished before step R can begin. +Step L must be finished before step N can begin. diff --git a/src/adventofcode2018/data/day_08/day08.txt b/src/adventofcode2018/data/day_08/day08.txt new file mode 100644 index 00000000..9fc2c810 --- /dev/null +++ b/src/adventofcode2018/data/day_08/day08.txt @@ -0,0 +1 @@ +8 11 7 2 5 5 3 6 1 6 0 6 1 9 4 7 3 4 3 2 1 1 1 3 1 9 0 7 2 5 6 3 7 1 9 3 2 1 1 1 2 3 2 1 1 8 0 11 8 1 2 7 6 8 3 1 5 3 8 3 2 2 3 1 1 3 2 2 4 1 3 4 3 3 6 1 7 0 9 1 9 3 4 7 3 8 2 8 1 2 2 3 2 1 1 1 6 0 10 7 9 5 2 4 4 8 7 3 1 3 2 1 1 1 2 1 9 0 6 5 7 7 1 2 6 3 1 1 1 1 1 3 2 3 1 5 2 3 3 2 3 5 1 7 0 10 5 7 9 1 4 7 8 9 6 3 2 1 2 3 2 3 2 1 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5 4 9 2 7 1 2 3 1 1 3 2 1 1 8 0 11 4 2 6 1 3 9 9 3 2 3 3 1 1 3 1 3 3 1 3 1 8 0 7 9 1 1 4 4 6 1 1 1 1 2 2 2 1 3 1 3 3 2 3 4 1 6 0 9 7 1 8 2 2 7 6 9 6 3 2 1 2 1 3 1 8 0 6 7 9 7 1 9 7 1 2 1 2 1 1 3 1 1 8 0 8 2 3 3 6 4 1 5 5 2 2 2 3 2 1 3 3 4 4 3 5 1 6 2 5 5 1 7 2 2 10 2 8 5 9 5 6 4 diff --git a/src/adventofcode2018/data/day_08/day08_input_a.txt b/src/adventofcode2018/data/day_08/day08_input_a.txt new file mode 100644 index 00000000..1e54d71e --- /dev/null +++ b/src/adventofcode2018/data/day_08/day08_input_a.txt @@ -0,0 +1 @@ +8 11 7 3 5 4 3 5 1 7 0 6 1 6 5 3 5 2 2 1 3 1 2 1 1 1 8 0 8 7 7 3 8 9 1 8 3 1 3 3 3 3 2 1 3 1 7 0 9 7 7 2 5 1 3 3 3 1 3 1 1 3 3 3 1 2 3 3 5 4 3 7 1 9 0 8 5 1 2 6 5 2 1 4 3 3 1 1 2 1 1 3 3 1 5 0 9 5 5 6 1 6 4 3 5 7 2 3 1 2 2 1 9 0 10 7 2 7 7 5 7 2 7 9 1 1 3 1 3 3 1 1 3 1 1 1 2 1 2 1 1 3 7 1 5 0 6 1 4 4 7 4 7 1 1 1 2 1 1 5 0 11 3 9 1 6 5 2 7 3 3 1 2 1 3 1 2 3 1 8 0 10 3 1 5 9 3 3 8 3 7 2 3 2 1 2 2 2 1 1 3 2 4 2 5 3 4 3 7 1 7 0 10 6 3 1 8 2 3 7 6 9 5 1 3 2 3 3 2 1 1 9 0 9 6 5 1 6 7 7 2 4 7 1 3 1 1 3 2 2 2 2 1 7 0 8 2 8 2 1 2 9 9 9 3 1 3 1 1 1 3 1 5 5 1 2 1 4 3 5 1 6 0 8 1 1 1 6 3 3 1 2 3 2 1 2 1 1 1 8 0 11 3 2 5 1 4 8 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1 4 4 5 3 2 3 5 1 7 0 8 3 2 6 7 8 1 3 1 1 2 1 3 2 2 1 1 9 0 7 9 5 8 6 1 1 1 1 1 3 2 1 3 1 3 3 1 8 0 10 2 8 1 3 3 7 3 5 2 2 1 2 1 2 2 1 3 2 2 2 1 4 3 3 4 1 7 0 8 1 8 5 6 4 4 7 1 3 2 1 3 1 2 1 1 8 0 9 8 8 5 2 2 8 8 1 2 3 3 3 2 1 1 3 1 1 8 0 8 5 9 1 2 3 3 1 7 1 1 1 1 1 3 3 2 5 1 4 2 3 4 1 5 0 10 4 6 7 9 1 1 1 9 1 9 3 3 1 3 1 1 8 0 8 7 9 1 4 8 7 1 8 3 1 2 1 2 3 3 3 1 5 0 10 9 1 5 5 6 1 1 2 6 9 3 1 1 1 1 1 2 5 2 5 2 4 1 6 7 5 6 5 1 2 6 7 2 10 6 2 10 diff --git a/src/adventofcode2018/data/day_09/day09.txt b/src/adventofcode2018/data/day_09/day09.txt new file mode 100644 index 00000000..9c890b5a --- /dev/null +++ b/src/adventofcode2018/data/day_09/day09.txt @@ -0,0 +1 @@ +426 players; last marble is worth 72058 points diff --git a/src/adventofcode2018/data/day_10/day10.txt b/src/adventofcode2018/data/day_10/day10.txt new file mode 100644 index 00000000..c8f8d4ce --- /dev/null +++ b/src/adventofcode2018/data/day_10/day10.txt @@ -0,0 +1,328 @@ +position=< 42772, -21149> velocity=<-4, 2> +position=< 42804, -31790> velocity=<-4, 3> +position=<-10445, -10502> velocity=< 1, 1> +position=<-31749, 21438> velocity=< 3, -2> +position=<-31722, 32074> velocity=< 3, -3> +position=< 53436, -21147> velocity=<-5, 2> +position=<-42336, -42437> velocity=< 4, 4> +position=<-42380, 21435> velocity=< 4, -2> +position=< 21508, -10506> velocity=<-2, 1> +position=<-31727, 42725> velocity=< 3, -4> +position=<-42383, 32083> velocity=< 4, -3> +position=< 42764, 21438> velocity=<-4, -2> +position=<-53037, -53086> velocity=< 5, 5> +position=< 53436, -10506> velocity=<-5, 1> +position=<-10445, 32083> velocity=< 1, -3> +position=<-53001, -53081> velocity=< 5, 5> +position=<-31724, -21151> velocity=< 3, 2> +position=<-21106, 42720> velocity=< 2, -4> +position=< 10847, -53083> velocity=<-1, 5> +position=< 21483, -21147> velocity=<-2, 2> +position=< 53433, -21146> velocity=<-5, 2> +position=< 32121, 42719> velocity=<-3, -4> +position=< 10834, 53364> velocity=<-1, -5> +position=<-31708, -42434> velocity=< 3, 4> +position=<-21057, -10497> velocity=< 2, 1> +position=<-42372, -53082> velocity=< 4, 5> +position=< 32143, -10502> velocity=<-3, 1> +position=<-31751, -53078> velocity=< 3, 5> +position=<-21069, 42720> velocity=< 2, -4> +position=<-21049, -42432> velocity=< 2, 4> +position=<-42376, 42727> velocity=< 4, -4> +position=< 42790, -21151> velocity=<-4, 2> +position=< 10849, 32082> velocity=<-1, -3> +position=<-31724, -21142> velocity=< 3, 2> +position=< 32159, -10498> velocity=<-3, 1> +position=< 32180, -21151> velocity=<-3, 2> +position=< 21491, 53368> velocity=<-2, -5> +position=< 32162, -21149> velocity=<-3, 2> +position=< 21482, -10505> velocity=<-2, 1> +position=<-52981, -53079> velocity=< 5, 5> +position=< 42796, 32079> velocity=<-4, -3> +position=<-21066, 42720> velocity=< 2, -4> +position=< 10862, 32083> velocity=<-1, -3> +position=< 21474, -53083> velocity=<-2, 5> +position=<-10434, -10497> velocity=< 1, 1> +position=<-21054, 53364> velocity=< 2, -5> +position=< 21534, 42723> velocity=<-2, -4> +position=< 10861, -21147> velocity=<-1, 2> +position=< 10857, -10502> velocity=<-1, 1> +position=< 53461, 32079> velocity=<-5, -3> +position=< 32132, -10505> velocity=<-3, 1> +position=<-42362, -21142> velocity=< 4, 2> +position=<-42396, 32074> velocity=< 4, -3> +position=< 53469, -21151> velocity=<-5, 2> +position=<-21098, 42723> velocity=< 2, -4> +position=<-42378, 32080> velocity=< 4, -3> +position=<-21074, 42726> velocity=< 2, -4> +position=< 10881, -10500> velocity=<-1, 1> +position=< 21514, 53367> velocity=<-2, -5> +position=< 42764, -53080> velocity=<-4, 5> +position=< 32151, 53368> velocity=<-3, -5> +position=<-21090, 21437> velocity=< 2, -2> +position=< 10877, -53078> velocity=<-1, 5> +position=<-10445, -31796> velocity=< 1, 3> +position=< 42796, 42722> velocity=<-4, -4> +position=<-31740, -21147> velocity=< 3, 2> +position=<-42344, -53083> velocity=< 4, 5> +position=<-21087, -31794> velocity=< 2, 3> +position=<-31691, 32082> velocity=< 3, -3> +position=< 21490, -31790> velocity=<-2, 3> +position=< 42792, -10506> velocity=<-4, 1> +position=< 53462, 32074> velocity=<-5, -3> +position=<-53025, 53366> velocity=< 5, -5> +position=<-31722, 21438> velocity=< 3, -2> +position=< 53469, 10786> velocity=<-5, -1> +position=< 10841, 32081> velocity=<-1, -3> +position=< 53449, 21431> velocity=<-5, -2> +position=<-21074, -10501> velocity=< 2, 1> +position=< 21487, -53084> velocity=<-2, 5> +position=<-53015, -53082> velocity=< 5, 5> +position=< 42777, -31787> velocity=<-4, 3> +position=< 42764, -10502> velocity=<-4, 1> +position=< 53422, 10787> velocity=<-5, -1> +position=< 42772, -10503> velocity=<-4, 1> +position=< 53465, 32081> velocity=<-5, -3> +position=<-10421, 10793> velocity=< 1, -1> +position=< 42815, -42432> velocity=<-4, 4> +position=<-21106, -53079> velocity=< 2, 5> +position=<-53033, 53369> velocity=< 5, -5> +position=< 42766, 53368> velocity=<-4, -5> +position=< 42767, -21151> velocity=<-4, 2> +position=< 21526, -31789> velocity=<-2, 3> +position=<-21082, -21148> velocity=< 2, 2> +position=< 53410, -21147> velocity=<-5, 2> +position=<-31691, -10500> velocity=< 3, 1> +position=< 42805, 32078> velocity=<-4, -3> +position=<-42378, -31790> velocity=< 4, 3> +position=<-21050, -21143> velocity=< 2, 2> +position=<-21106, -42436> velocity=< 2, 4> +position=<-53001, 53365> velocity=< 5, -5> +position=< 53469, -21145> velocity=<-5, 2> +position=< 10833, -31796> velocity=<-1, 3> +position=<-53009, -10498> velocity=< 5, 1> +position=< 32159, -31789> velocity=<-3, 3> +position=<-53007, -53077> velocity=< 5, 5> +position=< 21474, -21149> velocity=<-2, 2> +position=< 53427, -53083> velocity=<-5, 5> +position=< 10861, 42720> velocity=<-1, -4> +position=<-53017, 10786> velocity=< 5, -1> +position=<-42335, -42441> velocity=< 4, 4> +position=<-31751, -42432> velocity=< 3, 4> +position=< 32171, 21429> velocity=<-3, -2> +position=<-53016, -53086> velocity=< 5, 5> +position=< 21522, 21436> velocity=<-2, -2> +position=<-53009, -53079> velocity=< 5, 5> +position=< 53433, 42721> velocity=<-5, -4> +position=< 53420, -42441> velocity=<-5, 4> +position=< 42777, -10504> velocity=<-4, 1> +position=<-10416, 32074> velocity=< 1, -3> +position=<-42396, 10788> velocity=< 4, -1> +position=< 21490, 10791> velocity=<-2, -1> +position=< 32128, -21147> velocity=<-3, 2> +position=< 53461, -21143> velocity=<-5, 2> +position=<-21063, -21149> velocity=< 2, 2> +position=<-31743, -31792> velocity=< 3, 3> +position=< 21514, 21432> velocity=<-2, -2> +position=< 10861, 10791> velocity=<-1, -1> +position=< 10881, -31792> velocity=<-1, 3> +position=< 10889, -31795> velocity=<-1, 3> +position=< 32143, -21145> velocity=<-3, 2> +position=<-21093, -42439> velocity=< 2, 4> +position=<-10450, 21433> velocity=< 1, -2> +position=<-31719, 21430> velocity=< 3, -2> +position=< 10865, 53373> velocity=<-1, -5> +position=<-10405, -21144> velocity=< 1, 2> +position=< 21534, -42433> velocity=<-2, 4> +position=<-31727, -53083> velocity=< 3, 5> +position=<-53021, 21437> velocity=< 5, -2> +position=< 53449, -42434> velocity=<-5, 4> +position=<-21046, 10789> velocity=< 2, -1> +position=< 21518, 32082> velocity=<-2, -3> +position=<-31727, -10506> velocity=< 3, 1> +position=<-53033, 10793> velocity=< 5, -1> +position=< 10842, -10498> velocity=<-1, 1> +position=< 53425, 32075> velocity=<-5, -3> +position=<-53004, 32082> velocity=< 5, -3> +position=<-53016, -53082> velocity=< 5, 5> +position=<-21098, 21435> velocity=< 2, -2> +position=<-10417, 42720> velocity=< 1, -4> +position=<-42363, 21429> velocity=< 4, -2> +position=< 32151, 10790> velocity=<-3, -1> +position=<-53025, 21431> velocity=< 5, -2> +position=<-10437, -42435> velocity=< 1, 4> +position=<-31735, -10502> velocity=< 3, 1> +position=<-21098, -21149> velocity=< 2, 2> +position=< 10830, 10784> velocity=<-1, -1> +position=< 10838, -21151> velocity=<-1, 2> +position=<-21085, -21142> velocity=< 2, 2> +position=< 32119, -53079> velocity=<-3, 5> +position=<-31700, 21438> velocity=< 3, -2> +position=<-31714, -31795> velocity=< 3, 3> +position=< 32135, -10504> velocity=<-3, 1> +position=< 10889, -21149> velocity=<-1, 2> +position=<-31742, -53086> velocity=< 3, 5> +position=<-31726, -42432> velocity=< 3, 4> +position=<-31727, -53079> velocity=< 3, 5> +position=<-42369, -31792> velocity=< 4, 3> +position=< 10830, -42437> velocity=<-1, 4> +position=< 32179, 42725> velocity=<-3, -4> +position=< 21483, -31796> velocity=<-2, 3> +position=< 53435, 32074> velocity=<-5, -3> +position=< 32132, -31788> velocity=<-3, 3> +position=< 53449, 10787> velocity=<-5, -1> +position=<-21066, -42439> velocity=< 2, 4> +position=<-21065, 10789> velocity=< 2, -1> +position=<-31693, -31787> velocity=< 3, 3> +position=<-42380, 42727> velocity=< 4, -4> +position=< 42788, 10785> velocity=<-4, -1> +position=<-21054, -21150> velocity=< 2, 2> +position=< 42772, -42434> velocity=<-4, 4> +position=<-31722, 42719> velocity=< 3, -4> +position=< 10837, -31794> velocity=<-1, 3> +position=< 21498, -42436> velocity=<-2, 4> +position=< 42797, 10793> velocity=<-4, -1> +position=<-42372, 42724> velocity=< 4, -4> +position=< 32171, 10787> velocity=<-3, -1> +position=<-21085, -42441> velocity=< 2, 4> +position=<-21046, 10791> velocity=< 2, -1> +position=<-31709, 53370> velocity=< 3, -5> +position=< 21503, 21438> velocity=<-2, -2> +position=<-31695, -10498> velocity=< 3, 1> +position=<-10411, -53077> velocity=< 1, 5> +position=< 32169, 21438> velocity=<-3, -2> +position=< 53454, -42441> velocity=<-5, 4> +position=< 21487, 10785> velocity=<-2, -1> +position=<-31711, 10792> velocity=< 3, -1> +position=<-21085, -10497> velocity=< 2, 1> +position=<-42360, -42432> velocity=< 4, 4> +position=<-21090, 21434> velocity=< 2, -2> +position=<-31739, 32074> velocity=< 3, -3> +position=< 53417, -10502> velocity=<-5, 1> +position=<-42364, -21149> velocity=< 4, 2> +position=< 42767, -21147> velocity=<-4, 2> +position=< 21502, 10784> velocity=<-2, -1> +position=<-53016, -53077> velocity=< 5, 5> +position=<-10401, 10787> velocity=< 1, -1> +position=<-31715, 53373> velocity=< 3, -5> +position=< 10869, 53364> velocity=<-1, -5> +position=< 10848, -10499> velocity=<-1, 1> +position=< 10880, -10497> velocity=<-1, 1> +position=<-31749, 32074> velocity=< 3, -3> +position=<-42388, -31788> velocity=< 4, 3> +position=<-10440, 42719> velocity=< 1, -4> +position=< 10857, -53082> velocity=<-1, 5> +position=< 53461, -21147> velocity=<-5, 2> +position=<-21063, -10499> velocity=< 2, 1> +position=< 32124, 42728> velocity=<-3, -4> +position=<-21102, 10788> velocity=< 2, -1> +position=< 32179, 32079> velocity=<-3, -3> +position=< 10837, 32075> velocity=<-1, -3> +position=<-42383, 32077> velocity=< 4, -3> +position=< 42769, 21429> velocity=<-4, -2> +position=< 21495, -10497> velocity=<-2, 1> +position=< 32151, -42436> velocity=<-3, 4> +position=< 32129, 10784> velocity=<-3, -1> +position=<-31750, 10793> velocity=< 3, -1> +position=< 53449, -42432> velocity=<-5, 4> +position=< 32128, -42437> velocity=<-3, 4> +position=<-42377, -21144> velocity=< 4, 2> +position=< 10833, 53373> velocity=<-1, -5> +position=< 32143, 32083> velocity=<-3, -3> +position=< 42816, -31792> velocity=<-4, 3> +position=<-31727, 42728> velocity=< 3, -4> +position=<-21103, 42719> velocity=< 2, -4> +position=<-42368, 21438> velocity=< 4, -2> +position=<-21098, -10500> velocity=< 2, 1> +position=<-31735, -10506> velocity=< 3, 1> +position=<-42391, 32074> velocity=< 4, -3> +position=<-21095, -53081> velocity=< 2, 5> +position=<-21079, -21147> velocity=< 2, 2> +position=< 32151, 53366> velocity=<-3, -5> +position=<-42396, 10785> velocity=< 4, -1> +position=< 32119, 21434> velocity=<-3, -2> +position=<-31716, -42432> velocity=< 3, 4> +position=< 32162, 32081> velocity=<-3, -3> +position=< 10845, 21430> velocity=<-1, -2> +position=< 32119, -21149> velocity=<-3, 2> +position=< 53461, -10504> velocity=<-5, 1> +position=<-21074, -42438> velocity=< 2, 4> +position=< 10873, 53372> velocity=<-1, -5> +position=<-42380, -31792> velocity=< 4, 3> +position=<-31751, 10788> velocity=< 3, -1> +position=<-31735, -53086> velocity=< 3, 5> +position=< 21499, 10788> velocity=<-2, -1> +position=< 32147, 10784> velocity=<-3, -1> +position=<-10409, 42721> velocity=< 1, -4> +position=< 21492, -42435> velocity=<-2, 4> +position=< 10885, -42434> velocity=<-1, 4> +position=< 53409, -42433> velocity=<-5, 4> +position=<-31699, 10784> velocity=< 3, -1> +position=< 53459, -31787> velocity=<-5, 3> +position=<-21093, -42433> velocity=< 2, 4> +position=< 53436, -42432> velocity=<-5, 4> +position=< 42764, 42727> velocity=<-4, -4> +position=<-52982, 10793> velocity=< 5, -1> +position=<-21061, -53077> velocity=< 2, 5> +position=< 21525, 10784> velocity=<-2, -1> +position=<-10401, -53083> velocity=< 1, 5> +position=< 10833, 10793> velocity=<-1, -1> +position=< 42767, 10793> velocity=<-4, -1> +position=< 10869, 21429> velocity=<-1, -2> +position=<-42370, -53082> velocity=< 4, 5> +position=< 10881, 53372> velocity=<-1, -5> +position=<-10461, 21429> velocity=< 1, -2> +position=<-21080, -42432> velocity=< 2, 4> +position=< 42817, 10784> velocity=<-4, -1> +position=< 42805, -10501> velocity=<-4, 1> +position=<-42371, -31796> velocity=< 4, 3> +position=<-42388, 32079> velocity=< 4, -3> +position=< 21490, 21436> velocity=<-2, -2> +position=<-10421, 42726> velocity=< 1, -4> +position=< 21492, 42722> velocity=<-2, -4> +position=< 42799, 42728> velocity=<-4, -4> +position=<-53025, 10787> velocity=< 5, -1> +position=< 21474, -42441> velocity=<-2, 4> +position=< 53433, 10792> velocity=<-5, -1> +position=< 32130, -31796> velocity=<-3, 3> +position=< 53438, -10506> velocity=<-5, 1> +position=<-10445, -21146> velocity=< 1, 2> +position=< 21518, -10505> velocity=<-2, 1> +position=< 32151, 42722> velocity=<-3, -4> +position=< 21514, 42723> velocity=<-2, -4> +position=<-31739, 21433> velocity=< 3, -2> +position=<-21094, -10506> velocity=< 2, 1> +position=< 32129, -31792> velocity=<-3, 3> +position=< 42824, -53084> velocity=<-4, 5> +position=<-52999, -42435> velocity=< 5, 4> +position=< 53409, -31794> velocity=<-5, 3> +position=<-42353, -10504> velocity=< 4, 1> +position=< 32132, -42432> velocity=<-3, 4> +position=< 42780, -42436> velocity=<-4, 4> +position=< 10888, -31796> velocity=<-1, 3> +position=<-10421, -53077> velocity=< 1, 5> +position=<-53033, -21150> velocity=< 5, 2> +position=< 21494, -53085> velocity=<-2, 5> +position=< 21533, -10506> velocity=<-2, 1> +position=< 53421, 32080> velocity=<-5, -3> +position=< 32159, -10501> velocity=<-3, 1> +position=< 10881, 21436> velocity=<-1, -2> +position=< 21493, 32081> velocity=<-2, -3> +position=<-42363, 53364> velocity=< 4, -5> +position=<-52993, 42727> velocity=< 5, -4> +position=< 10841, -31792> velocity=<-1, 3> +position=< 10871, -53083> velocity=<-1, 5> +position=<-42379, 53369> velocity=< 4, -5> +position=< 21518, 21430> velocity=<-2, -2> +position=<-31727, 32078> velocity=< 3, -3> +position=<-42361, -31796> velocity=< 4, 3> +position=< 32123, -21142> velocity=<-3, 2> +position=< 10856, 10784> velocity=<-1, -1> +position=< 10853, 21430> velocity=<-1, -2> +position=< 21498, -31787> velocity=<-2, 3> +position=<-21098, -10506> velocity=< 2, 1> +position=<-42388, -10501> velocity=< 4, 1> +position=<-42395, -31796> velocity=< 4, 3> +position=< 10870, -42436> velocity=<-1, 4> +position=< 42824, -10501> velocity=<-4, 1> +position=< 42800, 10784> velocity=<-4, -1> diff --git a/src/adventofcode2018/data/day_10/day10_test.txt b/src/adventofcode2018/data/day_10/day10_test.txt new file mode 100644 index 00000000..e499c031 --- /dev/null +++ b/src/adventofcode2018/data/day_10/day10_test.txt @@ -0,0 +1,31 @@ +position=< 9, 1> velocity=< 0, 2> +position=< 7, 0> velocity=<-1, 0> +position=< 3, -2> velocity=<-1, 1> +position=< 6, 10> velocity=<-2, -1> +position=< 2, -4> velocity=< 2, 2> +position=<-6, 10> velocity=< 2, -2> +position=< 1, 8> velocity=< 1, -1> +position=< 1, 7> velocity=< 1, 0> +position=<-3, 11> velocity=< 1, -2> +position=< 7, 6> velocity=<-1, -1> +position=<-2, 3> velocity=< 1, 0> +position=<-4, 3> velocity=< 2, 0> +position=<10, -3> velocity=<-1, 1> +position=< 5, 11> velocity=< 1, -2> +position=< 4, 7> velocity=< 0, -1> +position=< 8, -2> velocity=< 0, 1> +position=<15, 0> velocity=<-2, 0> +position=< 1, 6> velocity=< 1, 0> +position=< 8, 9> velocity=< 0, -1> +position=< 3, 3> velocity=<-1, 1> +position=< 0, 5> velocity=< 0, -1> +position=<-2, 2> velocity=< 2, 0> +position=< 5, -2> velocity=< 1, 2> +position=< 1, 4> velocity=< 2, 1> +position=<-2, 7> velocity=< 2, -2> +position=< 3, 6> velocity=<-1, -1> +position=< 5, 0> velocity=< 1, 0> +position=<-6, 0> velocity=< 2, 0> +position=< 5, 9> velocity=< 1, -2> +position=<14, 7> velocity=<-2, 0> +position=<-3, 6> velocity=< 2, -1> diff --git a/src/adventofcode2018/data/day_11/day11.txt b/src/adventofcode2018/data/day_11/day11.txt new file mode 100644 index 00000000..e3caddc6 --- /dev/null +++ b/src/adventofcode2018/data/day_11/day11.txt @@ -0,0 +1 @@ +5153 diff --git a/src/adventofcode2018/data/day_12/day12.txt b/src/adventofcode2018/data/day_12/day12.txt new file mode 100644 index 00000000..38e6b38f --- /dev/null +++ b/src/adventofcode2018/data/day_12/day12.txt @@ -0,0 +1,34 @@ +initial state: ##.#...#.#.#....###.#.#....##.#...##.##.###..#.##.###..####.#..##..#.##..#.......####.#.#..#....##.# + +#.#.# => # +..#.# => . +.#.## => # +.##.. => . +##... => # +##..# => # +#.##. => # +.#..# => # +.#### => . +....# => . +#.... => . +#.### => . +###.# => # +.#.#. => . +#...# => . +.#... => # +##.#. => # +#..## => # +..##. => . +####. => # +.###. => . +##### => . +#.#.. => . +...#. => . +..#.. => . +###.. => # +#..#. => . +.##.# => . +..... => . +##.## => # +..### => # +...## => # diff --git a/src/adventofcode2018/data/day_12/day12_test.txt b/src/adventofcode2018/data/day_12/day12_test.txt new file mode 100644 index 00000000..864fa0c9 --- /dev/null +++ b/src/adventofcode2018/data/day_12/day12_test.txt @@ -0,0 +1,16 @@ +initial state: #..#.#..##......###...### + +...## => # +..#.. => # +.#... => # +.#.#. => # +.#.## => # +.##.. => # +.#### => # +#.#.# => # +#.### => # +##.#. => # +##.## => # +###.. => # +###.# => # +####. => # diff --git a/src/adventofcode2018/data/day_13/day13.txt b/src/adventofcode2018/data/day_13/day13.txt new file mode 100644 index 00000000..266e6fb5 --- /dev/null +++ b/src/adventofcode2018/data/day_13/day13.txt @@ -0,0 +1,150 @@ + /-------------------------------------------------\ /---------------------------\ + /--------------+---------------------------------------\ | | | + | /---+-------->------------------------------+-->-----\| /--------+---\ | + | | | /---------------------\ | || | | | | + | | | | | |/-------++-------------------------------------------+--------+---+-----------------------+-\ + | | | | |/---++-------++-------------------------------------------+--------+---+-----------------------+\| + | | | /----+---------------------++---++-------++----------------\ /+--------+---+-------\ ||| + | | | /----+----+-------------\ || || || | || | | | ||| + | | | | | /+--<----------+-\/----++---++-------++----------------+-------------------------++--------+---+-----\ | ||| + | | | | | || | || || || || | /---------++-------\| | /-+-+------------\ ||| + | | | | | || /----+-++----++---++-------++----\ | | || || | | | | | ||| + | | | | | || | | || || || || | | | || || | | | | | ||| + | | | | | || | | || || /++-------++----+-----------+---------------+---------++-------++---+---+-+-+---\ | ||| + | | | | | || | | || || ||| /-++----+-------\ | | || || | | | | | | ||| + | /------+---+--+----+---++--------+-\ | || || ||| | || | | | | || || | | | | | | ||| + | | | | | | || | | | || |\--+++-----+-++----+-------+---+---------------+---------++-------++---+---+-+-+---+--------+--+/| + | | | | | | || | | |/++----+---+++-----+-++--\ | | | | || || | | | | | | | | + | | | | | | \+--------+-+--++/| | ||| | || | | | | /-------+\ || || | | | | v | | | + | | | | | | | |/+--++-+----+---+++-----+-++--+-+-------+---+-------+-------++--------++-------++---+---+-+-+\ | | | | + |/--+------+---+--+----+--\ | /---+++--++-+----+---+++-----+-++\ | | | | | || || || | | | || | | | | + || | | | | | | | | ||| || | | /-+++-----+-+++-+-+-------+---+-------+\ || || || | | | || | | | | + || | | | | | | | | ||| || | | | ||| | ||| | | | | /----++------++--------++-------++---+---+-+-++--+---\ | | | + || | | | | | | | | ||| || | | | ||| | ||| | | | | | || || |\-------++---/ | | || | | | | | + || | | | | | | |/---+---+++--++-+----+-+-+++-----+-+++-+-+-------+---+--+----++------++--------+--------++\ | | || | | | | | + || |/-----+---+-<+----+--+-++---+---+++--++-+----+-+-+++----\| ||| | | /----+---+--+----++------++--------+--------+++------+-+-++--+---+----+--+\| + || || | | | | | || | ||| || | | | ||| || ||| | | | | | | || || | ||| | | || | | | ||| + || \+-----+---+--+----+--+-++---+---++/ || | | | ||| || ||| | | | /+---+--+----++------++--------+-\ ||| | | || | | | ||| + || | | | | |/-+-++---+---++---++-+-\ | | ||| || ||| | | | || | | || || /------+-+------+++----\ | | || | | | ||| + || | | | | || | || | || /-++-+-+--+-+-+++----++-+++-+-+--+---++---+--+----++------++-+------+-+------+++----+-+-+-++--+---+\ | ||| + \+---+-----+---+--+----++-+-++---+---++-+-++-+-+--+-+-+/| || ||| | | | || | | || || | | | /--+++----+-+-+-++--+---++---+\ ||| + \---+-----+--<+--+----++-/ || | || | |\-+-+--+-+-+-+----++-+++-/ | | || | | || || | | | | ||| | | | || | || || ||| + | | | | || || |/--++-+-+--+-+--+-+-+-+----++-+++---+--+---++---+--+----++------++-+------+-+---+--+++---\| | | || | || || ||| + | | | | || || || \+-+-+--+-+--+-+<+-+----++-+++---/ | || | | ||/-----++-+------+-+---+-\||| || | | ||/-+---++--\|| ||| + | | | | || || /++---+-+-+--+-+--+-+-+-+----++-+++------+---++--\| | \++-----+/ | | | | |||| || | | ||| | || ||| ||| + | /+---+--+----++---++--+++---+-+-+--+-+--+-+-+-+----++-+++------+---++--++--+-----++--\ | | | | | |||| || | | ||| | || ||| ||| + | /--++---+--+----++---++--+++---+-+-+--+\| | | | |/---++-+++------+---++--++--+-----++-\| | | | | | |||| || | | ||| | || ||| ||| + /-+-+--++---+--+----++---++--+++---+-+-+--+++--+-+-+-++---++-+++------+---++--++-\| /++-++--+--+------+-+\ | |||| || | | ||| | || ||| ||| + | | | || | |/---++---++--+++---+-+-+--+++--+-+-+-++---++-+++------+---++--++-++----+++-++--+--+------+-++--+-++++--\|| | | ||| | || ||| ||| + | | | ||/--+--++---++---++--+++---+-+-+--+++--+-+-+-++---++-+++------+---++--++-++----+++-++--+--+------+-++--+-++++\ ||| | | ||| | || ||| ||| +/---+-+-+--+++--+--++\ || || ||| | | | ||| /+-+-+-++---++-+++------+---++--++-++----+++-++--+\ |/-----+-++--+\||||| ||| | | ||| | || ||| ||| +| | | | ||| | ||| || || ||| |/+-+--+++-++-+-+-++---++-+++------+---++--++-++----+++-++--++-++-----+\|| ||||||| ||| | | ||| | || ||| ||| +| | | | ||| | ||| || || ||| ||| | ||| || | | || || ||| | || || || |||/++--++-++-----++++--+++++++-+++-+-+-+++-+\ || ||| ||| +| | | | ||| | ||| || /++--+++--\||| | ||| || | | || || ||| | || || || |||||| \+-++-----++++--+++/\++-+++-+-+-+++-++--++--+++-/|| +| | | | ||| | ||| || ||| ||| |||| | ||| || | | || || ||| | || || || |||||| | || |||| ||| || ||| | | ||| || || ||| || +| | | | ||| | ||| |\--+++--+++--++++-+--++/ || | | || || ||| | || || || |||||| | || |||| ||| || ||| | | ||| || || ||| || +| | |/+--+++--+--+++--+---+++--+++--++++-+--++--++-+\| || || ||| | || || |\----++++++---+-++-----++++--+++--++-+++-+-+-+++-++--/| ||| || +| | ||| ||| | |\+--+---+++--+++--++++-+--++--++-+++-++---++-+++------+---++--++-+-----++++++---+-++-----++++--+++--++-/||/+-+-+++-++---+--+++-\|| +| | ||| ||| | | |/-+---+++--+++--++++-+--++--++-+++-++---++-+++------+---++--++-+\ |||||| | || |||| ||| || |||| | ||| || | ||| ||| +| | ||| /+++--+--+-++-+---+++--+++--++++-+--++--++-+++-++---++-+++--\ | || || || |||||| | || |||| \++--++--++++-+-+++-++---+--++/ ||| +|/--+-+++-++++--+--+-++-+---+++--+++--++++-+--++--++-+++-++\ || ||| | \---++--++-++----++++++---+-++-----++++---++--++--++++-+-+++-++---+--++--+/| +|| /+-+++-++++--+--+-++-+---+++--+++--++++-+--++--++-+++-+++--++-+++--+-------++-\|| || |||||| /-+-++-----++++---++-\|| |||| | ||| || | || | | +|| || ||| |||| | | || | \++--+++--/||| | || || ||| ||| || ||| | || ||| || |||||| |/+-++-----++++---++-+++--++++-+-+++\|| | || | | +|| || ||| |||| | | || | || \++---+++-+--++--++-+++-+++--++-+++--+-------++-+/| || |||||| ||| || |||| || ||| |||| | |||||| | || | | +|| || ||| |\++--+--+-++-+----++---++---+++-+--++--++-+++-+++--++-+++--+-------++-+-+-++----+++++/ ||| || |||| || ||| |||| | |||||| | || | | +|| || ||| | || | | || | || || ||| | || ||/+++-+++--++-+++--+-------++-+-+-++----+++++--+++-++-\ |||| || ||| |||| | |||||| | || | | +|| || ||| | || | | || | || || ||| | \+--++++++-+++--++-+++--+-------++-+-+-++----+++++--+++-++-+---++++---++-+++--++++-/ |||||| | || | | +|| || ||| | || | | ||/+----++---++---+++-+---+--++++++-+++--++-+++--+------\|| | | || ||||| /+++-++-+---++++-\ || ||| |||| |||||| | || | | +|| || ||| | || /+--+-++++\ || || /+++-+---+--++++++-+++--++-+++--+------+++-+-+-++----+++++-++++-++-+---++++\| || ||| |||| |||||| | || | | +|| || ||| | || || /+-+++++---++---++--++++-+---+--++++++-+++--++-+++--+------+++-+-+-++----+++++-++++-++-+-\ |||||| || ||| |||| |||||| | || | | +|| || \++-+-++-++-++-+++++---++---++--++++-+---+--++++++-+++--/| ||| | ||| | | || ||||| ||||/++-+-+-++++++-++\||| |||| |||||| | || | | +|| || || | || || || v|||| || /-++--++++-+---+--++++++-+++\ | ||| | ||| | | || ||||| ||||||\-+-+-++++++-/||||| |||| |||||| | || | | +|| || || | || || || ||||| || | || |||| | | |||||| |||| | ||| | ||| | | || ||||| |||||| | | |||||| ||||| |||| |||||| | || | | +|| || || | || || || ||||| || | || |||| | | |||||| |||| | ||| | |||/+-+-++----+++++-++++++--+-+-++++++--+++++--++++---++++++---+-\|| | | +|| || || | || || || ||||| || | \+--++++-+---+--++++++-++++--+-++/ | ||||| | || ||||| ||||||/-+-+-++++++-\||||| |||| |||||| | ||| | | +|| || || | || || || ||||| || | | |||| | /-+--++++++-++++--+-++---+------+++++-+-++----+++++-+++++++-+-+-++++++-++++++\ |||| |||||| | ||| | | +|| || || | || || || ||||| || | | |||| | | | |||||| |||| | || | ||||| | || ||||| ||||||| | | |||||| ||||||| |||| |||||| | ||| | | +|| || || | ||/++-++-+++++---++-+--+--++++-+-+-+--++++++-++++--+-++\ | ||||| | || /--+++++-+++++++-+\| |||||| ||||||| |||| |||||| | ||| | | +|| || || | ||||| ||/+++++---++-+--+--++++-+-+-+--++++++-++++\ | |||/-+------+++++-+-++-+--+++++-+++++++-+++-++++++-+++++++-++++---++++++---+\||| | | +|| || || | ||||| |||||||| || | | |||| | | | |||||| ||||| | |||| | ||||| | || | ||||| |||^||| ||| \+++++-+++++++-++++---/||||| ||||| | | +|| || || | ||||| |||||||| |\-+--+--++++-+-+-+--++++++-+++++-+-++++-+------+++++-+-++-+--+++++-+++++++-+++--+++++-++++/|| ||\+----+++++---+++++--/ | +|| || || | ||||| |||||||| |/-+--+--++++-+-+-+--++++++-+++++-+-++++-+------+++++-+-++-+--+++++-+++++++-+++--+++++-++++-++-++-+----+++++-\ ||||| | +|| || || | |||||/++++++++---++-+--+\ |||| | | | |||||| ||||| | |||| | /-+++++-+\|| | ||||| ||||||| ||| ||||| |||| || || | ||||| | ||||| | +|| || || | |||||||||||||| || | || |||| | | | |||||| ||||| | |||| | | ||||| |||| | ||||| ||||||| ||| ||||| |||| || || | ||||| | ||||| | +|| || || | |||||||||||||| || | || |||| | | | |||||| ||||| | |||| | | ||||| |||| | ||||| |||||\+-+++--+++++-++++-++-+/ | ||||| | ||||| | +|| || || | |||||||||||||| || | \+-++++-+-+-+--++++++-+++++-+-++++-+----+-+++++-++++-+--+++++-+++++-+-+++--+++++-++++-++-/ | ||||| | ||||| | +|| || || | ||||\+++++++++---++-+---+-++++-+-+-+--++++++-+++++-+-+/|| | | ||||| |||| | ||||| ||||| | ||| ||||| |||| || | ||||| | ||||| | +|| || || |/++++-+++++++++-\ || | | |||| | | | |||\++-+++++-+-+-++-+----+-+++++-++++-+--+/||| ||||| | ||| ||||| |||| || | ||||| | ||||| | +|| || || |||||| ||||||||| | || | | |||| | | | ||| || ||||| | | || | | ||||| |||| | | ||| ||||| | ||| ||||| |||| || | ||||| | ||||| | +|| || || |||||| ||||||||| | || |/--+-++++-+-+-+--+++-++-+++++-+-+-++-+----+-+++++-++++-+\ | ||| ||||| | ||| ||||| |||| || | ||||| | ||||| | +|| || || |||||| ||||||\++-+-++-++--+-++++-+-+-+--+++-++-+++++-+-+-++-+----+-/|||| |||| || | ||| ||||| | ||| ||||| |||| || | ||||| | ||||| | +||/++--++-++++++-++++++-++\| || || | |||| | | | ||| v| ||||| | | || | | |||| |||| || | ||| ||||| | ||| /+++++-++++-++----+-\ ||||| | ||||| | +||||| || ||\+++-++++++-++++-++-++--+-++++-+-+-+--+++-++-+++++-+-/ || | | |||| |||| || | ||| ||||| | ||| |||||| |||| || | | ||||| | ||||| | +||||| || || ||\-++++++-+/|| || || | |||| | | | ||| || ||||| | || | | |||| |||| || | ||| ||||\-+-+++-++++++-++/| || | | ||||| | ||||| | +||||| || || || ||\+++-+-++-++-++--+-++++-//+-+--+++-++-+++++-+---++-+----+--++++-++++-++-+-+++-++++--+-+++-++++++-++-+-++----+-+\ ||||| | ||||| | +||||| || || || || ||| | || || || | |||| || | ||| || ||||| | || | | |||| |||| || | ||| |||| | ||| |||||| || | || \-++-+++++-+-++++/ | +||||| || || || |\-+++-+-++-++-++--+-++++--++-+--+++-++-+++++-+---++-+----+--++++-++++-++-+-+++-++++--+-++/ |||||| || | || || ||||| | |||| | +||||| || || || | ||| | || || || | |||\--++-+--+++-++-+++++-+---++-+----+--++++-++++-++-+-+++-++++--+-++--++++++-++-+-++------++-+++++-+-/||| | +||||| || || || | ||| | || || || | ||| || | ||| || ||||| | || | | |||| |||| || | ||| |||| | || |||||| || | || || ||||| | ||| | +||||| || |\-++--+--+++-+-+/ || || | ||| || | ||| || ||||| | || | | |||| |||| || | ||| |||| | || |||||| || | || || ||||| | ||| | +||||| || | || | /+++-+-+--++-++--+-+++---++-+--+++-++-+++++-+---++-+----+--++++\|||| || \-+++-++++--+-++--+++/|| || | || || ||||| | ||| | +||||| || | || | |||| | | || || | ||| || | ||| || ||||| | || | | ||||||||| || ||| |||| | || ||| || || | || || ||||| | ||| | +||||| || | /++--+-++++-+-+--++-++--+-+++---++-+--+++-++-+++++-+---++-+----+--+++++++++-++---+++-++++--+-++--+++\|| || | || || ||||| | ||| | +||||| || | ||| | |||| | | || || | ||| || | ||| || ||||| | || | | ||||||||| || ||| ||||/-+-++--++++++-++-+-++-----\|| ||||| | ||| | +||||| \+-+-+++--+-++++-+-+--++-++--+-+++---++-+--+++-/| \++++-+---++-+----+--+++++++++-++---+++-+++++-+-++--++++++-++-+-++-----+++-+++++-+--+++-----/ +||||| | | ||| | |||| | | || || | ||| || | \++--+--++++-+---++-+----+--+++++++++-++---+++-+++/| \-++--++++++-/| | || ||| ||||| | ||| +||||| | | ||| | |||| | | |\-++--+-+++---++-+---++--+--++++-+---++-+----+--+++++++++-++---+++-+++-+---++--++++++--+-+-++-----+++-+++++-/ ||| +||||| | | |||/-+-++++-+-+--+--++--+-+++---++-+---++--+--++++\| || | | ||||||||| || ||| ||| | || |||||| | | || ||| ||||| ||| +||||| | | |||| | |||| | | | || | ||| || | || | |||||| || | | ||||||||| || ||| ||| | || |||||| | | || ||| ||||| ||| +||||| | | |||| | |||| | | | || | ||| || | || | |||||| || | | ||||||||| || ||| |\+-+---++--++++++--+-/ || ||| ||||| ||| +||||| | | |||| | |||| | | \--++--+-+++---++-+---/| | |||||| || | | ||||||||| || \++-+-+-+---++--++++++--/ || ||| ||||| ||| +||||| | | |||| | |||| | | || | ||| || | /+--+--++++++---++-+----+--+++++++++-++----++-+-+-+---++--++++++------++-----+++-+++++----+++----\ +||||| | | |||| | |||| | | || | ||| || | || | \+++++---++-+----+--+++++++++-++----+/ \-+-+---++--+++++/ || ||| ||||| ||| | +||||| /-+-+-++++-+-++++-+-+-----++--+-+++---++-+---++--+-\ ||||| || | | ||||||||| || | | | ||/-+++++-------++-----+++-+++++\ ||| | +||||| | | | |||| | |||| | | || | ||| || | || | | ||||\---++-+----+--+/||||||| || | | | ||| ||||| || ||| |||||| ||| | +||||| | | | |||| | |\++-+-+-----++--+-+++---++-+---++--+-+-++/| || | | | ||||||| || | | \---+++-+++++-------++-----/|| |||||| ||| | +||||| | | | |||| | | || | | || | ||| || | |\--+-+-++-+----++-+----+--+-+++++++-++----+----+-----/|| ||||| || || |||||| ||| | +||||| | | | |||| | | || | | || | ||| || | | |/+-++-+----++-+-\ | | |^||||| \+----+----+------/| |^||| || || |||||| ||| | +||||| | | | |||| | | || | | || | ||| || | | ||| || | || | | | | ||||||| | /+----+-----\ | ||||| || || |||||| ||| | +||||| | | | |||| | | || | | || | ||| || | | ||| || | || | ^ \--+-++++/|| | || | /--+-+-+++++--\ || || |||||| ||| | +||||| | | | |||| | | || \-+-----++--+-+++---++-+---+---+++-++-+----++-+-+-----+-+++/ || | || /-+--+--+-+-+++++--+----++\ || |||||| ||| | +||||| | | | |||| | | || | || | ||\---++-+---+---+++-++-+----++-+-+-----+-+++--++--+---++--+-+--+--+-+-+/||| | ||| || |||||| ||| | +||||| | | \-++++-+-+-++---+-----++--+-++----++-+---+---+++-++-+----++-/ | | ||| || | || | | | | | | ||| | ||| || |\++++---++/ | +||||| | | |||| | | || | || | |\----++-+---+---+++-++-+----++---+-----+-+++--++--+---++--+-+--+--+-+-+-+++--+----+++-----++-/ |||| || | +||||| \-+---++++-+-+-++---+-----++--+-+-----++-+---+---++/ || | || | | ||| || | || | | | | \-+-+++--+----+++-----++---+++/ || | +||||| | |||| | | || | \+--+-+-----++-+---+---++--+/ | || | | ||| || | || | | | | | ||| | ||| || ||| || | +||||| | |||| | | || | | | | || | | || | | || |/----+-+++--++--+---++--+-+--+--+---+-+++--+----+++-----++---+++--\ || | +||||| | |||| | | || | | | | || | | || | | |\---++----+-+++--++--+---++--+-+--+--+---+-+++--+----+++-----++---+++--+-/| | +||||\---+---++++-+-+-++---+------+--+-+-----++-+---+---++--+--+----+----++----+-+++--/| | || | \--+--+---+-+++--+----+++-----++---/|| | | | +\+++----+---++++-+-+-/| | | | | || | | || | | | || | ||| | | |\--+----+--+---+-+++--+----+++-----++----+/ | | | + ||| | |||| | | | | | | | || | | \+--+--+----+----++----+-+++---+--+---+---+----+--+---+-+++--+----+++-----++----/ | | | + ||| \---++++-+-+--+---+------+--+-+-----++-/ | | | | | || | ||| | | | | \--+---+-+++--/ /-+++-----++----\ | | | + ||| |||| | | | | /--+--+-+-----++---\ | | | | | || | ||| | | | \-------+---+-+++-----+-++/ || | | | | + ||| |||| | | | | | | | | || | | | | | | || \-+++---+--+---+-------<---+---+-/|| | || || | | | | + ||\--------++++-+-+--+---+---+--+--+-+-----++---+-+----+--+--+----+----++------+/| | | \-----------/ | || | || || | | | | + || |||| | | | | | | | | || | | \--+--+----+----/| | | | | | || /-+-++------++----+\ | | | + || |||| | | | | | | | | || | | | | | | | | | | | || | | || || || | | | + || \+++-+-+--+---+---+--+--+-+-----++---+-+-------+--+----+-----+------+-+---+--+-------------------+--/| | | || || || | | | + || ||| | | \---+---+--+--+-+-----++---+-+-------+--+----+-----+------+-+---/ | | | | | || || || | | | + || ||\-+-+------+---+--+--+-+-----++---+-+-------+--/ | | | | | | | | | || || || | | | + || || | | | | | | | || | \-------+-------+-----+------+-+------+-------------------+---+---+-+-++------++----++--+--+-----/ + || || | | /+---+--+--+-+-----++---+--------\| | | /--+-+------+-------------------+-\ | | | || || || | | + || || | \-----++---+--+--+-+-----++---+--------++-------+-----+---+--+-/ | \-+-+---+-+-++------/| || | | + \+----------++--+-------++---+--+--+-+-----++---+--------+/ | | | | | | | | \-++-------+----/| | | + | \+--+-------++---+--+--+-+-----++---+--------+---->---+-----+---+--+--------+---------------------+-+---+---/| | | | | + | | | || | | |/+-----++---+------\ | | \---+--+--------+---------------------+-+---+----+-------+-----+--/ | + | \--+-------++---+--+--+++-----++---+------+-+--------/ | | | | | | | | | | + \--------------+-------+/ | | ||| || | | | | \--------+---------------------+-+---+----+-------+-----+-----/ + /----+-------+----+--+--+++-----++---+------+-+------------------+-----------+-------------------\ | | | | | | + | | | | | ||| || | | | | | | | | \----+-------+-----/ + | | | | | ||| || | | | | | | | | | | + | | | | | ||| |\---+------+-+------------------+-----------+-------------------+-+-+--------/ | + | | \----+--+--+++-----+----+------+-/ | | | | | | + | | | | ||| \----+------+--------------------+-----------+-------------------+-+-+>---------------/ + | | | | |\+----------+------/ | | | | | + | | | \-<+-+----------+---------------------------+-----------/ | | | + | | | | \----------+---------------------------+-------------------------------+-+-/ + | \------------+-----/ | | | | + | | | \-------------------------------+-/ + \-----------------+------------------+-----------------------------------------------------------/ + \------------------/ diff --git a/src/adventofcode2018/data/day_13/day13_simple.txt b/src/adventofcode2018/data/day_13/day13_simple.txt new file mode 100644 index 00000000..374e24d6 --- /dev/null +++ b/src/adventofcode2018/data/day_13/day13_simple.txt @@ -0,0 +1,7 @@ +| +v +| +| +| +^ +| diff --git a/src/adventofcode2018/data/day_13/day13_test.txt b/src/adventofcode2018/data/day_13/day13_test.txt new file mode 100644 index 00000000..ef3ccc31 --- /dev/null +++ b/src/adventofcode2018/data/day_13/day13_test.txt @@ -0,0 +1,6 @@ +/->-\ +| | /----\ +| /-+--+-\ | +| | | | v | +\-+-/ \-+--/ + \------/ diff --git a/src/adventofcode2018/data/day_14/day14.txt b/src/adventofcode2018/data/day_14/day14.txt new file mode 100644 index 00000000..caa0456f --- /dev/null +++ b/src/adventofcode2018/data/day_14/day14.txt @@ -0,0 +1 @@ +047801 diff --git a/src/adventofcode2018/data/day_16/day16.txt b/src/adventofcode2018/data/day_16/day16.txt new file mode 100644 index 00000000..25719e17 --- /dev/null +++ b/src/adventofcode2018/data/day_16/day16.txt @@ -0,0 +1,4298 @@ +Before: [2, 0, 0, 1] +15 3 1 3 +After: [2, 0, 0, 1] + +Before: [3, 2, 3, 3] +4 3 3 0 +After: [3, 2, 3, 3] + +Before: [3, 2, 1, 3] +12 3 0 0 +After: [1, 2, 1, 3] + +Before: [1, 2, 2, 2] +2 0 2 0 +After: [0, 2, 2, 2] + +Before: [0, 1, 2, 1] +10 1 0 1 +After: [0, 1, 2, 1] + +Before: [2, 1, 3, 2] +11 0 3 3 +After: [2, 1, 3, 1] + +Before: [1, 2, 1, 1] +9 2 0 2 +After: [1, 2, 2, 1] + +Before: [3, 0, 1, 1] +15 3 1 3 +After: [3, 0, 1, 1] + +Before: [0, 1, 1, 1] +10 1 0 3 +After: [0, 1, 1, 1] + +Before: [1, 3, 2, 2] +2 0 2 2 +After: [1, 3, 0, 2] + +Before: [0, 2, 2, 3] +13 3 2 3 +After: [0, 2, 2, 0] + +Before: [2, 1, 3, 1] +12 2 3 2 +After: [2, 1, 0, 1] + +Before: [2, 1, 2, 2] +7 0 2 1 +After: [2, 1, 2, 2] + +Before: [2, 2, 0, 2] +11 0 3 2 +After: [2, 2, 1, 2] + +Before: [3, 0, 3, 2] +3 3 3 3 +After: [3, 0, 3, 0] + +Before: [1, 0, 1, 1] +9 2 0 2 +After: [1, 0, 2, 1] + +Before: [0, 1, 1, 0] +5 1 3 0 +After: [1, 1, 1, 0] + +Before: [1, 0, 1, 0] +9 2 0 3 +After: [1, 0, 1, 2] + +Before: [2, 1, 0, 3] +0 1 3 0 +After: [0, 1, 0, 3] + +Before: [2, 3, 2, 0] +12 2 0 3 +After: [2, 3, 2, 1] + +Before: [0, 0, 3, 2] +1 0 0 0 +After: [0, 0, 3, 2] + +Before: [2, 0, 2, 1] +14 3 2 2 +After: [2, 0, 1, 1] + +Before: [0, 0, 2, 1] +15 3 1 3 +After: [0, 0, 2, 1] + +Before: [2, 0, 1, 3] +13 3 2 3 +After: [2, 0, 1, 0] + +Before: [3, 1, 3, 3] +7 2 3 2 +After: [3, 1, 1, 3] + +Before: [1, 1, 1, 1] +3 2 3 3 +After: [1, 1, 1, 0] + +Before: [1, 0, 2, 1] +14 3 2 1 +After: [1, 1, 2, 1] + +Before: [1, 1, 2, 2] +2 0 2 3 +After: [1, 1, 2, 0] + +Before: [2, 3, 0, 1] +3 3 3 2 +After: [2, 3, 0, 1] + +Before: [1, 1, 2, 0] +2 0 2 2 +After: [1, 1, 0, 0] + +Before: [2, 1, 3, 0] +5 1 3 3 +After: [2, 1, 3, 1] + +Before: [2, 3, 2, 1] +3 3 3 0 +After: [0, 3, 2, 1] + +Before: [0, 1, 0, 2] +10 1 0 2 +After: [0, 1, 1, 2] + +Before: [1, 1, 2, 2] +4 2 2 3 +After: [1, 1, 2, 2] + +Before: [3, 1, 0, 2] +6 1 3 1 +After: [3, 0, 0, 2] + +Before: [3, 0, 3, 1] +15 3 1 0 +After: [1, 0, 3, 1] + +Before: [3, 1, 2, 0] +8 1 2 0 +After: [0, 1, 2, 0] + +Before: [1, 1, 1, 1] +9 2 3 2 +After: [1, 1, 2, 1] + +Before: [0, 1, 3, 0] +5 1 3 3 +After: [0, 1, 3, 1] + +Before: [3, 1, 1, 3] +7 0 3 3 +After: [3, 1, 1, 1] + +Before: [1, 2, 2, 1] +14 3 2 0 +After: [1, 2, 2, 1] + +Before: [2, 1, 2, 0] +5 1 3 0 +After: [1, 1, 2, 0] + +Before: [0, 1, 1, 0] +5 1 3 1 +After: [0, 1, 1, 0] + +Before: [2, 1, 1, 3] +13 3 2 1 +After: [2, 0, 1, 3] + +Before: [2, 0, 1, 3] +15 2 1 0 +After: [1, 0, 1, 3] + +Before: [2, 3, 2, 2] +11 0 3 3 +After: [2, 3, 2, 1] + +Before: [3, 3, 2, 1] +14 3 2 0 +After: [1, 3, 2, 1] + +Before: [2, 1, 1, 2] +6 1 3 1 +After: [2, 0, 1, 2] + +Before: [3, 1, 0, 3] +7 0 3 0 +After: [1, 1, 0, 3] + +Before: [0, 3, 1, 3] +13 3 3 2 +After: [0, 3, 1, 3] + +Before: [2, 1, 3, 2] +6 1 3 2 +After: [2, 1, 0, 2] + +Before: [3, 2, 2, 3] +13 3 1 0 +After: [0, 2, 2, 3] + +Before: [1, 1, 1, 0] +5 1 3 1 +After: [1, 1, 1, 0] + +Before: [3, 1, 2, 1] +14 3 2 0 +After: [1, 1, 2, 1] + +Before: [3, 3, 0, 3] +4 3 3 1 +After: [3, 3, 0, 3] + +Before: [0, 2, 0, 3] +13 3 3 3 +After: [0, 2, 0, 1] + +Before: [1, 1, 2, 2] +2 0 2 1 +After: [1, 0, 2, 2] + +Before: [1, 3, 1, 3] +9 2 0 2 +After: [1, 3, 2, 3] + +Before: [3, 1, 1, 2] +6 1 3 2 +After: [3, 1, 0, 2] + +Before: [0, 0, 1, 3] +13 0 0 3 +After: [0, 0, 1, 1] + +Before: [1, 1, 2, 0] +8 1 2 0 +After: [0, 1, 2, 0] + +Before: [2, 2, 2, 1] +12 2 0 1 +After: [2, 1, 2, 1] + +Before: [1, 0, 2, 0] +15 0 1 1 +After: [1, 1, 2, 0] + +Before: [1, 1, 3, 0] +5 1 3 3 +After: [1, 1, 3, 1] + +Before: [0, 0, 2, 1] +14 3 2 2 +After: [0, 0, 1, 1] + +Before: [1, 1, 0, 3] +4 3 3 3 +After: [1, 1, 0, 3] + +Before: [0, 0, 2, 3] +1 0 0 2 +After: [0, 0, 0, 3] + +Before: [2, 1, 2, 2] +8 1 2 3 +After: [2, 1, 2, 0] + +Before: [0, 1, 0, 3] +10 1 0 1 +After: [0, 1, 0, 3] + +Before: [1, 2, 2, 3] +2 0 2 3 +After: [1, 2, 2, 0] + +Before: [2, 1, 0, 2] +11 0 3 3 +After: [2, 1, 0, 1] + +Before: [0, 2, 0, 2] +1 0 0 0 +After: [0, 2, 0, 2] + +Before: [1, 3, 2, 0] +2 0 2 1 +After: [1, 0, 2, 0] + +Before: [1, 0, 2, 1] +3 3 3 0 +After: [0, 0, 2, 1] + +Before: [1, 1, 2, 1] +4 2 2 1 +After: [1, 2, 2, 1] + +Before: [1, 0, 2, 1] +15 0 1 0 +After: [1, 0, 2, 1] + +Before: [0, 1, 1, 3] +10 1 0 1 +After: [0, 1, 1, 3] + +Before: [0, 3, 1, 1] +3 3 3 1 +After: [0, 0, 1, 1] + +Before: [0, 1, 1, 2] +6 1 3 1 +After: [0, 0, 1, 2] + +Before: [0, 0, 3, 3] +1 0 0 1 +After: [0, 0, 3, 3] + +Before: [1, 3, 1, 1] +9 2 0 2 +After: [1, 3, 2, 1] + +Before: [0, 1, 3, 3] +10 1 0 0 +After: [1, 1, 3, 3] + +Before: [2, 0, 1, 3] +4 3 3 2 +After: [2, 0, 3, 3] + +Before: [2, 1, 1, 1] +9 2 3 0 +After: [2, 1, 1, 1] + +Before: [3, 0, 3, 3] +12 3 2 3 +After: [3, 0, 3, 1] + +Before: [3, 1, 0, 2] +6 1 3 3 +After: [3, 1, 0, 0] + +Before: [0, 3, 1, 3] +4 3 3 3 +After: [0, 3, 1, 3] + +Before: [3, 0, 1, 3] +12 3 0 3 +After: [3, 0, 1, 1] + +Before: [3, 1, 3, 3] +0 1 3 1 +After: [3, 0, 3, 3] + +Before: [2, 1, 2, 2] +8 1 2 0 +After: [0, 1, 2, 2] + +Before: [2, 2, 3, 1] +3 3 3 1 +After: [2, 0, 3, 1] + +Before: [1, 0, 1, 0] +9 2 0 2 +After: [1, 0, 2, 0] + +Before: [3, 1, 2, 0] +8 1 2 2 +After: [3, 1, 0, 0] + +Before: [3, 2, 1, 3] +7 0 3 1 +After: [3, 1, 1, 3] + +Before: [0, 1, 0, 1] +10 1 0 1 +After: [0, 1, 0, 1] + +Before: [1, 1, 3, 3] +13 3 1 2 +After: [1, 1, 0, 3] + +Before: [3, 1, 0, 3] +13 3 3 2 +After: [3, 1, 1, 3] + +Before: [0, 0, 0, 2] +3 3 3 3 +After: [0, 0, 0, 0] + +Before: [2, 0, 3, 2] +11 0 3 3 +After: [2, 0, 3, 1] + +Before: [3, 1, 3, 3] +12 3 2 2 +After: [3, 1, 1, 3] + +Before: [2, 0, 2, 1] +4 2 2 0 +After: [2, 0, 2, 1] + +Before: [0, 3, 3, 1] +12 2 3 3 +After: [0, 3, 3, 0] + +Before: [2, 1, 2, 1] +8 1 2 2 +After: [2, 1, 0, 1] + +Before: [2, 2, 2, 2] +11 0 3 1 +After: [2, 1, 2, 2] + +Before: [1, 2, 1, 2] +3 3 3 2 +After: [1, 2, 0, 2] + +Before: [3, 2, 1, 1] +9 2 3 3 +After: [3, 2, 1, 2] + +Before: [3, 0, 3, 1] +3 3 3 1 +After: [3, 0, 3, 1] + +Before: [2, 2, 0, 2] +11 0 3 0 +After: [1, 2, 0, 2] + +Before: [2, 2, 1, 1] +3 2 3 3 +After: [2, 2, 1, 0] + +Before: [1, 1, 2, 2] +6 1 3 2 +After: [1, 1, 0, 2] + +Before: [1, 1, 2, 2] +6 1 3 0 +After: [0, 1, 2, 2] + +Before: [2, 1, 2, 0] +7 0 2 1 +After: [2, 1, 2, 0] + +Before: [1, 1, 2, 2] +6 1 3 3 +After: [1, 1, 2, 0] + +Before: [3, 0, 2, 3] +7 0 3 2 +After: [3, 0, 1, 3] + +Before: [3, 1, 2, 1] +8 1 2 2 +After: [3, 1, 0, 1] + +Before: [1, 0, 2, 3] +15 0 1 2 +After: [1, 0, 1, 3] + +Before: [1, 0, 2, 3] +15 0 1 1 +After: [1, 1, 2, 3] + +Before: [2, 2, 1, 2] +11 0 3 2 +After: [2, 2, 1, 2] + +Before: [0, 2, 1, 1] +9 2 3 0 +After: [2, 2, 1, 1] + +Before: [0, 0, 1, 1] +15 2 1 0 +After: [1, 0, 1, 1] + +Before: [1, 2, 2, 0] +2 0 2 1 +After: [1, 0, 2, 0] + +Before: [0, 0, 2, 3] +13 0 0 3 +After: [0, 0, 2, 1] + +Before: [2, 0, 1, 2] +11 0 3 0 +After: [1, 0, 1, 2] + +Before: [3, 0, 2, 1] +14 3 2 0 +After: [1, 0, 2, 1] + +Before: [0, 3, 3, 3] +7 2 3 3 +After: [0, 3, 3, 1] + +Before: [0, 2, 1, 3] +0 2 3 1 +After: [0, 0, 1, 3] + +Before: [3, 1, 0, 2] +6 1 3 2 +After: [3, 1, 0, 2] + +Before: [2, 3, 2, 2] +11 0 3 1 +After: [2, 1, 2, 2] + +Before: [2, 1, 1, 0] +5 1 3 2 +After: [2, 1, 1, 0] + +Before: [2, 1, 2, 0] +8 1 2 3 +After: [2, 1, 2, 0] + +Before: [1, 1, 2, 3] +4 3 3 1 +After: [1, 3, 2, 3] + +Before: [1, 1, 1, 0] +9 2 0 3 +After: [1, 1, 1, 2] + +Before: [2, 1, 2, 2] +11 0 3 1 +After: [2, 1, 2, 2] + +Before: [0, 0, 1, 1] +1 0 0 1 +After: [0, 0, 1, 1] + +Before: [2, 1, 2, 2] +6 1 3 0 +After: [0, 1, 2, 2] + +Before: [0, 1, 1, 0] +5 1 3 3 +After: [0, 1, 1, 1] + +Before: [1, 2, 2, 1] +2 0 2 1 +After: [1, 0, 2, 1] + +Before: [2, 1, 2, 1] +8 1 2 0 +After: [0, 1, 2, 1] + +Before: [1, 1, 2, 0] +4 2 2 2 +After: [1, 1, 2, 0] + +Before: [0, 2, 1, 1] +9 2 3 3 +After: [0, 2, 1, 2] + +Before: [1, 0, 1, 3] +9 2 0 1 +After: [1, 2, 1, 3] + +Before: [2, 3, 2, 1] +14 3 2 0 +After: [1, 3, 2, 1] + +Before: [0, 1, 2, 1] +14 3 2 3 +After: [0, 1, 2, 1] + +Before: [0, 1, 3, 3] +4 3 3 2 +After: [0, 1, 3, 3] + +Before: [0, 2, 1, 3] +0 1 3 3 +After: [0, 2, 1, 0] + +Before: [0, 1, 0, 0] +10 1 0 2 +After: [0, 1, 1, 0] + +Before: [0, 1, 2, 2] +10 1 0 0 +After: [1, 1, 2, 2] + +Before: [1, 1, 0, 0] +5 1 3 0 +After: [1, 1, 0, 0] + +Before: [0, 0, 1, 3] +0 2 3 0 +After: [0, 0, 1, 3] + +Before: [1, 3, 2, 2] +2 0 2 0 +After: [0, 3, 2, 2] + +Before: [0, 1, 0, 3] +10 1 0 0 +After: [1, 1, 0, 3] + +Before: [3, 1, 2, 0] +5 1 3 2 +After: [3, 1, 1, 0] + +Before: [0, 0, 2, 1] +14 3 2 0 +After: [1, 0, 2, 1] + +Before: [1, 3, 2, 2] +2 0 2 3 +After: [1, 3, 2, 0] + +Before: [0, 3, 2, 1] +1 0 0 1 +After: [0, 0, 2, 1] + +Before: [1, 1, 1, 2] +9 2 0 1 +After: [1, 2, 1, 2] + +Before: [0, 1, 1, 1] +10 1 0 2 +After: [0, 1, 1, 1] + +Before: [2, 3, 1, 1] +9 2 3 0 +After: [2, 3, 1, 1] + +Before: [1, 0, 1, 1] +15 3 1 0 +After: [1, 0, 1, 1] + +Before: [0, 1, 1, 2] +10 1 0 2 +After: [0, 1, 1, 2] + +Before: [1, 1, 2, 1] +14 3 2 0 +After: [1, 1, 2, 1] + +Before: [3, 1, 1, 3] +4 3 3 1 +After: [3, 3, 1, 3] + +Before: [3, 0, 0, 3] +7 0 3 2 +After: [3, 0, 1, 3] + +Before: [1, 3, 3, 3] +4 3 3 3 +After: [1, 3, 3, 3] + +Before: [0, 1, 3, 2] +10 1 0 3 +After: [0, 1, 3, 1] + +Before: [0, 3, 3, 3] +13 3 3 1 +After: [0, 1, 3, 3] + +Before: [0, 0, 1, 2] +3 3 3 2 +After: [0, 0, 0, 2] + +Before: [3, 2, 3, 3] +12 3 0 0 +After: [1, 2, 3, 3] + +Before: [1, 1, 3, 3] +7 2 3 0 +After: [1, 1, 3, 3] + +Before: [2, 0, 1, 3] +15 2 1 1 +After: [2, 1, 1, 3] + +Before: [0, 3, 2, 3] +0 2 3 1 +After: [0, 0, 2, 3] + +Before: [2, 1, 2, 2] +7 0 2 3 +After: [2, 1, 2, 1] + +Before: [2, 1, 0, 0] +5 1 3 2 +After: [2, 1, 1, 0] + +Before: [3, 3, 2, 1] +3 3 3 0 +After: [0, 3, 2, 1] + +Before: [1, 1, 2, 0] +5 1 3 3 +After: [1, 1, 2, 1] + +Before: [1, 1, 2, 1] +2 0 2 1 +After: [1, 0, 2, 1] + +Before: [2, 0, 1, 1] +9 2 3 3 +After: [2, 0, 1, 2] + +Before: [1, 0, 2, 0] +2 0 2 2 +After: [1, 0, 0, 0] + +Before: [3, 1, 2, 1] +8 1 2 0 +After: [0, 1, 2, 1] + +Before: [1, 3, 1, 3] +13 3 2 1 +After: [1, 0, 1, 3] + +Before: [0, 1, 3, 0] +10 1 0 0 +After: [1, 1, 3, 0] + +Before: [0, 2, 2, 2] +1 0 0 2 +After: [0, 2, 0, 2] + +Before: [1, 1, 0, 1] +3 3 3 2 +After: [1, 1, 0, 1] + +Before: [3, 1, 3, 3] +12 3 2 1 +After: [3, 1, 3, 3] + +Before: [2, 2, 2, 3] +12 2 1 1 +After: [2, 1, 2, 3] + +Before: [0, 1, 0, 0] +5 1 3 0 +After: [1, 1, 0, 0] + +Before: [1, 0, 1, 1] +9 2 3 3 +After: [1, 0, 1, 2] + +Before: [0, 1, 3, 2] +6 1 3 1 +After: [0, 0, 3, 2] + +Before: [2, 0, 2, 1] +14 3 2 0 +After: [1, 0, 2, 1] + +Before: [1, 0, 2, 0] +2 0 2 3 +After: [1, 0, 2, 0] + +Before: [0, 1, 1, 2] +6 1 3 3 +After: [0, 1, 1, 0] + +Before: [0, 0, 2, 0] +1 0 0 0 +After: [0, 0, 2, 0] + +Before: [0, 0, 3, 1] +15 3 1 1 +After: [0, 1, 3, 1] + +Before: [1, 0, 1, 3] +9 2 0 3 +After: [1, 0, 1, 2] + +Before: [1, 2, 2, 1] +12 2 1 0 +After: [1, 2, 2, 1] + +Before: [3, 1, 1, 1] +9 2 3 1 +After: [3, 2, 1, 1] + +Before: [2, 1, 2, 0] +5 1 3 3 +After: [2, 1, 2, 1] + +Before: [3, 2, 1, 3] +0 1 3 2 +After: [3, 2, 0, 3] + +Before: [3, 1, 2, 3] +12 3 0 0 +After: [1, 1, 2, 3] + +Before: [0, 0, 0, 1] +3 3 3 3 +After: [0, 0, 0, 0] + +Before: [0, 2, 2, 1] +1 0 0 3 +After: [0, 2, 2, 0] + +Before: [1, 1, 2, 1] +8 1 2 0 +After: [0, 1, 2, 1] + +Before: [2, 1, 3, 0] +5 1 3 2 +After: [2, 1, 1, 0] + +Before: [1, 1, 2, 0] +8 1 2 1 +After: [1, 0, 2, 0] + +Before: [3, 0, 2, 3] +0 2 3 1 +After: [3, 0, 2, 3] + +Before: [0, 3, 2, 1] +14 3 2 0 +After: [1, 3, 2, 1] + +Before: [2, 2, 2, 3] +0 2 3 3 +After: [2, 2, 2, 0] + +Before: [3, 1, 2, 2] +6 1 3 0 +After: [0, 1, 2, 2] + +Before: [1, 2, 1, 1] +9 2 0 3 +After: [1, 2, 1, 2] + +Before: [3, 1, 0, 3] +12 3 0 3 +After: [3, 1, 0, 1] + +Before: [1, 2, 1, 1] +9 2 3 1 +After: [1, 2, 1, 1] + +Before: [2, 0, 2, 0] +7 0 2 3 +After: [2, 0, 2, 1] + +Before: [3, 2, 0, 3] +12 3 0 1 +After: [3, 1, 0, 3] + +Before: [2, 3, 2, 0] +7 0 2 1 +After: [2, 1, 2, 0] + +Before: [1, 1, 1, 3] +0 2 3 3 +After: [1, 1, 1, 0] + +Before: [1, 1, 2, 0] +2 0 2 0 +After: [0, 1, 2, 0] + +Before: [1, 3, 2, 1] +14 3 2 3 +After: [1, 3, 2, 1] + +Before: [1, 2, 1, 3] +9 2 0 2 +After: [1, 2, 2, 3] + +Before: [3, 1, 2, 3] +8 1 2 2 +After: [3, 1, 0, 3] + +Before: [0, 3, 3, 3] +12 3 2 0 +After: [1, 3, 3, 3] + +Before: [1, 0, 2, 2] +15 0 1 2 +After: [1, 0, 1, 2] + +Before: [2, 2, 3, 2] +11 0 3 0 +After: [1, 2, 3, 2] + +Before: [3, 1, 2, 1] +14 3 2 2 +After: [3, 1, 1, 1] + +Before: [1, 1, 1, 0] +5 1 3 0 +After: [1, 1, 1, 0] + +Before: [3, 1, 1, 1] +3 2 3 1 +After: [3, 0, 1, 1] + +Before: [2, 1, 3, 3] +7 2 3 0 +After: [1, 1, 3, 3] + +Before: [1, 1, 2, 3] +2 0 2 2 +After: [1, 1, 0, 3] + +Before: [3, 1, 2, 0] +5 1 3 0 +After: [1, 1, 2, 0] + +Before: [2, 2, 1, 1] +9 2 3 1 +After: [2, 2, 1, 1] + +Before: [2, 0, 2, 0] +4 2 2 2 +After: [2, 0, 2, 0] + +Before: [0, 2, 1, 2] +3 3 3 3 +After: [0, 2, 1, 0] + +Before: [3, 0, 1, 3] +7 0 3 1 +After: [3, 1, 1, 3] + +Before: [2, 2, 3, 2] +11 0 3 3 +After: [2, 2, 3, 1] + +Before: [2, 2, 2, 3] +0 2 3 1 +After: [2, 0, 2, 3] + +Before: [0, 1, 3, 0] +5 1 3 2 +After: [0, 1, 1, 0] + +Before: [3, 1, 2, 2] +6 1 3 2 +After: [3, 1, 0, 2] + +Before: [0, 2, 0, 3] +4 3 3 3 +After: [0, 2, 0, 3] + +Before: [2, 2, 3, 3] +7 2 3 3 +After: [2, 2, 3, 1] + +Before: [0, 3, 1, 2] +3 3 3 2 +After: [0, 3, 0, 2] + +Before: [0, 3, 3, 0] +1 0 0 0 +After: [0, 3, 3, 0] + +Before: [0, 3, 3, 3] +13 0 0 0 +After: [1, 3, 3, 3] + +Before: [3, 0, 1, 2] +3 3 3 3 +After: [3, 0, 1, 0] + +Before: [0, 1, 1, 1] +3 2 3 1 +After: [0, 0, 1, 1] + +Before: [2, 2, 2, 1] +12 2 1 2 +After: [2, 2, 1, 1] + +Before: [2, 2, 3, 2] +11 0 3 2 +After: [2, 2, 1, 2] + +Before: [0, 1, 0, 3] +4 3 3 0 +After: [3, 1, 0, 3] + +Before: [0, 3, 1, 1] +9 2 3 3 +After: [0, 3, 1, 2] + +Before: [2, 1, 0, 0] +5 1 3 1 +After: [2, 1, 0, 0] + +Before: [0, 1, 3, 2] +6 1 3 0 +After: [0, 1, 3, 2] + +Before: [2, 3, 0, 2] +11 0 3 2 +After: [2, 3, 1, 2] + +Before: [2, 1, 2, 1] +14 3 2 0 +After: [1, 1, 2, 1] + +Before: [2, 1, 2, 3] +7 0 2 2 +After: [2, 1, 1, 3] + +Before: [2, 1, 3, 3] +7 2 3 2 +After: [2, 1, 1, 3] + +Before: [1, 2, 1, 1] +3 2 3 2 +After: [1, 2, 0, 1] + +Before: [2, 3, 1, 1] +9 2 3 2 +After: [2, 3, 2, 1] + +Before: [0, 1, 2, 1] +8 1 2 3 +After: [0, 1, 2, 0] + +Before: [3, 2, 2, 1] +14 3 2 0 +After: [1, 2, 2, 1] + +Before: [2, 1, 2, 3] +8 1 2 1 +After: [2, 0, 2, 3] + +Before: [2, 1, 2, 1] +14 3 2 3 +After: [2, 1, 2, 1] + +Before: [0, 0, 3, 0] +1 0 0 0 +After: [0, 0, 3, 0] + +Before: [3, 2, 2, 3] +7 0 3 1 +After: [3, 1, 2, 3] + +Before: [1, 3, 2, 0] +2 0 2 2 +After: [1, 3, 0, 0] + +Before: [1, 2, 0, 3] +13 3 1 0 +After: [0, 2, 0, 3] + +Before: [2, 3, 0, 2] +11 0 3 3 +After: [2, 3, 0, 1] + +Before: [1, 2, 2, 1] +14 3 2 2 +After: [1, 2, 1, 1] + +Before: [0, 1, 0, 3] +4 3 3 3 +After: [0, 1, 0, 3] + +Before: [0, 1, 2, 0] +5 1 3 1 +After: [0, 1, 2, 0] + +Before: [0, 2, 2, 3] +1 0 0 3 +After: [0, 2, 2, 0] + +Before: [2, 1, 3, 1] +12 2 3 0 +After: [0, 1, 3, 1] + +Before: [0, 1, 2, 0] +10 1 0 1 +After: [0, 1, 2, 0] + +Before: [1, 1, 1, 3] +0 1 3 2 +After: [1, 1, 0, 3] + +Before: [2, 2, 2, 2] +11 0 3 0 +After: [1, 2, 2, 2] + +Before: [0, 2, 1, 0] +1 0 0 2 +After: [0, 2, 0, 0] + +Before: [0, 3, 1, 1] +9 2 3 2 +After: [0, 3, 2, 1] + +Before: [0, 3, 3, 1] +13 0 0 0 +After: [1, 3, 3, 1] + +Before: [0, 1, 3, 3] +4 3 3 3 +After: [0, 1, 3, 3] + +Before: [0, 2, 2, 0] +1 0 0 1 +After: [0, 0, 2, 0] + +Before: [0, 1, 1, 3] +0 1 3 0 +After: [0, 1, 1, 3] + +Before: [1, 3, 1, 3] +9 2 0 3 +After: [1, 3, 1, 2] + +Before: [3, 1, 1, 1] +3 3 3 2 +After: [3, 1, 0, 1] + +Before: [3, 1, 2, 3] +0 1 3 1 +After: [3, 0, 2, 3] + +Before: [1, 3, 1, 1] +9 2 3 0 +After: [2, 3, 1, 1] + +Before: [3, 0, 1, 1] +15 2 1 3 +After: [3, 0, 1, 1] + +Before: [2, 0, 3, 2] +11 0 3 1 +After: [2, 1, 3, 2] + +Before: [1, 2, 1, 3] +4 3 3 2 +After: [1, 2, 3, 3] + +Before: [0, 3, 1, 3] +1 0 0 2 +After: [0, 3, 0, 3] + +Before: [0, 1, 2, 3] +8 1 2 2 +After: [0, 1, 0, 3] + +Before: [2, 3, 3, 1] +12 2 3 2 +After: [2, 3, 0, 1] + +Before: [1, 1, 2, 2] +6 1 3 1 +After: [1, 0, 2, 2] + +Before: [0, 2, 2, 3] +4 3 3 0 +After: [3, 2, 2, 3] + +Before: [3, 1, 2, 1] +8 1 2 3 +After: [3, 1, 2, 0] + +Before: [2, 0, 1, 2] +11 0 3 3 +After: [2, 0, 1, 1] + +Before: [0, 0, 0, 2] +1 0 0 0 +After: [0, 0, 0, 2] + +Before: [0, 3, 0, 1] +1 0 0 1 +After: [0, 0, 0, 1] + +Before: [0, 1, 1, 2] +6 1 3 2 +After: [0, 1, 0, 2] + +Before: [0, 0, 1, 2] +1 0 0 1 +After: [0, 0, 1, 2] + +Before: [3, 0, 0, 3] +12 3 0 3 +After: [3, 0, 0, 1] + +Before: [0, 1, 0, 0] +5 1 3 2 +After: [0, 1, 1, 0] + +Before: [0, 0, 3, 3] +1 0 0 0 +After: [0, 0, 3, 3] + +Before: [2, 1, 1, 2] +11 0 3 0 +After: [1, 1, 1, 2] + +Before: [1, 1, 0, 2] +6 1 3 3 +After: [1, 1, 0, 0] + +Before: [0, 1, 2, 2] +6 1 3 1 +After: [0, 0, 2, 2] + +Before: [1, 2, 2, 0] +2 0 2 2 +After: [1, 2, 0, 0] + +Before: [1, 1, 0, 2] +3 3 3 1 +After: [1, 0, 0, 2] + +Before: [2, 0, 1, 1] +15 3 1 3 +After: [2, 0, 1, 1] + +Before: [1, 2, 1, 0] +9 2 0 1 +After: [1, 2, 1, 0] + +Before: [3, 1, 2, 2] +6 1 3 1 +After: [3, 0, 2, 2] + +Before: [1, 3, 2, 3] +13 3 3 0 +After: [1, 3, 2, 3] + +Before: [1, 3, 2, 2] +2 0 2 1 +After: [1, 0, 2, 2] + +Before: [0, 1, 2, 2] +6 1 3 2 +After: [0, 1, 0, 2] + +Before: [3, 0, 2, 2] +13 2 2 1 +After: [3, 1, 2, 2] + +Before: [0, 0, 1, 1] +3 3 3 3 +After: [0, 0, 1, 0] + +Before: [1, 1, 0, 1] +3 3 3 1 +After: [1, 0, 0, 1] + +Before: [0, 2, 2, 1] +14 3 2 2 +After: [0, 2, 1, 1] + +Before: [3, 1, 3, 1] +12 2 3 2 +After: [3, 1, 0, 1] + +Before: [2, 0, 2, 2] +7 0 2 2 +After: [2, 0, 1, 2] + +Before: [2, 1, 2, 2] +11 0 3 3 +After: [2, 1, 2, 1] + +Before: [0, 1, 1, 0] +10 1 0 0 +After: [1, 1, 1, 0] + +Before: [3, 3, 2, 2] +13 2 2 1 +After: [3, 1, 2, 2] + +Before: [1, 0, 1, 1] +15 0 1 3 +After: [1, 0, 1, 1] + +Before: [0, 0, 1, 2] +15 2 1 0 +After: [1, 0, 1, 2] + +Before: [2, 1, 0, 2] +6 1 3 2 +After: [2, 1, 0, 2] + +Before: [0, 1, 0, 3] +10 1 0 3 +After: [0, 1, 0, 1] + +Before: [2, 0, 0, 2] +11 0 3 0 +After: [1, 0, 0, 2] + +Before: [0, 1, 1, 2] +13 0 0 3 +After: [0, 1, 1, 1] + +Before: [0, 2, 3, 0] +13 0 0 0 +After: [1, 2, 3, 0] + +Before: [3, 3, 1, 3] +4 3 3 1 +After: [3, 3, 1, 3] + +Before: [1, 1, 3, 2] +6 1 3 2 +After: [1, 1, 0, 2] + +Before: [2, 0, 2, 1] +14 3 2 1 +After: [2, 1, 2, 1] + +Before: [1, 1, 2, 2] +8 1 2 1 +After: [1, 0, 2, 2] + +Before: [1, 1, 2, 0] +8 1 2 2 +After: [1, 1, 0, 0] + +Before: [3, 0, 1, 3] +0 2 3 1 +After: [3, 0, 1, 3] + +Before: [2, 0, 2, 2] +7 0 2 3 +After: [2, 0, 2, 1] + +Before: [1, 3, 2, 0] +13 2 2 1 +After: [1, 1, 2, 0] + +Before: [0, 1, 3, 3] +10 1 0 1 +After: [0, 1, 3, 3] + +Before: [0, 1, 0, 3] +0 1 3 3 +After: [0, 1, 0, 0] + +Before: [1, 3, 2, 3] +2 0 2 1 +After: [1, 0, 2, 3] + +Before: [0, 1, 0, 2] +10 1 0 0 +After: [1, 1, 0, 2] + +Before: [2, 0, 1, 3] +0 2 3 0 +After: [0, 0, 1, 3] + +Before: [3, 0, 3, 1] +12 2 3 3 +After: [3, 0, 3, 0] + +Before: [2, 1, 1, 0] +5 1 3 3 +After: [2, 1, 1, 1] + +Before: [0, 1, 2, 0] +10 1 0 0 +After: [1, 1, 2, 0] + +Before: [2, 0, 2, 1] +15 3 1 1 +After: [2, 1, 2, 1] + +Before: [2, 3, 2, 1] +14 3 2 2 +After: [2, 3, 1, 1] + +Before: [1, 1, 2, 1] +8 1 2 1 +After: [1, 0, 2, 1] + +Before: [3, 0, 0, 3] +12 3 0 1 +After: [3, 1, 0, 3] + +Before: [0, 2, 1, 1] +9 2 3 2 +After: [0, 2, 2, 1] + +Before: [0, 1, 2, 0] +10 1 0 2 +After: [0, 1, 1, 0] + +Before: [2, 0, 2, 1] +15 3 1 3 +After: [2, 0, 2, 1] + +Before: [3, 1, 0, 2] +6 1 3 0 +After: [0, 1, 0, 2] + +Before: [3, 0, 2, 1] +14 3 2 2 +After: [3, 0, 1, 1] + +Before: [1, 0, 2, 0] +15 0 1 2 +After: [1, 0, 1, 0] + +Before: [0, 2, 2, 1] +14 3 2 1 +After: [0, 1, 2, 1] + +Before: [0, 0, 2, 3] +0 2 3 0 +After: [0, 0, 2, 3] + +Before: [0, 2, 3, 1] +3 3 3 3 +After: [0, 2, 3, 0] + +Before: [1, 0, 2, 2] +2 0 2 3 +After: [1, 0, 2, 0] + +Before: [2, 3, 2, 3] +13 3 2 3 +After: [2, 3, 2, 0] + +Before: [1, 3, 2, 1] +14 3 2 1 +After: [1, 1, 2, 1] + +Before: [3, 1, 3, 3] +12 3 0 1 +After: [3, 1, 3, 3] + +Before: [0, 0, 2, 0] +1 0 0 3 +After: [0, 0, 2, 0] + +Before: [2, 0, 3, 3] +7 2 3 2 +After: [2, 0, 1, 3] + +Before: [1, 3, 2, 3] +0 2 3 2 +After: [1, 3, 0, 3] + +Before: [3, 0, 2, 1] +14 3 2 1 +After: [3, 1, 2, 1] + +Before: [1, 0, 3, 1] +15 3 1 0 +After: [1, 0, 3, 1] + +Before: [2, 3, 1, 1] +3 2 3 0 +After: [0, 3, 1, 1] + +Before: [3, 1, 3, 1] +12 2 3 0 +After: [0, 1, 3, 1] + +Before: [2, 1, 0, 1] +3 3 3 0 +After: [0, 1, 0, 1] + +Before: [0, 1, 0, 3] +13 0 0 2 +After: [0, 1, 1, 3] + +Before: [3, 1, 2, 2] +8 1 2 0 +After: [0, 1, 2, 2] + +Before: [2, 3, 1, 2] +11 0 3 0 +After: [1, 3, 1, 2] + +Before: [1, 0, 1, 3] +13 3 3 2 +After: [1, 0, 1, 3] + +Before: [3, 2, 3, 3] +13 3 1 0 +After: [0, 2, 3, 3] + +Before: [3, 0, 1, 1] +9 2 3 1 +After: [3, 2, 1, 1] + +Before: [1, 0, 2, 2] +2 0 2 2 +After: [1, 0, 0, 2] + +Before: [3, 0, 3, 3] +7 0 3 3 +After: [3, 0, 3, 1] + +Before: [0, 1, 0, 2] +6 1 3 3 +After: [0, 1, 0, 0] + +Before: [3, 1, 2, 3] +8 1 2 1 +After: [3, 0, 2, 3] + +Before: [1, 1, 2, 3] +2 0 2 3 +After: [1, 1, 2, 0] + +Before: [0, 3, 0, 2] +1 0 0 3 +After: [0, 3, 0, 0] + +Before: [2, 2, 2, 2] +12 2 1 3 +After: [2, 2, 2, 1] + +Before: [2, 1, 3, 2] +11 0 3 2 +After: [2, 1, 1, 2] + +Before: [0, 1, 2, 2] +6 1 3 3 +After: [0, 1, 2, 0] + +Before: [2, 1, 3, 2] +11 0 3 0 +After: [1, 1, 3, 2] + +Before: [3, 1, 3, 2] +6 1 3 3 +After: [3, 1, 3, 0] + +Before: [2, 3, 2, 0] +7 0 2 2 +After: [2, 3, 1, 0] + +Before: [3, 3, 2, 1] +14 3 2 1 +After: [3, 1, 2, 1] + +Before: [1, 2, 2, 1] +14 3 2 1 +After: [1, 1, 2, 1] + +Before: [0, 1, 0, 2] +6 1 3 1 +After: [0, 0, 0, 2] + +Before: [2, 1, 2, 0] +5 1 3 2 +After: [2, 1, 1, 0] + +Before: [2, 3, 3, 3] +7 2 3 1 +After: [2, 1, 3, 3] + +Before: [3, 1, 0, 3] +0 1 3 0 +After: [0, 1, 0, 3] + +Before: [0, 3, 2, 3] +4 2 2 1 +After: [0, 2, 2, 3] + +Before: [2, 0, 0, 2] +11 0 3 1 +After: [2, 1, 0, 2] + +Before: [0, 2, 2, 3] +13 0 0 2 +After: [0, 2, 1, 3] + +Before: [1, 1, 1, 0] +9 2 0 1 +After: [1, 2, 1, 0] + +Before: [1, 1, 3, 3] +0 1 3 0 +After: [0, 1, 3, 3] + +Before: [2, 2, 2, 3] +0 2 3 0 +After: [0, 2, 2, 3] + +Before: [3, 1, 2, 3] +0 2 3 0 +After: [0, 1, 2, 3] + +Before: [2, 2, 2, 2] +7 0 2 3 +After: [2, 2, 2, 1] + +Before: [1, 1, 2, 1] +14 3 2 2 +After: [1, 1, 1, 1] + +Before: [0, 0, 2, 0] +4 2 2 3 +After: [0, 0, 2, 2] + +Before: [3, 3, 0, 3] +13 3 3 3 +After: [3, 3, 0, 1] + +Before: [0, 2, 3, 1] +13 0 0 2 +After: [0, 2, 1, 1] + +Before: [2, 3, 2, 0] +7 0 2 3 +After: [2, 3, 2, 1] + +Before: [0, 1, 0, 2] +1 0 0 3 +After: [0, 1, 0, 0] + +Before: [2, 2, 0, 2] +3 3 3 1 +After: [2, 0, 0, 2] + +Before: [1, 3, 2, 3] +2 0 2 2 +After: [1, 3, 0, 3] + +Before: [1, 1, 3, 3] +13 3 3 3 +After: [1, 1, 3, 1] + +Before: [0, 0, 1, 1] +15 3 1 3 +After: [0, 0, 1, 1] + +Before: [1, 1, 3, 0] +5 1 3 1 +After: [1, 1, 3, 0] + +Before: [2, 0, 3, 2] +11 0 3 2 +After: [2, 0, 1, 2] + +Before: [3, 0, 3, 3] +7 2 3 0 +After: [1, 0, 3, 3] + +Before: [0, 1, 2, 1] +10 1 0 3 +After: [0, 1, 2, 1] + +Before: [2, 0, 0, 2] +11 0 3 3 +After: [2, 0, 0, 1] + +Before: [1, 2, 2, 3] +2 0 2 1 +After: [1, 0, 2, 3] + +Before: [1, 2, 1, 2] +9 2 0 1 +After: [1, 2, 1, 2] + +Before: [0, 2, 2, 1] +1 0 0 0 +After: [0, 2, 2, 1] + +Before: [0, 1, 1, 0] +5 1 3 2 +After: [0, 1, 1, 0] + +Before: [2, 0, 3, 3] +13 3 3 0 +After: [1, 0, 3, 3] + +Before: [1, 1, 2, 0] +5 1 3 1 +After: [1, 1, 2, 0] + +Before: [3, 1, 2, 1] +14 3 2 1 +After: [3, 1, 2, 1] + +Before: [0, 1, 0, 2] +10 1 0 3 +After: [0, 1, 0, 1] + +Before: [1, 1, 3, 0] +5 1 3 2 +After: [1, 1, 1, 0] + +Before: [2, 1, 2, 3] +8 1 2 2 +After: [2, 1, 0, 3] + +Before: [3, 3, 3, 3] +12 3 0 1 +After: [3, 1, 3, 3] + +Before: [1, 0, 1, 0] +15 0 1 3 +After: [1, 0, 1, 1] + +Before: [2, 0, 1, 1] +15 3 1 0 +After: [1, 0, 1, 1] + +Before: [1, 1, 0, 0] +5 1 3 1 +After: [1, 1, 0, 0] + +Before: [0, 0, 2, 1] +14 3 2 1 +After: [0, 1, 2, 1] + +Before: [0, 1, 0, 0] +5 1 3 1 +After: [0, 1, 0, 0] + +Before: [2, 2, 2, 3] +0 1 3 3 +After: [2, 2, 2, 0] + +Before: [1, 0, 2, 1] +14 3 2 0 +After: [1, 0, 2, 1] + +Before: [1, 0, 1, 3] +9 2 0 0 +After: [2, 0, 1, 3] + +Before: [3, 0, 1, 0] +15 2 1 3 +After: [3, 0, 1, 1] + +Before: [0, 3, 2, 1] +14 3 2 3 +After: [0, 3, 2, 1] + +Before: [0, 3, 0, 0] +13 0 0 2 +After: [0, 3, 1, 0] + +Before: [1, 2, 1, 1] +9 2 0 0 +After: [2, 2, 1, 1] + +Before: [1, 1, 0, 3] +0 1 3 1 +After: [1, 0, 0, 3] + +Before: [0, 0, 1, 3] +15 2 1 1 +After: [0, 1, 1, 3] + +Before: [3, 1, 1, 3] +0 1 3 0 +After: [0, 1, 1, 3] + +Before: [0, 1, 3, 0] +13 0 0 0 +After: [1, 1, 3, 0] + +Before: [1, 1, 3, 3] +7 2 3 1 +After: [1, 1, 3, 3] + +Before: [1, 0, 2, 3] +2 0 2 3 +After: [1, 0, 2, 0] + +Before: [2, 0, 2, 1] +15 3 1 2 +After: [2, 0, 1, 1] + +Before: [2, 0, 2, 3] +4 3 3 0 +After: [3, 0, 2, 3] + +Before: [0, 1, 0, 1] +13 0 0 1 +After: [0, 1, 0, 1] + +Before: [0, 1, 2, 2] +10 1 0 3 +After: [0, 1, 2, 1] + +Before: [1, 2, 2, 2] +12 2 1 1 +After: [1, 1, 2, 2] + +Before: [0, 2, 2, 3] +0 2 3 2 +After: [0, 2, 0, 3] + +Before: [2, 1, 2, 2] +8 1 2 1 +After: [2, 0, 2, 2] + +Before: [0, 1, 2, 0] +8 1 2 0 +After: [0, 1, 2, 0] + +Before: [3, 3, 2, 0] +4 2 2 2 +After: [3, 3, 2, 0] + +Before: [2, 0, 1, 2] +11 0 3 1 +After: [2, 1, 1, 2] + +Before: [0, 1, 2, 3] +10 1 0 2 +After: [0, 1, 1, 3] + +Before: [3, 3, 1, 1] +9 2 3 2 +After: [3, 3, 2, 1] + +Before: [2, 0, 1, 2] +11 0 3 2 +After: [2, 0, 1, 2] + +Before: [0, 1, 0, 0] +10 1 0 0 +After: [1, 1, 0, 0] + +Before: [0, 1, 3, 1] +3 3 3 0 +After: [0, 1, 3, 1] + +Before: [1, 1, 3, 3] +7 2 3 2 +After: [1, 1, 1, 3] + +Before: [2, 1, 2, 2] +6 1 3 2 +After: [2, 1, 0, 2] + +Before: [1, 0, 2, 1] +15 3 1 0 +After: [1, 0, 2, 1] + +Before: [3, 1, 1, 0] +5 1 3 2 +After: [3, 1, 1, 0] + +Before: [3, 0, 3, 3] +7 2 3 3 +After: [3, 0, 3, 1] + +Before: [3, 0, 3, 3] +12 3 2 2 +After: [3, 0, 1, 3] + +Before: [1, 1, 2, 1] +14 3 2 3 +After: [1, 1, 2, 1] + +Before: [3, 1, 1, 1] +3 3 3 0 +After: [0, 1, 1, 1] + +Before: [0, 0, 3, 3] +12 3 2 3 +After: [0, 0, 3, 1] + +Before: [2, 3, 2, 1] +14 3 2 1 +After: [2, 1, 2, 1] + +Before: [1, 2, 2, 0] +2 0 2 0 +After: [0, 2, 2, 0] + +Before: [2, 1, 3, 3] +4 3 3 0 +After: [3, 1, 3, 3] + +Before: [0, 1, 2, 0] +1 0 0 2 +After: [0, 1, 0, 0] + +Before: [0, 2, 2, 2] +3 3 3 1 +After: [0, 0, 2, 2] + +Before: [2, 2, 2, 3] +12 2 1 3 +After: [2, 2, 2, 1] + +Before: [1, 1, 0, 0] +5 1 3 2 +After: [1, 1, 1, 0] + +Before: [2, 1, 1, 2] +6 1 3 3 +After: [2, 1, 1, 0] + +Before: [1, 3, 2, 3] +2 0 2 3 +After: [1, 3, 2, 0] + +Before: [3, 0, 3, 1] +15 3 1 3 +After: [3, 0, 3, 1] + +Before: [0, 1, 3, 2] +1 0 0 1 +After: [0, 0, 3, 2] + +Before: [2, 0, 2, 0] +12 2 0 0 +After: [1, 0, 2, 0] + +Before: [3, 3, 1, 3] +4 3 3 2 +After: [3, 3, 3, 3] + +Before: [3, 0, 2, 3] +13 2 2 0 +After: [1, 0, 2, 3] + +Before: [3, 2, 2, 3] +0 1 3 3 +After: [3, 2, 2, 0] + +Before: [3, 0, 2, 0] +4 2 2 3 +After: [3, 0, 2, 2] + +Before: [1, 0, 2, 1] +15 3 1 3 +After: [1, 0, 2, 1] + +Before: [3, 3, 2, 1] +14 3 2 3 +After: [3, 3, 2, 1] + +Before: [1, 3, 1, 2] +9 2 0 3 +After: [1, 3, 1, 2] + +Before: [2, 1, 2, 3] +8 1 2 0 +After: [0, 1, 2, 3] + +Before: [2, 2, 2, 2] +7 0 2 1 +After: [2, 1, 2, 2] + +Before: [1, 1, 0, 2] +6 1 3 0 +After: [0, 1, 0, 2] + +Before: [3, 1, 1, 2] +6 1 3 3 +After: [3, 1, 1, 0] + +Before: [0, 1, 3, 1] +10 1 0 3 +After: [0, 1, 3, 1] + +Before: [0, 2, 2, 0] +12 2 1 2 +After: [0, 2, 1, 0] + +Before: [1, 2, 1, 1] +3 3 3 3 +After: [1, 2, 1, 0] + +Before: [2, 3, 2, 3] +12 2 0 1 +After: [2, 1, 2, 3] + +Before: [0, 1, 2, 2] +8 1 2 0 +After: [0, 1, 2, 2] + +Before: [0, 1, 1, 2] +6 1 3 0 +After: [0, 1, 1, 2] + +Before: [2, 3, 3, 2] +11 0 3 1 +After: [2, 1, 3, 2] + +Before: [2, 0, 0, 1] +3 3 3 2 +After: [2, 0, 0, 1] + +Before: [2, 0, 3, 2] +11 0 3 0 +After: [1, 0, 3, 2] + +Before: [0, 1, 1, 1] +10 1 0 0 +After: [1, 1, 1, 1] + +Before: [1, 3, 2, 3] +0 2 3 1 +After: [1, 0, 2, 3] + +Before: [3, 1, 1, 2] +6 1 3 0 +After: [0, 1, 1, 2] + +Before: [0, 1, 0, 0] +10 1 0 3 +After: [0, 1, 0, 1] + +Before: [1, 1, 1, 0] +5 1 3 2 +After: [1, 1, 1, 0] + +Before: [2, 1, 2, 2] +8 1 2 2 +After: [2, 1, 0, 2] + +Before: [0, 1, 1, 1] +9 2 3 2 +After: [0, 1, 2, 1] + +Before: [2, 1, 2, 2] +6 1 3 3 +After: [2, 1, 2, 0] + +Before: [0, 1, 2, 1] +14 3 2 0 +After: [1, 1, 2, 1] + +Before: [1, 1, 2, 1] +2 0 2 0 +After: [0, 1, 2, 1] + +Before: [1, 1, 2, 0] +8 1 2 3 +After: [1, 1, 2, 0] + +Before: [1, 1, 2, 1] +14 3 2 1 +After: [1, 1, 2, 1] + +Before: [1, 2, 2, 1] +4 2 2 2 +After: [1, 2, 2, 1] + +Before: [2, 1, 0, 2] +11 0 3 1 +After: [2, 1, 0, 2] + +Before: [3, 2, 2, 0] +4 2 2 2 +After: [3, 2, 2, 0] + +Before: [0, 1, 0, 1] +10 1 0 0 +After: [1, 1, 0, 1] + +Before: [2, 2, 0, 2] +3 3 3 3 +After: [2, 2, 0, 0] + +Before: [2, 2, 2, 2] +11 0 3 2 +After: [2, 2, 1, 2] + +Before: [2, 3, 2, 1] +14 3 2 3 +After: [2, 3, 2, 1] + +Before: [1, 1, 3, 2] +6 1 3 1 +After: [1, 0, 3, 2] + +Before: [0, 1, 2, 3] +10 1 0 3 +After: [0, 1, 2, 1] + +Before: [3, 0, 2, 2] +4 2 2 2 +After: [3, 0, 2, 2] + +Before: [0, 1, 2, 1] +14 3 2 1 +After: [0, 1, 2, 1] + +Before: [3, 1, 3, 2] +6 1 3 1 +After: [3, 0, 3, 2] + +Before: [1, 1, 2, 0] +2 0 2 1 +After: [1, 0, 2, 0] + +Before: [1, 1, 2, 1] +2 0 2 2 +After: [1, 1, 0, 1] + +Before: [1, 3, 2, 1] +13 2 2 3 +After: [1, 3, 2, 1] + +Before: [3, 3, 2, 0] +13 2 2 2 +After: [3, 3, 1, 0] + +Before: [2, 2, 1, 3] +0 1 3 3 +After: [2, 2, 1, 0] + +Before: [1, 0, 0, 2] +15 0 1 0 +After: [1, 0, 0, 2] + +Before: [3, 2, 1, 1] +3 3 3 3 +After: [3, 2, 1, 0] + +Before: [3, 2, 1, 3] +0 1 3 1 +After: [3, 0, 1, 3] + +Before: [3, 3, 2, 3] +7 0 3 0 +After: [1, 3, 2, 3] + +Before: [0, 2, 0, 2] +1 0 0 1 +After: [0, 0, 0, 2] + +Before: [2, 0, 2, 1] +7 0 2 1 +After: [2, 1, 2, 1] + +Before: [3, 2, 2, 1] +14 3 2 2 +After: [3, 2, 1, 1] + +Before: [1, 1, 2, 3] +8 1 2 3 +After: [1, 1, 2, 0] + +Before: [1, 1, 0, 2] +6 1 3 2 +After: [1, 1, 0, 2] + +Before: [2, 1, 3, 2] +6 1 3 1 +After: [2, 0, 3, 2] + +Before: [1, 0, 3, 3] +4 3 3 1 +After: [1, 3, 3, 3] + +Before: [0, 2, 3, 3] +0 1 3 0 +After: [0, 2, 3, 3] + +Before: [2, 1, 1, 3] +0 2 3 1 +After: [2, 0, 1, 3] + +Before: [1, 0, 0, 1] +15 3 1 2 +After: [1, 0, 1, 1] + +Before: [0, 3, 3, 2] +1 0 0 2 +After: [0, 3, 0, 2] + +Before: [2, 1, 2, 3] +7 0 2 1 +After: [2, 1, 2, 3] + +Before: [0, 0, 3, 2] +13 0 0 3 +After: [0, 0, 3, 1] + +Before: [0, 1, 2, 0] +5 1 3 2 +After: [0, 1, 1, 0] + +Before: [0, 2, 2, 1] +12 2 1 0 +After: [1, 2, 2, 1] + +Before: [0, 1, 2, 1] +8 1 2 2 +After: [0, 1, 0, 1] + +Before: [0, 1, 1, 0] +10 1 0 3 +After: [0, 1, 1, 1] + +Before: [0, 3, 1, 0] +1 0 0 2 +After: [0, 3, 0, 0] + +Before: [2, 1, 1, 2] +11 0 3 1 +After: [2, 1, 1, 2] + +Before: [3, 3, 2, 1] +14 3 2 2 +After: [3, 3, 1, 1] + +Before: [3, 1, 2, 2] +4 2 2 3 +After: [3, 1, 2, 2] + +Before: [1, 1, 2, 3] +0 2 3 2 +After: [1, 1, 0, 3] + +Before: [2, 2, 2, 3] +0 1 3 1 +After: [2, 0, 2, 3] + +Before: [3, 3, 2, 3] +4 3 3 2 +After: [3, 3, 3, 3] + +Before: [2, 1, 2, 0] +7 0 2 3 +After: [2, 1, 2, 1] + +Before: [0, 2, 1, 1] +9 2 3 1 +After: [0, 2, 1, 1] + +Before: [2, 1, 0, 3] +0 1 3 2 +After: [2, 1, 0, 3] + +Before: [0, 1, 0, 3] +13 3 3 0 +After: [1, 1, 0, 3] + +Before: [0, 0, 3, 1] +3 3 3 2 +After: [0, 0, 0, 1] + +Before: [1, 0, 0, 0] +15 0 1 0 +After: [1, 0, 0, 0] + +Before: [0, 0, 1, 3] +0 2 3 1 +After: [0, 0, 1, 3] + +Before: [1, 1, 1, 3] +9 2 0 1 +After: [1, 2, 1, 3] + +Before: [3, 0, 1, 3] +0 2 3 2 +After: [3, 0, 0, 3] + +Before: [3, 1, 3, 2] +6 1 3 0 +After: [0, 1, 3, 2] + +Before: [3, 3, 1, 3] +12 3 0 1 +After: [3, 1, 1, 3] + +Before: [3, 1, 1, 3] +0 2 3 0 +After: [0, 1, 1, 3] + +Before: [2, 1, 1, 2] +6 1 3 2 +After: [2, 1, 0, 2] + +Before: [0, 1, 0, 2] +10 1 0 1 +After: [0, 1, 0, 2] + +Before: [0, 1, 1, 0] +10 1 0 1 +After: [0, 1, 1, 0] + +Before: [3, 2, 1, 3] +13 3 1 3 +After: [3, 2, 1, 0] + +Before: [2, 1, 1, 0] +5 1 3 0 +After: [1, 1, 1, 0] + +Before: [0, 1, 3, 1] +10 1 0 1 +After: [0, 1, 3, 1] + +Before: [0, 0, 3, 1] +12 2 3 2 +After: [0, 0, 0, 1] + +Before: [1, 1, 2, 3] +0 2 3 0 +After: [0, 1, 2, 3] + +Before: [1, 1, 2, 3] +0 2 3 3 +After: [1, 1, 2, 0] + +Before: [1, 3, 2, 1] +14 3 2 0 +After: [1, 3, 2, 1] + +Before: [0, 1, 2, 3] +10 1 0 0 +After: [1, 1, 2, 3] + +Before: [2, 3, 3, 1] +12 2 3 3 +After: [2, 3, 3, 0] + +Before: [2, 0, 2, 2] +11 0 3 2 +After: [2, 0, 1, 2] + +Before: [3, 1, 0, 2] +3 3 3 2 +After: [3, 1, 0, 2] + +Before: [0, 1, 2, 0] +1 0 0 3 +After: [0, 1, 2, 0] + +Before: [0, 3, 2, 1] +14 3 2 2 +After: [0, 3, 1, 1] + +Before: [3, 2, 3, 3] +12 3 2 1 +After: [3, 1, 3, 3] + +Before: [3, 2, 2, 1] +3 3 3 2 +After: [3, 2, 0, 1] + +Before: [2, 0, 3, 2] +3 3 3 2 +After: [2, 0, 0, 2] + +Before: [1, 1, 2, 1] +8 1 2 2 +After: [1, 1, 0, 1] + +Before: [3, 1, 2, 0] +5 1 3 1 +After: [3, 1, 2, 0] + +Before: [1, 1, 1, 1] +9 2 3 0 +After: [2, 1, 1, 1] + +Before: [2, 0, 2, 0] +13 2 2 1 +After: [2, 1, 2, 0] + +Before: [0, 0, 2, 2] +13 2 2 3 +After: [0, 0, 2, 1] + +Before: [2, 1, 2, 1] +8 1 2 3 +After: [2, 1, 2, 0] + +Before: [2, 1, 0, 2] +3 3 3 3 +After: [2, 1, 0, 0] + +Before: [0, 2, 3, 0] +1 0 0 1 +After: [0, 0, 3, 0] + +Before: [3, 2, 1, 3] +12 3 0 1 +After: [3, 1, 1, 3] + +Before: [0, 1, 3, 2] +1 0 0 2 +After: [0, 1, 0, 2] + +Before: [2, 2, 2, 3] +0 1 3 2 +After: [2, 2, 0, 3] + +Before: [3, 0, 1, 0] +15 2 1 2 +After: [3, 0, 1, 0] + +Before: [1, 0, 3, 1] +12 2 3 2 +After: [1, 0, 0, 1] + +Before: [0, 1, 1, 2] +10 1 0 1 +After: [0, 1, 1, 2] + +Before: [3, 1, 1, 3] +13 3 2 2 +After: [3, 1, 0, 3] + +Before: [1, 0, 2, 0] +2 0 2 0 +After: [0, 0, 2, 0] + +Before: [1, 2, 0, 3] +0 1 3 1 +After: [1, 0, 0, 3] + +Before: [0, 3, 2, 3] +4 2 2 2 +After: [0, 3, 2, 3] + +Before: [2, 2, 1, 2] +11 0 3 3 +After: [2, 2, 1, 1] + +Before: [1, 0, 1, 2] +3 3 3 0 +After: [0, 0, 1, 2] + +Before: [0, 1, 2, 0] +8 1 2 3 +After: [0, 1, 2, 0] + +Before: [2, 0, 3, 3] +12 3 2 1 +After: [2, 1, 3, 3] + +Before: [2, 1, 3, 2] +11 0 3 1 +After: [2, 1, 3, 2] + +Before: [1, 2, 1, 2] +9 2 0 0 +After: [2, 2, 1, 2] + +Before: [2, 2, 2, 0] +12 2 0 1 +After: [2, 1, 2, 0] + +Before: [2, 3, 0, 2] +3 3 3 3 +After: [2, 3, 0, 0] + +Before: [1, 1, 3, 1] +12 2 3 3 +After: [1, 1, 3, 0] + +Before: [1, 0, 3, 1] +15 0 1 0 +After: [1, 0, 3, 1] + +Before: [1, 0, 1, 1] +9 2 0 1 +After: [1, 2, 1, 1] + +Before: [0, 1, 3, 2] +10 1 0 0 +After: [1, 1, 3, 2] + +Before: [0, 1, 1, 2] +10 1 0 3 +After: [0, 1, 1, 1] + +Before: [3, 1, 3, 1] +3 3 3 2 +After: [3, 1, 0, 1] + +Before: [0, 0, 3, 3] +12 3 2 0 +After: [1, 0, 3, 3] + +Before: [3, 0, 1, 1] +9 2 3 3 +After: [3, 0, 1, 2] + +Before: [2, 2, 0, 3] +13 3 3 3 +After: [2, 2, 0, 1] + +Before: [0, 3, 1, 3] +13 3 2 2 +After: [0, 3, 0, 3] + +Before: [0, 1, 0, 2] +6 1 3 0 +After: [0, 1, 0, 2] + +Before: [2, 2, 2, 1] +14 3 2 0 +After: [1, 2, 2, 1] + +Before: [3, 1, 1, 0] +5 1 3 1 +After: [3, 1, 1, 0] + +Before: [0, 1, 3, 3] +0 1 3 3 +After: [0, 1, 3, 0] + +Before: [0, 0, 0, 1] +15 3 1 1 +After: [0, 1, 0, 1] + +Before: [3, 1, 2, 3] +7 0 3 1 +After: [3, 1, 2, 3] + +Before: [1, 1, 2, 1] +2 0 2 3 +After: [1, 1, 2, 0] + +Before: [0, 0, 2, 1] +13 0 0 2 +After: [0, 0, 1, 1] + +Before: [0, 0, 1, 3] +13 3 3 0 +After: [1, 0, 1, 3] + +Before: [1, 0, 1, 2] +9 2 0 3 +After: [1, 0, 1, 2] + +Before: [2, 0, 3, 3] +7 2 3 3 +After: [2, 0, 3, 1] + +Before: [0, 3, 1, 3] +0 2 3 0 +After: [0, 3, 1, 3] + +Before: [2, 1, 1, 1] +9 2 3 3 +After: [2, 1, 1, 2] + +Before: [0, 0, 1, 0] +15 2 1 0 +After: [1, 0, 1, 0] + +Before: [1, 0, 2, 1] +2 0 2 0 +After: [0, 0, 2, 1] + +Before: [0, 0, 1, 3] +4 3 3 3 +After: [0, 0, 1, 3] + +Before: [0, 1, 1, 2] +10 1 0 0 +After: [1, 1, 1, 2] + +Before: [2, 2, 2, 2] +11 0 3 3 +After: [2, 2, 2, 1] + +Before: [2, 3, 3, 1] +3 3 3 3 +After: [2, 3, 3, 0] + +Before: [1, 1, 2, 3] +2 0 2 0 +After: [0, 1, 2, 3] + +Before: [3, 1, 2, 1] +8 1 2 1 +After: [3, 0, 2, 1] + +Before: [2, 2, 0, 2] +11 0 3 3 +After: [2, 2, 0, 1] + +Before: [2, 2, 3, 1] +12 2 3 2 +After: [2, 2, 0, 1] + +Before: [2, 2, 2, 3] +13 2 2 3 +After: [2, 2, 2, 1] + +Before: [2, 0, 2, 1] +14 3 2 3 +After: [2, 0, 2, 1] + +Before: [0, 0, 2, 3] +1 0 0 1 +After: [0, 0, 2, 3] + +Before: [0, 1, 2, 0] +5 1 3 3 +After: [0, 1, 2, 1] + +Before: [2, 2, 2, 2] +12 2 1 1 +After: [2, 1, 2, 2] + +Before: [3, 2, 0, 3] +7 0 3 3 +After: [3, 2, 0, 1] + +Before: [0, 1, 1, 3] +4 3 3 0 +After: [3, 1, 1, 3] + +Before: [1, 1, 1, 2] +6 1 3 1 +After: [1, 0, 1, 2] + +Before: [1, 1, 1, 2] +6 1 3 3 +After: [1, 1, 1, 0] + +Before: [1, 0, 3, 1] +12 2 3 1 +After: [1, 0, 3, 1] + +Before: [1, 0, 2, 1] +2 0 2 2 +After: [1, 0, 0, 1] + +Before: [1, 0, 1, 0] +15 2 1 2 +After: [1, 0, 1, 0] + +Before: [1, 3, 3, 3] +4 3 3 1 +After: [1, 3, 3, 3] + +Before: [1, 0, 1, 1] +9 2 3 2 +After: [1, 0, 2, 1] + +Before: [0, 2, 2, 3] +0 2 3 1 +After: [0, 0, 2, 3] + +Before: [3, 2, 2, 3] +0 2 3 0 +After: [0, 2, 2, 3] + +Before: [0, 1, 2, 2] +8 1 2 3 +After: [0, 1, 2, 0] + +Before: [3, 1, 0, 0] +5 1 3 2 +After: [3, 1, 1, 0] + +Before: [2, 0, 2, 2] +7 0 2 0 +After: [1, 0, 2, 2] + +Before: [1, 2, 1, 3] +0 2 3 2 +After: [1, 2, 0, 3] + +Before: [0, 0, 2, 2] +4 2 2 1 +After: [0, 2, 2, 2] + +Before: [1, 0, 1, 1] +15 0 1 0 +After: [1, 0, 1, 1] + +Before: [1, 0, 2, 0] +2 0 2 1 +After: [1, 0, 2, 0] + +Before: [1, 0, 0, 1] +15 0 1 1 +After: [1, 1, 0, 1] + +Before: [0, 1, 3, 0] +10 1 0 1 +After: [0, 1, 3, 0] + +Before: [2, 3, 0, 2] +11 0 3 0 +After: [1, 3, 0, 2] + +Before: [1, 0, 2, 2] +15 0 1 3 +After: [1, 0, 2, 1] + +Before: [3, 0, 1, 1] +15 3 1 2 +After: [3, 0, 1, 1] + +Before: [0, 0, 2, 1] +3 3 3 1 +After: [0, 0, 2, 1] + +Before: [1, 3, 2, 0] +2 0 2 3 +After: [1, 3, 2, 0] + +Before: [0, 1, 2, 0] +10 1 0 3 +After: [0, 1, 2, 1] + +Before: [3, 2, 2, 3] +13 3 1 1 +After: [3, 0, 2, 3] + +Before: [3, 0, 3, 2] +3 3 3 1 +After: [3, 0, 3, 2] + +Before: [0, 0, 2, 3] +13 2 2 1 +After: [0, 1, 2, 3] + +Before: [1, 1, 1, 2] +6 1 3 2 +After: [1, 1, 0, 2] + +Before: [2, 3, 2, 1] +12 2 0 2 +After: [2, 3, 1, 1] + +Before: [0, 0, 0, 1] +15 3 1 3 +After: [0, 0, 0, 1] + +Before: [2, 2, 2, 1] +14 3 2 2 +After: [2, 2, 1, 1] + +Before: [0, 1, 2, 3] +13 3 2 0 +After: [0, 1, 2, 3] + +Before: [2, 1, 0, 1] +3 3 3 2 +After: [2, 1, 0, 1] + +Before: [0, 1, 2, 0] +5 1 3 0 +After: [1, 1, 2, 0] + +Before: [3, 3, 1, 3] +0 2 3 3 +After: [3, 3, 1, 0] + +Before: [1, 2, 3, 3] +0 1 3 2 +After: [1, 2, 0, 3] + +Before: [0, 1, 2, 2] +10 1 0 1 +After: [0, 1, 2, 2] + +Before: [2, 1, 1, 3] +13 3 1 0 +After: [0, 1, 1, 3] + +Before: [1, 0, 3, 3] +4 3 3 0 +After: [3, 0, 3, 3] + +Before: [2, 3, 1, 1] +9 2 3 3 +After: [2, 3, 1, 2] + +Before: [2, 2, 2, 0] +7 0 2 2 +After: [2, 2, 1, 0] + +Before: [0, 0, 3, 1] +15 3 1 0 +After: [1, 0, 3, 1] + +Before: [0, 2, 2, 1] +14 3 2 0 +After: [1, 2, 2, 1] + +Before: [1, 1, 3, 2] +6 1 3 3 +After: [1, 1, 3, 0] + +Before: [2, 2, 1, 1] +9 2 3 2 +After: [2, 2, 2, 1] + +Before: [1, 0, 0, 1] +15 0 1 3 +After: [1, 0, 0, 1] + +Before: [1, 1, 3, 1] +3 3 3 0 +After: [0, 1, 3, 1] + +Before: [3, 2, 2, 3] +0 1 3 0 +After: [0, 2, 2, 3] + +Before: [3, 2, 3, 3] +12 3 0 2 +After: [3, 2, 1, 3] + +Before: [1, 2, 2, 1] +2 0 2 2 +After: [1, 2, 0, 1] + +Before: [3, 1, 1, 1] +9 2 3 0 +After: [2, 1, 1, 1] + +Before: [1, 2, 1, 2] +3 3 3 1 +After: [1, 0, 1, 2] + +Before: [3, 0, 2, 2] +13 2 2 0 +After: [1, 0, 2, 2] + +Before: [2, 3, 2, 2] +3 3 3 2 +After: [2, 3, 0, 2] + +Before: [1, 0, 2, 3] +2 0 2 1 +After: [1, 0, 2, 3] + +Before: [2, 3, 2, 2] +7 0 2 0 +After: [1, 3, 2, 2] + +Before: [2, 3, 0, 2] +11 0 3 1 +After: [2, 1, 0, 2] + +Before: [1, 1, 2, 0] +4 2 2 1 +After: [1, 2, 2, 0] + +Before: [2, 1, 0, 2] +11 0 3 0 +After: [1, 1, 0, 2] + +Before: [0, 1, 2, 0] +1 0 0 1 +After: [0, 0, 2, 0] + +Before: [2, 1, 1, 0] +5 1 3 1 +After: [2, 1, 1, 0] + +Before: [0, 1, 2, 2] +13 2 2 2 +After: [0, 1, 1, 2] + +Before: [0, 3, 2, 1] +14 3 2 1 +After: [0, 1, 2, 1] + +Before: [1, 1, 1, 0] +5 1 3 3 +After: [1, 1, 1, 1] + +Before: [1, 0, 0, 0] +15 0 1 1 +After: [1, 1, 0, 0] + +Before: [0, 1, 0, 3] +1 0 0 3 +After: [0, 1, 0, 0] + +Before: [2, 1, 2, 0] +5 1 3 1 +After: [2, 1, 2, 0] + +Before: [3, 1, 0, 3] +7 0 3 2 +After: [3, 1, 1, 3] + +Before: [1, 3, 1, 1] +9 2 0 0 +After: [2, 3, 1, 1] + +Before: [3, 1, 1, 0] +5 1 3 3 +After: [3, 1, 1, 1] + +Before: [2, 1, 3, 0] +5 1 3 0 +After: [1, 1, 3, 0] + +Before: [0, 2, 0, 3] +0 1 3 1 +After: [0, 0, 0, 3] + +Before: [2, 3, 2, 2] +11 0 3 2 +After: [2, 3, 1, 2] + +Before: [3, 1, 2, 1] +14 3 2 3 +After: [3, 1, 2, 1] + +Before: [2, 2, 2, 1] +14 3 2 1 +After: [2, 1, 2, 1] + +Before: [1, 3, 2, 0] +2 0 2 0 +After: [0, 3, 2, 0] + +Before: [1, 2, 2, 1] +2 0 2 0 +After: [0, 2, 2, 1] + +Before: [3, 1, 2, 0] +8 1 2 1 +After: [3, 0, 2, 0] + +Before: [0, 2, 0, 3] +13 0 0 1 +After: [0, 1, 0, 3] + +Before: [1, 2, 1, 0] +9 2 0 2 +After: [1, 2, 2, 0] + +Before: [0, 0, 0, 0] +13 0 0 3 +After: [0, 0, 0, 1] + +Before: [0, 3, 2, 0] +1 0 0 1 +After: [0, 0, 2, 0] + +Before: [1, 0, 2, 1] +14 3 2 2 +After: [1, 0, 1, 1] + +Before: [1, 1, 2, 2] +2 0 2 0 +After: [0, 1, 2, 2] + +Before: [0, 1, 0, 1] +10 1 0 3 +After: [0, 1, 0, 1] + +Before: [2, 2, 0, 2] +11 0 3 1 +After: [2, 1, 0, 2] + +Before: [2, 2, 3, 3] +7 2 3 1 +After: [2, 1, 3, 3] + +Before: [0, 1, 3, 0] +10 1 0 3 +After: [0, 1, 3, 1] + +Before: [2, 1, 0, 2] +6 1 3 0 +After: [0, 1, 0, 2] + +Before: [0, 2, 2, 1] +14 3 2 3 +After: [0, 2, 2, 1] + +Before: [3, 2, 2, 1] +14 3 2 1 +After: [3, 1, 2, 1] + +Before: [2, 3, 3, 3] +7 2 3 2 +After: [2, 3, 1, 3] + +Before: [1, 0, 1, 1] +15 2 1 2 +After: [1, 0, 1, 1] + +Before: [2, 1, 2, 2] +7 0 2 0 +After: [1, 1, 2, 2] + +Before: [0, 2, 3, 3] +7 2 3 2 +After: [0, 2, 1, 3] + +Before: [1, 2, 0, 3] +0 1 3 2 +After: [1, 2, 0, 3] + +Before: [1, 0, 2, 0] +15 0 1 0 +After: [1, 0, 2, 0] + +Before: [0, 1, 0, 0] +10 1 0 1 +After: [0, 1, 0, 0] + +Before: [2, 1, 2, 1] +7 0 2 0 +After: [1, 1, 2, 1] + +Before: [2, 1, 2, 1] +14 3 2 1 +After: [2, 1, 2, 1] + +Before: [0, 1, 2, 3] +10 1 0 1 +After: [0, 1, 2, 3] + +Before: [2, 1, 2, 2] +6 1 3 1 +After: [2, 0, 2, 2] + +Before: [1, 1, 3, 2] +3 3 3 1 +After: [1, 0, 3, 2] + +Before: [3, 1, 0, 0] +5 1 3 3 +After: [3, 1, 0, 1] + +Before: [0, 1, 2, 0] +1 0 0 0 +After: [0, 1, 2, 0] + +Before: [1, 0, 2, 1] +2 0 2 3 +After: [1, 0, 2, 0] + +Before: [0, 1, 2, 2] +6 1 3 0 +After: [0, 1, 2, 2] + +Before: [1, 1, 0, 0] +5 1 3 3 +After: [1, 1, 0, 1] + +Before: [0, 3, 2, 0] +4 2 2 0 +After: [2, 3, 2, 0] + +Before: [3, 0, 0, 1] +15 3 1 0 +After: [1, 0, 0, 1] + +Before: [0, 3, 3, 0] +1 0 0 1 +After: [0, 0, 3, 0] + +Before: [0, 2, 3, 3] +1 0 0 1 +After: [0, 0, 3, 3] + +Before: [3, 1, 2, 2] +8 1 2 1 +After: [3, 0, 2, 2] + +Before: [0, 3, 1, 2] +1 0 0 0 +After: [0, 3, 1, 2] + +Before: [2, 0, 2, 2] +11 0 3 0 +After: [1, 0, 2, 2] + +Before: [1, 0, 1, 3] +15 2 1 0 +After: [1, 0, 1, 3] + +Before: [1, 3, 2, 3] +0 2 3 0 +After: [0, 3, 2, 3] + +Before: [1, 2, 1, 3] +13 3 2 2 +After: [1, 2, 0, 3] + +Before: [2, 2, 1, 2] +11 0 3 1 +After: [2, 1, 1, 2] + +Before: [2, 2, 2, 2] +4 2 2 2 +After: [2, 2, 2, 2] + +Before: [3, 0, 2, 1] +14 3 2 3 +After: [3, 0, 2, 1] + +Before: [2, 3, 3, 2] +11 0 3 0 +After: [1, 3, 3, 2] + +Before: [3, 2, 0, 2] +3 3 3 3 +After: [3, 2, 0, 0] + +Before: [1, 1, 3, 1] +12 2 3 0 +After: [0, 1, 3, 1] + +Before: [0, 1, 2, 2] +3 3 3 1 +After: [0, 0, 2, 2] + +Before: [1, 2, 2, 2] +12 2 1 3 +After: [1, 2, 2, 1] + +Before: [1, 0, 1, 1] +9 2 0 0 +After: [2, 0, 1, 1] + +Before: [2, 1, 0, 3] +4 3 3 3 +After: [2, 1, 0, 3] + +Before: [2, 1, 2, 1] +12 2 0 0 +After: [1, 1, 2, 1] + +Before: [0, 1, 2, 2] +10 1 0 2 +After: [0, 1, 1, 2] + +Before: [1, 0, 1, 2] +9 2 0 2 +After: [1, 0, 2, 2] + +Before: [3, 1, 3, 3] +7 0 3 3 +After: [3, 1, 3, 1] + +Before: [0, 1, 3, 3] +10 1 0 2 +After: [0, 1, 1, 3] + +Before: [1, 3, 1, 1] +3 2 3 1 +After: [1, 0, 1, 1] + +Before: [1, 3, 2, 3] +2 0 2 0 +After: [0, 3, 2, 3] + +Before: [1, 3, 1, 1] +9 2 0 1 +After: [1, 2, 1, 1] + +Before: [1, 1, 2, 0] +2 0 2 3 +After: [1, 1, 2, 0] + +Before: [2, 3, 1, 2] +11 0 3 1 +After: [2, 1, 1, 2] + +Before: [0, 0, 1, 0] +1 0 0 0 +After: [0, 0, 1, 0] + +Before: [2, 1, 0, 2] +6 1 3 1 +After: [2, 0, 0, 2] + +Before: [2, 3, 2, 3] +7 0 2 0 +After: [1, 3, 2, 3] + +Before: [0, 3, 2, 3] +0 2 3 0 +After: [0, 3, 2, 3] + +Before: [2, 2, 3, 3] +0 1 3 1 +After: [2, 0, 3, 3] + +Before: [1, 0, 2, 1] +14 3 2 3 +After: [1, 0, 2, 1] + +Before: [3, 1, 2, 3] +0 2 3 1 +After: [3, 0, 2, 3] + +Before: [0, 0, 3, 3] +13 3 3 3 +After: [0, 0, 3, 1] + +Before: [0, 3, 0, 3] +1 0 0 3 +After: [0, 3, 0, 0] + +Before: [0, 1, 3, 2] +6 1 3 3 +After: [0, 1, 3, 0] + +Before: [0, 3, 3, 3] +7 2 3 0 +After: [1, 3, 3, 3] + +Before: [0, 1, 0, 0] +5 1 3 3 +After: [0, 1, 0, 1] + +Before: [1, 3, 2, 1] +2 0 2 1 +After: [1, 0, 2, 1] + +Before: [1, 0, 1, 1] +15 2 1 0 +After: [1, 0, 1, 1] + +Before: [2, 0, 0, 2] +11 0 3 2 +After: [2, 0, 1, 2] + +Before: [3, 1, 3, 2] +6 1 3 2 +After: [3, 1, 0, 2] + +Before: [1, 0, 1, 0] +15 2 1 1 +After: [1, 1, 1, 0] + +Before: [0, 1, 3, 3] +10 1 0 3 +After: [0, 1, 3, 1] + +Before: [2, 1, 3, 0] +5 1 3 1 +After: [2, 1, 3, 0] + +Before: [0, 1, 0, 3] +10 1 0 2 +After: [0, 1, 1, 3] + +Before: [1, 3, 2, 1] +2 0 2 2 +After: [1, 3, 0, 1] + +Before: [2, 1, 3, 2] +6 1 3 3 +After: [2, 1, 3, 0] + +Before: [0, 0, 2, 1] +15 3 1 0 +After: [1, 0, 2, 1] + +Before: [1, 2, 2, 2] +2 0 2 3 +After: [1, 2, 2, 0] + +Before: [3, 1, 2, 0] +5 1 3 3 +After: [3, 1, 2, 1] + +Before: [1, 1, 2, 3] +8 1 2 2 +After: [1, 1, 0, 3] + +Before: [0, 1, 3, 1] +10 1 0 0 +After: [1, 1, 3, 1] + +Before: [0, 0, 0, 2] +1 0 0 3 +After: [0, 0, 0, 0] + +Before: [3, 1, 2, 3] +13 3 3 3 +After: [3, 1, 2, 1] + +Before: [2, 2, 2, 1] +7 0 2 3 +After: [2, 2, 2, 1] + +Before: [1, 2, 2, 1] +14 3 2 3 +After: [1, 2, 2, 1] + +Before: [1, 1, 2, 3] +8 1 2 1 +After: [1, 0, 2, 3] + +Before: [1, 3, 2, 1] +2 0 2 3 +After: [1, 3, 2, 0] + +Before: [2, 2, 2, 3] +13 3 2 2 +After: [2, 2, 0, 3] + +Before: [1, 2, 2, 1] +2 0 2 3 +After: [1, 2, 2, 0] + +Before: [3, 1, 3, 0] +5 1 3 0 +After: [1, 1, 3, 0] + +Before: [2, 3, 1, 2] +11 0 3 2 +After: [2, 3, 1, 2] + +Before: [1, 1, 3, 2] +6 1 3 0 +After: [0, 1, 3, 2] + +Before: [0, 1, 2, 3] +8 1 2 1 +After: [0, 0, 2, 3] + +Before: [1, 1, 2, 2] +8 1 2 2 +After: [1, 1, 0, 2] + +Before: [2, 1, 2, 1] +14 3 2 2 +After: [2, 1, 1, 1] + +Before: [0, 1, 3, 2] +6 1 3 2 +After: [0, 1, 0, 2] + +Before: [2, 0, 1, 3] +0 2 3 1 +After: [2, 0, 1, 3] + +Before: [2, 1, 0, 2] +6 1 3 3 +After: [2, 1, 0, 0] + + + +2 2 3 2 +15 1 0 1 +10 1 0 1 +2 0 1 3 +0 3 2 1 +15 1 1 1 +9 0 1 0 +14 0 2 2 +2 2 3 0 +2 1 2 1 +2 3 0 3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11 0 3 3 +15 3 2 3 +9 3 2 2 +2 1 1 0 +15 1 0 3 +10 3 2 3 +15 1 0 1 +10 1 2 1 +1 0 3 1 +15 1 2 1 +9 2 1 2 +14 2 3 3 +15 1 0 2 +10 2 2 2 +2 2 1 1 +14 0 2 1 +15 1 3 1 +9 1 3 3 +14 3 1 2 +15 2 0 1 +10 1 3 1 +2 2 3 0 +2 0 1 3 +12 0 1 3 +15 3 3 3 +9 2 3 2 +14 2 1 1 +2 3 3 3 +2 2 2 2 +2 1 3 0 +14 0 2 0 +15 0 1 0 +15 0 2 0 +9 0 1 1 +14 1 0 0 diff --git a/src/adventofcode2018/day01.py b/src/adventofcode2018/day01.py new file mode 100644 index 00000000..08e927a7 --- /dev/null +++ b/src/adventofcode2018/day01.py @@ -0,0 +1,29 @@ +from collections import Counter + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day1PartA(FileReaderSolution): + def solve(self, input_data: str) -> int: + parts = input_data.split() + total = 0 + for part in parts: + total += eval(part) # nosec B307 + return total + + +class Day1PartB(FileReaderSolution): + def solve(self, input_data: str) -> int: + frequency_to_reach = 2 + + visited_frequencies: Counter = Counter() + # We start at 0, add one for frequency 0 + visited_frequencies[0] += 1 + parts = input_data.split() + total = 0 + while True: + for part in parts: + total += eval(part) # nosec B307 + visited_frequencies[total] += 1 + if visited_frequencies[total] == frequency_to_reach: + return total diff --git a/src/adventofcode2018/day02.py b/src/adventofcode2018/day02.py new file mode 100644 index 00000000..7d8b93ed --- /dev/null +++ b/src/adventofcode2018/day02.py @@ -0,0 +1,109 @@ +from collections import Counter +from collections.abc import Iterable +from functools import lru_cache +from itertools import combinations + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day2: + @staticmethod + def compute_counts(input_string: str) -> tuple[int, int]: + """ + Compute how many times a letter appears into the input + + Returns two values; count_twice if any letter appers more then once, + count_thrice if any letter appears more then twice. + If there are more occurences, the result will still be 1. + + :param input_string: The string used as input + :return tuple (count_twice, count_thrice) + """ + letter_counter: Counter = Counter() + for letter in input_string: + letter_counter[letter] += 1 + + count_twice = 0 + count_thrice = 0 + for key, count in letter_counter.items(): + if count == 2: + count_twice = 1 + if count == 3: + count_thrice = 1 + return count_twice, count_thrice + + @staticmethod + def compute_factors(input_strings: Iterable): + """ + For a list of input_strings, compute the counts and return the factors for + letters that appear twice of thrice + :param input_strings: + :return: + """ + count_twice = 0 + count_thrice = 0 + for string in input_strings: + result_twice, result_thrice = Day2.compute_counts(string) + count_twice += result_twice + count_thrice += result_thrice + return count_twice, count_thrice + + +class Day2PartA(Day2, FileReaderSolution): + def solve(self, input_data: str) -> int: + parts = input_data.split() + count_twice, count_thrice = self.compute_factors(parts) + checksum = count_twice * count_thrice + return checksum + + +class Day2PartB(Day2, FileReaderSolution): + @staticmethod + @lru_cache(maxsize=None) + def compute_distance(word1: str, word2: str) -> int: + """Compute the distance between two words on positional base""" + difference = 0 + for i in range(0, len(word1)): + if word1[i] != word2[i]: + difference += 1 + return difference + + @staticmethod + def compute_shortest_distance(input_set: Iterable) -> tuple[tuple[str, str], int]: + """ + From a set, compute the words with the lowest distance and return + those words. + """ + word_set: tuple[str, str] = ("", "") + min_distance = 1024 + for word1, word2 in combinations(input_set, 2): + # Compute distance: + distance = Day2PartB.compute_distance(word1, word2) + + if distance < min_distance: + # Distance is lower then the current distance; setting + min_distance = distance + word_set = (word1, word2) + + return word_set, min_distance + + @staticmethod + def compute_common_letters(word1: str, word2: str) -> str: + """Return only the letters that are common at the same place""" + letters: list[str] = [] + for i in range(0, len(word1)): + if word1[i] == word2[i]: + letters.append(word1[i]) + return "".join(letters) + + def solve(self, input_data: str) -> str: + parts = input_data.split() + # Get the string with the shorest distance + shortest = self.compute_shortest_distance(parts) + + # Get common letters + common_letters: str = self.compute_common_letters( + shortest[0][0], shortest[0][1] + ) + + return common_letters diff --git a/src/adventofcode2018/day03.py b/src/adventofcode2018/day03.py new file mode 100644 index 00000000..ee973608 --- /dev/null +++ b/src/adventofcode2018/day03.py @@ -0,0 +1,135 @@ +import re +from collections import namedtuple + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day3: + square_size = 1_000 + Claim = namedtuple("Claim", "id, left, top, width, height") + + def split_claim_into_sections(self, input_data: str) -> "Claim": + """ + Split the input data `#1 @ 1,3: 4x4` into the parts: + - ID 1 + - 1 from left edge + - 3 from top egde + - 4 width + - 4 heigh + + return named tuple with the fields. + + :param input_data: + :return: + """ + pattern = ( + r"^#(?P\d*) @ (?P\d*),(?P\d*): " + r"(?P\d*)x(?P\d*)" + ) + + result = re.match(pattern, input_data) + if result: + claim = self.Claim( + id=int(result["id"]), + left=int(result["left"]), + top=int(result["top"]), + width=int(result["width"]), + height=int(result["height"]), + ) + return claim + raise ValueError(f"String {input_data} could not be processed as a valid Claim") + + def make_map(self): + self.map: dict[int, dict] = dict() + for i in range(0, self.square_size): + self.map[i] = dict() + for j in range(0, self.square_size): + self.map[i][j] = [] + + def _parse_claim(self, claim: Claim) -> bool: + x = claim.left + y = claim.top + for i in range(x, x + claim.width): + for j in range(y, y + claim.height): + self.map[j][i].append(claim.id) + return True + + def parse_claims(self, claims: list[Claim]) -> bool: + for claim in claims: + self._parse_claim(claim) + return True + + def print_map(self): + for i in range(0, self.square_size): + for j in range(0, self.square_size): + claims_on_position = len(self.map[i][j]) + if claims_on_position == 0: + print(".", end="") + elif claims_on_position == 1: + print(self.map[i][j][0], end="") + else: + print("x", end="") + print() + + def compute_multiple_claims(self) -> int: + """Compute how many claims are overlapping""" + counter = 0 + for i in range(0, self.square_size): + for j in range(0, self.square_size): + if len(self.map[i][j]) > 1: + counter += 1 + return counter + + def compute_unclaimed_id(self) -> int: + """ + Compute the ID of the Claim that is not overlapping with other claims + :return: False if there is no overlapping claim + """ + valid_claims: list = [] + invalid_claims: list = [] + for i in range(0, self.square_size): + for j in range(0, self.square_size): + claims_on_position = len(self.map[i][j]) + if claims_on_position == 1: + claim_id = self.map[i][j][0] + if claim_id not in invalid_claims and claim_id not in valid_claims: + # We have a valid claim that has no overlapping claims + valid_claims.append(claim_id) + elif claims_on_position > 1: + # We have two claims that are overlapping each other. + # Adding them to the invalid_claims, removing them from the valid + for claim in self.map[i][j]: + if claim not in invalid_claims: + invalid_claims.append(claim) + if claim in valid_claims: + valid_claims.remove(claim) + return valid_claims[0] + + def build_map(self, input_data): + """ + Use the Claims input_data to create a map of claims + + :param input_data: + :return: Nothing + """ + lines = input_data.split("\n") + + claims = [self.split_claim_into_sections(line) for line in lines if line] + self.make_map() + self.parse_claims(claims) + + +class Day3PartA(Day3, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.build_map(input_data) + # self.print_map() + res = self.compute_multiple_claims() + return res + + +class Day3PartB(Day3, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.build_map(input_data) + # self.print_map() + res = self.compute_unclaimed_id() + return res diff --git a/src/adventofcode2018/day04.py b/src/adventofcode2018/day04.py new file mode 100644 index 00000000..811bfa11 --- /dev/null +++ b/src/adventofcode2018/day04.py @@ -0,0 +1,138 @@ +import re +from collections import Counter + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day4: + @staticmethod + def split_line_into_sections(input_data: str) -> dict: + """Split the input into sections we can use: + [1518-11-01 00:00] Guard #10 begins shift + year-month-day hour:minute + """ + date_pattern = ( + r"^\[\d*-(?P\d*)-(?P\d*) (?P\d*):(?P\d*)]" + ) + guard_pattern = r"Guard #(?P\d*) begins shift" + + time_result = re.match(date_pattern, input_data) + guard_result = re.search(guard_pattern, input_data) + + if guard_result: + guard = int(guard_result["guard"]) + mode = "guard" + else: + guard = False + if "asleep" in input_data: + mode = "asleep" + elif "wakes" in input_data: + mode = "wakes" + else: + raise ValueError(f"Error during in {input_data}, no valid state") + + result = { + "month": int(time_result["month"]), + "day": int(time_result["day"]), + "hour": int(time_result["hour"]), + "minute": int(time_result["minute"]), + "mode": mode, + "guard": guard, + } + + return result + + def parse_strings(self, input_data): + """ + Split the input data into objects we can use. Objects are sorted on + date/time. + """ + lines = input_data.split("\n") + log_entries = [self.split_line_into_sections(line) for line in lines if line] + sorted_log_entries = sorted( + log_entries, key=lambda x: (x["month"], x["day"], x["hour"], x["minute"]) + ) + return sorted_log_entries + + def parse_logs(self, log_entries): + guard_info = {} + current_guard = 0 + sleep = 0 + for entry in log_entries: + if entry["mode"] == "guard": + # We have a new guard. Set ID and append entry into info dict + current_guard = entry["guard"] + if current_guard not in guard_info: + guard_info[current_guard] = [] + elif entry["mode"] == "asleep": + sleep = entry["minute"] + else: + sleep_time = list(range(sleep, entry["minute"] + 1)) + guard_info[current_guard].append(sleep_time) + return guard_info + + @staticmethod + def determine_most_asleep_minute(guard_info: list) -> int: + """Determine which minute this guard sleeps the most""" + minutes_slept = Counter() + for shift in guard_info: + for minute in shift: + minutes_slept[minute] += 1 + if minutes_slept.most_common(1): + return minutes_slept.most_common(1)[0][0] + else: + return False + + +class Day4PartA(Day4, FileReaderSolution): + @staticmethod + def determine_mostasleep(guard_info): + most_slept_guard = False + total_minutes_slept = False + for guard_id, minutes_slept in guard_info.items(): + # Get the minutes a guard slept. Subtract one, since we add all the minutes + # but the minut the guard falls asleep doesn't found. + this_guard_slept = sum([len(x) - 1 for x in minutes_slept]) + if this_guard_slept > total_minutes_slept: + total_minutes_slept = this_guard_slept + most_slept_guard = guard_id + return most_slept_guard, total_minutes_slept + + def solve(self, input_data: str) -> int: + log_entries = self.parse_strings(input_data) + guard_info = self.parse_logs(log_entries) + guard_id, minutes_slept = self.determine_mostasleep(guard_info) + most_slept_minute = self.determine_most_asleep_minute(guard_info[guard_id]) + result = guard_id * most_slept_minute + return result + + +class Day4PartB(Day4, FileReaderSolution): + @staticmethod + def determine_most_asleep_same_minute(guard_info: dict) -> (int, int): + """ + Determine which guard is the most asleep at the same minute + """ + guard_most_slept_same_minute = False + times_that_guard_slept = False + minute_that_guard_slept = False + for guard_id, minutes_slept in guard_info.items(): + minute = Day4.determine_most_asleep_minute(minutes_slept) + # Count how many minutes this guard slept at the specific minute + total_minutes_slept = 0 + for day in minutes_slept: + if minute in day: + total_minutes_slept += 1 + if total_minutes_slept > times_that_guard_slept: + guard_most_slept_same_minute = guard_id + times_that_guard_slept = total_minutes_slept + minute_that_guard_slept = minute + + return guard_most_slept_same_minute, minute_that_guard_slept + + def solve(self, input_data: str) -> int: + log_entries = self.parse_strings(input_data) + guard_info = self.parse_logs(log_entries) + guard, minute = self.determine_most_asleep_same_minute(guard_info) + result = guard * minute + return result diff --git a/src/adventofcode2018/day05.py b/src/adventofcode2018/day05.py new file mode 100644 index 00000000..db6fb4d6 --- /dev/null +++ b/src/adventofcode2018/day05.py @@ -0,0 +1,66 @@ +import re +import sys +from collections import Counter +from string import ascii_lowercase + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day5: + @staticmethod + def recude_input(input_string: str) -> str: + """ + Reduce input, react on the same letters with different capitalisation. + For example: + "aA" -> "" + "abBA" -> "" + "abAB" -> "abAB" + + :param input_string: + :return: + """ + # Because this is an recursive function, we run into the a recursion error. + # We increase the recursion limit to make our solution work. + sys.setrecursionlimit(5000) + for position in range(0, len(input_string) - 1): + letter_1 = input_string[position] + letter_2 = input_string[position + 1] + if letter_1.lower() == letter_2.lower() and letter_1 != letter_2: + # lower(A) == lower(a) && A != a + # Remove duplicate letters + replaced = input_string.replace(f"{letter_1}{letter_2}", "") + return Day5.recude_input(replaced) + return input_string + + +class Day5PartA(Day5, FileReaderSolution): + def solve(self, input_data: str) -> int: + reduced_string = Day5.recude_input(input_data.strip()) + return len(reduced_string) + + +class Day5PartB(Day5, FileReaderSolution): + @staticmethod + def remove_and_react(input_string: str, remove_type: str) -> str: + """ + Remove a polymer of a specific type, and react the resulting string + + :param input_string: The input string that is going to be reacted on + :param remove_type: The specific polymer that is going to be removed, + not looking at polarity + :return: + """ + replace_regex = re.compile(remove_type, re.IGNORECASE) + replaced_string = replace_regex.sub("", input_string) + reduced_string = Day5.recude_input(replaced_string) + return reduced_string + + def solve(self, input_data: str) -> int: + # Count the numbers + number_counts = Counter() + for letter in ascii_lowercase: + reduced_string = Day5PartB.remove_and_react(input_data.strip(), letter) + string_length = len(reduced_string) + number_counts[letter] = string_length + lowest = number_counts.most_common()[-1] + return lowest[1] diff --git a/src/adventofcode2018/day06.py b/src/adventofcode2018/day06.py new file mode 100644 index 00000000..6f408bbb --- /dev/null +++ b/src/adventofcode2018/day06.py @@ -0,0 +1,178 @@ +from collections import Counter, namedtuple + +from adventofcode.utils.abstract import FileReaderSolution + +Point = namedtuple("Point", "x y id") + + +class Day06: + grid = None + points = None + max_x = 0 + max_y = 0 + + def __init__(self): + self.points = {} + + def yield_over_grid(self, extra=0): + for y in range(0, self.max_y + extra): + for x in range(0, self.max_x + extra): + yield x, y + + def generate_points(self, input_string): + """Generate a grid based on the input string.""" + id = 1 + for line in input_string: + x, y = line.split(",") + x = int(x) + y = int(y) + new_point = Point(x=x, y=y, id=id) + self.points[id] = new_point + id += 1 + + self.max_x = max([p.x for p in self.points.values()]) + self.max_y = max([p.y for p in self.points.values()]) + + def generate_grid(self): + """ + Generate a grid based on the points in `self.grid` + """ + self.grid = dict() + for x in range(0, self.max_x + 5): + self.grid[x] = dict() + for y in range(0, self.max_y + 5): + self.grid[x][y] = False + + for point in self.points.values(): + self.grid[point.x][point.y] = point + + def print_grid(self): + """Print the grid to the standard output.""" + print() + for y in range(0, self.max_y + 5): + for x in range(0, self.max_x + 5): + if self.grid[x][y]: + char = self.grid[x][y].id + 64 + print(chr(char), end="") + else: + print(".", end="") + print() + + def generate_distance(self): + """ + For every point in the grid, locate the closest point using + Manhattan distance. + """ + for x, y in self.yield_over_grid(extra=5): + if self.grid[x][y] is not False: + # Skip grids that are already filled in + continue + # Loop over every point in the grid, and compute the closest point + test_point = Point(x=x, y=y, id=0) + closest_point = self.compute_closest_point(test_point) + if closest_point: + self.grid[x][y] = closest_point + + def compute_closest_point(self, point: Point) -> [Point, bool]: + """ + For Point `point`, return the closest point. If multiple points + have the same closest distance, we return False + """ + # @TODO Refactor this to create a list of distances, sort this list, + # Check if there the lowest and lowest+1 doesn't have the same distance + # And return the distance if there is no tie, or return False + min_distance = self.max_x + self.max_y + min_point = False + for test_point in self.points.values(): + distance = self.compute_distance( + point.x, point.y, test_point.x, test_point.y + ) + if min_point and distance == min_distance: + # We already multiple claims for this distance. + # If we don't get a distance that is lower that the current one, we set + # the closest point to None. If we then find a closer point we return + # that point, or we return false. + min_point = False + + if distance < min_distance: + min_distance = distance + min_point = test_point + + return min_point + + def compute_biggest_area(self) -> int: + """ + Compute the number of points of the biggest area + + Loop over the grid, and add points to the Point Counter. + If a point connects to the edge of out grid, it's infinite and we ignore this + point. + :return: + """ + # Loop over the grid, and do stuff; + point_cnt = Counter() + for id, value in self.points.items(): + point_cnt[id] = 0 + + for x, y in self.yield_over_grid(extra=1): + point = self.grid[x][y] + if point: + if (x == 0) or (y == 0) or (x == self.max_x) or (y == self.max_y): + # We are on the edge, exclude this point; + point_cnt[point.id] = False + elif point_cnt[point.id] is not False: + point_cnt[point.id] += 1 + + # Return the biggest area + return point_cnt.most_common(1)[0][1] + + @staticmethod + def compute_distance(a: int, b: int, x: int, y: int) -> int: + """ + Compute the Manhattan distance between points (a, b) and (x, y) + """ + res = abs(a - x) + abs(b - y) + return res + + +class Day06PartA(Day06, FileReaderSolution): + def solve(self, input_data: str) -> int: + input_lines = input_data.splitlines() + self.generate_points(input_lines) + self.generate_grid() + self.generate_distance() + result = self.compute_biggest_area() + return result + + +class Day06PartB(Day06, FileReaderSolution): + def get_score_for_location(self, x: int, y: int, max_score: int = 32) -> int: + """ + Compute the score for location at (x, y), and return then the score goes over + max_score. + """ + total_score = 0 + for point in self.points.values(): + score = self.compute_distance(x, y, point.x, point.y) + total_score += score + if total_score >= max_score: + return False + return total_score + + def compute_area(self, max_score: int = 32) -> int: + """Compute how many points points have the maximum manhattan distance of + `max_score` to all the other points + """ + points = 0 + for x, y in self.yield_over_grid(extra=5): + score = self.get_score_for_location(x, y, max_score) + if score: + points += 1 + return points + + def solve(self, input_data: str, max_score: int = 10_000) -> int: + input_lines = input_data.splitlines() + self.generate_points(input_lines) + self.generate_grid() + result = self.compute_area(max_score) + return result diff --git a/src/adventofcode2018/day07.py b/src/adventofcode2018/day07.py new file mode 100644 index 00000000..cdbc52ca --- /dev/null +++ b/src/adventofcode2018/day07.py @@ -0,0 +1,188 @@ +import re + +from adventofcode.utils.abstract import FileReaderSolution + + +class TimedNode: + name = None + seconds_worked_on = 0 + seconds_to_work = 0 + + def __init__(self, name, extra_seconds=0): + self.name = name + # Compute home many seconds we have left + self.seconds_to_work = ord(name) - ord("A") + extra_seconds + 1 + + def is_complete(self): + return self.seconds_to_work <= self.seconds_worked_on + + def work(self): + if self.time_left() > 0: + self.seconds_worked_on += 1 + + def time_left(self) -> int: + return self.seconds_to_work - self.seconds_worked_on + + def __repr__(self): + return f"{self.name} ({self.seconds_to_work} - {self.seconds_worked_on})" + + +class Day07: + def __init__(self): + self.node_tree = dict() + self.walked_nodes = list() + self.nodes_worked_on = list() + + @staticmethod + def parse_string(input_string: str) -> (str, str): + """ + Parse a string and return the in and out nodes. + Example input: + "Step C must be finished before step A can begin.", + + Returns: + (C, A) + + """ + regex = ( + "Step (?P[A-Z]) must be finished before step " + "(?P[A-Z]) can begin." + ) + matches = re.match(regex, input_string) + return matches["before"], matches["after"] + + @staticmethod + def parse_strings(input_strings) -> [tuple]: + """Parse strings into tuples""" + return [Day07.parse_string(line) for line in input_strings] + + def build_tree(self, nodes: [tuple]): + """Build a tree of the nodes in `nodes`. + Nodes is a tuple in the pair (Before, After) + """ + for node in nodes: + if node[0] in self.node_tree: + self.node_tree[node[0]].append(node[1]) + else: + self.node_tree[node[0]] = [node[1]] + # Also add the children as Nodes. + if node[1] not in self.node_tree: + self.node_tree[node[1]] = list() + + def get_parent(self, child: str) -> [str]: + """Return the parent(s) of this child as a list""" + parents = [] + for node, children in self.node_tree.items(): + if child in children: + parents.append(node) + + return sorted(parents) + + def validate_node_ready(self, search_node: str): + """Validate if we can visit this node. This is true when the parent of + this node is in visited_node + """ + for node, children in self.node_tree.items(): + if search_node in children: + # We have a parent! + if node not in self.walked_nodes: + # Our parent hasn't been visited yet. + return False + return True + + def walk_tree(self, root_node): + """Walk the tree, and see the order""" + # First we have to add the starting node to our result, and visited list + self.walked_nodes = list() + self.walked_nodes.append(root_node) + while len(self.walked_nodes) < len(self.node_tree): + # For a node to be ready, the parent needs to be in visited_nodes + next_node = self.get_next_node() + self.walked_nodes.append(next_node) + + return "".join(self.walked_nodes) + + def get_next_node(self): + valid_nodes = list() + for node in self.node_tree.keys(): + if ( + node not in self.walked_nodes + and node not in self.nodes_worked_on + and self.validate_node_ready(node) + ): + valid_nodes.append(node) + if valid_nodes: + valid_nodes = sorted(valid_nodes) + next_node = valid_nodes[0] + return next_node + else: + return False + + def get_root(self) -> str: + """Get the root node and return this as String. + + The root is defined as a key without parents. + If there are multiple parents, sort them. + """ + nodes_with_parents = list(self.node_tree.keys()) + for node, children in self.node_tree.items(): + for child in children: + if child in nodes_with_parents: + nodes_with_parents.remove(child) + return sorted(nodes_with_parents)[0] + + def walk_tree_with_helpers(self, extra_time: int = 60, num_workers: int = 5) -> int: + """ + Walk the tree, but we now have helpers! + """ + current_second = 0 + work_nodes = { + name: TimedNode(name, extra_time) for name in self.node_tree.keys() + } + # We start at second 0. + # The first worker will start on the root_node + workers = [False for _ in range(num_workers)] + + while len(self.walked_nodes) < len(self.node_tree): + self.nodes_worked_on = [x.name for x in workers if x] + for idx, worker in enumerate(workers): + # Loop over the workers, and let them work! + if worker: + worker.work() + if worker.is_complete(): + self.walked_nodes.append(worker.name) + workers[idx] = False + # All our workers have worked, or not. Let's see if there are any free + # workers. + for idx, worker in enumerate(workers): + # Check if worker is free + if not worker: + # Check if we have a node we can assign to this worker: + free_node = self.get_next_node() + if free_node: + workers[idx] = work_nodes[free_node] + self.nodes_worked_on = [x.name for x in workers if x] + + current_second += 1 + return current_second - 1 + + +class Day07PartA(Day07, FileReaderSolution): + def solve(self, input_data: str) -> str: + input_lines = input_data.strip().split("\n") + nodes = self.parse_strings(input_lines) + self.build_tree(nodes) + root_node = self.get_root() + result = self.walk_tree(root_node) + return result + + +class Day07PartB(Day07, FileReaderSolution): + def solve(self, input_data: str, extra_time: int = 60, num_workers: int = 5) -> int: + input_lines = input_data.strip().split("\n") + nodes = self.parse_strings(input_lines) + self.build_tree(nodes) + result = self.walk_tree_with_helpers( + extra_time=extra_time, num_workers=num_workers + ) + return result diff --git a/src/adventofcode2018/day08.py b/src/adventofcode2018/day08.py new file mode 100644 index 00000000..6b4bb364 --- /dev/null +++ b/src/adventofcode2018/day08.py @@ -0,0 +1,83 @@ +from adventofcode.utils.abstract import FileReaderSolution + + +class Node: + metadata: list = None + children: list = None + + def __init__(self, metadata=False): + self.children = [] + if not metadata: + self.metadata = list() + else: + self.metadata = metadata + + def add_child(self, child: "Node"): + self.children.append(child) + + def value(self): + """Compute the value of this node, and it's children""" + if len(self.children) == 0: + return sum(self.metadata) + # We have to go for the indexing method: + count = 0 + for meta_entry in self.metadata: + try: + count += self.children[meta_entry - 1].value() + except IndexError: + pass + return count + + +class Day08: + def __init__(self): + self.nodes = list() + + def parse_data(self, input_data: str) -> [int]: + """Parse a string of numbers seperated by spaces, and return a list of ints""" + return [int(numb) for numb in input_data.split(" ")] + + def create_nodes( + self, numbers: [int], read_position=0, parent_node: Node = False + ) -> int: + qty_child_nodes = numbers[read_position] + read_position += 1 + qty_meta_data = numbers[read_position] + read_position += 1 + + new_node = Node() + if parent_node: + parent_node.add_child(new_node) + # Go look at child nodes. + for _ in range(qty_child_nodes): + read_position = self.create_nodes(numbers, read_position, new_node) + + metadata = numbers[read_position : read_position + qty_meta_data] + new_node.metadata = metadata + self.nodes.append(new_node) + + new_position = read_position + qty_meta_data + return new_position + + def compute_sum_metadata(self) -> int: + """Create the sum of all the nodes""" + checksum = [node.metadata for node in self.nodes] + res = sum(list(map(sum, checksum))) + return res + + +class Day08PartA(Day08, FileReaderSolution): + def solve(self, input_data: str) -> int: + numbers = self.parse_data(input_data) + self.create_nodes(numbers) + result = self.compute_sum_metadata() + return result + + +class Day08PartB(Day08, FileReaderSolution): + def solve(self, input_data: str) -> int: + numbers = self.parse_data(input_data) + self.create_nodes(numbers) + root_node = self.nodes[-1] + res = root_node.value() + return res diff --git a/src/adventofcode2018/day09.py b/src/adventofcode2018/day09.py new file mode 100644 index 00000000..b0c8715d --- /dev/null +++ b/src/adventofcode2018/day09.py @@ -0,0 +1,75 @@ +from collections import Counter, deque + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day09: + players = None + + def __init__(self): + self.players = Counter() + self.grid = deque() + + def play_game(self, players, last_marble): + """Compute the result from the number of `players` and the worth in points + of the `last_marble` + + :param players: The number of players + :param last_marble: The last marble is worth so many points + """ + current_player = 0 + + for current_marble in range(0, last_marble + 1): + current_player += 1 + if current_player > players: + current_player = 1 + + if current_marble > 1 and (current_marble % 23 == 0): + # Current marble is a multiple of 23! + # The current player gets the current marble value added to their score + self.players[current_player] += current_marble + # the marble 7 marbles counter-clockwise from the current marble is + # removed from the circle and also added to the current player's score + self.grid.rotate(7) + removed_marble = self.grid.popleft() + self.players[current_player] += removed_marble + + else: + # Rotate the grid twice + self.grid.rotate(-2) + self.grid.appendleft(current_marble) + + def compute_result(self, players: int, last_marble: int) -> int: + """ + Compute the result from the number of `players` and the worth in points + of the `last_marble` + + :param players: The number of players + :param last_marble: The last marble is worth so many points + :returns the highest score + """ + self.play_game(players, last_marble) + return self.compute_score() + + def compute_score(self) -> int: + """Compute the score for a player""" + best_player = self.players.most_common(1) + return best_player[0][1] + + +class Day09PartA(Day09, FileReaderSolution): + def solve(self, input_data: str) -> int: + input_data = input_data.split() + players = int(input_data[0]) + marble = int(input_data[6]) + score = self.compute_result(players=players, last_marble=marble) + return score + + +class Day09PartB(Day09, FileReaderSolution): + def solve(self, input_data: str) -> int: + input_data = input_data.split() + players = int(input_data[0]) + marble = int(input_data[6]) * 100 + score = self.compute_result(players=players, last_marble=marble) + return score diff --git a/src/adventofcode2018/day10.py b/src/adventofcode2018/day10.py new file mode 100644 index 00000000..c32132f2 --- /dev/null +++ b/src/adventofcode2018/day10.py @@ -0,0 +1,124 @@ +import re +from itertools import count + +import matplotlib.pyplot as plt + +from adventofcode.utils.abstract import FileReaderSolution + + +class Point: + def __init__(self, x, y, vel_x, vel_y): + self.x = x + self.y = y + self.vel_x = vel_x + self.vel_y = vel_y + + def compute_step(self, seconds=1): + """ + Computer the position of `point` after `seconds` seconds. + """ + self.x += self.vel_x * seconds + self.y += self.vel_y * seconds + + def __eq__(self, other: "Point") -> bool: + return ( + self.x == other.x + and self.y == other.y + and self.vel_x == other.vel_x + and self.vel_y == other.vel_y + ) + + def __repr__(self): + return f"position=<{self.x}, {self.y}> velocity=<{self.vel_x}, {self.vel_y}>" + + +class Day10: + def __init__(self): + self.points = list() + self.grid = dict() + + @staticmethod + def parse_string(input_string: str): + """Parse string into x, y, vel_x, vel_y + + position=< 2, -4> velocity=< 2, 2> + """ + str_match = " *(-?[0-9]*)" + points_match = f"<{str_match},{str_match}>" + regex = f"position={points_match} velocity={points_match}" + matches = re.match(regex, input_string) + x = int(matches[1]) + y = int(matches[2]) + vel_x = int(matches[3]) + vel_y = int(matches[4]) + + point = Point(x, y, vel_x, vel_y) + return point + + def parse_list_into_points(self, list_of_points: list): + for line in list_of_points: + if line: + point = self.parse_string(line) + self.points.append(point) + + def loop_grid(self, numbers: int = 1): + for point in self.points: + point.compute_step(numbers) + + def print_grid(self): + x_points = [point.x for point in self.points] + y_points = [point.y for point in self.points] + min_x = min(x_points) + min_y = min(y_points) + + for point in self.points: + point_x = point.x + abs(min_x) + point_y = (point.y + abs(min_y)) * -1 + + plt.scatter(point_x, point_y, c="black") + plt.ylabel("some numbers") + plt.show() + + def compute_smallest_point(self): + """Compute the smallest_length width of the grid, in which generation""" + + smallest_length = max([point.x for point in self.points]) + for x in count(1): + self.loop_grid() + computed_lengh = max([point.x for point in self.points]) + + if computed_lengh < smallest_length: + # This is the smalest iteration, for now? + smallest_length = computed_lengh + if computed_lengh > smallest_length: + # This one is bigger than the previous one + return x - 1 + + +class Day10PartA(Day10, FileReaderSolution): + def solve(self, input_data: str, show_image=False) -> int: + input_lines = input_data.split("\n") + self.parse_list_into_points(input_lines) + + # Then the display is the smalest, do we have an image? + smallest_run = self.compute_smallest_point() + + # Reset grid + self.grid = [] + self.points = [] + self.parse_list_into_points(input_lines) + + self.loop_grid(smallest_run) + # if show_image: + # self.print_grid() + return smallest_run + + +class Day10PartB(Day10, FileReaderSolution): + def solve(self, input_data: str) -> int: + input_lines = input_data.split("\n") + self.parse_list_into_points(input_lines) + + # Then the display is the smalest, do we have an image? + smallest_run = self.compute_smallest_point() + return smallest_run diff --git a/src/adventofcode2018/day11.py b/src/adventofcode2018/day11.py new file mode 100644 index 00000000..88dc2e57 --- /dev/null +++ b/src/adventofcode2018/day11.py @@ -0,0 +1,142 @@ +from adventofcode.utils.abstract import FileReaderSolution + + +class Day11: + def __init__(self, size: int = 300): + self.grid = [] + self.size = size + + @staticmethod + def computer_power_level(x: int, y: int, serial: int) -> int: + """ + Compute the powerlevel of this cell at position `x, y` with serial `serial` + """ + rack_id = x + 10 + powerlevel = rack_id * y + powerlevel += serial + powerlevel *= rack_id + powerlevel_str = f"{powerlevel:06d}" + + hunderdth = int(str(powerlevel_str)[-3]) + hunderdth -= 5 + return hunderdth + + def generate_grid(self, serial): + self.grid = [ + [self.computer_power_level(x, y, serial) for y in range(0, self.size + 1)] + for x in range(0, self.size + 1) + ] + + def compute_summed_area(self): + for y in range(0, self.size + 1): + for x in range(0, self.size + 1): + # i(x,y) + I(x,y-1) + I(x-1,y) - I(x-1, y-1) + + if x > 0 and y > 0: + value = ( + self.grid[x][y] + + self.grid[x][y - 1] + + self.grid[x - 1][y] + - self.grid[x - 1][y - 1] + ) + elif x > 0: + value = self.grid[x][y] + self.grid[x - 1][y] + elif y > 0: + value = self.grid[x][y] + self.grid[x][y - 1] + else: + value = self.grid[x][y] + + self.grid[x][y] = value + + def sum_area(self, tl_x: int, tl_y: int, rb_x: int, rb_y: int) -> int: + """ + Compute the sum of an area + with the points in a square. + tl = top left, rb is bottom right + tl_x,tl_y + + rb_x,rb_y + """ + # result is now sum of elements + # between (0, 0) and (rb_x, rb_y) + if max([tl_x, tl_y, rb_x, rb_y]) > self.size: + return -1 + res = self.grid[rb_x][rb_y] + + # Remove elements between (0, 0)and (tl_x-1, rb_y) + if tl_x > 0: + res = res - self.grid[tl_x - 1][rb_y] + + # Remove elements between (0, 0) and (rb_x, tl_y-1) + if tl_y > 0: + res = res - self.grid[rb_x][tl_y - 1] + + # Add self.grid[tl_x-1][tl_y-1] as elements + # between (0, 0) and (tl_x-1, tl_y-1) are subtracted twice + if tl_x > 0 and tl_y > 0: + res = res + self.grid[tl_x - 1][tl_y - 1] + return res + + def compute_from(self, x: int, y: int, size: int = 3) -> int: + """Compute an 3x3 area, with x, y as top-left""" + tl_x = x + tl_y = y + rb_x = x + (size - 1) + rb_y = y + (size - 1) + res = self.sum_area(tl_x, tl_y, rb_x, rb_y) + return res + + def print_partial_grid(self, top_x, top_y): + print() + for y in range(top_y - 1, top_y + 4): + for x in range(top_x - 1, top_x + 4): + value = f"{self.grid[x][y]:3d} " + print(value, end="") + print() + + def find_best_grid(self, grid_size: int = 3): + most_power = float("-inf") + grid_with_power = None + for y in range(1, self.size - 1): + for x in range(1, self.size - 1): + compute_power = self.compute_from(x, y, grid_size) + if compute_power > most_power: + grid_with_power = (x, y) + most_power = compute_power + return grid_with_power, most_power + + def find_best_grid_size(self): + most_power = float("-inf") + best_grid = None + best_grid_size = None + # grid_size_to_test = self.size - 1 + grid_size_to_test = int(self.size / 4) + for size in range(1, grid_size_to_test): + grid, power = self.find_best_grid(size) + if power > most_power: + most_power = power + best_grid = grid + best_grid_size = size + return { + "best_grid": best_grid, + "most_power": most_power, + "best_grid_size": best_grid_size, + } + + +class Day11PartA(Day11, FileReaderSolution): + def solve(self, input_data: str) -> str: + serial = int(input_data) + self.generate_grid(serial) + self.compute_summed_area() + res, power = self.find_best_grid() + return str(res) + + +class Day11PartB(Day11, FileReaderSolution): + def solve(self, input_data: str) -> str: + serial = int(input_data) + self.generate_grid(serial) + self.compute_summed_area() + res = self.find_best_grid_size() + return f"{res['best_grid'][0]}, {res['best_grid'][1]}, {res['best_grid_size']}" diff --git a/src/adventofcode2018/day12.py b/src/adventofcode2018/day12.py new file mode 100644 index 00000000..e16775a8 --- /dev/null +++ b/src/adventofcode2018/day12.py @@ -0,0 +1,115 @@ +import itertools + +from adventofcode.utils.abstract import FileReaderSolution + +""" +Game of live. Do we model the plants, or do we model the list? + +If we model the plants, we can just do a for loop over the plants, but we need an +efficient way to get the neightbours. + +If we model the 'table', we can loop over the table, pick out the plants and we have +the neight plants surounding them. + +Table is it. +""" + + +class Garden: + PLANT = "#" + EMPTY = "." + + def __init__(self, spots: list = None): + # We use the offset to do negative indexing + self.offset = 5 + + self.table = ["."] * self.offset + spots + ["."] * self.offset + self.notes = dict() + self.generation = 0 + + def split_notes(self, notes: list = None): + """Parse the notes in `notes` and store them + + :param notes: The notes we found with information + """ + for note in notes: + parts = note.split(" => ") + if len(parts) == 2 and parts[1].strip() == "#": + self.notes[parts[0].strip()] = True + + # Fill the empty spots in with False + options = list(itertools.product("#.", repeat=5)) + for option in options: + option_string = "".join(option) + if option_string not in self.notes: + self.notes[option_string] = False + + def __repr__(self): + return self.EMPTY * 5 + "".join(self.table) + self.EMPTY * 5 + + def generate(self, num_generations=1): + """Generate a `num_generations` new generations of plants""" + + # Loop over all the spots, but we need to get the ones to the left as well. + # + # Generate a new empty table, with space in the front and back + for _ in range(num_generations): + self.generation += 1 + next_gen = ["."] * (10 + len(self.table)) + for center_point in range(2, len(self.table) - 2): + left = center_point - 2 + right = center_point + 3 + plants = self.table[left:right] + plant_string = "".join(plants) + do_we_live = self.notes[plant_string] + if do_we_live: + next_gen[center_point] = self.PLANT + else: + next_gen[center_point] = self.EMPTY + last_plant = "".join(next_gen).rindex(self.PLANT) + self.table = next_gen[: last_plant + 5] + + def count_plants(self) -> int: + """Count the numbers of the spots containing the plants""" + return sum( + [i - self.offset for i, x in enumerate(self.table) if x == self.PLANT] + ) + + +class Day12: + pass + + +class Day12PartA(Day12, FileReaderSolution): + def solve(self, input_data: str) -> int: + lines = input_data.split("\n") + initial_state = list(lines[0].split()[2]) + garden = Garden(initial_state) + garden.split_notes(lines[1:]) + garden.generate(20) + return garden.count_plants() + + +class Day12PartB(Day12, FileReaderSolution): + def solve(self, input_data: str) -> int: + lines = input_data.split("\n") + initial_state = list(lines[0].split()[2]) + garden = Garden(initial_state) + garden.split_notes(lines[1:]) + # We're not running all 50.000.000.000 calculations, that will take forever. + # We found out that after some generations, the loop will be the same. + # We first do 1000 generations + garden.generate(1000) + count_1000 = garden.count_plants() + + # When we do the next generations: + garden.generate() + + count_1001 = garden.count_plants() + # Now have the difference between generations + difference = count_1001 - count_1000 + + # With this difference we can compute the end result. + generations_to_do = 50_000_000_000 - garden.generation + result = generations_to_do * difference + count_1001 + return result diff --git a/src/adventofcode2018/day13.py b/src/adventofcode2018/day13.py new file mode 100644 index 00000000..406d8489 --- /dev/null +++ b/src/adventofcode2018/day13.py @@ -0,0 +1,259 @@ +from enum import Enum + +from adventofcode.utils.abstract import FileReaderSolution + + +class GridPosition: + """Define a simple position on the grid""" + + def __init__(self, x: int, y: int, symbol: str, cart: "MineCart" = None): + """ + Create a new position, based on position (`x`, `y`), and a symbol to + specify the direction. + There is no validation on the `symbol`. + An minecart on this position is possible, but option. + """ + self.x = x + self.y = y + self.symbol = symbol + if cart: + self.carts = [cart] + else: + self.carts = list() + + def __repr__(self): + if len(self.carts) == 1: + symbol = self.carts[0].direction.name + elif len(self.carts) > 1: + symbol = "X" + else: + symbol = self.symbol + return f"({self.x}, {self.y}) = {symbol}" + + def is_intersection(self) -> bool: + """Is this position an intersection?""" + if self.symbol == "+": + return True + else: + return False + + def is_straight(self) -> bool: + if self.symbol in ("|", "-"): + return True + else: + return False + + def is_corner(self) -> bool: + if self.symbol in ("/", "\\"): + return True + else: + return False + + def has_cart(self): + """Return if this grid has a cart""" + if len(self.carts) >= 1: + return True + else: + return False + + +class Turns(Enum): + LEFT = 0 + STRAIGHT = 1 + RIGHT = 2 + + def get_turn_direction(self, direction: "Direction"): + """Compute a new value for direction""" + if self == self.LEFT: + if direction == Direction.UP: + return direction.LEFT + elif direction == Direction.DOWN: + return direction.RIGHT + elif direction == Direction.LEFT: + return direction.DOWN + elif direction == Direction.RIGHT: + return direction.UP + elif self == self.RIGHT: + if direction == Direction.UP: + return direction.RIGHT + elif direction == Direction.DOWN: + return direction.LEFT + elif direction == Direction.LEFT: + return direction.UP + elif direction == Direction.RIGHT: + return Direction.DOWN + elif self == self.STRAIGHT: + return direction + + +class Direction(Enum): + """ + Directions to take with (X, Y) position changes + X is horizontal, Y is vertical + """ + + RIGHT = (1, 0) + LEFT = (-1, 0) + UP = (0, -1) + DOWN = (0, 1) + + @staticmethod + def sign_to_direction(direction: str): + """Convert a direction ( <, >, ^, v) to a direction""" + if direction == "<": + return Direction.LEFT + elif direction == ">": + return Direction.RIGHT + elif direction == "v": + return Direction.DOWN + elif direction == "^": + return Direction.UP + raise ValueError(f"{direction} is not a valid direction") + + +class MineCart: + def __init__(self, x: int, y: int, direction: Direction): + self.last_move = -1 + self.x = x + self.y = y + self.direction = direction + + def get_next_move(self): + self.last_move = (self.last_move + 1) % len(Turns) + return Turns(self.last_move) + + def _compute_direction(self): + (delta_x, delta_y) = self.direction.value + new_x = delta_x + self.x + new_y = delta_y + self.y + self.x = new_x + self.y = new_y + + def set_next_position(self, position: GridPosition): + """Get the next position, based on the track and the current direction""" + if position.is_intersection(): + # We are at an intersection. + new_turn = self.get_next_move() + self.direction = new_turn.get_turn_direction(self.direction) + self._compute_direction() + + elif position.is_straight(): + self._compute_direction() + + elif position.is_corner(): + # We are in a corner, for example + # ^-- + # | + # We cannot do up, so the only direction is right: + if self.direction == Direction.UP: + if position.symbol == "/": + self.direction = Direction.RIGHT + elif position.symbol == "\\": + self.direction = Direction.LEFT + elif self.direction == Direction.DOWN: + if position.symbol == "/": + self.direction = Direction.LEFT + elif position.symbol == "\\": + self.direction = Direction.RIGHT + elif self.direction == Direction.RIGHT: + if position.symbol == "/": + self.direction = Direction.UP + elif position.symbol == "\\": + self.direction = Direction.DOWN + elif self.direction == Direction.LEFT: + if position.symbol == "/": + self.direction = Direction.DOWN + elif position.symbol == "\\": + self.direction = Direction.UP + + self._compute_direction() + + else: + raise ValueError("Cannot compute position!") + + +class Day13: + def __init__(self): + self.grid = dict() + self.carts = list() + + def build_grid(self, lines: list[str]): + for y, line in enumerate(lines): + for x, symbol in enumerate(line): + if not symbol.strip(): + continue + if symbol in ("<", ">", "v", "^"): + minecart = MineCart( + x, y, direction=Direction.sign_to_direction(symbol) + ) + self.carts.append(minecart) + if symbol in ("<", ">"): + symbol = "-" + else: + symbol = "|" + else: + # No minecart at this position + minecart = None + + pos = GridPosition(x, y, symbol, minecart) + self.grid[(x, y)] = pos + + def tick(self, return_on_crash=True) -> bool | tuple[int, int]: + """Run the simulation for one tick + :param return_on_crash: Return when there is a crash + :returns x, y: Crash location + """ + seen_carts = set() + for grid_position, position in self.grid.items(): + if position.has_cart() and position.carts[0] not in seen_carts: + # Add cart to seen cart, and remove it from the current grid + cart = position.carts[0] + seen_carts.add(position.carts[0]) + position.carts = list() + + cart.set_next_position(position) + self.grid[(cart.x, cart.y)].carts.append(cart) + if len(self.grid[(cart.x, cart.y)].carts) >= 2: + if return_on_crash: + return cart.x, cart.y + else: + # Remove all carts from the whole set + for crashed_cart in self.grid[(cart.x, cart.y)].carts: + self.carts.remove(crashed_cart) + # And remove the carts from the grid: + self.grid[(cart.x, cart.y)].carts = list() + else: + return False + + def ticks(self, n=1): + """Do `n` ticks""" + for _ in range(n): + colission = self.tick() + if colission: + return colission + + def tick_until_one_left(self) -> tuple[int, int]: + """Tick until one cart is left, and return the location of the cart""" + while True: + self.tick(return_on_crash=False) + if len(self.carts) == 1: + return self.carts[0].x, self.carts[0].y + if len(self.carts) == 0: + raise RuntimeError("There are no carts left, this should not happen") + + +class Day13PartA(Day13, FileReaderSolution): + def solve(self, input_data: str) -> tuple[int, int]: + lines = input_data.splitlines() + self.build_grid(lines=lines) + while True: + colission = self.tick() + if colission: + return colission + + +class Day13PartB(Day13, FileReaderSolution): + def solve(self, input_data: str) -> tuple[int, int]: + lines = input_data.splitlines() + self.build_grid(lines=lines) + return self.tick_until_one_left() diff --git a/src/adventofcode2018/day14.py b/src/adventofcode2018/day14.py new file mode 100644 index 00000000..a310525d --- /dev/null +++ b/src/adventofcode2018/day14.py @@ -0,0 +1,168 @@ +import tqdm + +from adventofcode.utils.abstract import FileReaderSolution + + +class Elve: + def __init__(self, current_recipe: int, current_recipe_idx: int): + self.current_recipe = current_recipe + self.current_recipe_idx = current_recipe_idx + + def __repr__(self): + return f"Working on {self.current_recipe}" + + +class Day14: + """Day 14: Chocolate Charts""" + + scoreboard = list() + elves = list() + + def parse_data(self, input_data: str): + """ + Parse the data in `input_data` as scoreboard + :param input_data: + :return: + """ + self.scoreboard = [int(x) for x in list(input_data)] + + def compute_new_recipes(self) -> list[int]: + """ + Based on the scoreboard and elves, compute new scores. + + If the elves are working on recipes 3 and 7, the sum will be 10 and the result + will be two recipes, 1 and 0. + IF the elves are working on recipes 2 and 3, the sum will be 5 and the result + will be one recipe, 5 + """ + sum_of_digits = sum([elve.current_recipe for elve in self.elves]) + return [int(d) for d in str(sum_of_digits)] + + def initalise(self, input_data: str, num_elves: int): + """ + Parse the data and create the elve + :param input_data: String of numbers + :param num_elves: The number of elves available + :return: String with the score. + """ + # Cleanup, in testing we instantieace + self.elves = list() + self.scoreboard = list() + self.parse_data(input_data) + + # Create `num_elves` with the first recipes from the scoreboard + for recipe_index in range(num_elves): + elve = Elve(self.scoreboard[recipe_index], recipe_index) + self.elves.append(elve) + + def pick_new_recipe(self): + """ + Let the elves pick a new recipe + :return: + """ + for elve in self.elves: + steps_forward = elve.current_recipe + 1 + new_idx = (elve.current_recipe_idx + steps_forward) % len(self.scoreboard) + elve.current_recipe_idx = new_idx + elve.current_recipe = self.scoreboard[new_idx] + pass + + def compute_next_recipes(self, num_recipes: int): + """ + Compute the score of the final recipes after `num_recipes` tries + """ + for _ in range(num_recipes): + new_recipes = self.compute_new_recipes() + self.scoreboard.extend(new_recipes) + + # Compute new recipe for the elves + self.pick_new_recipe() + + def compute_recipe_length(self, num_recipes_created: int): + """ + Run until we have created `num_recipes_created` + :param num_recipes_created: + :return: + """ + while len(self.scoreboard) < num_recipes_created: + self.compute_next_recipes(1) + + def total_score(self, after_num_recipes) -> str: + """ + Return the total score after `after_num_recipes` + """ + start = after_num_recipes + stop = after_num_recipes + 10 + numbers = self.scoreboard[start:stop] + result = "".join([str(number) for number in numbers]) + return result + + @staticmethod + def find_sequence_in_list(needle: list, haystack: list) -> int: + """ + Search for the list `needle` in `haystack`, and return offset from the + end where we search. If the needle is not found, return False + + We only search at the end, or one or two records before the end. + Eg: [2, 3] is in [2, 3, 4] and returns 1 + Eg: [3, 4] is in [2, 3, 4] and returns 0 + + :param needle: + :param haystack: + :return: Offset + """ + length_needle = len(needle) + last_digits = haystack[-length_needle:] + # Check for the last position + if last_digits == needle: + return 0 + # Check for the first to last position + last_digits = haystack[-(length_needle + 1) : -1] + if last_digits == needle: + return 1 + # Check for the second to last position + last_digits = haystack[-(length_needle + 2) : -2] + if last_digits == needle: + return 2 + return False + + def search_for_recipe(self, recipe: str) -> int: + """ + Alves had it backwards, and we now want to search for `recipe`, and return + after how many recipes it is in the list + :param recipe: + :return: + """ + # for recipe_step in count(0): + recipe_digits = [int(digit) for digit in list(recipe)] + num_digits = len(recipe_digits) + for _ in tqdm.tqdm(range(20235240)): + self.compute_next_recipes(1) + result = self.find_sequence_in_list( + needle=recipe_digits, haystack=self.scoreboard + ) + if result: + return len(self.scoreboard) - num_digits - result + + raise ValueError("There should have been a solution now...") + + +class Day14PartA(Day14, FileReaderSolution): + def solve(self, input_data: str) -> str: + # We hardcode the number of elves to two, this is in the original assignment + self.initalise(input_data="37", num_elves=2) + # Recipes needed is the also the number of our puzzle input + num_recipes = int(input_data) + self.compute_recipe_length(num_recipes + 10) + score = self.total_score(num_recipes) + + return score + + +class Day14PartB(Day14, FileReaderSolution): + def solve(self, input_data: str) -> int: + # We hardcode the puzzle input, since it's not in the input we're given + self.initalise(input_data="37", num_elves=2) + + result = self.search_for_recipe(input_data.strip()) + return result diff --git a/src/adventofcode2018/day16.py b/src/adventofcode2018/day16.py new file mode 100644 index 00000000..e4376a64 --- /dev/null +++ b/src/adventofcode2018/day16.py @@ -0,0 +1,417 @@ +import copy +import re +from abc import ABC, abstractmethod + +from adventofcode.utils.abstract import FileReaderSolution + + +class Device: + def __init__(self, start_data=None): + self.num_registers = 4 + if start_data: + self.register = start_data + else: + self.register = [0] * self.num_registers + + def __eq__(self, other): + return self.register == other.register + + +class Instruction(ABC): + @staticmethod + @abstractmethod + def execute(device, input_a, input_b, store_c): + """ + Execute instruction with input A and B on device + :param device: The device to execute the register on + :param input_a: Input A + :param input_b: Input B + :param store_c: Store in result C + """ + raise NotImplementedError + + +class Addr(Instruction): + @staticmethod + def execute(device, input_a, input_b, store_c): + """ + addr (add register) + stores into register C the result of adding register A and register B. + """ + + device.register[store_c] = device.register[input_a] + device.register[input_b] + + +class Addi(Instruction): + @staticmethod + def execute(device, input_a, input_b, store_c): + """ + addi (add immediate) + stores into register C the result of adding register A and value B. + """ + device.register[store_c] = device.register[input_a] + input_b + + +class Mulr(Instruction): + @staticmethod + def execute(device, input_a, input_b, store_c): + """ + mulr (multiply register) + stores into register C the result of multiplying register A and register B. + """ + device.register[store_c] = device.register[input_a] * device.register[input_b] + + +class Muli(Instruction): + @staticmethod + def execute(device, input_a, input_b, store_c): + """ + muli (multiply immediate) + stores into register C the result of multiplying register A and value B. + """ + device.register[store_c] = device.register[input_a] * input_b + + +class Banr(Instruction): + @staticmethod + def execute(device, input_a, input_b, store_c): + """ + banr (bitwise AND register) + stores into register C the result of the bitwise AND of register A and + register B. + """ + device.register[store_c] = device.register[input_a] & device.register[input_b] + + +class Bani(Instruction): + @staticmethod + def execute(device, input_a, input_b, store_c): + """ + bani (bitwise AND immediate) + stores into register C the result of the bitwise AND of register A and value B. + """ + device.register[store_c] = device.register[input_a] & input_b + + +class Borr(Instruction): + @staticmethod + def execute(device, input_a, input_b, store_c): + """ + borr (bitwise OR register) + stores into register C the result of the bitwise OR of register A and + register B. + """ + device.register[store_c] = device.register[input_a] | device.register[input_b] + + +class Bori(Instruction): + @staticmethod + def execute(device, input_a, input_b, store_c): + """ + bori (bitwise OR immediate) + stores into register C the result of the bitwise OR of register A and value B. + """ + device.register[store_c] = device.register[input_a] | input_b + + +class Setr(Instruction): + @staticmethod + def execute(device, input_a, input_b, store_c): + """ + setr (set register) + copies the contents of register A into register C. (Input B is ignored.) + """ + device.register[store_c] = device.register[input_a] + + +class Seti(Instruction): + @staticmethod + def execute(device, input_a, input_b, store_c): + """ + seti (set immediate) + stores value A into register C. (Input B is ignored.) + """ + device.register[store_c] = input_a + + +class Gtir(Instruction): + @staticmethod + def execute(device, input_a, input_b, store_c): + """ + gtir (greater-than immediate/register) + sets register C to 1 if value A is greater than register B. + Otherwise, register C is set to 0. + """ + if input_a > device.register[input_b]: + device.register[store_c] = 1 + else: + device.register[store_c] = 0 + + +class Gtri(Instruction): + @staticmethod + def execute(device, input_a, input_b, store_c): + """ + gtri (greater-than register/immediate) + sets register C to 1 if register A is greater than value B. + Otherwise, register C is set to 0. + """ + if device.register[input_a] > input_b: + device.register[store_c] = 1 + else: + device.register[store_c] = 0 + + +class Gtrr(Instruction): + @staticmethod + def execute(device, input_a, input_b, store_c): + """ + gtrr (greater-than register/register) + sets register C to 1 if register A is greater than register B. + Otherwise, register C is set to 0. + """ + if device.register[input_a] > device.register[input_b]: + device.register[store_c] = 1 + else: + device.register[store_c] = 0 + + +class Eqir(Instruction): + @staticmethod + def execute(device, input_a, input_b, store_c): + """ + eqir (equal immediate/register) + sets register C to 1 if value A is equal to register B. + Otherwise, register C is set to 0. + """ + if input_a == device.register[input_b]: + device.register[store_c] = 1 + else: + device.register[store_c] = 0 + + +class Eqri(Instruction): + @staticmethod + def execute(device, input_a, input_b, store_c): + """ + eqri (equal register/immediate) + sets register C to 1 if register A is equal to value B. + Otherwise, register C is set to 0. + """ + if device.register[input_a] == input_b: + device.register[store_c] = 1 + else: + device.register[store_c] = 0 + + +class Eqrr(Instruction): + @staticmethod + def execute(device, input_a, input_b, store_c): + """ + eqrr (equal register/register) + sets register C to 1 if register A is equal to register B. + Otherwise, register C is set to 0. + """ + if device.register[input_a] == device.register[input_b]: + device.register[store_c] = 1 + else: + device.register[store_c] = 0 + + +class Day16: + opcodes = ( + Addr, + Addi, + Mulr, + Muli, + Banr, + Bani, + Borr, + Bori, + Setr, + Seti, + Gtir, + Gtri, + Gtrr, + Eqir, + Eqri, + Eqrr, + ) + + @staticmethod + def fetch_instruction(input_strings): + """ + Parse a string and yield only the instruction. + This function yields an instruction every time it is called. + + :param input_strings: Text with instructions + :return: Dict with opcode, A, B, C as keys and respective values. + """ + register_match = r"(?P\d*) (?P\d*) (?P\d*) (?P\d*)" + for line in input_strings.splitlines(): + if register_result := re.match(register_match, line): + yield { + "opcode": int(register_result["opcode"]), + "A": int(register_result["A"]), + "B": int(register_result["B"]), + "C": int(register_result["C"]), + } + + def resolve_instruction_to_opcode(self, input_strings) -> list[str]: + """ + Resolve input strings into opcodes + + :param input_strings: The input in the form of register before, opcode, regitser + after. + :return: A list with valid opcodes for this instruction + """ + current_instruction, before_device, after_device = None, None, None + + number_match = ( + r"\[(?P\d*), (?P\d*), (?P\d*), (?P\d*)\]" + ) + register_match = r"(?P\d*) (?P\d*) (?P\d*) (?P\d*)" + before_match = r"Before: " + number_match + after_match = r"After: " + number_match + for line in input_strings.splitlines(): + if before_result := re.match(before_match, line): + before_device = Device( + [ + int(before_result["reg_0"]), + int(before_result["reg_1"]), + int(before_result["reg_2"]), + int(before_result["reg_3"]), + ] + ) + elif register_result := re.search(register_match, line): + current_instruction = register_result + + elif after_result := re.search(after_match, line): + after_device = Device( + [ + int(after_result["reg_0"]), + int(after_result["reg_1"]), + int(after_result["reg_2"]), + int(after_result["reg_3"]), + ] + ) + result = self.match_registers( + current_instruction, before_device, after_device + ) + return result + else: + raise ValueError("Invalid regular match") + + def match_registers(self, current_instruction, before_device, after_device): + """Loop over all the instructions we have, and compare register before with + the register after""" + correct_opcodes = [] + for instruction in self.opcodes: + device = copy.deepcopy(before_device) + instruction.execute( + device, + int(current_instruction["A"]), + int(current_instruction["B"]), + int(current_instruction["C"]), + ) + if device == after_device: + correct_opcodes.append(instruction.__name__) + + return correct_opcodes + + +class Day16PartA(Day16, FileReaderSolution): + def number_of_instructions(self, input_data: str) -> int: + """ + Loop over the instructions and calculate the valid opcodes. + Return how many times we have three or more valid opcodes. + + :param input_data: Input data + :return: Number of opcodes with three or more instructions + """ + blocks = input_data.split("\n\n") + three_or_more = 0 + for block in blocks: + matched_opcodes = self.resolve_instruction_to_opcode(block) + if matched_opcodes and len(matched_opcodes) >= 3: + three_or_more += 1 + return three_or_more + + def solve(self, input_data: str) -> int: + return self.number_of_instructions(input_data) + + +class Day16PartB(Day16, FileReaderSolution): + def resolve_opcode_no_to_instruction( # noqa: C901 + self, input_data: str + ) -> list[str]: + """ + Resolve the opcode with the instruction + + @TODO Refactor! Way to complex... + + :param input_data: Sample input data + :return: List with opcode number as values and instruction as key. + """ + blocks = input_data.split("\n\n") + opcode_to_instruction = {} + for opcode in range(16): + opcode_to_instruction[opcode] = { + "valid": set(), + "invalid": set(), + } + + for block in blocks: + matched_opcodes = self.resolve_instruction_to_opcode(block) + if matched_opcodes: + opcode = next(self.fetch_instruction(block))["opcode"] + opcode_dict = opcode_to_instruction[opcode] + for matched_opcode in matched_opcodes: + if ( + matched_opcode not in opcode_dict["valid"] + and matched_opcode not in opcode_dict["invalid"] + ): + # If the opcode is not yet in there, add it. + opcode_dict["valid"].add(matched_opcode) + + # In the end, remove all the opcode in opcode_dict['valid'] that are not + # in this set, and add them to the invalid opcodes. + # Loop over a copy of the dict, because we change is in place + for opcode in opcode_dict["valid"].copy(): + if opcode not in matched_opcodes: + opcode_dict["valid"].remove(opcode) + opcode_dict["invalid"].add(opcode) + + # Let's clean is up: + while True: + for instruction, values in opcode_to_instruction.items(): + if len(values["valid"]) == 1: + # We have an instruction with only 1 match, let's remove this from + # all the matches + for ( + to_rm_instruction, + to_rm_values, + ) in opcode_to_instruction.items(): + if to_rm_instruction != instruction: + print("removing!") + to_rm_values["valid"] = ( + to_rm_values["valid"] - values["valid"] + ) + + # Let's to a check to see if every instruction has one opcode: + all_one = True + for instruction, values in opcode_to_instruction.items(): + if len(values["valid"]) != 1: + all_one = False + if all_one: + # Everything is clean now! + result = {} + for instruction, values in opcode_to_instruction.items(): + result[instruction] = values["valid"].pop() + return result + + def solve(self, input_data: str) -> int: + # opcode_list = self.resolve_opcode_no_to_instruction(input_data) + # Run the computer + # @TODO. + raise NotImplementedError diff --git a/src/adventofcode2019/solutions/data/day_01/day01.txt b/src/adventofcode2019/data/day_01/day01.txt similarity index 100% rename from src/adventofcode2019/solutions/data/day_01/day01.txt rename to src/adventofcode2019/data/day_01/day01.txt diff --git a/src/adventofcode2019/solutions/data/day_02/day02.txt b/src/adventofcode2019/data/day_02/day02.txt similarity index 100% rename from src/adventofcode2019/solutions/data/day_02/day02.txt rename to src/adventofcode2019/data/day_02/day02.txt diff --git a/src/adventofcode2019/solutions/data/day_03/day03.txt b/src/adventofcode2019/data/day_03/day03.txt similarity index 98% rename from src/adventofcode2019/solutions/data/day_03/day03.txt rename to src/adventofcode2019/data/day_03/day03.txt index dc45abaf..bfa570c3 100644 --- a/src/adventofcode2019/solutions/data/day_03/day03.txt +++ b/src/adventofcode2019/data/day_03/day03.txt @@ -1,2 +1,2 @@ R999,D467,L84,D619,L49,U380,R287,U80,R744,D642,L340,U738,R959,U710,R882,U861,L130,D354,L579,D586,R798,D735,L661,D453,L828,U953,R604,D834,R921,D348,R620,U775,R364,U552,L221,U119,R590,U29,L267,D745,L128,U468,L978,D717,R883,D227,R691,D330,L33,U520,L862,D132,R99,U400,L455,U737,L603,U220,L689,U131,R158,D674,R617,D287,R422,U734,L73,U327,L525,D245,R849,D692,R114,U136,R762,D5,R329,U429,L849,U748,R816,U556,R614,D412,R416,D306,R307,U826,R880,U936,L164,U984,L689,D934,R790,D14,R561,D736,L3,D442,R301,D520,L451,U76,R844,D307,L144,D800,L462,D138,R956,U225,L393,D186,L924,D445,L86,D640,L920,D877,L197,U191,L371,D701,R826,D282,R856,D412,L788,D417,R69,D678,R978,D268,L268,U112,L69,U164,L748,U191,R227,D227,R59,U749,R134,U779,R865,U247,R55,D567,R821,U799,R937,D942,L445,D571,R685,D111,R107,D769,R269,D968,R102,U335,R538,U125,L725,D654,R451,D242,R777,U813,R799,D786,L804,U313,L322,U771,R219,U316,L973,U963,R84,D289,R825,D299,L425,D49,R995,D486,R550,D789,R735,D501,R966,U955,R432,U635,L353,D600,R675,D236,R864,U322,R719,D418,L877,U833,R839,D634,L533,D438,L734,U130,L578,U498,L984,D413,L615,U40,L699,U656,L653,U419,R856,U882,R30,D266,R386,D692,L210,U802,L390,U753,L406,U338,R743,D320,L125,U204,R391,U537,R887,D194,L302,U400,R510,U92,L310,D382,R597,U498,R851,D357,L568,U800,R918,D106,R673,D735,L86,D67,R398,D677,R355,D501,L909,D133,R729,D293,L498,U222,R832,U671,R751,U36,R422,U840,L636,D476,L292,D105,L239,U199,R669,U736,L345,D911,L277,U452,L979,D153,R882,U604,R602,U495,L311,U453,L215,D713,R873 -L996,U773,L865,D472,L988,D570,L388,U458,L87,U885,L115,U55,R75,U582,R695,U883,R83,U285,R96,D244,L647,D359,R136,U107,R912,U871,L844,U395,L63,U899,L205,D137,R549,U221,L859,D429,L809,U127,R304,U679,L511,U144,R926,U95,L805,U811,R42,D248,L546,D644,L551,D897,R368,D391,L224,U164,L490,D991,L146,D615,R536,U247,R10,U998,L957,D233,R706,D926,R760,U438,R270,D983,R134,U738,L262,U301,L480,D635,L702,D715,R479,U500,R19,D291,R368,U203,R305,D999,R106,U355,L683,D298,R90,U968,L254,D936,R89,U496,R253,U688,R99,U637,L783,D451,R673,D762,R997,D50,L488,U551,L871,U388,R949,D371,R584,D908,L880,U523,R557,U436,R520,U587,L56,U18,R397,U541,R660,D444,R51,U187,R221,U902,R726,U303,R97,D817,R185,D218,L240,D67,L259,U334,R821,U629,R21,D970,R282,U155,R555,D678,L99,D570,R863,D405,R941,U584,L303,D109,L871,U180,R595,D226,L670,D943,L127,U647,R452,D570,R75,D284,R414,U404,R515,U993,R408,U488,R890,D318,L415,U969,R769,D976,L732,U1,R489,U655,R930,U638,R649,D254,R161,U287,L659,D26,L477,D821,L124,U538,R17,D711,L203,U888,R904,U648,L908,D65,L215,U283,R698,U28,R72,U214,R499,D89,R489,D58,R949,D91,L710,U960,L755,D402,L27,D873,R61,U607,R57,D548,R369,U622,L244,U19,R61,D606,R928,D968,R10,D988,R816,U500,R915,D400,R546,D283,L627,D919,L259,U337,R374,U795,L355,D989,L224,D77,L872,U901,R476,U765,L320,U768,L937,D437,R141,D822,L326,D324,L498,U994,L518,D857,R973,D681,L710,D590,L879,U499,R488,D151,L242,U988,L944,U683,L24,U491,R823,D246,R872,D654,R28,U581,L142,U31,R435,D686,L147,D102,R952,D607,L959,D929,L46 \ No newline at end of file +L996,U773,L865,D472,L988,D570,L388,U458,L87,U885,L115,U55,R75,U582,R695,U883,R83,U285,R96,D244,L647,D359,R136,U107,R912,U871,L844,U395,L63,U899,L205,D137,R549,U221,L859,D429,L809,U127,R304,U679,L511,U144,R926,U95,L805,U811,R42,D248,L546,D644,L551,D897,R368,D391,L224,U164,L490,D991,L146,D615,R536,U247,R10,U998,L957,D233,R706,D926,R760,U438,R270,D983,R134,U738,L262,U301,L480,D635,L702,D715,R479,U500,R19,D291,R368,U203,R305,D999,R106,U355,L683,D298,R90,U968,L254,D936,R89,U496,R253,U688,R99,U637,L783,D451,R673,D762,R997,D50,L488,U551,L871,U388,R949,D371,R584,D908,L880,U523,R557,U436,R520,U587,L56,U18,R397,U541,R660,D444,R51,U187,R221,U902,R726,U303,R97,D817,R185,D218,L240,D67,L259,U334,R821,U629,R21,D970,R282,U155,R555,D678,L99,D570,R863,D405,R941,U584,L303,D109,L871,U180,R595,D226,L670,D943,L127,U647,R452,D570,R75,D284,R414,U404,R515,U993,R408,U488,R890,D318,L415,U969,R769,D976,L732,U1,R489,U655,R930,U638,R649,D254,R161,U287,L659,D26,L477,D821,L124,U538,R17,D711,L203,U888,R904,U648,L908,D65,L215,U283,R698,U28,R72,U214,R499,D89,R489,D58,R949,D91,L710,U960,L755,D402,L27,D873,R61,U607,R57,D548,R369,U622,L244,U19,R61,D606,R928,D968,R10,D988,R816,U500,R915,D400,R546,D283,L627,D919,L259,U337,R374,U795,L355,D989,L224,D77,L872,U901,R476,U765,L320,U768,L937,D437,R141,D822,L326,D324,L498,U994,L518,D857,R973,D681,L710,D590,L879,U499,R488,D151,L242,U988,L944,U683,L24,U491,R823,D246,R872,D654,R28,U581,L142,U31,R435,D686,L147,D102,R952,D607,L959,D929,L46 diff --git a/src/adventofcode2019/solutions/data/day_04/day04.txt b/src/adventofcode2019/data/day_04/day04.txt similarity index 100% rename from src/adventofcode2019/solutions/data/day_04/day04.txt rename to src/adventofcode2019/data/day_04/day04.txt diff --git a/src/adventofcode2019/solutions/data/day_05/day05.txt b/src/adventofcode2019/data/day_05/day05.txt similarity index 100% rename from src/adventofcode2019/solutions/data/day_05/day05.txt rename to src/adventofcode2019/data/day_05/day05.txt diff --git a/src/adventofcode2019/solutions/data/day_06/day06.txt b/src/adventofcode2019/data/day_06/day06.txt similarity index 100% rename from src/adventofcode2019/solutions/data/day_06/day06.txt rename to src/adventofcode2019/data/day_06/day06.txt diff --git a/src/adventofcode2019/solutions/data/day_07/day07.txt b/src/adventofcode2019/data/day_07/day07.txt similarity index 96% rename from src/adventofcode2019/solutions/data/day_07/day07.txt rename to src/adventofcode2019/data/day_07/day07.txt index 53bbd9fb..d1550e65 100644 --- a/src/adventofcode2019/solutions/data/day_07/day07.txt +++ b/src/adventofcode2019/data/day_07/day07.txt @@ -1 +1 @@ -3,8,1001,8,10,8,105,1,0,0,21,30,51,76,101,118,199,280,361,442,99999,3,9,102,5,9,9,4,9,99,3,9,102,4,9,9,1001,9,3,9,102,2,9,9,101,2,9,9,4,9,99,3,9,1002,9,3,9,1001,9,4,9,102,5,9,9,101,3,9,9,1002,9,3,9,4,9,99,3,9,101,5,9,9,102,4,9,9,1001,9,3,9,1002,9,2,9,101,4,9,9,4,9,99,3,9,1002,9,2,9,1001,9,3,9,102,5,9,9,4,9,99,3,9,1002,9,2,9,4,9,3,9,1002,9,2,9,4,9,3,9,1002,9,2,9,4,9,3,9,1001,9,2,9,4,9,3,9,102,2,9,9,4,9,3,9,102,2,9,9,4,9,3,9,1002,9,2,9,4,9,3,9,101,2,9,9,4,9,3,9,1002,9,2,9,4,9,3,9,1002,9,2,9,4,9,99,3,9,1001,9,1,9,4,9,3,9,1002,9,2,9,4,9,3,9,1002,9,2,9,4,9,3,9,101,2,9,9,4,9,3,9,102,2,9,9,4,9,3,9,102,2,9,9,4,9,3,9,101,1,9,9,4,9,3,9,102,2,9,9,4,9,3,9,101,1,9,9,4,9,3,9,102,2,9,9,4,9,99,3,9,1001,9,1,9,4,9,3,9,1001,9,2,9,4,9,3,9,101,1,9,9,4,9,3,9,101,1,9,9,4,9,3,9,1002,9,2,9,4,9,3,9,1001,9,2,9,4,9,3,9,101,1,9,9,4,9,3,9,1002,9,2,9,4,9,3,9,1001,9,1,9,4,9,3,9,101,1,9,9,4,9,99,3,9,1001,9,1,9,4,9,3,9,1002,9,2,9,4,9,3,9,1002,9,2,9,4,9,3,9,1002,9,2,9,4,9,3,9,101,2,9,9,4,9,3,9,1001,9,2,9,4,9,3,9,101,2,9,9,4,9,3,9,1001,9,1,9,4,9,3,9,1001,9,1,9,4,9,3,9,1002,9,2,9,4,9,99,3,9,102,2,9,9,4,9,3,9,1001,9,2,9,4,9,3,9,101,1,9,9,4,9,3,9,102,2,9,9,4,9,3,9,101,2,9,9,4,9,3,9,1001,9,1,9,4,9,3,9,101,1,9,9,4,9,3,9,101,1,9,9,4,9,3,9,1001,9,2,9,4,9,3,9,1001,9,2,9,4,9,99 \ No newline at end of file +3,8,1001,8,10,8,105,1,0,0,21,30,51,76,101,118,199,280,361,442,99999,3,9,102,5,9,9,4,9,99,3,9,102,4,9,9,1001,9,3,9,102,2,9,9,101,2,9,9,4,9,99,3,9,1002,9,3,9,1001,9,4,9,102,5,9,9,101,3,9,9,1002,9,3,9,4,9,99,3,9,101,5,9,9,102,4,9,9,1001,9,3,9,1002,9,2,9,101,4,9,9,4,9,99,3,9,1002,9,2,9,1001,9,3,9,102,5,9,9,4,9,99,3,9,1002,9,2,9,4,9,3,9,1002,9,2,9,4,9,3,9,1002,9,2,9,4,9,3,9,1001,9,2,9,4,9,3,9,102,2,9,9,4,9,3,9,102,2,9,9,4,9,3,9,1002,9,2,9,4,9,3,9,101,2,9,9,4,9,3,9,1002,9,2,9,4,9,3,9,1002,9,2,9,4,9,99,3,9,1001,9,1,9,4,9,3,9,1002,9,2,9,4,9,3,9,1002,9,2,9,4,9,3,9,101,2,9,9,4,9,3,9,102,2,9,9,4,9,3,9,102,2,9,9,4,9,3,9,101,1,9,9,4,9,3,9,102,2,9,9,4,9,3,9,101,1,9,9,4,9,3,9,102,2,9,9,4,9,99,3,9,1001,9,1,9,4,9,3,9,1001,9,2,9,4,9,3,9,101,1,9,9,4,9,3,9,101,1,9,9,4,9,3,9,1002,9,2,9,4,9,3,9,1001,9,2,9,4,9,3,9,101,1,9,9,4,9,3,9,1002,9,2,9,4,9,3,9,1001,9,1,9,4,9,3,9,101,1,9,9,4,9,99,3,9,1001,9,1,9,4,9,3,9,1002,9,2,9,4,9,3,9,1002,9,2,9,4,9,3,9,1002,9,2,9,4,9,3,9,101,2,9,9,4,9,3,9,1001,9,2,9,4,9,3,9,101,2,9,9,4,9,3,9,1001,9,1,9,4,9,3,9,1001,9,1,9,4,9,3,9,1002,9,2,9,4,9,99,3,9,102,2,9,9,4,9,3,9,1001,9,2,9,4,9,3,9,101,1,9,9,4,9,3,9,102,2,9,9,4,9,3,9,101,2,9,9,4,9,3,9,1001,9,1,9,4,9,3,9,101,1,9,9,4,9,3,9,101,1,9,9,4,9,3,9,1001,9,2,9,4,9,3,9,1001,9,2,9,4,9,99 diff --git a/src/adventofcode2019/solutions/data/day_08/day08.txt b/src/adventofcode2019/data/day_08/day08.txt similarity index 99% rename from src/adventofcode2019/solutions/data/day_08/day08.txt rename to src/adventofcode2019/data/day_08/day08.txt index 0dde1876..ec92280f 100644 --- a/src/adventofcode2019/solutions/data/day_08/day08.txt +++ b/src/adventofcode2019/data/day_08/day08.txt @@ -1 +1 @@ -222202222222222222222221022222220122202022222220222212222220222022002022222200122222222212222222222220222222122222220222122222221222220222222122220222222222222222222222222211022222220222202222222221222202222222222022022222222212022222222202222222222222222222122222211222222222222222122222222222221222222212222222222222222212022222220222202222222222222222222222122222022222222212022222222202222222222220222222222222221222122222221222120222222022222222222222222222222222222212022222220022202122222221222202222222022222002022222202222222222212222222222222222222122222200222022222221222021222222022220222222212222212222222222221222222220222222122222221222222222220222121222022222222022222220212222222222220222222122222200222122222221222022222222022222222222222222222222222222211022222221122212022222220222222222222022020202222222222022222221222222222222220222222122222212222222222221222220222222222220222222222222212222222222210022222222222202122222222222202222221022221012222222200222222220202222222222222022222122222211222022222221222122222222222220222222222222222222222222220122222220222212122222220222222222221222100222022222212222222221202222222222222122222222222210222122222220222022222222022222222222212222212222222222221022222220222202222222222222222222221122101112222222222022222222212222222222221022222222222201222222222220222122222222022221222222222222212222222222210222222222222202222222222222222222220022011122022222201222222221202222222222221022222022222221222222222220222220222222222222222222222222202222222222201122222222022212022222221222212222220022020220222222202222222222212122222222222022222222222212222022222221222020222220222221222222222222212222222222220222222220022212122222222222222222221122111202222222200222222221222122222222220022222222222222222222222020222121222221022221222222212222202222222222220222222222222222222222121222202222220022121210122222220022222221202022222222220222222222222221222022222220222020222221222220222222212222212222222222211122222221122212122222120222212222222122112211222222211122222222222022222222221222222222222210222222222021222120222222122222222222202222222222222222221122222222122202122222020222202222221222122111222222222122222221222022222222220222222122222202222222222220222222222221222220222222222222212222222222202122222220022202022222221222202222220122001000222222220122222220202222222222221222222022222201222122222020222020222222022222222222222222202222222222221222222221122222022222122222212222221122120211122222210202222221212222222222222122222022222210222220222121222220222220022221222222202222202222222222210222212222022202222222022222222222222122000110122222221112222222212122222222220022222222222220222121222120222121222220222221222222202222211222222222211222212220022222122222021222202222221022100002022222200102222222212022222222220022222022222212222020222022222220222220122222222222222222212222222222220222222220022202122222021222212222221122202201222222202002222220202022222222222122222222222201222121222021222222222221222221222202222222200222222222202022202222222212122222022222222222222022111120122222210122222221202122221222221122222122222212222022222121222120222220222221222222222222222222222222210022202222222222022222020222212222221122020222022222202012222220202122220222220022222022222202222120221222222022222220022221222212212222202222222222222020212222222212122222122222212222222022121200222222221022222222202022222222222222222222222201222221221020222120222221222221222212212222222222222222220220212222022202122222021222212222222122002011122222222102221220202022220222222122222122222211222221220022222021222222122221222222212222201222222222201222212220122202222222221222221222220022202101022222210102220222202122220222221022222122222222222221221020222020222221022221222212202222201222222222222122212220122212022222222222221222222122102001221222201102221220222122220222220122222222222221222220222222222120222222222220222222212222200222222222200022202221122202022222022222222222220222111111020222220222222222202222221222220122222122222222222121222021222121222221222220222222212222212222222222222021202221222222122222100222221222220122201102022222202112221220202122221222221022220022222200222021222021222122222221222221222222212222222222222222202222202220222202022222201222212222222222021110021222211002221220202122220222221222220022222210222120220022222021222221022220222212222222220222222222222020202220122202122222211222200222221122000001020222220112221221202222221222221022222122222201222222220022222221222222122220222202202222220222222222222022212221022212222222222222212222221022002120021222220102221220202022221222222122221121222221222222220221222021222222022220222222222222221222222222222022212222222212222222222222202222220222111221121222200122221210222022220222221122222020222201222020220122222122122220222222222212202222220222222222222021202201022222122222012222202222221122102211220222200222222212222122221222221022222020222222222021220122222021022221122221202222212222202222222222221110212211122222122222200222221222220222001100121222211222222220212122222222222122221222222222222222222120222020022220022220212222222222221222222222202102212221022222022222011222201222221222021121022222202222221220222122221222220122220122222221220120221022222122022221122221202212202220221222222222220020222210222222122022001202200222222222022011121222200222221201212022220222221122220020222210222221220022202222122220022221222222222220211222221222200201202212122222222022200212221222220222212111221222202202221202222022221222220022221122222220221220220222222220022221022222222212222222220222220222210010202210022212022122100222220222221022000220020222202202220220212122221222220122220221222210222220222122202022022222122220222222202221222222222222222001202211022202022222121212211222220222202112221222102012220202202122222222221022221120222200222220222021212022022221022220202202222220220222222222202212212210222222122222000202202222220022011011122222101012221220222022222222221222221122222202222221220221222222222220122221212222202222212222221222220001212210222222222222201202201022222022000200120222222122220212212122220222221222222121222211222121222220212020022221222222222202212222210222222222211102202210122212220222012212222022221022202222222222102212221010202022220222220122221122222201220022221121222122122220022220202202202222222222222222201212202211122212220022002222200122222222221010021222212102221110222022222222222222222021222200211221221221202220122221122221212222202222211222220222201102212210222222222022022222221122220122201010021222210012220111202222220222220222221021222221222022220120212122222220222220222212222220202222220222220100202221222202221022212202211022222222211222020222020212221010222222222220220222220220222222221022220121222021222222122222212202222220220222222222202110202210022212021222112222212022221022212220020202220222221222212222222221222222220021222211212122222021212221222221222220222202222221201222222222210212202220222202222222001222212022220022000021120222120112221210212022222220222122221220222011201121222222202122122221122222222202212221220222221022222020222211022222022022012222202222221122122000122202100012220120212122220220221022220122222000202121221020222021022220222222202212212221220222220022220202202212022202121222202222220122220122122100220212011202220111212222220220222222222120222110220222221120222121122222122222202212212220201222221022220221222202222202220022200222200022221212022211020212112112220122202222220221220120222122222002212022200220202121122220022220202212202222220222220222211122222221222202021122210202201022220222010202220212201222220221222122221222220220222222022011221020202120212021122220122221212212222120201222221222220222222201222222222022011212202022220102222020120222201202221102202122221222220021220020022001222121201021222021022222222222202222222022201222221122222221222200222222022122201202220022221102222112222202022202222102212022220221221222222022222001202122212021202121022222122220202222212020202222222022212200222201222222220122011212212022222222200222022202222012222002202222221220220020220020022220202220220020202222222221022222222222212221220222222122202121212201222202220022002202221122222112110102022202000022221000222022221222210021221121022110202022212021212220022222022220202202202120212220222222222012222210222202022222010222210022222222110212122222100212222001202122221221221222202020122110201021212122202112022222222220222202202021202222222022202201222200122212121222011222210022220222212201220222200022222002202222220220221222202222122021201121201121202201022221222222222202212020221220222222212000202210122212020212200202211022222112221110221222211002220001222222220220202222221222122000210222220222222112012221122220202212212121220221222022200001202200022202021012222212212222222222020220120212122222220100202122221020221020212121122221202020221220212021212220222220202202212220221221221222201120202201122212021022021222221220222202022211221212212112220210202022222122202121221021222201220020211022212201102202222220212212222122201221220122220201222201122212220012110202201120222112022010120222010102221012202120220022200221212122022111222220210221202012222221122222202202212022212222221022220020202202122202020212212212211121222122111012220222000002221201202120222122201022221220022211220120202120212121112201122222202212202221202220220122222012202221122222021022211202211221221202102220221222112202222212212020220222211220201222122111210120220221212220122222122221202222222021210220221122200020202222022212120212110202212120222122000122022222011102221220212021222020221121212121222101202122220122212122222211022222002202202021210221221022220121212222022222221202110222202221221002221101221212011202220021202122222122210021212121122101221220211021202221212210122221012222222122222222222022210010002212022222021022101212201222222112120011221222111022220021212020221020221021212220222112001122222122212111002200222222012212222220210222222122202101212220222222021012221222222120220102221221021212111022220001222121220121200022211020021100021122222220212102102212122220222212212222001222221022222221012201022212222212122202200222221202012002020222012012222120222022221121221220220120122022100120221020212121112201222220212202212122221220222022201220022200122202022102021202220022021122001212222212221202222102212021222022200220220120220210222021212020212000012220122221212202222120212221222022211212022202222222220022020202222222221022010120022222011002220012212120220021202212221222120221022022200201222201202201022221222212212121100221222222211210122211222222220002011212202021021222121020121222121102222211222121222120222211210121222002100020210211212220112201222221002222222021021222222122201022222221222202020012110212210122122121220102122202202112220110202220221122220121221221120212211020221211202021212221112221012222212022112221221022202022102212222212021202010222220121020010101121120222010202222022222221220020220002211220120121112022200101212001002222220222002212212021122220220222201000102210222202020012022222220221221012001121120202210122222121012221222122200202222120221001002221210212202200202220010221212212222221100221220122210100222211222212020022120202202022121100102220120212021222221000102020222222200020222121122221111122220112202012022222210220012222212120112220220022202201122202222202120212111222210122121212211212120202111022221002212122221021201012211122222220122221212000212210222220201220112222212222121221221122222110202222022202121102022202202221222222221210021212022022220011022220220021221122212120122110000220212001222120202222012222022202212122212222220222220022012222122222021122120221222220022112121221120212212122222201122221222021212101222121122000001221210200212002001011000221212202222122001220220122222211022210222202122012012202212120222122022010221202202012221122102022221022201212202101020121221020221221202201220212020222222212202220120220222222200010122221122212122202010202210221022012102221221212012122220012122021221222221220201110020202012222222110222012002111011220202212212021002222221022202222102222122202120022211222221220122011202221022212122102220220012021022122211210211111021022020220220100202110200101021220002222202022112121221122202002012222122212222222220211200120122112201120122212211102220201022120222122221100210220222202000221222112222200012100101222112212102220211022222122212102212220122221122012001220222020121011021122021212202112221012022221120222222201212220222202112221220021222120122021110211222202122021012022221122222212022220122222121222122220201121020102122111220222112112222001222221220120201202202221022000012021211211212012011110102202022202002221121220220022220112022201022210021022210222220221220022011001120222102002220120022222022021210002212210122002002022222010222121101211021222212202122220010022021222222002022201022200021202210202112221020002212221020202101222221110020021122120220201221102221212012122212100202200200121220011022222102221002020020222211100222210222222022122022211201022221211111210122202000212222001112022020021200010201212121000101220222011222210100102112200212202210222210220122122211120122221022201021102010211002122020200210212121222010022222012101120022120210210211011020001020120200010222122210102111001102222000021020021020122212222222212122202020202011222212120021002022012220222101002221012102120120102221202210110020202020021221220222000100121110112022222202022002221021222211221002222022201022122221221120220120100210201022222111112222202020220121202221001202011221122120020220211222220120222120221012222200220022220022222221002112212222212222002221210101021120111020101122212211102222122120021121111201221220110022211000222201020212221121201101102212212200022122122020121120100212200102212121112001221110221120201210201122212100012222100122021222020000201202022221011121220201110202020122021010011222212212122211021121220021122102210202210221222200221210220102002100002021222010202220101020022022011222200222001122001012021210202202012002000021010212222020020022221022220011202122220112222221202122212102221111200221020221212211102221101012022201021100222211021120022101022220111222000212020120120212222212020011122221021102111222222222202222212121211101222001201202110020212200002220120201221220212101212222101022001121220202011202112121212202010112212102020020121220022220211222222202202020002202222210022012001022000120202021012221222200120201211202220210120022000222122211220202100002101222200122212212221022201222022011212222210112212120112011202202220111022211012222222101102221200221222112220102202202100020112000221212010212121102120020001010222112022010201122121122210122220002222220122222220121022202201212010120212002212222211102222100120001102211122020212011022202211212110221112110200212222200022201112220121202010212212012201122212121211102221200122011002221212201212222122112122200210111021201112121121110020211100212220111201102110100120202112201101211001111111220100121022110210011011222111121100221020111120010201010001201000000020211220100120001110012102001220021012001110111121111 \ No newline at end of file +222202222222222222222221022222220122202022222220222212222220222022002022222200122222222212222222222220222222122222220222122222221222220222222122220222222222222222222222222211022222220222202222222221222202222222222022022222222212022222222202222222222222222222122222211222222222222222122222222222221222222212222222222222222212022222220222202222222222222222222222122222022222222212022222222202222222222220222222222222221222122222221222120222222022222222222222222222222222222212022222220022202122222221222202222222022222002022222202222222222212222222222222222222122222200222022222221222021222222022220222222212222212222222222221222222220222222122222221222222222220222121222022222222022222220212222222222220222222122222200222122222221222022222222022222222222222222222222222222211022222221122212022222220222222222222022020202222222222022222221222222222222220222222122222212222222222221222220222222222220222222222222212222222222210022222222222202122222222222202222221022221012222222200222222220202222222222222022222122222211222022222221222122222222222220222222222222222222222222220122222220222212122222220222222222221222100222022222212222222221202222222222222122222222222210222122222220222022222222022222222222212222212222222222221022222220222202222222222222222222221122101112222222222022222222212222222222221022222222222201222222222220222122222222022221222222222222212222222222210222222222222202222222222222222222220022011122022222201222222221202222222222221022222022222221222222222220222220222222222222222222222222202222222222201122222222022212022222221222212222220022020220222222202222222222212122222222222022222222222212222022222221222020222220222221222222222222212222222222220222222220022212122222222222222222221122111202222222200222222221222122222222220022222222222222222222222020222121222221022221222222212222202222222222220222222222222222222222121222202222220022121210122222220022222221202022222222220222222222222221222022222220222020222221222220222222212222212222222222211122222221122212122222120222212222222122112211222222211122222222222022222222221222222222222210222222222021222120222222122222222222202222222222222222221122222222122202122222020222202222221222122111222222222122222221222022222222220222222122222202222222222220222222222221222220222222222222212222222222202122222220022202022222221222202222220122001000222222220122222220202222222222221222222022222201222122222020222020222222022222222222222222202222222222221222222221122222022222122222212222221122120211122222210202222221212222222222222122222022222210222220222121222220222220022221222222202222202222222222210222212222022202222222022222222222222122000110122222221112222222212122222222220022222222222220222121222120222121222220222221222222202222211222222222211222212220022222122222021222202222221022100002022222200102222222212022222222220022222022222212222020222022222220222220122222222222222222212222222222220222222220022202122222021222212222221122202201222222202002222220202022222222222122222222222201222121222021222222222221222221222202222222200222222222202022202222222212122222022222222222222022111120122222210122222221202122221222221122222122222212222022222121222120222220222221222222222222222222222222210022202222222222022222020222212222221122020222022222202012222220202122220222220022222022222202222120221222222022222220022221222212212222202222222222222020212222222212122222122222212222222022121200222222221022222222202022222222222222222222222201222221221020222120222221222221222212212222222222222222220220212222022202122222021222212222222122002011122222222102221220202022220222222122222122222211222221220022222021222222122221222222212222201222222222201222212220122202222222221222221222220022202101022222210102220222202122220222221022222122222222222221221020222020222221022221222212202222201222222222222122212220122212022222222222221222222122102001221222201102221220222122220222220122222222222221222220222222222120222222222220222222212222200222222222200022202221122202022222022222222222220222111111020222220222222222202222221222220122222122222222222121222021222121222221222220222222212222212222222222222021202221222222122222100222221222220122201102022222202112221220202122221222221022220022222200222021222021222122222221222221222222212222222222222222202222202220222202022222201222212222222222021110021222211002221220202122220222221222220022222210222120220022222021222221022220222212222222220222222222222020202220122202122222211222200222221122000001020222220112221221202222221222221022222122222201222222220022222221222222122220222202202222220222222222222022212221022212222222222222212222221022002120021222220102221220202022221222222122221121222221222222220221222021222222022220222222222222221222222222222022212222222212222222222222202222220222111221121222200122221210222022220222221122222020222201222020220122222122122220222222222212202222220222222222222021202201022222122222012222202222221122102211220222200222222212222122221222221022222020222222222021220122222021022221122221202222212222202222222222221110212211122222122222200222221222220222001100121222211222222220212122222222222122221222222222222222222120222020022220022220212222222222221222222222202102212221022222022222011222201222221222021121022222202222221220222122221222220122220122222221220120221022222122022221122221202212202220221222222222220020222210222222122022001202200222222222022011121222200222221201212022220222221122220020222210222221220022202222122220022221222222222220211222221222200201202212122222222022200212221222220222212111221222202202221202222022221222220022221122222220221220220222222220022221022222222212222222220222220222210010202210022212022122100222220222221022000220020222202202220220212122221222220122220221222210222220222122202022022222122220222222202221222222222222222001202211022202022222121212211222220222202112221222102012220202202122222222221022221120222200222220222021212022022221022220202202222220220222222222202212212210222222122222000202202222220022011011122222101012221220222022222222221222221122222202222221220221222222222220122221212222202222212222221222220001212210222222222222201202201022222022000200120222222122220212212122220222221222222121222211222121222220212020022221222222222202212222210222222222211102202210122212220222012212222022221022202222222222102212221010202022220222220122221122222201220022221121222122122220022220202202202222222222222222201212202211122212220022002222200122222222221010021222212102221110222022222222222222222021222200211221221221202220122221122221212222202222211222220222201102212210222222222022022222221122220122201010021222210012220111202222220222220222221021222221222022220120212122222220222220222212222220202222220222220100202221222202221022212202211022222222211222020222020212221010222222222220220222220220222222221022220121222021222222122222212202222220220222222222202110202210022212021222112222212022221022212220020202220222221222212222222221222222220021222211212122222021212221222221222220222202222221201222222222210212202220222202222222001222212022220022000021120222120112221210212022222220222122221220222011201121222222202122122221122222222202212221220222221022222020222211022222022022012222202222221122122000122202100012220120212122220220221022220122222000202121221020222021022220222222202212212221220222220022220202202212022202121222202222220122220122122100220212011202220111212222220220222222222120222110220222221120222121122222122222202212212220201222221022220221222202222202220022200222200022221212022211020212112112220122202222220221220120222122222002212022200220202121122220022220202212202222220222220222211122222221222202021122210202201022220222010202220212201222220221222122221222220220222222022011221020202120212021122220122221212212222120201222221222220222222201222222222022011212202022220102222020120222201202221102202122221222220021220020022001222121201021222021022222222222202222222022201222221122222221222200222222022122201202220022221102222112222202022202222102212022220221221222222022222001202122212021202121022222122220202222212020202222222022212200222201222222220122011212212022222222200222022202222012222002202222221220220020220020022220202220220020202222222221022222222222212221220222222122202121212201222202220022002202221122222112110102022202000022221000222022221222210021221121022110202022212021212220022222022220202202202120212220222222222012222210222202022222010222210022222222110212122222100212222001202122221221221222202020122110201021212122202112022222222220222202202021202222222022202201222200122212121222011222210022220222212201220222200022222002202222220220221222202222122021201121201121202201022221222222222202212020221220222222212000202210122212020212200202211022222112221110221222211002220001222222220220202222221222122000210222220222222112012221122220202212212121220221222022200001202200022202021012222212212222222222020220120212122222220100202122221020221020212121122221202020221220212021212220222220202202212220221221221222201120202201122212021022021222221220222202022211221212212112220210202022222122202121221021222201220020211022212201102202222220212212222122201221220122220201222201122212220012110202201120222112022010120222010102221012202120220022200221212122022111222220210221202012222221122222202202212022212222221022220020202202122202020212212212211121222122111012220222000002221201202120222122201022221220022211220120202120212121112201122222202212202221202220220122222012202221122222021022211202211221221202102220221222112202222212212020220222211220201222122111210120220221212220122222122221202222222021210220221122200020202222022212120212110202212120222122000122022222011102221220212021222020221121212121222101202122220122212122222211022222002202202021210221221022220121212222022222221202110222202221221002221101221212011202220021202122222122210021212121122101221220211021202221212210122221012222222122222222222022210010002212022222021022101212201222222112120011221222111022220021212020221020221021212220222112001122222122212111002200222222012212222220210222222122202101212220222222021012221222222120220102221221021212111022220001222121220121200022211020021100021122222220212102102212122220222212212222001222221022222221012201022212222212122202200222221202012002020222012012222120222022221121221220220120122022100120221020212121112201222220212202212122221220222022201220022200122202022102021202220022021122001212222212221202222102212021222022200220220120220210222021212020212000012220122221212202222120212221222022211212022202222222220022020202222222221022010120022222011002220012212120220021202212221222120221022022200201222201202201022221222212212121100221222222211210122211222222220002011212202021021222121020121222121102222211222121222120222211210121222002100020210211212220112201222221002222222021021222222122201022222221222202020012110212210122122121220102122202202112220110202220221122220121221221120212211020221211202021212221112221012222212022112221221022202022102212222212021202010222220121020010101121120222010202222022222221220020220002211220120121112022200101212001002222220222002212212021122220220222201000102210222202020012022222220221221012001121120202210122222121012221222122200202222120221001002221210212202200202220010221212212222221100221220122210100222211222212020022120202202022121100102220120212021222221000102020222222200020222121122221111122220112202012022222210220012222212120112220220022202201122202222202120212111222210122121212211212120202111022221002212122221021201012211122222220122221212000212210222220201220112222212222121221221122222110202222022202121102022202202221222222221210021212022022220011022220220021221122212120122110000220212001222120202222012222022202212122212222220222220022012222122222021122120221222220022112121221120212212122222201122221222021212101222121122000001221210200212002001011000221212202222122001220220122222211022210222202122012012202212120222122022010221202202012221122102022221022201212202101020121221020221221202201220212020222222212202220120220222222200010122221122212122202010202210221022012102221221212012122220012122021221222221220201110020202012222222110222012002111011220202212212021002222221022202222102222122202120022211222221220122011202221022212122102220220012021022122211210211111021022020220220100202110200101021220002222202022112121221122202002012222122212222222220211200120122112201120122212211102220201022120222122221100210220222202000221222112222200012100101222112212102220211022222122212102212220122221122012001220222020121011021122021212202112221012022221120222222201212220222202112221220021222120122021110211222202122021012022221122222212022220122222121222122220201121020102122111220222112112222001222221220120201202202221022000012021211211212012011110102202022202002221121220220022220112022201022210021022210222220221220022011001120222102002220120022222022021210002212210122002002022222010222121101211021222212202122220010022021222222002022201022200021202210202112221020002212221020202101222221110020021122120220201221102221212012122212100202200200121220011022222102221002020020222211100222210222222022122022211201022221211111210122202000212222001112022020021200010201212121000101220222011222210100102112200212202210222210220122122211120122221022201021102010211002122020200210212121222010022222012101120022120210210211011020001020120200010222122210102111001102222000021020021020122212222222212122202020202011222212120021002022012220222101002221012102120120102221202210110020202020021221220222000100121110112022222202022002221021222211221002222022201022122221221120220120100210201022222111112222202020220121202221001202011221122120020220211222220120222120221012222200220022220022222221002112212222212222002221210101021120111020101122212211102222122120021121111201221220110022211000222201020212221121201101102212212200022122122020121120100212200102212121112001221110221120201210201122212100012222100122021222020000201202022221011121220201110202020122021010011222212212122211021121220021122102210202210221222200221210220102002100002021222010202220101020022022011222200222001122001012021210202202012002000021010212222020020022221022220011202122220112222221202122212102221111200221020221212211102221101012022201021100222211021120022101022220111222000212020120120212222212020011122221021102111222222222202222212121211101222001201202110020212200002220120201221220212101212222101022001121220202011202112121212202010112212102020020121220022220211222222202202020002202222210022012001022000120202021012221222200120201211202220210120022000222122211220202100002101222200122212212221022201222022011212222210112212120112011202202220111022211012222222101102221200221222112220102202202100020112000221212010212121102120020001010222112022010201122121122210122220002222220122222220121022202201212010120212002212222211102222100120001102211122020212011022202211212110221112110200212222200022201112220121202010212212012201122212121211102221200122011002221212201212222122112122200210111021201112121121110020211100212220111201102110100120202112201101211001111111220100121022110210011011222111121100221020111120010201010001201000000020211220100120001110012102001220021012001110111121111 diff --git a/src/adventofcode2019/solutions/data/day_09/day09.txt b/src/adventofcode2019/data/day_09/day09.txt similarity index 99% rename from src/adventofcode2019/solutions/data/day_09/day09.txt rename to src/adventofcode2019/data/day_09/day09.txt index f62f256a..059bbe75 100644 --- a/src/adventofcode2019/solutions/data/day_09/day09.txt +++ b/src/adventofcode2019/data/day_09/day09.txt @@ -1 +1 @@ -1102,34463338,34463338,63,1007,63,34463338,63,1005,63,53,1101,0,3,1000,109,988,209,12,9,1000,209,6,209,3,203,0,1008,1000,1,63,1005,63,65,1008,1000,2,63,1005,63,904,1008,1000,0,63,1005,63,58,4,25,104,0,99,4,0,104,0,99,4,17,104,0,99,0,0,1101,0,36,1015,1102,1,387,1028,1101,24,0,1016,1101,0,23,1008,1102,1,35,1012,1102,1,554,1023,1101,29,0,1003,1101,27,0,1011,1101,25,0,1000,1101,0,38,1018,1102,20,1,1019,1102,28,1,1005,1102,1,619,1026,1102,1,22,1004,1101,0,0,1020,1101,0,31,1009,1102,1,783,1024,1102,1,33,1001,1102,616,1,1027,1102,1,21,1006,1101,32,0,1013,1102,39,1,1014,1102,1,378,1029,1101,774,0,1025,1102,1,1,1021,1102,30,1,1007,1102,37,1,1002,1102,1,26,1017,1101,0,557,1022,1102,1,34,1010,109,13,2101,0,-5,63,1008,63,23,63,1005,63,203,4,187,1105,1,207,1001,64,1,64,1002,64,2,64,109,-14,2107,28,4,63,1005,63,225,4,213,1106,0,229,1001,64,1,64,1002,64,2,64,109,10,1207,-3,20,63,1005,63,245,1106,0,251,4,235,1001,64,1,64,1002,64,2,64,109,8,1205,3,263,1105,1,269,4,257,1001,64,1,64,1002,64,2,64,109,-9,1207,-7,34,63,1005,63,287,4,275,1105,1,291,1001,64,1,64,1002,64,2,64,109,-4,2102,1,-3,63,1008,63,32,63,1005,63,311,1105,1,317,4,297,1001,64,1,64,1002,64,2,64,109,21,21101,40,0,-6,1008,1019,43,63,1005,63,337,1106,0,343,4,323,1001,64,1,64,1002,64,2,64,109,-26,1202,7,1,63,1008,63,21,63,1005,63,365,4,349,1106,0,369,1001,64,1,64,1002,64,2,64,109,26,2106,0,3,4,375,1001,64,1,64,1105,1,387,1002,64,2,64,109,-9,21108,41,40,3,1005,1019,407,1001,64,1,64,1106,0,409,4,393,1002,64,2,64,109,13,1205,-8,423,4,415,1106,0,427,1001,64,1,64,1002,64,2,64,109,-19,21107,42,41,5,1005,1015,447,1001,64,1,64,1106,0,449,4,433,1002,64,2,64,109,-3,2102,1,-5,63,1008,63,37,63,1005,63,471,4,455,1105,1,475,1001,64,1,64,1002,64,2,64,109,-2,1201,0,0,63,1008,63,28,63,1005,63,497,4,481,1105,1,501,1001,64,1,64,1002,64,2,64,109,8,2107,29,-8,63,1005,63,521,1001,64,1,64,1106,0,523,4,507,1002,64,2,64,109,-3,1208,-3,30,63,1005,63,541,4,529,1106,0,545,1001,64,1,64,1002,64,2,64,109,4,2105,1,9,1105,1,563,4,551,1001,64,1,64,1002,64,2,64,109,9,1206,-3,581,4,569,1001,64,1,64,1106,0,581,1002,64,2,64,109,-8,1201,-9,0,63,1008,63,23,63,1005,63,605,1001,64,1,64,1106,0,607,4,587,1002,64,2,64,109,21,2106,0,-9,1106,0,625,4,613,1001,64,1,64,1002,64,2,64,109,-35,2108,31,8,63,1005,63,647,4,631,1001,64,1,64,1105,1,647,1002,64,2,64,109,2,1202,0,1,63,1008,63,30,63,1005,63,667,1105,1,673,4,653,1001,64,1,64,1002,64,2,64,109,17,21108,43,43,-4,1005,1016,691,4,679,1106,0,695,1001,64,1,64,1002,64,2,64,109,-14,1208,-1,30,63,1005,63,711,1106,0,717,4,701,1001,64,1,64,1002,64,2,64,109,6,21101,44,0,-1,1008,1011,44,63,1005,63,739,4,723,1105,1,743,1001,64,1,64,1002,64,2,64,109,-15,2108,30,8,63,1005,63,759,1106,0,765,4,749,1001,64,1,64,1002,64,2,64,109,27,2105,1,0,4,771,1001,64,1,64,1105,1,783,1002,64,2,64,109,-9,1206,6,795,1105,1,801,4,789,1001,64,1,64,1002,64,2,64,109,4,21102,45,1,-7,1008,1012,45,63,1005,63,823,4,807,1105,1,827,1001,64,1,64,1002,64,2,64,109,-14,21102,46,1,5,1008,1010,43,63,1005,63,851,1001,64,1,64,1105,1,853,4,833,1002,64,2,64,109,-1,2101,0,1,63,1008,63,25,63,1005,63,873,1105,1,879,4,859,1001,64,1,64,1002,64,2,64,109,9,21107,47,48,-3,1005,1010,897,4,885,1105,1,901,1001,64,1,64,4,64,99,21101,0,27,1,21101,915,0,0,1106,0,922,21201,1,57526,1,204,1,99,109,3,1207,-2,3,63,1005,63,964,21201,-2,-1,1,21101,942,0,0,1106,0,922,21201,1,0,-1,21201,-2,-3,1,21101,957,0,0,1106,0,922,22201,1,-1,-2,1105,1,968,21202,-2,1,-2,109,-3,2106,0,0 \ No newline at end of file +1102,34463338,34463338,63,1007,63,34463338,63,1005,63,53,1101,0,3,1000,109,988,209,12,9,1000,209,6,209,3,203,0,1008,1000,1,63,1005,63,65,1008,1000,2,63,1005,63,904,1008,1000,0,63,1005,63,58,4,25,104,0,99,4,0,104,0,99,4,17,104,0,99,0,0,1101,0,36,1015,1102,1,387,1028,1101,24,0,1016,1101,0,23,1008,1102,1,35,1012,1102,1,554,1023,1101,29,0,1003,1101,27,0,1011,1101,25,0,1000,1101,0,38,1018,1102,20,1,1019,1102,28,1,1005,1102,1,619,1026,1102,1,22,1004,1101,0,0,1020,1101,0,31,1009,1102,1,783,1024,1102,1,33,1001,1102,616,1,1027,1102,1,21,1006,1101,32,0,1013,1102,39,1,1014,1102,1,378,1029,1101,774,0,1025,1102,1,1,1021,1102,30,1,1007,1102,37,1,1002,1102,1,26,1017,1101,0,557,1022,1102,1,34,1010,109,13,2101,0,-5,63,1008,63,23,63,1005,63,203,4,187,1105,1,207,1001,64,1,64,1002,64,2,64,109,-14,2107,28,4,63,1005,63,225,4,213,1106,0,229,1001,64,1,64,1002,64,2,64,109,10,1207,-3,20,63,1005,63,245,1106,0,251,4,235,1001,64,1,64,1002,64,2,64,109,8,1205,3,263,1105,1,269,4,257,1001,64,1,64,1002,64,2,64,109,-9,1207,-7,34,63,1005,63,287,4,275,1105,1,291,1001,64,1,64,1002,64,2,64,109,-4,2102,1,-3,63,1008,63,32,63,1005,63,311,1105,1,317,4,297,1001,64,1,64,1002,64,2,64,109,21,21101,40,0,-6,1008,1019,43,63,1005,63,337,1106,0,343,4,323,1001,64,1,64,1002,64,2,64,109,-26,1202,7,1,63,1008,63,21,63,1005,63,365,4,349,1106,0,369,1001,64,1,64,1002,64,2,64,109,26,2106,0,3,4,375,1001,64,1,64,1105,1,387,1002,64,2,64,109,-9,21108,41,40,3,1005,1019,407,1001,64,1,64,1106,0,409,4,393,1002,64,2,64,109,13,1205,-8,423,4,415,1106,0,427,1001,64,1,64,1002,64,2,64,109,-19,21107,42,41,5,1005,1015,447,1001,64,1,64,1106,0,449,4,433,1002,64,2,64,109,-3,2102,1,-5,63,1008,63,37,63,1005,63,471,4,455,1105,1,475,1001,64,1,64,1002,64,2,64,109,-2,1201,0,0,63,1008,63,28,63,1005,63,497,4,481,1105,1,501,1001,64,1,64,1002,64,2,64,109,8,2107,29,-8,63,1005,63,521,1001,64,1,64,1106,0,523,4,507,1002,64,2,64,109,-3,1208,-3,30,63,1005,63,541,4,529,1106,0,545,1001,64,1,64,1002,64,2,64,109,4,2105,1,9,1105,1,563,4,551,1001,64,1,64,1002,64,2,64,109,9,1206,-3,581,4,569,1001,64,1,64,1106,0,581,1002,64,2,64,109,-8,1201,-9,0,63,1008,63,23,63,1005,63,605,1001,64,1,64,1106,0,607,4,587,1002,64,2,64,109,21,2106,0,-9,1106,0,625,4,613,1001,64,1,64,1002,64,2,64,109,-35,2108,31,8,63,1005,63,647,4,631,1001,64,1,64,1105,1,647,1002,64,2,64,109,2,1202,0,1,63,1008,63,30,63,1005,63,667,1105,1,673,4,653,1001,64,1,64,1002,64,2,64,109,17,21108,43,43,-4,1005,1016,691,4,679,1106,0,695,1001,64,1,64,1002,64,2,64,109,-14,1208,-1,30,63,1005,63,711,1106,0,717,4,701,1001,64,1,64,1002,64,2,64,109,6,21101,44,0,-1,1008,1011,44,63,1005,63,739,4,723,1105,1,743,1001,64,1,64,1002,64,2,64,109,-15,2108,30,8,63,1005,63,759,1106,0,765,4,749,1001,64,1,64,1002,64,2,64,109,27,2105,1,0,4,771,1001,64,1,64,1105,1,783,1002,64,2,64,109,-9,1206,6,795,1105,1,801,4,789,1001,64,1,64,1002,64,2,64,109,4,21102,45,1,-7,1008,1012,45,63,1005,63,823,4,807,1105,1,827,1001,64,1,64,1002,64,2,64,109,-14,21102,46,1,5,1008,1010,43,63,1005,63,851,1001,64,1,64,1105,1,853,4,833,1002,64,2,64,109,-1,2101,0,1,63,1008,63,25,63,1005,63,873,1105,1,879,4,859,1001,64,1,64,1002,64,2,64,109,9,21107,47,48,-3,1005,1010,897,4,885,1105,1,901,1001,64,1,64,4,64,99,21101,0,27,1,21101,915,0,0,1106,0,922,21201,1,57526,1,204,1,99,109,3,1207,-2,3,63,1005,63,964,21201,-2,-1,1,21101,942,0,0,1106,0,922,21201,1,0,-1,21201,-2,-3,1,21101,957,0,0,1106,0,922,22201,1,-1,-2,1105,1,968,21202,-2,1,-2,109,-3,2106,0,0 diff --git a/src/adventofcode2019/solutions/data/day_10/day10.txt b/src/adventofcode2019/data/day_10/day10.txt similarity index 100% rename from src/adventofcode2019/solutions/data/day_10/day10.txt rename to src/adventofcode2019/data/day_10/day10.txt diff --git a/src/adventofcode2019/solutions/data/day_11/day11.txt b/src/adventofcode2019/data/day_11/day11.txt similarity index 99% rename from src/adventofcode2019/solutions/data/day_11/day11.txt rename to src/adventofcode2019/data/day_11/day11.txt index 8b99bcc6..64f15f85 100644 --- a/src/adventofcode2019/solutions/data/day_11/day11.txt +++ b/src/adventofcode2019/data/day_11/day11.txt @@ -1 +1 @@ -3,8,1005,8,299,1106,0,11,0,0,0,104,1,104,0,3,8,102,-1,8,10,101,1,10,10,4,10,1008,8,0,10,4,10,1002,8,1,29,1,1007,14,10,2,1106,8,10,3,8,1002,8,-1,10,1001,10,1,10,4,10,108,1,8,10,4,10,1002,8,1,58,3,8,1002,8,-1,10,101,1,10,10,4,10,108,0,8,10,4,10,1002,8,1,80,3,8,1002,8,-1,10,1001,10,1,10,4,10,1008,8,0,10,4,10,102,1,8,103,1,5,6,10,3,8,102,-1,8,10,101,1,10,10,4,10,108,1,8,10,4,10,101,0,8,128,1,106,18,10,1,7,20,10,1006,0,72,1006,0,31,3,8,1002,8,-1,10,1001,10,1,10,4,10,108,0,8,10,4,10,1002,8,1,164,3,8,1002,8,-1,10,1001,10,1,10,4,10,108,1,8,10,4,10,102,1,8,186,1,1007,8,10,1006,0,98,3,8,1002,8,-1,10,1001,10,1,10,4,10,1008,8,0,10,4,10,101,0,8,216,2,102,8,10,1,1008,18,10,1,1108,8,10,1006,0,68,3,8,1002,8,-1,10,1001,10,1,10,4,10,1008,8,1,10,4,10,1001,8,0,253,3,8,102,-1,8,10,1001,10,1,10,4,10,108,1,8,10,4,10,1002,8,1,274,1,1105,7,10,101,1,9,9,1007,9,1060,10,1005,10,15,99,109,621,104,0,104,1,21102,936995738520,1,1,21102,316,1,0,1106,0,420,21101,0,936995824276,1,21102,1,327,0,1106,0,420,3,10,104,0,104,1,3,10,104,0,104,0,3,10,104,0,104,1,3,10,104,0,104,1,3,10,104,0,104,0,3,10,104,0,104,1,21102,248129784923,1,1,21102,1,374,0,1105,1,420,21102,29015149735,1,1,21101,385,0,0,1106,0,420,3,10,104,0,104,0,3,10,104,0,104,0,21101,983925826304,0,1,21101,0,408,0,1105,1,420,21102,825012036364,1,1,21101,0,419,0,1105,1,420,99,109,2,22101,0,-1,1,21101,0,40,2,21101,0,451,3,21102,441,1,0,1105,1,484,109,-2,2105,1,0,0,1,0,0,1,109,2,3,10,204,-1,1001,446,447,462,4,0,1001,446,1,446,108,4,446,10,1006,10,478,1101,0,0,446,109,-2,2105,1,0,0,109,4,2102,1,-1,483,1207,-3,0,10,1006,10,501,21102,0,1,-3,21201,-3,0,1,22102,1,-2,2,21102,1,1,3,21101,520,0,0,1106,0,525,109,-4,2105,1,0,109,5,1207,-3,1,10,1006,10,548,2207,-4,-2,10,1006,10,548,21201,-4,0,-4,1105,1,616,21201,-4,0,1,21201,-3,-1,2,21202,-2,2,3,21102,1,567,0,1105,1,525,21202,1,1,-4,21102,1,1,-1,2207,-4,-2,10,1006,10,586,21102,0,1,-1,22202,-2,-1,-2,2107,0,-3,10,1006,10,608,21201,-1,0,1,21102,1,608,0,106,0,483,21202,-2,-1,-2,22201,-4,-2,-4,109,-5,2106,0,0 \ No newline at end of file +3,8,1005,8,299,1106,0,11,0,0,0,104,1,104,0,3,8,102,-1,8,10,101,1,10,10,4,10,1008,8,0,10,4,10,1002,8,1,29,1,1007,14,10,2,1106,8,10,3,8,1002,8,-1,10,1001,10,1,10,4,10,108,1,8,10,4,10,1002,8,1,58,3,8,1002,8,-1,10,101,1,10,10,4,10,108,0,8,10,4,10,1002,8,1,80,3,8,1002,8,-1,10,1001,10,1,10,4,10,1008,8,0,10,4,10,102,1,8,103,1,5,6,10,3,8,102,-1,8,10,101,1,10,10,4,10,108,1,8,10,4,10,101,0,8,128,1,106,18,10,1,7,20,10,1006,0,72,1006,0,31,3,8,1002,8,-1,10,1001,10,1,10,4,10,108,0,8,10,4,10,1002,8,1,164,3,8,1002,8,-1,10,1001,10,1,10,4,10,108,1,8,10,4,10,102,1,8,186,1,1007,8,10,1006,0,98,3,8,1002,8,-1,10,1001,10,1,10,4,10,1008,8,0,10,4,10,101,0,8,216,2,102,8,10,1,1008,18,10,1,1108,8,10,1006,0,68,3,8,1002,8,-1,10,1001,10,1,10,4,10,1008,8,1,10,4,10,1001,8,0,253,3,8,102,-1,8,10,1001,10,1,10,4,10,108,1,8,10,4,10,1002,8,1,274,1,1105,7,10,101,1,9,9,1007,9,1060,10,1005,10,15,99,109,621,104,0,104,1,21102,936995738520,1,1,21102,316,1,0,1106,0,420,21101,0,936995824276,1,21102,1,327,0,1106,0,420,3,10,104,0,104,1,3,10,104,0,104,0,3,10,104,0,104,1,3,10,104,0,104,1,3,10,104,0,104,0,3,10,104,0,104,1,21102,248129784923,1,1,21102,1,374,0,1105,1,420,21102,29015149735,1,1,21101,385,0,0,1106,0,420,3,10,104,0,104,0,3,10,104,0,104,0,21101,983925826304,0,1,21101,0,408,0,1105,1,420,21102,825012036364,1,1,21101,0,419,0,1105,1,420,99,109,2,22101,0,-1,1,21101,0,40,2,21101,0,451,3,21102,441,1,0,1105,1,484,109,-2,2105,1,0,0,1,0,0,1,109,2,3,10,204,-1,1001,446,447,462,4,0,1001,446,1,446,108,4,446,10,1006,10,478,1101,0,0,446,109,-2,2105,1,0,0,109,4,2102,1,-1,483,1207,-3,0,10,1006,10,501,21102,0,1,-3,21201,-3,0,1,22102,1,-2,2,21102,1,1,3,21101,520,0,0,1106,0,525,109,-4,2105,1,0,109,5,1207,-3,1,10,1006,10,548,2207,-4,-2,10,1006,10,548,21201,-4,0,-4,1105,1,616,21201,-4,0,1,21201,-3,-1,2,21202,-2,2,3,21102,1,567,0,1105,1,525,21202,1,1,-4,21102,1,1,-1,2207,-4,-2,10,1006,10,586,21102,0,1,-1,22202,-2,-1,-2,2107,0,-3,10,1006,10,608,21201,-1,0,1,21102,1,608,0,106,0,483,21202,-2,-1,-2,22201,-4,-2,-4,109,-5,2106,0,0 diff --git a/src/adventofcode2019/solutions/data/day_12/day12.txt b/src/adventofcode2019/data/day_12/day12.txt similarity index 73% rename from src/adventofcode2019/solutions/data/day_12/day12.txt rename to src/adventofcode2019/data/day_12/day12.txt index cd37d27f..7c9cc367 100644 --- a/src/adventofcode2019/solutions/data/day_12/day12.txt +++ b/src/adventofcode2019/data/day_12/day12.txt @@ -1,4 +1,4 @@ - \ No newline at end of file + diff --git a/src/adventofcode2019/solutions/data/day_13/day13.txt b/src/adventofcode2019/data/day_13/day13.txt similarity index 99% rename from src/adventofcode2019/solutions/data/day_13/day13.txt rename to src/adventofcode2019/data/day_13/day13.txt index 88fcb50c..94ffd411 100644 --- a/src/adventofcode2019/solutions/data/day_13/day13.txt +++ b/src/adventofcode2019/data/day_13/day13.txt @@ -1 +1 @@ -1,380,379,385,1008,2159,334192,381,1005,381,12,99,109,2160,1102,0,1,383,1101,0,0,382,20101,0,382,1,21002,383,1,2,21102,37,1,0,1106,0,578,4,382,4,383,204,1,1001,382,1,382,1007,382,38,381,1005,381,22,1001,383,1,383,1007,383,20,381,1005,381,18,1006,385,69,99,104,-1,104,0,4,386,3,384,1007,384,0,381,1005,381,94,107,0,384,381,1005,381,108,1105,1,161,107,1,392,381,1006,381,161,1101,0,-1,384,1105,1,119,1007,392,36,381,1006,381,161,1102,1,1,384,20102,1,392,1,21101,0,18,2,21101,0,0,3,21102,1,138,0,1105,1,549,1,392,384,392,21001,392,0,1,21102,18,1,2,21102,3,1,3,21101,0,161,0,1105,1,549,1102,0,1,384,20001,388,390,1,21001,389,0,2,21102,180,1,0,1105,1,578,1206,1,213,1208,1,2,381,1006,381,205,20001,388,390,1,20102,1,389,2,21102,1,205,0,1106,0,393,1002,390,-1,390,1102,1,1,384,21002,388,1,1,20001,389,391,2,21102,1,228,0,1105,1,578,1206,1,261,1208,1,2,381,1006,381,253,21001,388,0,1,20001,389,391,2,21102,253,1,0,1106,0,393,1002,391,-1,391,1101,0,1,384,1005,384,161,20001,388,390,1,20001,389,391,2,21101,0,279,0,1106,0,578,1206,1,316,1208,1,2,381,1006,381,304,20001,388,390,1,20001,389,391,2,21101,304,0,0,1105,1,393,1002,390,-1,390,1002,391,-1,391,1102,1,1,384,1005,384,161,20101,0,388,1,20102,1,389,2,21102,0,1,3,21101,0,338,0,1106,0,549,1,388,390,388,1,389,391,389,21001,388,0,1,20101,0,389,2,21101,4,0,3,21101,0,365,0,1105,1,549,1007,389,19,381,1005,381,75,104,-1,104,0,104,0,99,0,1,0,0,0,0,0,0,205,17,15,1,1,19,109,3,21201,-2,0,1,21201,-1,0,2,21102,1,0,3,21101,414,0,0,1106,0,549,22102,1,-2,1,22101,0,-1,2,21102,1,429,0,1105,1,601,1202,1,1,435,1,386,0,386,104,-1,104,0,4,386,1001,387,-1,387,1005,387,451,99,109,-3,2106,0,0,109,8,22202,-7,-6,-3,22201,-3,-5,-3,21202,-4,64,-2,2207,-3,-2,381,1005,381,492,21202,-2,-1,-1,22201,-3,-1,-3,2207,-3,-2,381,1006,381,481,21202,-4,8,-2,2207,-3,-2,381,1005,381,518,21202,-2,-1,-1,22201,-3,-1,-3,2207,-3,-2,381,1006,381,507,2207,-3,-4,381,1005,381,540,21202,-4,-1,-1,22201,-3,-1,-3,2207,-3,-4,381,1006,381,529,21202,-3,1,-7,109,-8,2105,1,0,109,4,1202,-2,38,566,201,-3,566,566,101,639,566,566,1201,-1,0,0,204,-3,204,-2,204,-1,109,-4,2106,0,0,109,3,1202,-1,38,593,201,-2,593,593,101,639,593,593,21001,0,0,-2,109,-3,2106,0,0,109,3,22102,20,-2,1,22201,1,-1,1,21102,1,383,2,21102,218,1,3,21102,1,760,4,21102,1,630,0,1105,1,456,21201,1,1399,-2,109,-3,2106,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,2,0,0,2,0,2,2,0,0,2,2,2,2,2,2,2,2,0,2,0,0,2,2,2,2,0,0,0,2,0,0,2,0,0,1,1,0,0,2,2,2,0,2,0,0,2,0,2,2,0,2,2,0,2,2,2,0,2,2,0,0,2,2,0,2,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,93,28,50,41,28,28,5,61,57,40,39,86,74,63,37,7,89,55,13,59,61,39,41,25,89,55,1,13,39,76,27,49,19,29,79,37,48,8,16,71,78,19,92,45,6,66,28,76,40,88,77,71,92,17,44,68,62,29,48,11,98,6,88,71,96,77,87,30,90,3,58,73,29,87,40,48,79,16,91,29,77,2,37,83,49,81,42,91,6,23,89,97,30,43,7,40,76,35,76,15,13,53,44,55,34,27,32,1,57,81,61,57,90,86,4,4,39,47,39,52,38,70,38,33,54,84,34,63,61,76,93,5,38,38,47,75,38,94,38,81,98,89,19,54,32,42,82,30,50,25,5,71,8,34,86,23,42,43,7,83,98,37,4,53,83,52,1,36,20,59,76,16,56,23,27,90,83,64,22,54,3,15,74,67,53,16,28,77,35,84,18,65,2,56,27,90,32,40,83,4,66,95,96,32,51,40,92,27,62,2,53,78,31,46,89,84,23,31,75,2,79,76,73,55,24,17,97,43,49,80,1,75,92,22,27,36,39,87,20,73,79,74,29,17,55,60,20,23,19,34,71,28,73,41,7,67,66,21,81,93,93,65,95,15,35,47,44,56,3,50,20,89,74,35,86,76,70,46,96,60,67,58,84,50,6,79,51,91,97,40,13,3,48,91,77,14,84,94,42,33,46,88,92,73,73,40,55,37,63,26,93,8,14,71,37,65,57,86,95,65,87,12,3,57,31,89,42,57,71,41,36,1,79,9,97,55,98,14,1,36,39,39,77,65,61,1,32,47,58,57,81,93,73,81,21,77,5,2,81,34,64,84,57,50,30,57,27,42,18,19,76,43,17,21,16,26,5,93,66,61,5,72,26,53,48,80,54,85,55,56,80,91,61,52,79,86,16,71,20,46,89,54,63,5,31,73,26,87,8,82,32,26,71,35,23,39,33,3,55,70,23,13,40,48,78,78,94,76,46,94,90,18,73,92,27,70,90,44,45,14,79,39,83,17,94,23,98,42,7,2,90,9,95,4,89,54,89,69,5,57,5,75,52,56,94,41,53,56,74,69,84,92,58,15,96,26,48,66,67,92,55,75,37,74,81,65,74,23,14,42,92,24,58,66,52,94,96,18,23,30,66,17,43,68,47,83,85,43,43,64,63,83,90,81,60,62,87,37,48,26,71,63,60,47,60,59,40,49,28,32,54,63,94,3,21,6,64,36,77,1,86,11,57,79,97,4,55,7,49,31,60,38,14,15,78,35,94,43,78,78,70,56,87,76,44,43,15,50,79,22,62,2,44,41,45,34,62,38,31,92,19,55,14,7,78,35,33,40,69,8,90,52,19,33,38,41,15,49,62,23,29,78,73,76,87,82,18,62,30,53,85,37,18,20,86,86,92,46,96,69,88,48,71,69,43,90,88,46,7,61,28,30,84,22,19,44,60,6,21,53,98,58,55,95,23,96,56,12,10,19,92,10,30,43,91,18,26,78,71,22,78,34,17,36,82,12,97,28,8,86,48,41,47,28,52,22,14,6,25,24,17,76,25,5,70,29,92,36,80,64,40,12,74,96,74,33,59,59,32,96,26,24,93,64,6,48,49,62,73,48,96,75,14,62,29,18,71,71,61,26,97,77,76,59,24,11,96,19,34,80,16,23,77,76,71,19,7,58,20,43,25,75,30,78,54,13,16,47,92,17,64,30,15,83,17,66,37,31,95,95,334192 \ No newline at end of file +1,380,379,385,1008,2159,334192,381,1005,381,12,99,109,2160,1102,0,1,383,1101,0,0,382,20101,0,382,1,21002,383,1,2,21102,37,1,0,1106,0,578,4,382,4,383,204,1,1001,382,1,382,1007,382,38,381,1005,381,22,1001,383,1,383,1007,383,20,381,1005,381,18,1006,385,69,99,104,-1,104,0,4,386,3,384,1007,384,0,381,1005,381,94,107,0,384,381,1005,381,108,1105,1,161,107,1,392,381,1006,381,161,1101,0,-1,384,1105,1,119,1007,392,36,381,1006,381,161,1102,1,1,384,20102,1,392,1,21101,0,18,2,21101,0,0,3,21102,1,138,0,1105,1,549,1,392,384,392,21001,392,0,1,21102,18,1,2,21102,3,1,3,21101,0,161,0,1105,1,549,1102,0,1,384,20001,388,390,1,21001,389,0,2,21102,180,1,0,1105,1,578,1206,1,213,1208,1,2,381,1006,381,205,20001,388,390,1,20102,1,389,2,21102,1,205,0,1106,0,393,1002,390,-1,390,1102,1,1,384,21002,388,1,1,20001,389,391,2,21102,1,228,0,1105,1,578,1206,1,261,1208,1,2,381,1006,381,253,21001,388,0,1,20001,389,391,2,21102,253,1,0,1106,0,393,1002,391,-1,391,1101,0,1,384,1005,384,161,20001,388,390,1,20001,389,391,2,21101,0,279,0,1106,0,578,1206,1,316,1208,1,2,381,1006,381,304,20001,388,390,1,20001,389,391,2,21101,304,0,0,1105,1,393,1002,390,-1,390,1002,391,-1,391,1102,1,1,384,1005,384,161,20101,0,388,1,20102,1,389,2,21102,0,1,3,21101,0,338,0,1106,0,549,1,388,390,388,1,389,391,389,21001,388,0,1,20101,0,389,2,21101,4,0,3,21101,0,365,0,1105,1,549,1007,389,19,381,1005,381,75,104,-1,104,0,104,0,99,0,1,0,0,0,0,0,0,205,17,15,1,1,19,109,3,21201,-2,0,1,21201,-1,0,2,21102,1,0,3,21101,414,0,0,1106,0,549,22102,1,-2,1,22101,0,-1,2,21102,1,429,0,1105,1,601,1202,1,1,435,1,386,0,386,104,-1,104,0,4,386,1001,387,-1,387,1005,387,451,99,109,-3,2106,0,0,109,8,22202,-7,-6,-3,22201,-3,-5,-3,21202,-4,64,-2,2207,-3,-2,381,1005,381,492,21202,-2,-1,-1,22201,-3,-1,-3,2207,-3,-2,381,1006,381,481,21202,-4,8,-2,2207,-3,-2,381,1005,381,518,21202,-2,-1,-1,22201,-3,-1,-3,2207,-3,-2,381,1006,381,507,2207,-3,-4,381,1005,381,540,21202,-4,-1,-1,22201,-3,-1,-3,2207,-3,-4,381,1006,381,529,21202,-3,1,-7,109,-8,2105,1,0,109,4,1202,-2,38,566,201,-3,566,566,101,639,566,566,1201,-1,0,0,204,-3,204,-2,204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,2,0,0,0,0,0,2,2,2,0,0,0,2,0,0,0,0,2,0,0,0,0,1,1,0,0,2,0,2,2,0,2,2,2,0,2,0,2,2,2,0,0,0,2,0,0,2,2,0,2,0,2,2,2,0,0,0,2,2,0,1,1,0,2,2,2,0,0,0,0,2,2,0,2,0,0,0,2,0,0,2,0,0,0,0,0,0,2,2,0,0,2,0,2,2,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,93,28,50,41,28,28,5,61,57,40,39,86,74,63,37,7,89,55,13,59,61,39,41,25,89,55,1,13,39,76,27,49,19,29,79,37,48,8,16,71,78,19,92,45,6,66,28,76,40,88,77,71,92,17,44,68,62,29,48,11,98,6,88,71,96,77,87,30,90,3,58,73,29,87,40,48,79,16,91,29,77,2,37,83,49,81,42,91,6,23,89,97,30,43,7,40,76,35,76,15,13,53,44,55,34,27,32,1,57,81,61,57,90,86,4,4,39,47,39,52,38,70,38,33,54,84,34,63,61,76,93,5,38,38,47,75,38,94,38,81,98,89,19,54,32,42,82,30,50,25,5,71,8,34,86,23,42,43,7,83,98,37,4,53,83,52,1,36,20,59,76,16,56,23,27,90,83,64,22,54,3,15,74,67,53,16,28,77,35,84,18,65,2,56,27,90,32,40,83,4,66,95,96,32,51,40,92,27,62,2,53,78,31,46,89,84,23,31,75,2,79,76,73,55,24,17,97,43,49,80,1,75,92,22,27,36,39,87,20,73,79,74,29,17,55,60,20,23,19,34,71,28,73,41,7,67,66,21,81,93,93,65,95,15,35,47,44,56,3,50,20,89,74,35,86,76,70,46,96,60,67,58,84,50,6,79,51,91,97,40,13,3,48,91,77,14,84,94,42,33,46,88,92,73,73,40,55,37,63,26,93,8,14,71,37,65,57,86,95,65,87,12,3,57,31,89,42,57,71,41,36,1,79,9,97,55,98,14,1,36,39,39,77,65,61,1,32,47,58,57,81,93,73,81,21,77,5,2,81,34,64,84,57,50,30,57,27,42,18,19,76,43,17,21,16,26,5,93,66,61,5,72,26,53,48,80,54,85,55,56,80,91,61,52,79,86,16,71,20,46,89,54,63,5,31,73,26,87,8,82,32,26,71,35,23,39,33,3,55,70,23,13,40,48,78,78,94,76,46,94,90,18,73,92,27,70,90,44,45,14,79,39,83,17,94,23,98,42,7,2,90,9,95,4,89,54,89,69,5,57,5,75,52,56,94,41,53,56,74,69,84,92,58,15,96,26,48,66,67,92,55,75,37,74,81,65,74,23,14,42,92,24,58,66,52,94,96,18,23,30,66,17,43,68,47,83,85,43,43,64,63,83,90,81,60,62,87,37,48,26,71,63,60,47,60,59,40,49,28,32,54,63,94,3,21,6,64,36,77,1,86,11,57,79,97,4,55,7,49,31,60,38,14,15,78,35,94,43,78,78,70,56,87,76,44,43,15,50,79,22,62,2,44,41,45,34,62,38,31,92,19,55,14,7,78,35,33,40,69,8,90,52,19,33,38,41,15,49,62,23,29,78,73,76,87,82,18,62,30,53,85,37,18,20,86,86,92,46,96,69,88,48,71,69,43,90,88,46,7,61,28,30,84,22,19,44,60,6,21,53,98,58,55,95,23,96,56,12,10,19,92,10,30,43,91,18,26,78,71,22,78,34,17,36,82,12,97,28,8,86,48,41,47,28,52,22,14,6,25,24,17,76,25,5,70,29,92,36,80,64,40,12,74,96,74,33,59,59,32,96,26,24,93,64,6,48,49,62,73,48,96,75,14,62,29,18,71,71,61,26,97,77,76,59,24,11,96,19,34,80,16,23,77,76,71,19,7,58,20,43,25,75,30,78,54,13,16,47,92,17,64,30,15,83,17,66,37,31,95,95,334192 diff --git a/src/adventofcode2019/solutions/data/day_14/day14.txt b/src/adventofcode2019/data/day_14/day14.txt similarity index 97% rename from src/adventofcode2019/solutions/data/day_14/day14.txt rename to src/adventofcode2019/data/day_14/day14.txt index df2efcf3..d9fed8c1 100644 --- a/src/adventofcode2019/solutions/data/day_14/day14.txt +++ b/src/adventofcode2019/data/day_14/day14.txt @@ -60,4 +60,4 @@ 7 DNLQF => 9 NWPC 1 FLQSP => 6 ZPKP 5 VLKQ => 7 RSHRF -6 TNRBS, 4 DZDQN, 6 TWHBV => 6 TJLKW \ No newline at end of file +6 TNRBS, 4 DZDQN, 6 TWHBV => 6 TJLKW diff --git a/src/adventofcode2019/solutions/data/day_15/day15.txt b/src/adventofcode2019/data/day_15/day15.txt similarity index 98% rename from src/adventofcode2019/solutions/data/day_15/day15.txt rename to src/adventofcode2019/data/day_15/day15.txt index 7233c9d1..57a58027 100644 --- a/src/adventofcode2019/solutions/data/day_15/day15.txt +++ b/src/adventofcode2019/data/day_15/day15.txt @@ -1 +1 @@ -3,1033,1008,1033,1,1032,1005,1032,31,1008,1033,2,1032,1005,1032,58,1008,1033,3,1032,1005,1032,81,1008,1033,4,1032,1005,1032,104,99,101,0,1034,1039,1001,1036,0,1041,1001,1035,-1,1040,1008,1038,0,1043,102,-1,1043,1032,1,1037,1032,1042,1105,1,124,102,1,1034,1039,1002,1036,1,1041,1001,1035,1,1040,1008,1038,0,1043,1,1037,1038,1042,1106,0,124,1001,1034,-1,1039,1008,1036,0,1041,1002,1035,1,1040,102,1,1038,1043,102,1,1037,1042,1106,0,124,1001,1034,1,1039,1008,1036,0,1041,1001,1035,0,1040,1002,1038,1,1043,101,0,1037,1042,1006,1039,217,1006,1040,217,1008,1039,40,1032,1005,1032,217,1008,1040,40,1032,1005,1032,217,1008,1039,37,1032,1006,1032,165,1008,1040,33,1032,1006,1032,165,1101,0,2,1044,1106,0,224,2,1041,1043,1032,1006,1032,179,1101,0,1,1044,1105,1,224,1,1041,1043,1032,1006,1032,217,1,1042,1043,1032,1001,1032,-1,1032,1002,1032,39,1032,1,1032,1039,1032,101,-1,1032,1032,101,252,1032,211,1007,0,62,1044,1106,0,224,1101,0,0,1044,1106,0,224,1006,1044,247,101,0,1039,1034,1002,1040,1,1035,102,1,1041,1036,101,0,1043,1038,1001,1042,0,1037,4,1044,1106,0,0,60,10,88,42,71,78,10,10,70,23,65,29,47,58,86,53,77,61,77,63,18,9,20,68,45,15,67,3,95,10,14,30,81,53,3,83,46,31,95,43,94,40,21,54,93,91,35,80,9,17,81,94,59,83,49,96,61,63,24,85,69,82,45,71,48,39,32,69,93,11,90,19,78,54,79,66,6,13,76,2,67,69,10,9,66,43,73,2,92,39,12,99,33,89,18,9,78,11,96,23,55,96,49,12,85,93,49,22,70,93,59,76,68,55,66,54,32,34,36,53,64,84,87,61,43,79,7,9,66,40,69,9,76,92,18,78,49,39,80,32,70,52,74,37,86,11,77,51,15,28,84,19,13,75,28,86,3,82,93,15,79,61,93,93,31,87,43,67,44,83,78,43,46,46,12,89,19,85,44,95,65,24,70,93,50,98,72,66,80,23,87,19,97,40,25,9,49,6,81,35,9,52,71,27,63,3,96,94,21,24,48,79,67,72,72,15,85,93,22,95,34,3,63,21,79,9,51,92,45,87,25,41,80,13,88,68,66,18,85,75,39,80,17,54,93,89,65,21,91,73,53,60,69,29,82,99,5,22,65,9,69,61,80,63,38,71,61,61,11,68,30,74,11,26,53,59,97,2,12,74,79,44,73,72,27,17,34,92,26,27,88,66,5,97,34,81,86,30,35,6,64,36,34,65,80,12,90,65,95,21,90,55,43,71,89,56,97,91,27,27,73,80,34,22,48,89,84,35,88,90,47,4,32,77,31,2,82,66,76,43,74,68,56,78,36,59,66,58,75,89,96,51,51,97,34,49,86,70,26,46,89,43,99,97,66,32,51,32,77,33,86,92,56,68,64,39,83,55,25,98,24,56,73,21,98,39,24,67,21,4,76,10,32,91,53,82,37,59,72,63,78,43,67,2,72,69,50,71,19,72,92,51,12,93,61,88,24,84,35,93,30,63,70,7,78,83,42,63,6,25,24,73,76,22,99,68,14,85,14,75,32,88,42,47,97,2,91,97,51,79,12,71,91,7,1,87,82,21,98,63,37,19,85,1,48,77,54,76,12,92,28,91,25,85,88,8,92,32,67,18,56,51,67,58,80,59,77,76,25,7,73,58,72,96,75,15,27,37,23,83,58,68,83,50,67,41,39,89,24,1,83,63,8,64,54,76,50,3,89,97,74,48,15,91,22,37,71,77,9,1,85,38,23,58,10,75,86,72,80,59,24,64,7,63,85,53,61,89,68,7,80,4,68,56,39,66,31,69,6,7,76,88,17,89,42,64,56,11,97,65,64,71,88,61,31,32,53,88,99,55,73,20,90,10,86,32,50,89,53,83,42,80,28,63,98,38,85,72,57,88,23,52,96,77,39,65,88,40,26,91,56,1,94,51,94,24,20,81,74,23,45,72,56,22,84,70,44,50,68,32,98,51,75,3,61,75,59,3,7,98,76,45,78,47,74,60,69,78,54,67,29,63,47,79,72,57,73,44,63,98,6,93,36,20,27,90,77,39,44,64,68,47,48,69,78,29,76,48,1,81,10,67,32,72,47,89,83,18,39,85,65,97,15,59,13,74,29,84,50,80,94,8,27,83,67,43,75,52,96,17,82,29,83,45,85,82,71,76,44,30,10,91,16,7,31,63,2,68,75,46,70,28,93,91,17,13,81,57,93,32,27,65,61,93,11,84,10,66,14,83,14,77,26,77,13,86,21,84,87,87,34,99,69,88,1,74,61,72,54,93,16,76,54,86,63,94,13,79,24,97,0,0,21,21,1,10,1,0,0,0,0,0,0 \ No newline at end of file +3,1033,1008,1033,1,1032,1005,1032,31,1008,1033,2,1032,1005,1032,58,1008,1033,3,1032,1005,1032,81,1008,1033,4,1032,1005,1032,104,99,101,0,1034,1039,1001,1036,0,1041,1001,1035,-1,1040,1008,1038,0,1043,102,-1,1043,1032,1,1037,1032,1042,1105,1,124,102,1,1034,1039,1002,1036,1,1041,1001,1035,1,1040,1008,1038,0,1043,1,1037,1038,1042,1106,0,124,1001,1034,-1,1039,1008,1036,0,1041,1002,1035,1,1040,102,1,1038,1043,102,1,1037,1042,1106,0,124,1001,1034,1,1039,1008,1036,0,1041,1001,1035,0,1040,1002,1038,1,1043,101,0,1037,1042,1006,1039,217,1006,1040,217,1008,1039,40,1032,1005,1032,217,1008,1040,40,1032,1005,1032,217,1008,1039,37,1032,1006,1032,165,1008,1040,33,1032,1006,1032,165,1101,0,2,1044,1106,0,224,2,1041,1043,1032,1006,1032,179,1101,0,1,1044,1105,1,224,1,1041,1043,1032,1006,1032,217,1,1042,1043,1032,1001,1032,-1,1032,1002,1032,39,1032,1,1032,1039,1032,101,-1,1032,1032,101,252,1032,211,1007,0,62,1044,1106,0,224,1101,0,0,1044,1106,0,224,1006,1044,247,101,0,1039,1034,1002,1040,1,1035,102,1,1041,1036,101,0,1043,1038,1001,1042,0,1037,4,1044,1106,0,0,60,10,88,42,71,78,10,10,70,23,65,29,47,58,86,53,77,61,77,63,18,9,20,68,45,15,67,3,95,10,14,30,81,53,3,83,46,31,95,43,94,40,21,54,93,91,35,80,9,17,81,94,59,83,49,96,61,63,24,85,69,82,45,71,48,39,32,69,93,11,90,19,78,54,79,66,6,13,76,2,67,69,10,9,66,43,73,2,92,39,12,99,33,89,18,9,78,11,96,23,55,96,49,12,85,93,49,22,70,93,59,76,68,55,66,54,32,34,36,53,64,84,87,61,43,79,7,9,66,40,69,9,76,92,18,78,49,39,80,32,70,52,74,37,86,11,77,51,15,28,84,19,13,75,28,86,3,82,93,15,79,61,93,93,31,87,43,67,44,83,78,43,46,46,12,89,19,85,44,95,65,24,70,93,50,98,72,66,80,23,87,19,97,40,25,9,49,6,81,35,9,52,71,27,63,3,96,94,21,24,48,79,67,72,72,15,85,93,22,95,34,3,63,21,79,9,51,92,45,87,25,41,80,13,88,68,66,18,85,75,39,80,17,54,93,89,65,21,91,73,53,60,69,29,82,99,5,22,65,9,69,61,80,63,38,71,61,61,11,68,30,74,11,26,53,59,97,2,12,74,79,44,73,72,27,17,34,92,26,27,88,66,5,97,34,81,86,30,35,6,64,36,34,65,80,12,90,65,95,21,90,55,43,71,89,56,97,91,27,27,73,80,34,22,48,89,84,35,88,90,47,4,32,77,31,2,82,66,76,43,74,68,56,78,36,59,66,58,75,89,96,51,51,97,34,49,86,70,26,46,89,43,99,97,66,32,51,32,77,33,86,92,56,68,64,39,83,55,25,98,24,56,73,21,98,39,24,67,21,4,76,10,32,91,53,82,37,59,72,63,78,43,67,2,72,69,50,71,19,72,92,51,12,93,61,88,24,84,35,93,30,63,70,7,78,83,42,63,6,25,24,73,76,22,99,68,14,85,14,75,32,88,42,47,97,2,91,97,51,79,12,71,91,7,1,87,82,21,98,63,37,19,85,1,48,77,54,76,12,92,28,91,25,85,88,8,92,32,67,18,56,51,67,58,80,59,77,76,25,7,73,58,72,96,75,15,27,37,23,83,58,68,83,50,67,41,39,89,24,1,83,63,8,64,54,76,50,3,89,97,74,48,15,91,22,37,71,77,9,1,85,38,23,58,10,75,86,72,80,59,24,64,7,63,85,53,61,89,68,7,80,4,68,56,39,66,31,69,6,7,76,88,17,89,42,64,56,11,97,65,64,71,88,61,31,32,53,88,99,55,73,20,90,10,86,32,50,89,53,83,42,80,28,63,98,38,85,72,57,88,23,52,96,77,39,65,88,40,26,91,56,1,94,51,94,24,20,81,74,23,45,72,56,22,84,70,44,50,68,32,98,51,75,3,61,75,59,3,7,98,76,45,78,47,74,60,69,78,54,67,29,63,47,79,72,57,73,44,63,98,6,93,36,20,27,90,77,39,44,64,68,47,48,69,78,29,76,48,1,81,10,67,32,72,47,89,83,18,39,85,65,97,15,59,13,74,29,84,50,80,94,8,27,83,67,43,75,52,96,17,82,29,83,45,85,82,71,76,44,30,10,91,16,7,31,63,2,68,75,46,70,28,93,91,17,13,81,57,93,32,27,65,61,93,11,84,10,66,14,83,14,77,26,77,13,86,21,84,87,87,34,99,69,88,1,74,61,72,54,93,16,76,54,86,63,94,13,79,24,97,0,0,21,21,1,10,1,0,0,0,0,0,0 diff --git a/src/adventofcode2019/solutions/data/day_16/day16.txt b/src/adventofcode2019/data/day_16/day16.txt similarity index 98% rename from src/adventofcode2019/solutions/data/day_16/day16.txt rename to src/adventofcode2019/data/day_16/day16.txt index e9cabfa5..cf0e280a 100644 --- a/src/adventofcode2019/solutions/data/day_16/day16.txt +++ b/src/adventofcode2019/data/day_16/day16.txt @@ -1 +1 @@ -59704176224151213770484189932636989396016853707543672704688031159981571127975101449262562108536062222616286393177775420275833561490214618092338108958319534766917790598728831388012618201701341130599267905059417956666371111749252733037090364984971914108277005170417001289652084308389839318318592713462923155468396822247189750655575623017333088246364350280299985979331660143758996484413769438651303748536351772868104792161361952505811489060546839032499706132682563962136170941039904873411038529684473891392104152677551989278815089949043159200373061921992851799948057507078358356630228490883482290389217471790233756775862302710944760078623023456856105493 \ No newline at end of file +59704176224151213770484189932636989396016853707543672704688031159981571127975101449262562108536062222616286393177775420275833561490214618092338108958319534766917790598728831388012618201701341130599267905059417956666371111749252733037090364984971914108277005170417001289652084308389839318318592713462923155468396822247189750655575623017333088246364350280299985979331660143758996484413769438651303748536351772868104792161361952505811489060546839032499706132682563962136170941039904873411038529684473891392104152677551989278815089949043159200373061921992851799948057507078358356630228490883482290389217471790233756775862302710944760078623023456856105493 diff --git a/src/adventofcode2019/solutions/data/day_17/day17.txt b/src/adventofcode2019/data/day_17/day17.txt similarity index 99% rename from src/adventofcode2019/solutions/data/day_17/day17.txt rename to src/adventofcode2019/data/day_17/day17.txt index 2598948a..a6b451c6 100644 --- a/src/adventofcode2019/solutions/data/day_17/day17.txt +++ b/src/adventofcode2019/data/day_17/day17.txt @@ -1 +1 @@ -1,330,331,332,109,3468,1102,1182,1,16,1101,0,1479,24,101,0,0,570,1006,570,36,1002,571,1,0,1001,570,-1,570,1001,24,1,24,1106,0,18,1008,571,0,571,1001,16,1,16,1008,16,1479,570,1006,570,14,21102,58,1,0,1105,1,786,1006,332,62,99,21101,0,333,1,21101,73,0,0,1105,1,579,1101,0,0,572,1102,1,0,573,3,574,101,1,573,573,1007,574,65,570,1005,570,151,107,67,574,570,1005,570,151,1001,574,-64,574,1002,574,-1,574,1001,572,1,572,1007,572,11,570,1006,570,165,101,1182,572,127,101,0,574,0,3,574,101,1,573,573,1008,574,10,570,1005,570,189,1008,574,44,570,1006,570,158,1105,1,81,21101,0,340,1,1106,0,177,21102,477,1,1,1106,0,177,21101,0,514,1,21102,176,1,0,1105,1,579,99,21101,0,184,0,1106,0,579,4,574,104,10,99,1007,573,22,570,1006,570,165,1001,572,0,1182,21102,375,1,1,21102,211,1,0,1105,1,579,21101,1182,11,1,21102,222,1,0,1106,0,979,21101,0,388,1,21101,233,0,0,1106,0,579,21101,1182,22,1,21102,244,1,0,1106,0,979,21101,0,401,1,21101,0,255,0,1105,1,579,21101,1182,33,1,21102,266,1,0,1105,1,979,21102,414,1,1,21102,1,277,0,1106,0,579,3,575,1008,575,89,570,1008,575,121,575,1,575,570,575,3,574,1008,574,10,570,1006,570,291,104,10,21101,1182,0,1,21102,313,1,0,1106,0,622,1005,575,327,1101,1,0,575,21101,0,327,0,1105,1,786,4,438,99,0,1,1,6,77,97,105,110,58,10,33,10,69,120,112,101,99,116,101,100,32,102,117,110,99,116,105,111,110,32,110,97,109,101,32,98,117,116,32,103,111,116,58,32,0,12,70,117,110,99,116,105,111,110,32,65,58,10,12,70,117,110,99,116,105,111,110,32,66,58,10,12,70,117,110,99,116,105,111,110,32,67,58,10,23,67,111,110,116,105,110,117,111,117,115,32,118,105,100,101,111,32,102,101,101,100,63,10,0,37,10,69,120,112,101,99,116,101,100,32,82,44,32,76,44,32,111,114,32,100,105,115,116,97,110,99,101,32,98,117,116,32,103,111,116,58,32,36,10,69,120,112,101,99,116,101,100,32,99,111,109,109,97,32,111,114,32,110,101,119,108,105,110,101,32,98,117,116,32,103,111,116,58,32,43,10,68,101,102,105,110,105,116,105,111,110,115,32,109,97,121,32,98,101,32,97,116,32,109,111,115,116,32,50,48,32,99,104,97,114,97,99,116,101,114,115,33,10,94,62,118,60,0,1,0,-1,-1,0,1,0,0,0,0,0,0,1,24,22,0,109,4,2102,1,-3,586,21002,0,1,-1,22101,1,-3,-3,21101,0,0,-2,2208,-2,-1,570,1005,570,617,2201,-3,-2,609,4,0,21201,-2,1,-2,1105,1,597,109,-4,2106,0,0,109,5,1202,-4,1,630,20101,0,0,-2,22101,1,-4,-4,21102,0,1,-3,2208,-3,-2,570,1005,570,781,2201,-4,-3,652,21002,0,1,-1,1208,-1,-4,570,1005,570,709,1208,-1,-5,570,1005,570,734,1207,-1,0,570,1005,570,759,1206,-1,774,1001,578,562,684,1,0,576,576,1001,578,566,692,1,0,577,577,21101,702,0,0,1105,1,786,21201,-1,-1,-1,1105,1,676,1001,578,1,578,1008,578,4,570,1006,570,724,1001,578,-4,578,21101,0,731,0,1105,1,786,1105,1,774,1001,578,-1,578,1008,578,-1,570,1006,570,749,1001,578,4,578,21101,756,0,0,1106,0,786,1105,1,774,21202,-1,-11,1,22101,1182,1,1,21102,1,774,0,1105,1,622,21201,-3,1,-3,1105,1,640,109,-5,2106,0,0,109,7,1005,575,802,20101,0,576,-6,20101,0,577,-5,1106,0,814,21102,0,1,-1,21101,0,0,-5,21102,0,1,-6,20208,-6,576,-2,208,-5,577,570,22002,570,-2,-2,21202,-5,51,-3,22201,-6,-3,-3,22101,1479,-3,-3,1202,-3,1,843,1005,0,863,21202,-2,42,-4,22101,46,-4,-4,1206,-2,924,21101,1,0,-1,1106,0,924,1205,-2,873,21102,1,35,-4,1106,0,924,1201,-3,0,878,1008,0,1,570,1006,570,916,1001,374,1,374,1201,-3,0,895,1101,0,2,0,1201,-3,0,902,1001,438,0,438,2202,-6,-5,570,1,570,374,570,1,570,438,438,1001,578,558,922,20101,0,0,-4,1006,575,959,204,-4,22101,1,-6,-6,1208,-6,51,570,1006,570,814,104,10,22101,1,-5,-5,1208,-5,39,570,1006,570,810,104,10,1206,-1,974,99,1206,-1,974,1102,1,1,575,21101,973,0,0,1105,1,786,99,109,-7,2106,0,0,109,6,21102,0,1,-4,21102,1,0,-3,203,-2,22101,1,-3,-3,21208,-2,82,-1,1205,-1,1030,21208,-2,76,-1,1205,-1,1037,21207,-2,48,-1,1205,-1,1124,22107,57,-2,-1,1205,-1,1124,21201,-2,-48,-2,1106,0,1041,21102,1,-4,-2,1106,0,1041,21102,-5,1,-2,21201,-4,1,-4,21207,-4,11,-1,1206,-1,1138,2201,-5,-4,1059,1201,-2,0,0,203,-2,22101,1,-3,-3,21207,-2,48,-1,1205,-1,1107,22107,57,-2,-1,1205,-1,1107,21201,-2,-48,-2,2201,-5,-4,1090,20102,10,0,-1,22201,-2,-1,-2,2201,-5,-4,1103,2102,1,-2,0,1105,1,1060,21208,-2,10,-1,1205,-1,1162,21208,-2,44,-1,1206,-1,1131,1105,1,989,21102,439,1,1,1105,1,1150,21102,477,1,1,1105,1,1150,21102,1,514,1,21101,1149,0,0,1105,1,579,99,21101,0,1157,0,1106,0,579,204,-2,104,10,99,21207,-3,22,-1,1206,-1,1138,1201,-5,0,1176,1202,-4,1,0,109,-6,2105,1,0,22,7,44,1,5,1,40,7,3,1,40,1,3,1,1,1,3,1,22,9,9,1,3,1,1,1,3,1,22,1,7,1,9,1,3,1,1,1,3,1,22,1,7,1,1,13,1,1,3,1,22,1,7,1,1,1,7,1,5,1,3,1,22,1,7,1,1,1,7,1,3,7,22,1,7,1,1,1,7,1,5,1,26,7,1,9,1,9,30,1,3,1,5,1,7,1,1,1,30,1,3,1,5,1,7,1,1,1,30,1,3,1,5,1,7,1,1,1,30,1,3,1,1,13,1,1,9,7,14,1,3,1,1,1,3,1,9,1,9,1,5,1,14,1,3,1,1,1,3,1,9,9,1,1,5,1,14,1,3,1,1,1,3,1,17,1,1,1,5,1,14,1,3,7,17,1,1,1,5,1,14,1,5,1,21,1,1,1,5,1,14,1,5,1,21,1,1,1,5,1,14,1,5,1,21,1,1,1,5,1,14,7,11,13,1,9,38,1,3,1,3,1,3,1,38,1,3,1,3,1,3,1,38,1,3,1,3,1,3,1,38,1,3,1,3,9,34,1,3,1,7,1,3,1,34,13,3,1,38,1,11,1,32,7,11,1,32,1,17,1,32,1,5,13,32,1,5,1,44,1,5,1,44,1,5,1,44,1,5,1,44,1,5,1,44,7,12 \ No newline at end of file +1,330,331,332,109,3468,1102,1182,1,16,1101,0,1479,24,101,0,0,570,1006,570,36,1002,571,1,0,1001,570,-1,570,1001,24,1,24,1106,0,18,1008,571,0,571,1001,16,1,16,1008,16,1479,570,1006,570,14,21102,58,1,0,1105,1,786,1006,332,62,99,21101,0,333,1,21101,73,0,0,1105,1,579,1101,0,0,572,1102,1,0,573,3,574,101,1,573,573,1007,574,65,570,1005,570,151,107,67,574,570,1005,570,151,1001,574,-64,574,1002,574,-1,574,1001,572,1,572,1007,572,11,570,1006,570,165,101,1182,572,127,101,0,574,0,3,574,101,1,573,573,1008,574,10,570,1005,570,189,1008,574,44,570,1006,570,158,1105,1,81,21101,0,340,1,1106,0,177,21102,477,1,1,1106,0,177,21101,0,514,1,21102,176,1,0,1105,1,579,99,21101,0,184,0,1106,0,579,4,574,104,10,99,1007,573,22,570,1006,570,165,1001,572,0,1182,21102,375,1,1,21102,211,1,0,1105,1,579,21101,1182,11,1,21102,222,1,0,1106,0,979,21101,0,388,1,21101,233,0,0,1106,0,579,21101,1182,22,1,21102,244,1,0,1106,0,979,21101,0,401,1,21101,0,255,0,1105,1,579,21101,1182,33,1,21102,266,1,0,1105,1,979,21102,414,1,1,21102,1,277,0,1106,0,579,3,575,1008,575,89,570,1008,575,121,575,1,575,570,575,3,574,1008,574,10,570,1006,570,291,104,10,21101,1182,0,1,21102,313,1,0,1106,0,622,1005,575,327,1101,1,0,575,21101,0,327,0,1105,1,786,4,438,99,0,1,1,6,77,97,105,110,58,10,33,10,69,120,112,101,99,116,101,100,32,102,117,110,99,116,105,111,110,32,110,97,109,101,32,98,117,116,32,103,111,116,58,32,0,12,70,117,110,99,116,105,111,110,32,65,58,10,12,70,117,110,99,116,105,111,110,32,66,58,10,12,70,117,110,99,116,105,111,110,32,67,58,10,23,67,111,110,116,105,110,117,111,117,115,32,118,105,100,101,111,32,102,101,101,100,63,10,0,37,10,69,120,112,101,99,116,101,100,32,82,44,32,76,44,32,111,114,32,100,105,115,116,97,110,99,101,32,98,117,116,32,103,111,116,58,32,36,10,69,120,112,101,99,116,101,100,32,99,111,109,109,97,32,111,114,32,110,101,119,108,105,110,101,32,98,117,116,32,103,111,116,58,32,43,10,68,101,102,105,110,105,116,105,111,110,115,32,109,97,121,32,98,101,32,97,116,32,109,111,115,116,32,50,48,32,99,104,97,114,97,99,116,101,114,115,33,10,94,62,118,60,0,1,0,-1,-1,0,1,0,0,0,0,0,0,1,24,22,0,109,4,2102,1,-3,586,21002,0,1,-1,22101,1,-3,-3,21101,0,0,-2,2208,-2,-1,570,1005,570,617,2201,-3,-2,609,4,0,21201,-2,1,-2,1105,1,597,109,-4,2106,0,0,109,5,1202,-4,1,630,20101,0,0,-2,22101,1,-4,-4,21102,0,1,-3,2208,-3,-2,570,1005,570,781,2201,-4,-3,652,21002,0,1,-1,1208,-1,-4,570,1005,570,709,1208,-1,-5,570,1005,570,734,1207,-1,0,570,1005,570,759,1206,-1,774,1001,578,562,684,1,0,576,576,1001,578,566,692,1,0,577,577,21101,702,0,0,1105,1,786,21201,-1,-1,-1,1105,1,676,1001,578,1,578,1008,578,4,570,1006,570,724,1001,578,-4,578,21101,0,731,0,1105,1,786,1105,1,774,1001,578,-1,578,1008,578,-1,570,1006,570,749,1001,578,4,578,21101,756,0,0,1106,0,786,1105,1,774,21202,-1,-11,1,22101,1182,1,1,21102,1,774,0,1105,1,622,21201,-3,1,-3,1105,1,640,109,-5,2106,0,0,109,7,1005,575,802,20101,0,576,-6,20101,0,577,-5,1106,0,814,21102,0,1,-1,21101,0,0,-5,21102,0,1,-6,20208,-6,576,-2,208,-5,577,570,22002,570,-2,-2,21202,-5,51,-3,22201,-6,-3,-3,22101,1479,-3,-3,1202,-3,1,843,1005,0,863,21202,-2,42,-4,22101,46,-4,-4,1206,-2,924,21101,1,0,-1,1106,0,924,1205,-2,873,21102,1,35,-4,1106,0,924,1201,-3,0,878,1008,0,1,570,1006,570,916,1001,374,1,374,1201,-3,0,895,1101,0,2,0,1201,-3,0,902,1001,438,0,438,2202,-6,-5,570,1,570,374,570,1,570,438,438,1001,578,558,922,20101,0,0,-4,1006,575,959,204,-4,22101,1,-6,-6,1208,-6,51,570,1006,570,814,104,10,22101,1,-5,-5,1208,-5,39,570,1006,570,810,104,10,1206,-1,974,99,1206,-1,974,1102,1,1,575,21101,973,0,0,1105,1,786,99,109,-7,2106,0,0,109,6,21102,0,1,-4,21102,1,0,-3,203,-2,22101,1,-3,-3,21208,-2,82,-1,1205,-1,1030,21208,-2,76,-1,1205,-1,1037,21207,-2,48,-1,1205,-1,1124,22107,57,-2,-1,1205,-1,1124,21201,-2,-48,-2,1106,0,1041,21102,1,-4,-2,1106,0,1041,21102,-5,1,-2,21201,-4,1,-4,21207,-4,11,-1,1206,-1,1138,2201,-5,-4,1059,1201,-2,0,0,203,-2,22101,1,-3,-3,21207,-2,48,-1,1205,-1,1107,22107,57,-2,-1,1205,-1,1107,21201,-2,-48,-2,2201,-5,-4,1090,20102,10,0,-1,22201,-2,-1,-2,2201,-5,-4,1103,2102,1,-2,0,1105,1,1060,21208,-2,10,-1,1205,-1,1162,21208,-2,44,-1,1206,-1,1131,1105,1,989,21102,439,1,1,1105,1,1150,21102,477,1,1,1105,1,1150,21102,1,514,1,21101,1149,0,0,1105,1,579,99,21101,0,1157,0,1106,0,579,204,-2,104,10,99,21207,-3,22,-1,1206,-1,1138,1201,-5,0,1176,1202,-4,1,0,109,-6,2105,1,0,22,7,44,1,5,1,40,7,3,1,40,1,3,1,1,1,3,1,22,9,9,1,3,1,1,1,3,1,22,1,7,1,9,1,3,1,1,1,3,1,22,1,7,1,1,13,1,1,3,1,22,1,7,1,1,1,7,1,5,1,3,1,22,1,7,1,1,1,7,1,3,7,22,1,7,1,1,1,7,1,5,1,26,7,1,9,1,9,30,1,3,1,5,1,7,1,1,1,30,1,3,1,5,1,7,1,1,1,30,1,3,1,5,1,7,1,1,1,30,1,3,1,1,13,1,1,9,7,14,1,3,1,1,1,3,1,9,1,9,1,5,1,14,1,3,1,1,1,3,1,9,9,1,1,5,1,14,1,3,1,1,1,3,1,17,1,1,1,5,1,14,1,3,7,17,1,1,1,5,1,14,1,5,1,21,1,1,1,5,1,14,1,5,1,21,1,1,1,5,1,14,1,5,1,21,1,1,1,5,1,14,7,11,13,1,9,38,1,3,1,3,1,3,1,38,1,3,1,3,1,3,1,38,1,3,1,3,1,3,1,38,1,3,1,3,9,34,1,3,1,7,1,3,1,34,13,3,1,38,1,11,1,32,7,11,1,32,1,17,1,32,1,5,13,32,1,5,1,44,1,5,1,44,1,5,1,44,1,5,1,44,1,5,1,44,7,12 diff --git a/src/adventofcode2019/solutions/data/infi/example.json b/src/adventofcode2019/data/infi/example.json similarity index 97% rename from src/adventofcode2019/solutions/data/infi/example.json rename to src/adventofcode2019/data/infi/example.json index 5ce71bca..77c83a11 100644 --- a/src/adventofcode2019/solutions/data/infi/example.json +++ b/src/adventofcode2019/data/infi/example.json @@ -1,4 +1,4 @@ { "flats": [[1,4],[3,8],[4,3],[5,7],[7,4],[10,3]], "sprongen": [[2,0],[0,4],[1,0],[0,0]] -} \ No newline at end of file +} diff --git a/src/adventofcode2019/solutions/data/infi/infi.json b/src/adventofcode2019/data/infi/infi.json similarity index 100% rename from src/adventofcode2019/solutions/data/infi/infi.json rename to src/adventofcode2019/data/infi/infi.json diff --git a/src/adventofcode2019/solutions/day01.py b/src/adventofcode2019/day01.py similarity index 94% rename from src/adventofcode2019/solutions/day01.py rename to src/adventofcode2019/day01.py index 83be5f64..a9f5d670 100644 --- a/src/adventofcode2019/solutions/day01.py +++ b/src/adventofcode2019/day01.py @@ -1,4 +1,4 @@ -from adventofcode2019.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution class Day01: diff --git a/src/adventofcode2019/solutions/day02.py b/src/adventofcode2019/day02.py similarity index 88% rename from src/adventofcode2019/solutions/day02.py rename to src/adventofcode2019/day02.py index 0ec2f458..1a0e78c4 100644 --- a/src/adventofcode2019/solutions/day02.py +++ b/src/adventofcode2019/day02.py @@ -1,5 +1,5 @@ -from adventofcode2019.solutions.intcode import IntCode -from adventofcode2019.utils.abstract import FileReaderSolution +from adventofcode2019.intcode import IntCode +from adventofcode.utils.abstract import FileReaderSolution class Day02: diff --git a/src/adventofcode2019/solutions/day03.py b/src/adventofcode2019/day03.py similarity index 89% rename from src/adventofcode2019/solutions/day03.py rename to src/adventofcode2019/day03.py index 4e19f351..73526386 100644 --- a/src/adventofcode2019/solutions/day03.py +++ b/src/adventofcode2019/day03.py @@ -1,6 +1,4 @@ -from typing import List - -from adventofcode2019.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution class Point: @@ -34,7 +32,7 @@ def __init__(self): self.lines = [] @staticmethod - def create_line(input_str: str) -> List[Point]: + def create_line(input_str: str) -> list[Point]: """ Create a line from the instructions in `input_str`. This function will return a List of `Point` namedtuples. @@ -42,7 +40,7 @@ def create_line(input_str: str) -> List[Point]: LetterNumbers, where letter is in RUDN. Example "R20,U10,D9,L83" """ - points: List[Point] = [] + points: list[Point] = [] # start = Point(100, 100) # points.append(start) @@ -67,18 +65,18 @@ def create_line(input_str: str) -> List[Point]: return points def create_lines(self, input_lines: str): - """ Create the lines and add them to the internal lines list """ + """Create the lines and add them to the internal lines list""" self.lines = [] for line in input_lines.splitlines(): self.lines.append(self.create_line(line)) def find_duplicates(self): - """ Find duplicates points in the internal lines list. """ + """Find duplicates points in the internal lines list.""" common = list(set(self.lines[0]).intersection(self.lines[1])) return common def find_closest_point(self): - """ Return the discance to the closest points in steps to reach it """ + """Return the discance to the closest points in steps to reach it""" duplicates = self.find_duplicates() # Get all the points, that are in total_distance = [] diff --git a/src/adventofcode2019/solutions/day04.py b/src/adventofcode2019/day04.py similarity index 90% rename from src/adventofcode2019/solutions/day04.py rename to src/adventofcode2019/day04.py index ea6c0bea..adcd2c70 100644 --- a/src/adventofcode2019/solutions/day04.py +++ b/src/adventofcode2019/day04.py @@ -1,5 +1,5 @@ -from adventofcode2019.utils.abstract import FileReaderSolution -from adventofcode2019.utils.advent_utils import string_to_list_of_ints +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.parsing import string_to_list_of_ints class Day04: @@ -22,7 +22,7 @@ def is_consecutive(number_str: str) -> bool: @staticmethod def is_consecutive_no_larger_group(number_str: str) -> bool: - """ Check for values, if there is any there is any double digit, success """ + """Check for values, if there is any there is any double digit, success""" for x in str(number_str): if str(number_str).count(x) == 2: return True diff --git a/src/adventofcode2019/solutions/day05.py b/src/adventofcode2019/day05.py similarity index 79% rename from src/adventofcode2019/solutions/day05.py rename to src/adventofcode2019/day05.py index 3d7d7da1..6abdd563 100644 --- a/src/adventofcode2019/solutions/day05.py +++ b/src/adventofcode2019/day05.py @@ -1,6 +1,6 @@ -from adventofcode2019.solutions.intcode import IntCode -from adventofcode2019.utils.abstract import FileReaderSolution -from adventofcode2019.utils.advent_utils import string_to_list_of_ints +from adventofcode2019.intcode import IntCode +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.parsing import string_to_list_of_ints class Day05: diff --git a/src/adventofcode2019/solutions/day06.py b/src/adventofcode2019/day06.py similarity index 92% rename from src/adventofcode2019/solutions/day06.py rename to src/adventofcode2019/day06.py index 7f5ff92a..55d64d97 100644 --- a/src/adventofcode2019/solutions/day06.py +++ b/src/adventofcode2019/day06.py @@ -1,8 +1,6 @@ -from typing import List - from anytree import Node, Walker # type: ignore -from adventofcode2019.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution class Day06: @@ -11,7 +9,7 @@ def __init__(self): self.root_node = None @staticmethod - def parse_lines(input_lines) -> List: + def parse_lines(input_lines) -> list: orbits = [] for line in input_lines: a, b = line.split(")") @@ -40,7 +38,7 @@ def create_nodes(self, orbits): raise ValueError("Too much roots! Found: {len(self.root_node)}") def find_distance_between_nodes(self, node_from: str, node_to: str) -> int: - """ Find the distance between nodes """ + """Find the distance between nodes""" # We are on the node we want to compute from, so we start with our parent from_node = self.nodes[node_from].parent to_node = self.nodes[node_to].parent diff --git a/src/adventofcode2019/solutions/day07.py b/src/adventofcode2019/day07.py similarity index 81% rename from src/adventofcode2019/solutions/day07.py rename to src/adventofcode2019/day07.py index a5436207..f49a89e1 100644 --- a/src/adventofcode2019/solutions/day07.py +++ b/src/adventofcode2019/day07.py @@ -1,15 +1,14 @@ import itertools -from typing import List, Tuple -from adventofcode2019.solutions.intcode import IntCode, ProgramFinished -from adventofcode2019.utils.abstract import FileReaderSolution -from adventofcode2019.utils.advent_utils import string_to_list_of_ints +from adventofcode2019.intcode import IntCode, ProgramFinished +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.parsing import string_to_list_of_ints class Day07: @staticmethod def compute_results_for_looped_sequence( - instructions: List[int], sequence: Tuple + instructions: list[int], sequence: tuple ) -> int: """ For program `instructions`, compute the result for the sequence in the string @@ -42,13 +41,13 @@ def compute_results_for_looped_sequence( last_value = result def get_best_looped_sequence( - self, start, stop, instructions: List[int] - ) -> Tuple[str, int]: - """ Get the sequence with the best output """ + self, start, stop, instructions: list[int] + ) -> tuple[str, int]: + """Get the sequence with the best output""" # Generate all the options # We loop because we have 10 computers, max_result = -1 - max_sequence: Tuple[int, ...] = (0, 0, 0, 0, 0) + max_sequence: tuple[int, ...] = (0, 0, 0, 0, 0) for sequence in itertools.permutations(range(start, stop)): result = self.compute_results_for_looped_sequence(instructions, sequence) if result > max_result: diff --git a/src/adventofcode2019/solutions/day08.py b/src/adventofcode2019/day08.py similarity index 77% rename from src/adventofcode2019/solutions/day08.py rename to src/adventofcode2019/day08.py index bc95aa3c..fb19f82c 100644 --- a/src/adventofcode2019/solutions/day08.py +++ b/src/adventofcode2019/day08.py @@ -1,15 +1,13 @@ -from typing import List - -from adventofcode2019.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution class Day08: - frames: List[str] + frames: list[str] width = 0 height = 0 def load_image(self, image_data: str, width: int, height: int): - """ Load an image from `image_data`, with `width` and `height` dimensions""" + """Load an image from `image_data`, with `width` and `height` dimensions""" frame_size = width * height self.frames = [ image_data[i : i + frame_size] @@ -20,19 +18,19 @@ def load_image(self, image_data: str, width: int, height: int): self.height = height def count_number_per_frame(self, number: int, frame: int) -> int: - """ Count the number of times `number` is in frame `frame """ + """Count the number of times `number` is in frame `frame""" needle = str(number) return self.frames[frame].count(needle) def layer_with_fewest_digit(self, number_to_find: int): - """ Find the layer with the fewest corrences of `number_to_find` """ + """Find the layer with the fewest corrences of `number_to_find`""" found = {} for x in range(0, len(self.frames)): found[x] = self.count_number_per_frame(number=number_to_find, frame=x) return min(found, key=found.get) # type: ignore @staticmethod - def _compute_per_pixel(pixels: List[int]) -> int: + def _compute_per_pixel(pixels: list[int]) -> int: for pixel in pixels: if pixel == 2: continue @@ -41,7 +39,7 @@ def _compute_per_pixel(pixels: List[int]) -> int: return 0 def get_computed_image(self): - """ Compute the image""" + """Compute the image""" resulting_image = [] for x in range(0, len(self.frames[0])): pixels = [int(frame[x]) for frame in self.frames] @@ -49,7 +47,7 @@ def get_computed_image(self): resulting_image.append(result) return resulting_image - def printable_image(self, image_data: List[int]): + def printable_image(self, image_data: list[int]): lines = [ "".join(map(str, image_data[i : i + self.width])) for i in range(0, len(image_data), self.width) @@ -59,7 +57,7 @@ def printable_image(self, image_data: List[int]): class Day08PartA(Day08, FileReaderSolution): def solve(self, input_data: str) -> int: - self.load_image(input_data, width=25, height=6) + self.load_image(input_data.strip(), width=25, height=6) # Find layer with the fewest 0 digits: layer = self.layer_with_fewest_digit(0) number_ones = self.count_number_per_frame(1, layer) @@ -69,7 +67,7 @@ def solve(self, input_data: str) -> int: class Day08PartB(Day08, FileReaderSolution): def solve(self, input_data: str) -> str: - self.load_image(input_data, width=25, height=6) + self.load_image(input_data.strip(), width=25, height=6) image = self.get_computed_image() printable = self.printable_image(image) result = printable.replace("0", " ").replace("1", "■") diff --git a/src/adventofcode2019/solutions/day09.py b/src/adventofcode2019/day09.py similarity index 76% rename from src/adventofcode2019/solutions/day09.py rename to src/adventofcode2019/day09.py index f8cc4e88..11c024f6 100644 --- a/src/adventofcode2019/solutions/day09.py +++ b/src/adventofcode2019/day09.py @@ -1,6 +1,6 @@ -from adventofcode2019.solutions.intcode import IntCode -from adventofcode2019.utils.abstract import FileReaderSolution -from adventofcode2019.utils.advent_utils import string_to_list_of_ints +from adventofcode2019.intcode import IntCode +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.parsing import string_to_list_of_ints class Day09: diff --git a/src/adventofcode2019/solutions/day10.py b/src/adventofcode2019/day10.py similarity index 83% rename from src/adventofcode2019/solutions/day10.py rename to src/adventofcode2019/day10.py index 686c6ed9..71bff370 100644 --- a/src/adventofcode2019/solutions/day10.py +++ b/src/adventofcode2019/day10.py @@ -1,8 +1,8 @@ import math from collections import defaultdict -from typing import Dict, List, NamedTuple, Set, Tuple +from typing import NamedTuple -from adventofcode2019.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution class Astroid(NamedTuple): @@ -17,11 +17,11 @@ class GridInfo(NamedTuple): class Day10: - astroids: List[Astroid] - astroids_destroyed: List[Astroid] + astroids: list[Astroid] + astroids_destroyed: list[Astroid] def create_map(self, input_data: str): - """ Create a map from input_data. """ + """Create a map from input_data.""" self.astroids = [] self.astroids_destroyed = [] for y, line in enumerate(input_data.splitlines()): @@ -33,7 +33,7 @@ def create_map(self, input_data: str): @staticmethod def _get_angle(astroid_1: Astroid, astroid_2: Astroid) -> float: - """ Compute the angle between two Astroids in degrees """ + """Compute the angle between two Astroids in degrees""" dx = astroid_1.x - astroid_2.x dy = astroid_1.y - astroid_2.y @@ -43,7 +43,7 @@ def _get_angle(astroid_1: Astroid, astroid_2: Astroid) -> float: @staticmethod def _get_distance(astroid_1: Astroid, astroid_2: Astroid) -> float: - """ Compute the distance between two Astroids """ + """Compute the distance between two Astroids""" a, b = astroid_1.x, astroid_1.y x, y = astroid_2.x, astroid_2.y euclidean_distance = math.sqrt((a - x) ** 2 + (b - y) ** 2) @@ -55,7 +55,7 @@ def count_asteroids_for_location(self, x: int, y: int) -> int: We do this by calculator the different angles we can see from this point. Duplicate angles are ignored. """ - found_angles: Set[float] = set() + found_angles: set[float] = set() point_in_space = Astroid(x=x, y=y) for astroid in self.astroids: @@ -72,8 +72,8 @@ def find_best_spot(self) -> int: """Find the best spot to be in, and return how many astroids we can spot""" return self.get_best_astroid()[1] - def get_best_astroid(self) -> Tuple[Astroid, int]: - """ Return the best astroid location and the number of visable astroids""" + def get_best_astroid(self) -> tuple[Astroid, int]: + """Return the best astroid location and the number of visable astroids""" locations = { astroid: self.count_asteroids_for_location(astroid.x, astroid.y) for astroid in self.astroids @@ -82,8 +82,8 @@ def get_best_astroid(self) -> Tuple[Astroid, int]: return best_astroid, locations[best_astroid] def calculate_angles(self, location: Astroid): - """ Create a dict with all the angles for the asteroids and the distance""" - angles: Dict[float, List] = defaultdict(list) + """Create a dict with all the angles for the asteroids and the distance""" + angles: dict[float, list] = defaultdict(list) for astroid in self.astroids: angle = self._get_angle(location, astroid) distance = self._get_distance(location, astroid) @@ -92,7 +92,7 @@ def calculate_angles(self, location: Astroid): return angles def remove_astroid(self, location: Astroid, n=200): - """ Shoot until we have reached `n` targets""" + """Shoot until we have reached `n` targets""" angle_information = self.calculate_angles(location) sorted_angles = sorted(angle_information) diff --git a/src/adventofcode2019/solutions/day11.py b/src/adventofcode2019/day11.py similarity index 93% rename from src/adventofcode2019/solutions/day11.py rename to src/adventofcode2019/day11.py index a17fbc14..67247e6d 100644 --- a/src/adventofcode2019/solutions/day11.py +++ b/src/adventofcode2019/day11.py @@ -4,9 +4,9 @@ import matplotlib.pyplot as plt # type: ignore -from adventofcode2019.solutions.intcode import IntCode, ProgramFinished -from adventofcode2019.utils.abstract import FileReaderSolution -from adventofcode2019.utils.advent_utils import string_to_list_of_ints +from adventofcode2019.intcode import IntCode, ProgramFinished +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.parsing import string_to_list_of_ints class Location(NamedTuple): @@ -128,7 +128,7 @@ def solve(self, input_data: str) -> int: class Day11PartB(Day11, FileReaderSolution): def plot_grid(self): - """ Plot the grid using matplotlib""" + """Plot the grid using matplotlib""" x_points = [point.x for point, color in self.hull.items()] y_points = [point.y for point, color in self.hull.items()] min_x = min(x_points) @@ -143,7 +143,7 @@ def plot_grid(self): plt.show() def show(self): - """ Plot the grid using Ascii""" + """Plot the grid using Ascii""" positions = [ (point.x, point.y) for point, color in self.hull.items() if color == 1 ] diff --git a/src/adventofcode2019/solutions/day12.py b/src/adventofcode2019/day12.py similarity index 85% rename from src/adventofcode2019/solutions/day12.py rename to src/adventofcode2019/day12.py index 38961c36..840b4fda 100644 --- a/src/adventofcode2019/solutions/day12.py +++ b/src/adventofcode2019/day12.py @@ -1,9 +1,8 @@ from itertools import combinations -from typing import List, Set, Tuple import numpy as np # type: ignore -from adventofcode2019.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution class Moon: @@ -40,7 +39,7 @@ def __eq__(self, other) -> bool: ) def apply_movement(self): - """ Move the Moon according to the internal speeds """ + """Move the Moon according to the internal speeds""" self.x += self.dx self.y += self.dy self.z += self.dz @@ -85,7 +84,7 @@ def get_total_energy(self) -> int: class Galaxy: - moons: List[Moon] + moons: list[Moon] def __eq__(self, other) -> bool: return self.moons == other.moons @@ -99,7 +98,7 @@ def create_moons(self, input_str: str): @staticmethod def apply_gravity(moon1: Moon, moon2: Moon): - """ Apply gravity to two pairs of moons. """ + """Apply gravity to two pairs of moons.""" for attribute in ("x", "y", "z"): dxattribute = f"d{attribute}" a1 = getattr(moon1, attribute) @@ -116,7 +115,7 @@ def apply_gravity(moon1: Moon, moon2: Moon): setattr(moon2, dxattribute, dxa2 + 1) def step(self): - """ Step thru our system, one step at a time """ + """Step thru our system, one step at a time""" # Look over two pairs of moons for pair in combinations(self.moons, 2): self.apply_gravity(pair[0], pair[1]) @@ -126,12 +125,12 @@ def step(self): moon.apply_movement() def step_multi(self, n: int): - """ Do `n` steps """ + """Do `n` steps""" for _ in range(n): self.step() def get_total_energy(self) -> int: - """ Return the total energy of all the Moons in the system""" + """Return the total energy of all the Moons in the system""" return sum(moon.get_total_energy() for moon in self.moons) @@ -149,8 +148,8 @@ def solve(self, input_data: str) -> int: class Day12PartB(Day12, FileReaderSolution): @staticmethod - def return_one_var(galaxy: Galaxy, var: str) -> Tuple[int, ...]: - """ Create a tuple with the Position and Velocity values for `var` """ + def return_one_var(galaxy: Galaxy, var: str) -> tuple[int, ...]: + """Create a tuple with the Position and Velocity values for `var`""" vardx = f"d{var}" values = tuple([getattr(moon, var) for moon in galaxy.moons]) + tuple( [getattr(moon, vardx) for moon in galaxy.moons] @@ -165,7 +164,7 @@ def find_returning(self, galaxy: Galaxy, var: str) -> int: """ i = 0 - visited: Set[Tuple] = set() + visited: set[tuple] = set() while True: values = self.return_one_var(galaxy, var) if values in visited: @@ -188,6 +187,11 @@ def solve(self, input_data: str) -> int: repeating_z = self.find_returning(galaxy, "z") # Find the lowest common multiple for all the axis - repeating = np.lcm.reduce([repeating_x, repeating_y, repeating_z]) + # Create a numpy array with int64. On windows the array is only 32 bits, + # leading to an overflow. On Linux, by default, it's 64 bits. See + # https://stackoverflow.com/a/72483130/550104 + + found_steps = np.array([repeating_x, repeating_y, repeating_z], dtype=np.int64) + repeating = np.lcm.reduce(found_steps) return repeating diff --git a/src/adventofcode2019/solutions/day13.py b/src/adventofcode2019/day13.py similarity index 92% rename from src/adventofcode2019/solutions/day13.py rename to src/adventofcode2019/day13.py index 8741afcd..01acdb6e 100644 --- a/src/adventofcode2019/solutions/day13.py +++ b/src/adventofcode2019/day13.py @@ -1,10 +1,9 @@ from collections import defaultdict from enum import IntEnum -from typing import List -from adventofcode2019.solutions.intcode import IntCode, ProgramFinished -from adventofcode2019.utils.abstract import FileReaderSolution -from adventofcode2019.utils.advent_utils import string_to_list_of_ints +from adventofcode2019.intcode import IntCode, ProgramFinished +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.parsing import string_to_list_of_ints class Tile(IntEnum): @@ -56,10 +55,10 @@ def show_screen(self): return "\n".join(grid) def draw_tile(self, x: int, y: int, tile: Tile) -> None: - """ Draw a single tile """ + """Draw a single tile""" self.screen[(x, y)] = tile - def get_location_for_tiles(self, type: Tile) -> List: + def get_location_for_tiles(self, type: Tile) -> list: tiles = [location for location, value in self.screen.items() if value == type] return tiles diff --git a/src/adventofcode2019/solutions/day14.py b/src/adventofcode2019/day14.py similarity index 92% rename from src/adventofcode2019/solutions/day14.py rename to src/adventofcode2019/day14.py index 0bbfda2f..b00132c6 100644 --- a/src/adventofcode2019/solutions/day14.py +++ b/src/adventofcode2019/day14.py @@ -2,9 +2,9 @@ import typing from collections import Counter, defaultdict from dataclasses import dataclass -from typing import Dict, List, NamedTuple +from typing import NamedTuple -from adventofcode2019.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution class Chemical(NamedTuple): @@ -13,7 +13,7 @@ class Chemical(NamedTuple): class Recipe(NamedTuple): - inputs: List[Chemical] + inputs: list[Chemical] output: Chemical @staticmethod @@ -57,7 +57,7 @@ def add_edge(self, node: "Node"): class NanoFactory: warehouse: defaultdict - recipes: Dict[str, Recipe] + recipes: dict[str, Recipe] def __init__(self): self.warehouse = defaultdict(int) @@ -68,7 +68,7 @@ def read_input(self, input_lines: str): recipe = Recipe.parse_recipe_string(line) self.recipes[recipe.output.name] = recipe - def _get_requirement_for_one(self, output: str, n: int) -> Dict[str, int]: + def _get_requirement_for_one(self, output: str, n: int) -> dict[str, int]: """Compute what we need for `n` units of `output` and return this as a Dict. For example, with the recipe `4 C, 1 A => 1 CA`, when we need 4 of `CA`, return {"C": 16, "A": 4} @@ -85,7 +85,7 @@ def _get_requirement_for_one(self, output: str, n: int) -> Dict[str, int]: result[input_recipe.name] = input_recipe.consumable * number_needed return result - def dep_resolve(self, node: Node, resolved: List, unresolved: List): + def dep_resolve(self, node: Node, resolved: list, unresolved: list): """ Resolve the order in which we need to process out recipe. Does checks for circular dependencies ( A->B->C->A ) @@ -132,15 +132,15 @@ def create_nodes(self) -> Node: return root_node - def resolve_tree(self) -> List[Node]: - """ Resolve the tree and return a list of nodes in order to process them.""" + def resolve_tree(self) -> list[Node]: + """Resolve the tree and return a list of nodes in order to process them.""" root_node = self.create_nodes() - resolved: List[Node] = [] + resolved: list[Node] = [] self.dep_resolve(root_node, resolved, []) return resolved def ore_needed_for_n_fuel(self, n=1) -> int: - """ Compute how many ORE we need for `n` fuel object""" + """Compute how many ORE we need for `n` fuel object""" # Do a recursive from FUEL to ORE resolved = self.resolve_tree() diff --git a/src/adventofcode2019/solutions/day15.py b/src/adventofcode2019/day15.py similarity index 94% rename from src/adventofcode2019/solutions/day15.py rename to src/adventofcode2019/day15.py index 2661190f..6e4ac722 100644 --- a/src/adventofcode2019/solutions/day15.py +++ b/src/adventofcode2019/day15.py @@ -1,10 +1,10 @@ from collections import deque from enum import IntEnum -from typing import Dict, NamedTuple, Optional +from typing import NamedTuple -from adventofcode2019.solutions.intcode import IntCode -from adventofcode2019.utils.abstract import FileReaderSolution -from adventofcode2019.utils.advent_utils import string_to_list_of_ints +from adventofcode2019.intcode import IntCode +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.parsing import string_to_list_of_ints class Point(NamedTuple): @@ -63,12 +63,12 @@ def show(tile): class Location: - """ Location / Pixel in the maze """ + """Location / Pixel in the maze""" point: Point - location_type: Optional[Tile] + location_type: Tile | None - def __init__(self, point: Point, location_type: Optional[Tile] = None): + def __init__(self, point: Point, location_type: Tile | None = None): self.point = point self.location_type = location_type @@ -85,7 +85,7 @@ class VisitQueue(NamedTuple): class Day15: - grid: Dict[Point, Location] + grid: dict[Point, Location] oxygen_points: set def show_screen(self, droid_point: Point): diff --git a/src/adventofcode2019/solutions/day16.py b/src/adventofcode2019/day16.py similarity index 84% rename from src/adventofcode2019/solutions/day16.py rename to src/adventofcode2019/day16.py index 247d06a9..73b8735f 100644 --- a/src/adventofcode2019/solutions/day16.py +++ b/src/adventofcode2019/day16.py @@ -1,13 +1,11 @@ -from typing import List - -from adventofcode2019.utils.abstract import FileReaderSolution -from adventofcode2019.utils.advent_utils import string_of_single_to_list_of_ints +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.parsing import string_of_single_to_list_of_ints class Day16: base_pattern = [0, 1, 0, -1] - def generate_pattern(self, num_digits: int, multiplier: int) -> List[int]: + def generate_pattern(self, num_digits: int, multiplier: int) -> list[int]: """ Generate the pattern. `num_digits` will be the number of digits in the stream, @@ -15,7 +13,7 @@ def generate_pattern(self, num_digits: int, multiplier: int) -> List[int]: The first digit is skipped """ - result: List[int] = [] + result: list[int] = [] while len(result) < num_digits + 1: for i in self.base_pattern: result.extend([i] * multiplier) @@ -23,7 +21,7 @@ def generate_pattern(self, num_digits: int, multiplier: int) -> List[int]: res = result[1 : num_digits + 1] return res - def compute_phase(self, input_signal: List[int]) -> List[int]: + def compute_phase(self, input_signal: list[int]) -> list[int]: output_signal = [] for multiplier in range(1, len(input_signal) + 1): matrix = self.generate_pattern(len(input_signal), multiplier) @@ -32,7 +30,7 @@ def compute_phase(self, input_signal: List[int]) -> List[int]: output_signal.append(line_sum) return output_signal - def run_phases(self, input_signal: List[int], num_phases) -> List[int]: + def run_phases(self, input_signal: list[int], num_phases) -> list[int]: for _ in range(num_phases): input_signal = self.compute_phase(input_signal) return input_signal @@ -40,7 +38,7 @@ def run_phases(self, input_signal: List[int], num_phases) -> List[int]: class Day16PartA(Day16, FileReaderSolution): def solve(self, input_data: str) -> int: - input_signal = string_of_single_to_list_of_ints(input_data) + input_signal = string_of_single_to_list_of_ints(input_data.strip()) result = self.run_phases(input_signal, 100) # Convert list of ints to single integer and take only the first 8 @@ -49,7 +47,7 @@ def solve(self, input_data: str) -> int: class Day16PartB(Day16, FileReaderSolution): def solve(self, input_data: str) -> int: - signal_str = input_data * 10_000 + signal_str = input_data.strip() * 10_000 offset = int(signal_str[0:7]) signal_str = signal_str[offset:] diff --git a/src/adventofcode2019/solutions/day17.py b/src/adventofcode2019/day17.py similarity index 82% rename from src/adventofcode2019/solutions/day17.py rename to src/adventofcode2019/day17.py index 849add16..32553d1c 100644 --- a/src/adventofcode2019/solutions/day17.py +++ b/src/adventofcode2019/day17.py @@ -1,9 +1,8 @@ from collections import defaultdict -from typing import List, Tuple, Dict -from adventofcode2019.solutions.intcode import IntCode, ProgramFinished -from adventofcode2019.utils.abstract import FileReaderSolution -from adventofcode2019.utils.advent_utils import string_to_list_of_ints +from adventofcode2019.intcode import IntCode, ProgramFinished +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.parsing import string_to_list_of_ints class Day17: @@ -12,7 +11,7 @@ def print_grid(grid): for row in grid.values(): print("".join([chr(i) for i in row.values()]), end="\n") - def run_bot(self, input_data: str) -> Dict[int, Dict[int, int]]: + def run_bot(self, input_data: str) -> dict[int, dict[int, int]]: instructions = string_to_list_of_ints(input_data) intcode = IntCode() @@ -35,7 +34,7 @@ def run_bot(self, input_data: str) -> Dict[int, Dict[int, int]]: @staticmethod def compute_points(grid_lines): - """ Compute the points in the grid""" + """Compute the points in the grid""" # First we will make a 2d array match = ord("#") matches = [] @@ -60,7 +59,7 @@ def compute_points(grid_lines): return matches @staticmethod - def compute_scores(matches: List[Tuple[int, int]]) -> int: + def compute_scores(matches: list[tuple[int, int]]) -> int: return sum([x[0] * x[1] for x in matches]) diff --git a/src/adventofcode2019/solutions/infi.py b/src/adventofcode2019/infi.py similarity index 85% rename from src/adventofcode2019/solutions/infi.py rename to src/adventofcode2019/infi.py index c3b701b8..e1ce02e6 100644 --- a/src/adventofcode2019/solutions/infi.py +++ b/src/adventofcode2019/infi.py @@ -5,7 +5,7 @@ from collections import deque from dataclasses import dataclass from pathlib import Path -from typing import Dict, NamedTuple +from typing import NamedTuple class Point(NamedTuple): @@ -20,7 +20,7 @@ class Santa: class Infi: filename: str - flats: Dict[int, Point] + flats: dict[int, Point] jumps: deque santa: Santa @@ -33,11 +33,10 @@ def __init__(self, filename: str = "info.json"): self._load_data() def _load_data(self): - """ Open the file and parse the json data inside the file """ - root_dir = Path(__file__).parent.parent - # with open(root_dir / "solutions" / "data" / input_file) as f: + """Open the file and parse the json data inside the file""" + root_dir = Path(__file__).parent - with open(root_dir / "solutions" / "data" / "infi" / self.filename, "r") as f: + with open(root_dir / "data" / "infi" / self.filename) as f: data = json.load(f) self.flats = {} diff --git a/src/adventofcode2019/solutions/intcode.py b/src/adventofcode2019/intcode.py similarity index 95% rename from src/adventofcode2019/solutions/intcode.py rename to src/adventofcode2019/intcode.py index 40432c33..59fbebdb 100644 --- a/src/adventofcode2019/solutions/intcode.py +++ b/src/adventofcode2019/intcode.py @@ -1,10 +1,10 @@ import json from collections import defaultdict, deque from enum import IntEnum -from typing import DefaultDict, List, Tuple +from typing import DefaultDict -class ProgramFinished(Exception): +class ProgramFinished(Exception): # noqa: N818 """ This exception is raised when the program is finished. This exception is usually not a fatal error, but used for control structure. @@ -62,7 +62,7 @@ def load(self, load_data: str): self.instructions[int(location)] = int(value) def save(self) -> str: - """ Save the state as a json string """ + """Save the state as a json string""" data = { "program_counter": self.program_counter, "relative_base": self.relative_base, @@ -76,21 +76,21 @@ def reset(self): self.instructions = defaultdict(int) self.input_values = deque([]) - def load_instructions(self, instructions: List[int]): + def load_instructions(self, instructions: list[int]): self.program_counter = 0 for i, instruction in enumerate(instructions): self.instructions[i] = instruction - def load_input_values(self, input_values: List[int]): + def load_input_values(self, input_values: list[int]): self.input_values.extend(input_values) - def set_input_value(self, input_values: List[int]): + def set_input_value(self, input_values: list[int]): self.input_values = deque(input_values) def set_input_function(self, input_function): self.input_function = input_function - def _parse_current_opcode(self) -> Tuple[int, List[int]]: + def _parse_current_opcode(self) -> tuple[int, list[int]]: current_opcode = self.instructions[self.program_counter] opcode_length = len(str(current_opcode)) if opcode_length >= 6: @@ -165,7 +165,7 @@ def _get_store_position(self, position_mode: int, position: int) -> int: raise ValueError(f"Not supported {position_mode=}") def process_instruction(self): - """ Process the current instruction and increase the program counter""" + """Process the current instruction and increase the program counter""" (current_opcode, position_modes) = self._parse_current_opcode() val_1 = self._get_value_from_location(position_modes[0], 1) val_2 = self._get_value_from_location(position_modes[1], 2) @@ -269,7 +269,7 @@ def run_return_or_raise(self) -> int: if res is not None: return res - def run_until_finished(self) -> List[int]: + def run_until_finished(self) -> list[int]: result = [] while True: try: diff --git a/src/adventofcode2019/main.py b/src/adventofcode2019/main.py deleted file mode 100644 index e354f5db..00000000 --- a/src/adventofcode2019/main.py +++ /dev/null @@ -1,108 +0,0 @@ -import importlib -import logging -import sys -import timeit - -import click -import tqdm - -logger = logging.getLogger(__name__) - - -@click.command() -@click.argument( - "day", - type=click.IntRange(1, 25), -) -@click.option("--parta", "part", flag_value="parta") -@click.option("--partb", "part", flag_value="partb") -@click.option( - "-t", - "--timeit", - "timeit_", - type=click.INT, - help="Test the solution using timeit with timeit iterations", -) -@click.option("-v", "--verbose", is_flag=True) -def main(day, part, timeit_, verbose): - """ - Simple program that runs a module from the advent of code. - DAY is an integer representing the day (1 - 25) that runs that day. - """ - if verbose: - level = logging.DEBUG - else: - level = logging.WARNING - logging.basicConfig( - level=level, - format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", - datefmt="%H:%M:%S", - ) - - day = f"{int(day):02}" - - print( - f"Welcome to Advent of Code 2019 - {day=} - {part=} - {timeit_=} - {verbose=}" - ) - - # Try to import the solution - import_path = f"adventofcode2019.solutions.day{day}" - data_path = f"day_{day}/day{day}.txt" - - logger.debug(f"Importing {import_path}") - - try: - day_module = importlib.import_module(import_path) - except ModuleNotFoundError: - print(f"Module {day} is not yet available") - sys.exit(-65) - if timeit_: - execution_times = [] - results = "" - - for _ in tqdm.trange(timeit_): - time_prior = timeit.default_timer() - - results = run_day(data_path, day, day_module, part) - - time_after = timeit.default_timer() - execution_times.append(time_after - time_prior) - - average_time = sum(execution_times) / len(execution_times) - - print("Results:") - print(results) - print( - f"Average running time: {average_time:.6f} seconds ({timeit_} iterations)" - ) - else: - print("Results:") - print(run_day(data_path, day, day_module, part)) - - -def run_day(data_path, day, day_module, part): - if part == "parta": - return run_parta(data_path, day, day_module) - - elif part == "partb": - return run_partb(data_path, day, day_module) - - else: - a = run_parta(data_path, day, day_module) - b = run_partb(data_path, day, day_module) - - return f"Part A:\n{a}\n\nPart B:\n{b}\n" - - -def run_parta(data_path, day, day_module): - result = getattr(day_module, f"Day{day}PartA")()(data_path) - return result - - -def run_partb(data_path, day, day_module): - result = getattr(day_module, f"Day{day}PartB")()(data_path) - return result - - -if __name__ == "__main__": - main() diff --git a/src/adventofcode2019/utils/abstract.py b/src/adventofcode2019/utils/abstract.py deleted file mode 100644 index cbf6b2a7..00000000 --- a/src/adventofcode2019/utils/abstract.py +++ /dev/null @@ -1,38 +0,0 @@ -from abc import ABC, abstractmethod -from pathlib import Path -from typing import Union - - -class AbstractSolution(ABC): - @abstractmethod - def solve(self, input_data: str) -> Union[str, int]: - raise NotImplementedError - - -class SimpleSolution(AbstractSolution, ABC): - """ - This solution implements a simple input_text that is used by the solve method. - """ - - def __call__(self, input_text: str) -> Union[str, int]: - """ - Give the input_text as parameter, process this and return the result - """ - res = self.solve(input_text) - return res - - -class FileReaderSolution(AbstractSolution, ABC): - """ - Implement filereader - """ - - def __call__(self, input_file: str) -> Union[str, int]: - """ - Give the input_text as parameter, process this and return the result - """ - root_dir = Path(__file__).parent.parent - with open(root_dir / "solutions" / "data" / input_file) as f: - input_data = f.read() - res = self.solve(input_data=input_data) - return res diff --git a/src/adventofcode2019/utils/__init__.py b/src/adventofcode2020/__init__.py similarity index 100% rename from src/adventofcode2019/utils/__init__.py rename to src/adventofcode2020/__init__.py diff --git a/src/adventofcode2020/data/day_01/day01.txt b/src/adventofcode2020/data/day_01/day01.txt new file mode 100644 index 00000000..4ac5daa9 --- /dev/null +++ b/src/adventofcode2020/data/day_01/day01.txt @@ -0,0 +1,200 @@ +1313 +1968 +1334 +1566 +820 +1435 +1369 +1230 +1383 +1816 +1396 +1974 +1911 +1989 +1824 +1430 +1709 +1204 +1792 +1800 +1703 +2009 +1467 +1400 +1315 +1985 +1598 +1215 +1574 +1770 +1870 +1352 +1544 +1339 +188 +1347 +1986 +2003 +1538 +1839 +1688 +1350 +1191 +1961 +1578 +1946 +1548 +1975 +1745 +1631 +1390 +1811 +1586 +1409 +247 +1600 +1565 +1929 +1854 +1602 +1773 +1815 +1887 +1689 +1266 +1573 +1534 +1939 +1909 +1273 +1386 +1713 +1268 +1611 +1348 +1478 +1857 +1916 +1113 +936 +1603 +1716 +1875 +1855 +1834 +1701 +1279 +1346 +1503 +1797 +1287 +1447 +1475 +1950 +1614 +1261 +1442 +1299 +1465 +896 +1481 +1804 +1931 +1849 +1675 +1726 +355 +1485 +1343 +1697 +1735 +1858 +1205 +1345 +1281 +253 +1808 +1557 +1964 +1771 +1891 +1583 +1896 +1398 +1930 +1258 +1338 +1208 +1328 +1493 +1963 +1374 +1212 +1223 +1501 +2004 +1591 +1954 +115 +1972 +1814 +1643 +1270 +1349 +1297 +1399 +1969 +1237 +1228 +1379 +1779 +1765 +1427 +1464 +1247 +1967 +1577 +1719 +1559 +1274 +1879 +1504 +1732 +1277 +1758 +1721 +1936 +1605 +1358 +1505 +1411 +1823 +1576 +1682 +1439 +1901 +1940 +1760 +1414 +1193 +1900 +1990 +1781 +1801 +1239 +1729 +1360 +1780 +1848 +1468 +1484 +1280 +1278 +1851 +1903 +1894 +1731 +1451 +549 +1570 diff --git a/src/adventofcode2020/data/day_02/day02.txt b/src/adventofcode2020/data/day_02/day02.txt new file mode 100644 index 00000000..713f7fda --- /dev/null +++ b/src/adventofcode2020/data/day_02/day02.txt @@ -0,0 +1,1000 @@ +16-18 h: hhhhhhhhhhhhhhhhhh +17-18 d: ddddddddddddddddzn +15-18 c: cccccccccccccczcczc +3-9 r: pplzctdrc +4-14 d: lxdmddfddddddd +8-14 v: pvxlknfvplgktv +11-13 h: hphhhhhhhfhshhhhh +1-4 l: hbljb +1-2 x: wxqzlvt +1-5 g: dxggdggb +5-13 f: lfgdplfffxffswck +6-7 z: zzzzgzzzz +1-7 c: cccclcchrkctfhc +3-7 c: ccjccqzcc +15-16 x: rxxchpvgxxhxkxxw +3-5 h: hbxjg +3-7 q: sffnxxqvdfsnqlhqpq +8-11 h: hhhhhhhlhhh +7-8 w: bxwzdlwr +4-5 x: xxxxp +4-7 x: xxxxxxxx +2-18 l: lllllllllllllllllrll +6-10 n: nnnnnngnznn +12-13 c: ccccccccccchc +2-6 g: ggqngxgbggc +4-5 k: xdztx +4-9 m: txskmsnxvqjhlp +9-11 w: wwtxmsjwjwlw +12-16 g: cgggpkhggqkgrjcbx +9-11 s: sxsssmssvszs +17-18 c: cccccccccclccsccchcc +7-8 z: stpgzwlqm +9-19 q: qqqqqqqqqqqqqqqqqqqq +4-5 p: hpvtpfgwp +8-9 m: mmmmmmqmm +11-12 s: ssswsssssspts +2-4 j: jjdr +17-18 k: kvkkmlkkkkkkfklkkkkk +1-4 b: bbbwb +2-12 c: cccccccccccccc +14-15 l: llllllllllplllllllll +7-10 c: czcccsvnrbccc +11-12 d: nfmvdlxbfwzq +8-10 t: tvtttttzts +5-6 g: wggghg +11-16 d: ztfdkggclvzmvsxd +16-17 v: vvvvvvbvvpvxvvvhv +3-7 w: vrswklnfnjzkm +1-18 s: bsssssssssssssssshss +8-10 g: vdzldttzgm +19-20 n: nnnnnnnnnnnnnnnnnnrb +1-4 x: xxxqxxxxx +11-13 m: xmmxmmmmgmwmmm +4-5 j: pzfjjsjjmcm +1-7 j: jsjsmjj +7-8 j: nqkkljhbj +4-5 w: wmsbqhmwdjns +4-7 j: jbjjcjcf +2-7 f: jhsxldwf +3-4 f: vmff +5-7 z: fscmzjqs +2-10 g: ggtfwzpbkgqqlzwmbm +5-6 j: jjwbdjj +13-15 b: bbbbbbbbkbbbvbbbb +4-6 t: qdthtt +1-8 m: kmmmmmmvmmmmm +4-8 g: gbgqgtcglvgggcg +3-4 h: ghjn +3-8 b: mgbzbjvbkbpbd +11-17 k: kkkktskgkkkfgzkkk +1-6 f: ftnvfgtrlcs +3-13 r: hrrzrfrfpvdlrnrcrcs +3-8 l: gzljpllvl +3-11 h: hchjhhnhhnhvhhhhx +9-16 s: srssssssssskpldsqss +4-10 n: nnbnnnwnnwnnnxnn +3-4 n: nnnp +11-19 z: nznpcdnxkwznzlpvcwzj +4-7 w: wwwrwtwncwvwwwwx +3-4 s: bkgs +2-16 z: nzlcmlvqdcmmcnphb +1-15 z: zzzzzzzzzzzzzzzzzz +9-10 t: tmgttdtqtttttwbgttt +1-2 h: hhhhhmhmkgxhnhw +4-5 h: hlhhh +9-15 h: xhhhhhchhhznphh +5-8 w: jwphwwwj +4-5 z: lztsz +10-11 c: mhtdcdhggccgfck +3-8 t: ccttgcktz +1-12 m: smmmmxmmmgmx +1-12 r: srrrrrrrrrrlrrrrr +2-5 h: khhzhrqr +3-4 m: mmztmm +2-5 f: fbffqf +1-11 p: zpppppppnphppx +5-12 z: pqrzlwztvzjfzbt +8-12 b: bbbbbbbdbbbcb +3-4 g: ghqg +7-10 m: mmmmmmmmmmmm +5-14 q: jblkqbqpmqwsqt +6-8 r: rrrtrlzltfrrrgrr +9-14 r: rrrrrzrrjrrrgmr +9-10 m: tmshdggksmv +10-17 d: dddddddddcddddddf +6-7 f: ffffffx +9-19 j: jfjljzjcjjzjjjfjpjj +2-6 h: jhxmhh +1-7 g: wgggggzggxmggg +5-6 n: nlgnlx +4-7 t: thzttttt +4-6 x: xhnxjx +14-16 p: ppppppppppppppppp +2-4 s: ssps +7-15 k: bzfljhskslxlznwvphg +6-7 j: dkjjsgk +9-11 p: ppppppppkpmpp +5-8 t: tzcttttttt +8-11 d: dddddddgddld +3-9 w: dwwhwbwwwwwzwtwxw +2-3 x: xxwxmw +1-5 g: gdlvg +4-6 c: cccmcrccccccc +1-11 f: ffffffffffnff +10-11 l: lgqgnwlhgdlvdlv +3-7 v: cjvvvvnvjvjvgvkx +4-5 v: vvvsv +13-15 t: tttttrtttttttth +11-12 q: nccsqqhqqqqqlqqqqq +2-7 p: pspppppppp +4-6 g: gglggg +17-18 p: hwpkcxvppzxxvpjzpp +1-3 b: dlfz +11-12 p: ppppppppppfpdppp +1-2 s: ssszdss +2-15 b: nbsblthmngvbqvbh +1-6 q: sqqqqbqq +4-11 q: tgmtqqrxfsvrzhc +8-13 q: qqqqzqqqqqqmqqqjqq +9-17 n: nnnnnnnnnnnnnnnnpnnn +6-9 h: rmhrlkhskbhhq +5-6 n: qnnjnn +4-6 l: lxlllkvdltgcfl +12-15 f: fflffffpfvftffwff +13-16 t: fpwmwmvtqbvxtvtt +7-8 w: kwwwjgwmwbw +1-2 x: xxnvmbcmxhnkkgfrr +3-7 f: rpcnzvjgh +13-15 r: rrwrkrrrrrrrdrbr +11-13 h: ghnzvhhhhwhchmh +7-8 h: hhhhhhnv +5-6 l: kgllll +1-4 k: kqsjblck +6-8 c: crxxccccgc +2-13 g: fvmhpbqkgvbwqvbldb +4-7 g: ggglggmgggkggg +6-7 n: znnrnpnn +12-15 j: jjqjzjjchjmjzsgppss +4-5 k: kkkkk +12-16 r: rrrrrrrrrrrcrrznrz +10-12 w: hdwsvqpwzvtx +9-11 b: brbtbwbbjbbbbbb +6-8 q: nqkvkqdqrq +3-5 n: pjcnd +9-11 q: qqqqqqqqpqqqq +6-7 b: zdbbfpqbvbbgbnq +11-14 g: dxvgpggnpngpqgn +8-11 z: zzzzzzzczzq +8-18 z: nzczzlkcchpzdkrpvzrd +2-4 d: fwdhl +12-13 m: mmmqllmmmmhnf +6-8 b: bmbbcbbbznnbd +18-19 z: zkzzzzzzzzzzzzzzzzz +4-10 m: smkkrpqznmnfdprq +7-8 j: jjjjjjhsj +10-15 t: trpttgcttttttbtt +6-7 t: tttttltttttttt +7-13 x: bxxcxxvxknqcxsx +6-10 j: zjrrtjwxfjhhtcsktslf +3-5 m: zjmms +11-14 v: vvvvvvvkvvvvvvv +1-2 c: ccch +13-14 v: vvvsvvvvvvvvvv +9-12 g: fgkgxgggcjdg +4-6 t: ttpxtgntzwtx +10-12 g: gggggggggkgbg +1-3 l: llllw +7-12 d: nddvldndjcdpdddz +2-5 w: wwtlwwvdww +6-11 c: fcccccccdcc +12-19 s: sjsssssssssssshssss +19-20 t: ttttttttttttttttttkf +7-11 z: zpfgzczcxzmclzzz +2-7 d: sddlpvdqzzlqfkjkbb +2-7 k: dkmlkckm +4-8 w: wwwwwwswww +1-3 d: pddd +1-9 r: chrrrrrrr +17-19 t: ttttttttttttttttptvt +17-18 v: xvvvkvvvvxvsvhbvvv +6-11 j: njjjjcpjjjbjhqj +1-3 s: ssss +15-16 k: kkkckkqgkkxkkkrp +6-7 b: mgzhbbb +9-12 w: wjwxwwpxxtwvwwjnnw +2-5 x: xxlwcpzfx +4-11 j: jjjxjjjjjjcj +6-17 c: qcccsvvzfpccccfchcc +3-4 c: scbjdmjhtlcdvbq +8-9 b: fngpbvfsctl +15-16 r: rrrrrrrqrrrrrrdlt +5-10 v: tvqlvvvtrvlfkwsvlvn +6-8 q: qqsqfqqqq +8-9 m: mmmmmmmms +8-12 r: rxrrprvcrrjd +19-20 c: cncccqwnbsvccclcjkcc +2-4 b: mmjg +12-13 l: slwjlqlslllll +2-8 m: fmmppmmmmtmzmmmm +4-13 l: llllmllllllllltz +6-11 f: ffffffhtffff +1-6 g: gngfzbgx +1-5 f: fwfmfrfxf +16-17 t: ttttttttttttttttt +2-7 w: twsdwvj +6-13 m: mmksmfnmdxtmhmmxm +1-6 b: bbbjbbnbzwgrb +13-15 c: ccccccccccccccsccc +7-8 k: kskkkgkkk +6-7 g: gggmgbzg +17-18 k: mckjkfkdfqkxgtrcrch +4-5 g: xglggggs +2-4 d: ddddddd +5-7 s: nlpzsss +5-12 w: ngwpwprvlftr +15-17 p: psgjvphpbppzpprpp +1-5 m: lljdr +6-8 h: hnzhhqxh +4-7 g: mmccqwfvlqrks +12-14 l: lllllllllllllll +2-3 c: cqfc +15-16 z: zzzzzzzzzzzzzzzz +6-7 v: gkzxvvvdbvnp +7-8 z: zzzjzzvc +13-18 v: vvvvvvvvvvvvkvvvvlv +1-12 p: pppppppkppppppp +10-12 v: vvvvvvvvvtvvv +5-6 s: qkpsqz +5-6 t: tgthtlt +1-5 z: zzzzzz +6-7 j: jjjjjjhj +4-5 b: lbbqdfrbbv +4-6 n: jvmxtfwnqpdhn +2-5 r: mcmrf +8-10 s: sssssssggsss +6-9 f: ffbflgzsfftxqg +1-18 p: pppppppppppppppppp +3-13 b: bbbbdfbbbbbnbbbblcb +5-6 d: drddpk +4-5 h: jhhhdh +12-18 x: wxtsqsrxtsxxxvhxfxx +5-6 q: qmxdnz +6-16 q: qqwqfqqqzqqqqfqqq +4-10 x: xxxgxxxznx +2-3 x: xndnnb +4-5 g: hcgff +5-6 s: wsgjpgssssssdssssss +16-18 k: kkkkkkkkkkkkkkkkkk +5-6 k: kkkkpqkk +13-19 r: rrrrrrrrgrkrrrrrrrr +10-11 s: vgnbshssjcpss +3-5 f: qfhjmjkcgv +3-4 q: nrtnvbsmbwpq +8-18 j: jjjrjjdtjmjjkjwzjjk +4-14 t: tttgtttttttbtxt +5-6 q: qqqqtj +14-17 b: bbbbbhjffbbtbbbbb +9-18 x: rxxxwxxxxxxxxxxxxc +3-9 f: hgjjfkvlflhbtxpb +7-19 n: nnmndnknnlnjnnnnnnz +5-8 m: mbmlmmfpgmwmm +7-8 j: jjjjjsdkjg +3-8 p: hlpjkpjjvbrgpw +10-11 t: tttttttttptt +6-10 b: bbbbbthbbd +3-11 l: xvlknhhglhcgvk +7-17 j: mpxjmcwwqqjtprwgjj +14-17 v: vvvvvvvvsvvvvhvvvv +16-17 p: pppppppdpwpppppppp +3-4 h: hhdr +8-9 v: bvvvvvvfs +6-12 p: pdpppbppnqpxp +3-6 w: jlwwjvcwwhwjrgwzjkqw +3-4 c: zqkzcc +2-7 h: hzhhhhv +1-9 g: mgjlggdznj +3-6 x: nxjxxkxhfx +7-11 m: pmpmmmmmmmmmtmm +9-11 t: tttttttttttt +3-4 n: nnnpqnbfnnnzn +10-17 b: bbqbbbjbbhbbgbthxb +2-8 n: qfqnjhhjsvcvcnnjnnhn +3-6 n: jsgnnn +1-2 n: nntknsnsp +5-7 s: ssssssss +8-9 l: kllllllllh +4-9 k: vkkkkkkkkk +3-8 x: hxdxbxnmxx +5-8 f: pfmvlbffff +13-18 n: rnncfnnntnrgxnnsnn +1-2 d: jxdd +3-5 p: bcfdp +2-4 k: hklkk +13-17 w: wwwwxwwwwldwwwwwm +4-5 z: gzzzgczz +14-15 g: gggggggggggggqg +9-10 x: jzwnmqhgqkxhxb +3-4 z: fszz +13-14 l: nlllllllllrlflllx +1-3 r: rrrr +15-16 c: ccccccckcccccccccl +1-6 h: hhhhhhhphhhhjfhhwjh +5-7 r: gvcprfrrgtqjkgsbcb +12-14 v: vvvhvvvvvvvvvvvvv +18-19 l: llllllrllllllllllpgd +13-14 x: xxxxxxxxxxxxxxx +7-13 d: pcgbdmkhnnxqdhb +9-11 c: ccccccccjcf +14-17 m: mmmmmmmmmmmsmmmkmkm +7-16 p: jblsmjhskpmcflvzqbb +1-3 p: pqpzfpw +6-8 h: whhtglkhshhzhh +1-9 x: xxjxxxxxxxx +2-3 d: ddgwh +3-4 z: rzzz +12-13 p: ppppppppppppppkp +2-6 f: fbffjbxz +4-7 f: dmkrhsfnffg +4-6 p: ppppppppp +17-19 d: ddnwdddddddnddddndgd +4-8 n: bxchqdknggfjqzcvdwzv +3-19 z: zzzzzzzzzzzzzzzzzzpz +2-11 h: hhthvhrhpkhfrljhf +7-8 s: sssssgsg +1-3 p: hpsp +4-5 d: wdkdd +2-4 j: fjpd +2-8 l: dsvhdlpl +11-15 b: bkbbqpbqbbbbbbfbr +4-9 j: vffrxjvglzq +17-19 q: qqqqqqqqqqqqqqqqqqqq +2-9 g: sbpcvnmsghrm +3-6 r: kxwwnfbqv +9-12 w: qxwwwwdwwcww +4-8 t: tttztttxt +5-6 k: sklmkk +1-15 t: qttstmlgtxjfwthj +12-15 s: sssssssssssssssss +1-8 d: ddtddbddj +7-14 m: rmmhmmmmzvmmmkxmmmdm +5-6 n: nnnnnwn +7-8 m: mmmmmmghmm +1-3 q: qpqqgkc +3-10 q: qqqqqzqqqqqqb +1-7 p: ppppppqp +3-5 c: nbkfmcccpkjccv +14-15 q: qqqqxqqqqqqqqqq +8-9 p: plgpblsfp +10-13 w: wwtwwwwwwwwvwww +8-15 k: kkwjkkkknkdkkkkk +6-7 l: lllllmkl +8-9 l: lllllllxgl +10-12 p: gpmpppppppvpvpqpx +4-7 x: rxbxxxzqx +1-10 h: dhhhhhhhhxh +12-18 v: vnwvgvprbfgvvgnvvv +4-17 n: xbdnmnrrcfmczhjxndr +8-9 k: kkkkkckqskkk +9-12 l: rblxmkxmlfflnfpg +6-11 q: vqlqqqqqqqqqqqqnq +8-10 j: lxpjjjjjwjglcjhjjj +4-6 x: xtxxjx +1-2 w: wwwww +5-8 h: hhhhkhjhhwh +7-10 s: stjsssdssdl +2-12 p: xwnzxpzwnxzc +4-5 v: vkvvvvk +1-6 k: ksgmxkkdcfqgxcxm +16-17 g: ggggggggggggggggg +9-10 g: ggggggggmcg +9-12 m: mmmmjzmpmmmx +2-3 r: lrrlrtmbcl +2-3 s: sqss +9-11 k: kkkkkkkkdknkdpkbkkk +13-15 t: tttttttttttttttt +3-5 p: ppkfkn +4-5 d: dddtk +9-13 b: hbmtbzspcqtwqfkbbbdb +5-7 d: dddtddhdddddddmddddd +6-7 q: qqqqqsl +8-9 k: kkkkkkkkk +3-7 d: gdcwjglkw +6-8 s: srtgjdsn +8-9 r: fxrgqrsrs +5-10 x: xxxxlqxxxxxxxxx +2-3 s: ssskpmzhqpp +2-10 q: qqqqqqqqqqq +5-12 r: srnqrrhkgrjr +1-3 s: fsmsssss +1-2 f: ptbtfm +9-10 b: lbbgrbqhnhbcnmb +1-3 x: xxnx +1-3 w: gjfh +3-8 q: qwqtdvqql +3-5 f: zfmcgpdlp +6-8 h: vhhhhhbh +4-12 c: lkbcvnztjnpxvlcf +4-6 w: wwwwwwwpwwd +10-15 v: vvwvvvdvvzslhvz +4-7 c: jpvmlffcgdkmcl +6-7 l: llllwlll +8-9 m: mmlmlmmnmmm +14-15 m: mmmmmmmmmjnmmmmkz +3-6 t: thttttt +3-14 t: kvltjtmkbvhtbt +6-7 j: jjjjvjjj +5-6 m: dmnmmmknqwmmmkm +8-12 s: ssksssssssssr +2-6 r: srvrqrdwxnprrvpqhd +6-11 l: lhllkdxlllln +2-4 t: qmmd +3-12 s: sssssssssssrs +17-18 t: ttttttttttttttttqf +2-5 r: qcbrr +14-16 h: hhghppchchfhhhlhm +15-17 g: nprhksgfwwjgggkkc +7-8 g: gggggggn +5-15 g: drgkscpgchvzmjs +1-3 l: fsztllllll +4-5 p: ptftp +5-6 j: jjjjjj +1-4 f: ffjfhz +9-10 q: qqtqwslqqg +6-20 h: hgklqhcmhfmxvcnxvxch +7-8 c: jcwbrvcc +8-10 m: mwmmmmmsmvmsf +8-9 v: cfvrvbvzvvvgvpk +14-17 s: srkhgbthtssxszqvsbsx +4-7 b: sbpffpbxv +9-11 z: zzzzzzzzzzzfztz +9-12 v: hmvvvvvvgvhkvvcvvvb +1-6 c: fkcjcwqccs +13-15 r: rrrrrrrrrrrrrrrrrnr +3-4 g: ghgg +6-7 b: wbbbbbbbbbb +7-8 t: trttdtttjbktt +3-4 t: wtttct +2-4 c: xccc +5-7 s: ssspvlrslxn +1-3 s: lsss +4-6 h: hjhjhghh +11-17 s: ssjrsscslskssqssn +1-4 j: rzjjjv +7-8 f: tvssgbrkqdtc +5-8 w: wrjklbblzwdclwnwjwx +4-8 r: srrrrrrr +1-7 g: ggggggg +7-9 m: msmcmmmbwgxkmmnmm +7-10 w: wrwwwvwwww +7-11 g: rgkzgdgpldgc +11-16 p: pppdpzvzpppqrwppv +3-5 n: hnnnnn +10-12 n: nnnnqnnnnmnwnn +6-9 k: spdbkgkxzlqkkkkk +2-5 j: jjjjjjjj +2-4 n: njnzn +7-8 c: cclmcchjcbc +13-16 k: jkrxkmtxfkxfccdklk +8-9 f: fffffffjkfffnpffvfff +8-10 x: xgmdzfxxsc +7-12 k: fknkjrklsrkkkhqknkv +10-12 l: lslzlpllblllll +3-4 f: fffvfff +16-19 j: jjfjjjjjjhjjjjjjjjj +1-3 h: hhhhhhhhhhhhhhw +8-11 n: nnntnpdnvkqt +9-10 n: nnnmnnnnnnnnnn +3-5 c: qbcccchvccf +8-9 s: sssssjsmqj +4-5 w: zwwrxwwfwpwwz +7-9 m: mmmmmmvmf +5-9 w: wwwvtwwwm +11-13 j: zjjjjjjjjjjljjjcjjj +2-9 c: zblcmvmcfc +16-17 g: gggggggggggggggqk +12-15 p: pfcpppsgppxbjvqppppp +4-6 l: ssldtlc +5-8 h: shtphhdhhhhm +17-20 n: nnnnnnnnmnnnnnhnsnnp +12-17 s: sscsrsssdsssssrssss +2-9 j: tjlffpwkjmnj +1-6 p: cpxfpdvjb +10-14 b: bbbbbbbbbhbnbbsbb +3-4 h: hhhnh +1-3 j: rkgjvqkgs +16-17 w: wjwzdwwwwwsxbtlfs +9-11 r: rrrrrrrrrrrr +1-5 d: dtzqdd +5-7 p: pprpppp +6-7 n: nnnnnnn +1-10 k: kkgcklpqzkk +2-4 n: lvxnntjnpwhrsxlnhn +3-6 h: hlhhhxhzh +6-7 c: zccccccc +1-4 z: ztczzzzzzzznzztnlkjz +5-6 c: cccnccshkcpgjhn +3-4 h: hhbh +1-4 m: gmtm +13-18 d: tldhjsdhdthhldzfgjxg +4-5 d: dddddd +1-3 r: rrrr +7-8 b: bbbbbbbt +12-14 z: zzqzbhzzzzzzzz +5-7 v: vqblwrw +8-9 c: tccccdcrccccqc +9-11 m: mmhmmmnmqmtm +3-10 n: dnwzhrfnqt +3-4 t: xnkfpcqtcqkctxrrm +2-7 l: lllllllll +2-7 g: rdnskwgwcgnrzncqtnp +11-13 s: ssssssssssqsw +10-12 m: mmmmmmmmmcmqqmmpmm +4-8 n: gnqnptxnhgpnnnn +6-7 t: tttttcct +2-3 s: sssssss +9-10 h: hhhhhphrms +3-6 d: vdxdddddd +8-15 k: kkkbkkckkkkkkzgkkk +4-10 n: ncntnnnnnnn +3-9 r: snrkcrrcvrx +7-11 s: sssssgwsshks +1-4 h: hfch +10-18 l: llllxllllflllfllsnll +13-16 x: xpwcxpxxxxfqxnxx +2-3 m: mvmmm +3-5 l: ljlzs +8-13 t: tgttttmmrfthttwt +2-9 t: vttjddjxtfrlw +3-5 r: frrrr +4-5 s: pssnm +4-5 h: jcphhsnrm +2-3 d: pjdd +2-3 g: gdgk +10-13 v: svtvvvvvxwvvwv +4-5 l: lqlll +13-14 s: sffbffsmssscss +2-3 j: fkkfmzqjnfvdjr +16-18 z: zmqzzgzkzzzglhzzlzj +3-4 h: hhfh +11-13 s: sssssnsspshswhsssss +7-9 g: gvgggrmgzr +1-5 p: hppxnlkgcpppppppp +1-13 q: qqqqqqqqqlgqqqqqn +3-5 x: xxzxpx +3-15 x: xcndrhtnpbqwgsxtzqn +9-13 d: nrhbddvslmwbs +8-10 g: grggggxggxgg +10-11 h: hrfprqnhbhh +2-3 r: rpzr +14-15 d: ddddddddrdddddd +7-8 b: zbbbbgbbbbpbbv +12-18 v: vvvvvvvvvvvfvvvvvvv +7-13 r: snkkjtnkrntjfd +1-7 g: ngdndgg +1-10 h: hhzhhhhrhhhhhhhh +6-7 x: dxrxxzs +6-7 x: xxxxxxxxxx +8-11 v: vcvvvvxvvkcvlvvvvvv +3-4 n: nrzh +8-12 x: xxxpvxxttxxfmnx +9-10 r: rrrrgrrrzr +2-8 v: lbtvvvzqvzsg +3-5 d: dkfbwlrg +13-14 k: kkkkkkkkkkkkkk +6-8 x: xqgbwxxxppgxz +1-4 n: pnnr +6-9 l: hglpllcnl +1-4 x: xxxx +3-5 n: lnzwmhjnndjdmknnqtnc +8-13 t: tttttttnttttjttt +7-11 s: ssssssssssvbn +1-5 l: lllllll +2-6 v: rvvzvvzcgv +6-8 c: tccckcrc +2-3 q: wnqq +2-3 p: pplpp +3-4 f: kxfwcfsk +1-6 m: mmmmmm +3-4 n: zgnnprvnns +17-18 z: zzzzzzzzzzzzzzzzwhz +3-11 w: wflwwwvwwhrgwwrwwwww +9-13 g: ggggggggpggggg +2-6 r: trvcwrr +5-7 p: prtjptws +7-10 b: bfbjwjlkbsbbwgk +3-5 z: zzzzzzzzwhzzzdznz +4-7 p: lphppppppp +4-5 n: nvnnnsnn +7-9 b: znbhbtgbw +1-11 w: jwwwwwwwwwgw +10-13 w: lwwwwwbwmwwfqwwr +5-12 p: ppppqppppppt +1-10 j: jjpjjjjjjjjjjjjjjj +6-9 g: gxgfgjmggggg +7-12 c: cdccccgcccgc +7-15 m: mmmmmmmmmmmmmmmmmmv +4-7 n: ndwjpvgnh +5-9 s: cszftmnqmssfqs +1-11 m: zmmmcdcmfmdbmltmf +16-17 s: zrshsssxssssssxfs +6-17 m: kphrlmrcmpskjcmmmg +3-4 j: jxjj +2-3 f: ffbfs +4-7 v: vvvvvvvv +1-7 f: fffffffff +1-17 d: dtdftddsdddddddsdd +8-10 c: ccrccccccsc +2-8 m: hqmmmmmpm +2-5 j: jjnjjjj +7-8 s: vsszssssss +3-18 g: ngpggmgggggggggggfgg +14-16 r: rrrkrqrlrrrjrrrpwtr +2-3 h: hshs +10-16 r: mrxdnzxmvrplhmrr +6-7 q: hwqmqqqqqql +3-6 z: rgtqkw +1-13 k: lkkkkkkkkkkkckkk +3-5 t: ttxtt +3-9 s: ljsvzbfwshssrc +6-7 z: zbwzjgw +1-11 n: ptnqltlkrxv +8-9 l: lsllllllhl +2-8 v: vvvvvvvzvvv +5-8 s: ssslnsssssssssl +7-8 k: kpkkkkkchlk +15-18 v: vtvvvvwvvvvvvmvvvb +11-13 m: mqmpjsmmlkvnmnfmwqmq +14-15 k: kkkkkkkkkkkkkljk +13-14 t: tffbtznjgtcnts +5-6 z: kkkpzzctq +4-5 h: jhbhzr +5-7 v: vqvvgxv +6-10 d: dddddpdddtdd +11-12 g: ggggggggggvggg +13-18 f: ffvfffxhrfhrcffpgnff +6-10 x: nsxgwsjxfthhxxgxg +2-5 w: wfvpmwtwg +9-10 l: lljwlllfxcll +2-5 b: rbbbmbbbbbbbbbvbbb +5-13 p: jjffpmbpppmtpf +1-5 r: rrzrrrrkrr +1-2 m: mmmmmgmm +16-18 z: zzzzzzzzzzzgzdzqzz +6-7 l: llwfxll +6-9 j: jjzhjjjjjjj +4-7 k: hwskvkk +2-3 d: dddddq +4-6 b: bbbbbbhbbbbbbbbbbbbb +7-14 l: lnhmlwzxlsldlx +2-4 m: msmmh +4-10 z: vhkrzzcbzzrzdcq +4-7 p: dnppppwp +5-7 z: mzzzzzzz +5-7 b: bbbbbbb +1-5 t: rrbtt +7-11 x: bjxqxtxzlfxpmkpqtnd +7-9 k: kkkkkkkkkk +8-9 d: dhfddpndbhqdtdwdtn +18-19 k: tnkzkdkkkgkkbckkkkk +8-11 f: cfnqkzffgxf +2-4 x: xxwxxsx +8-11 m: mmmkmpcmmvgxmmmcmm +13-14 z: wfzlzzzzzrdxzlzz +2-4 n: frns +4-5 q: qhqqqq +12-18 w: fwwwwdxxzvzzgwpwlk +12-13 n: nnjnnnnnwnnxgnn +8-11 c: tcjcbcwctkccr +4-6 m: jvmhtq +1-2 b: bbbbb +11-12 q: vqfqvqdnsxqq +7-9 m: mgmjmtmmzmmhrm +9-10 t: ktvnttttxl +8-10 r: rcrrdrrdgsrr +7-8 m: bvlmhxfxnlmfbz +3-5 c: bhczc +1-3 w: nwwnwwxww +3-5 l: jcllld +1-10 b: bbtbqbtbbbbtbbbbbbb +5-7 x: vsxxxxxx +3-4 k: gdkv +8-10 k: kpkkwzkrkjkkkm +3-6 l: hhlmll +16-17 x: xxxxxxxxxxxxxtxmx +1-4 w: wrkw +1-4 t: gzpkttttt +2-3 z: zzzq +13-14 q: qqqqqqqqqqqqqq +2-19 d: vdwfzsfqtqbglgrfdvd +4-6 x: dxtnxzx +3-5 g: ggggg +6-7 m: mmmmmjj +15-16 t: tvtttttvbttttttt +5-6 k: kdztgkx +1-3 d: dddd +5-14 h: hhptkkcpqphhdgw +13-14 j: hvmrjdcjhjjfgbmw +10-14 h: hhbhchhhhwhhnhhhthh +2-3 f: jcstlgbdf +3-4 w: kwww +2-12 b: bbbbbbbbbbbfbbbbbbbb +2-4 x: xxxs +10-11 c: qmrtcpztvcc +7-12 l: llptfltlllllzllzl +14-16 m: mmmmmmmmqmmmmtmr +10-18 m: mgmmmnmmbbvmmmmmmgmm +4-18 q: kqlrkhrqljbgwpmpnq +3-4 c: czcdc +2-13 k: jnmzxwvgfldnz +11-12 b: bbbbbbrbbbbb +6-11 p: psfpzrpfpqkzpvppt +9-11 p: mpspjjxcpqpdppppph +4-17 t: tdtftttttttlttdtttwq +12-15 r: krrrrrmrrrrdrrmp +2-3 x: xczx +1-7 j: mjjgjjdjj +2-8 x: jmlxxxxxxxrxxxx +6-7 l: qntxbml +7-12 k: kkkkkkvkkkkfkk +2-7 z: nsgtlfdrsp +7-9 m: mvmmgmjmm +3-7 t: ttttttt +2-9 b: gbczjbbbblbbb +8-12 j: jjjjjjjljjjsj +9-11 h: dmrjmzdwhhhqz +6-10 j: jjjjjjvvjfcp +1-6 t: tqsznxwnnrnmjt +5-8 f: rpffhjnlkxplffhm +8-9 d: fddddddddddcdndddrdd +4-5 k: jkkfckkk +3-5 l: llglkqllll +3-5 k: zkzknkkk +5-7 d: nddddnq +9-10 j: vjgjlfcjjjfxjjmjrzwk +2-4 m: fdxm +5-7 c: cvqgkhvtbccc +7-20 j: rscsdsjzflbldrwqvkjj +4-5 p: pbxpppp +3-4 h: vnhhvlbtbqshhcsxhs +4-12 k: hkdkfxkknkkkkck +4-5 g: gggvq +4-5 h: zhtch +8-12 m: tpmmxzmgmmln +9-15 c: ccckfccjznpclnccxc +9-12 p: pppppppptcpfpppppppp +15-17 g: ttdlnvrknskcgvrgnm +7-12 r: rrrrtrtrrrrjlrrr +4-5 c: rccclxc +3-5 d: hbgzddt +4-5 x: cxxxx +3-4 k: kkpc +8-9 j: jjjjjjjrhv +5-6 p: ppcppp +14-15 h: hqhhhhhghhhhhlrhh +5-10 z: zzzzzzzzzzzzz +6-7 m: mhdmmzpmmmp +1-2 j: knjj +2-7 m: mmqnmjmtkz +2-3 j: jzjjjjj +12-15 g: gggggggggggngggg +6-9 h: hrtllxbqgcrf +3-4 c: ccccc +7-11 g: jclgcjgngkzggg +6-9 s: qwnvpsvbsmwqpqrst +17-18 k: kpdkzkkkkkkkkkfkksk +1-3 v: svnv +4-6 k: kkndkkkkk +12-15 z: zzzzzzzzzzzdzzzz +3-9 z: zzzzzzzzr +7-10 w: vgwwwcwwww +10-15 n: vgxnnnqnnnhwsbnxpnnk +2-4 v: fxhvh +11-12 h: hhjhhhnchhhhhhhh +3-9 z: vzzczzzkzbh +5-8 k: kskkkkktkk +3-7 s: sswssxt +4-7 g: rggdggg +4-7 c: zccpcccc +6-11 z: mzlrssckpzvzslcwzzzz +8-9 v: vvvvvvvvvvvvvv +1-4 f: fffffffffffffffff +8-10 f: tjfffmgrfl +3-5 k: kfwnp +6-7 t: pvtstmq +3-7 x: cvxkwxxgpjxskkvsxp +1-7 c: cctcckccccxc +1-3 g: vfxvfxmhpgg +13-16 m: fmjplfbgzzkrmcmv +3-6 l: llmllc +17-19 j: hjzjrbpjzjdjjvbzjjv +7-12 q: qqqqqqqqqqqq +9-13 n: nnnnnnnnqnnnxnnv +17-18 n: nnnnnnnnnnnnsnnnzh +6-15 f: rswffffffkfffkxfjf +3-6 v: vvvvvvv +9-11 d: ddddddddmdf +19-20 k: kkkkkkkkkkkkhkkkkktg +9-11 f: ffffqfffnfl +6-9 r: rrrrvrrrr +5-6 g: kgdfggggng +17-18 w: wwwwwwwwwwwwwwwwrm +5-14 t: tttttttttttttqtt +13-15 n: nnnbnnnnnnnntnn +4-13 g: rlhgcffsgshcg +4-12 z: mbfztgsbkscpqwl +18-20 p: mmflppmwzscjcgsxdddd +1-6 k: kkkkkkkk +18-19 n: qxkljbmdgsfsnknfhjb +1-2 h: nxnhh +2-11 f: fxffffffffxffffkffff +4-11 k: mqvktsksvkkwjbtvg +13-14 m: kmtmzqmmjmmmmmmwkm +3-5 t: ttswxtt +11-12 b: bbbbbbhbbblbbbb +9-10 w: lkhccgmwvd +2-3 t: thttl +12-13 b: bbbbbbbbbbblb +8-9 w: wdwwjbwblwww +4-5 h: hqphz +9-14 h: hhhhhxhhzhhhhht +9-10 x: xxxxxxxxxxx +4-7 m: dgltmmrdvmfmd +9-10 h: vltrhtgblsmlmnbvml +6-10 p: gkpppbppspp +8-9 c: scjdvbpwn +4-15 f: fpfnffffffffffhn +10-14 s: sssscswsssssss +4-10 j: jxdjfscnmgj +6-12 w: ksjdxwckwwwwwfzwsgz +1-8 j: jjjjjjjtj +1-3 d: kgpvfv +2-12 w: wwwtwwwvwwwwrwwwwww +4-6 f: fkbdftxqtxjwfvf +7-8 p: pppppppk +12-14 g: gmgvgffnggjkgggg +3-4 x: wxkgxxxx +3-7 n: nnnddmcjcrtnnfhnx +4-5 k: kkbmxkk +12-13 b: bbbkxbbbbbnbbtbbgb +9-11 h: hhhhhhhhhhhh +4-6 q: lmgvsfqxmqhvzqqt +13-15 t: ttttvtttttttfhm +1-3 x: hxlw +9-14 v: gjrvgrmvvvdcvv +5-15 z: zzzzczzzzzzzzzzzz +1-8 s: tssssssss +10-15 h: vhvhxthvhhhchhshfh +1-9 l: lllpllqklmlk +12-14 z: zjzzzzzzzhzkzz +3-8 w: wlzzflnmflwdnp +5-7 s: sgsdssss +5-13 h: hnhshhnklhqbhh +4-6 b: xsbbbxbbpbbbbb +14-16 c: cccjgccccccccmvc +5-11 r: nrrrrrrsdjrrk +6-12 s: gssjtjssfhjsssssss +5-6 j: jjjjrs +14-15 d: dddddddddddddddd +10-11 z: zczzzzzzzzzczzzzzz +2-4 q: qqqj +7-13 f: fffffhfffffff +13-14 q: qqqqqqqqqqqqjfqqq +8-9 w: wwwtcwqjw +5-6 x: xcrfxx +13-19 r: rdwfrghfrcnjcdjxtrmr +6-9 h: hhdhhhmlg +7-11 p: ppgpppgppdq +5-6 m: msmrtxm +14-15 j: kjkzrslzdzgrfjjjj +14-15 f: fqjfffwsffzhmff +15-16 d: ddddddddddddddvmdd +10-11 w: wslwwcwkzrvkg +1-3 v: kvvvv +6-12 q: qqqqqbqqqqqzqqqqqq +15-17 m: mmmmmmmmbmmmmmfmxd +1-10 t: sttttttttvt +8-9 q: qqqqqbqwq +14-15 t: ftgtttgftxttwtt +5-9 p: bzkpxnfnj +2-9 h: hhngqknrhd +10-11 h: hhhhbhvhqhhhh +5-8 v: dvstzxwtp +3-5 q: qmzpbmmwsqwzr +7-8 r: rrcrrrrr +3-4 w: wwwt +1-2 l: pzzl +4-13 h: trpbbrhnxnkbrkmgdk +4-5 v: fgxmv +5-11 d: dddgddxrdbmsddj +7-8 s: ssssssss +5-7 m: dfmksgsdmcbjrmk +4-7 s: tsqcssrzs +4-5 j: jjjjjjl +6-10 s: vkwshtpqjxslssxm +3-4 z: zzdfzz +1-5 m: fkhmw +6-11 f: twtfbvwbbsfff +2-9 f: fzwfjljxfxfkjfl +1-2 d: ssddd +5-9 k: kkzkscklbqtkkk +6-16 v: vjfbmnplzwtkxlvdqwn +5-8 g: ggnlkgdh +11-12 s: qbswtxnplqss +3-6 r: rrrrrr +10-11 w: wmhwswwwwfwww +3-9 c: tcncldghxp +3-8 q: wqtqgbpz +17-20 b: bbhblqlbggtsqcbcbbkt +7-15 f: fftffcxgfzttffmbrff +11-12 v: vvvlvrvvwvvqskvvxv +9-11 h: hdjcxnkhxhkqhh +5-12 l: llllqllllllnl +17-18 z: zbzzbzzzzzzzzzzptc +2-6 c: cgmrpjdhkcp +4-10 x: xxxjxtxvxxvx +11-15 s: sspsvsjsssskzbsss +2-4 z: rsfd +4-16 r: rrrrrrlkrrrrrrrrr +10-11 x: xxxxxxxxxpxxxxx +1-10 j: tjjsvjmxcb +4-5 t: tttbbtvttptttsthw +7-11 m: xmxzrnmksbm +2-6 t: vxdspsgtftlptvqft +6-10 k: kkkkmmdkkl +3-5 l: sssglkvfvdskkghdhkxs +4-6 m: mljkmwmnmm +4-7 l: lllllrh +5-11 x: bsmxjxxcmcxxx +1-2 t: tttt +9-11 p: xpppppppcppd +15-16 w: wxzxtwzjrmvkwzdwjt +13-15 l: pnhkxsqfrldsltltcf +4-10 v: vvvrvvvvvvv +6-11 m: qpbmsmbsxpmzg +1-7 m: tmmmlmcmmm +10-14 s: ssshsssscxssszs +1-7 q: tdqxmqkxgkt +2-4 m: bcmq +3-4 d: ddjd +13-17 r: rrrrrrrrvprrrrsrx +3-8 p: fjwbkcdt +1-6 k: gskwbl +7-8 z: wzgzhlzs +5-6 v: xvvvlmvvsvbsv +1-18 f: ffjcfbvrtftffxvfff +3-8 l: lbtjlllqc +4-7 v: vnvvdsvl +15-18 d: ddddpdddddddddcgdrdd +3-9 f: fffffffff +1-5 v: svvjvvlpvwmvvgc +13-14 z: zzzzzzzzzzzzmz +6-8 p: zcwptpgppfpppc +8-14 j: cjrzvhjjmdpzjjqs +16-19 s: sszsssssssssssssssss +7-9 r: rrrkrrrrrnrrmj +2-4 l: ldln +3-5 p: pppvprp +1-5 k: kkkkkk +1-4 g: ggxz +2-4 x: xwsgv +15-16 v: vvvvjvqvfsktgvlvvvv +17-19 x: xxxxxxxxxxxxxxxxcxx +1-8 m: mmmmmhmpmms +2-6 f: lffzdfsf +2-3 p: jphqlvzfmpnmt +2-11 g: ggrjthgdmggkgssq +5-6 r: rwgrrr +4-7 t: tttptmlthlfst +5-7 v: bhhdvhhv +8-11 n: nnnnnnnmnnnnn +7-20 r: rxrqlrwrnrsrrvbvtrrm +9-13 s: pfslddbsshsssrsrssls +3-10 q: vwbwhvdfqqvghjzf +9-14 b: bbbbbbbbbbbbbvb +2-3 f: pfff +3-9 r: trhrrrrrgrrn +7-11 z: zzzzzzzzzzzz +4-6 s: xwssttdqtc +7-9 t: ttzmqqdtqtt +6-19 g: gggggggggggggggggggg diff --git a/src/adventofcode2020/data/day_03/day03.txt b/src/adventofcode2020/data/day_03/day03.txt new file mode 100644 index 00000000..a3ac5068 --- /dev/null +++ b/src/adventofcode2020/data/day_03/day03.txt @@ -0,0 +1,323 @@ +.#......#..####.....#..#....... +#.#...#...#..#.#...#.#...##.##. +#.#....#..........#...##.....## +#.#.#.....##......#.#.......### +..#..###....#.#....#.#.#..#.... +.......#.#....##..##...#...#... +..#..#..#..###.......#.....#.#. +.#.......#...##...##.##......## +#.#.##..##.#..#....#..###..#.#. +#.....#.#.........#.....##.#.#. +..#.#....##..#...#...##........ +......#....#..##.#.#......###.. +.......#.......#......##...#... +.##.....#.......#...###.....##. +.#...#.##..##.#..##....#....... +..#......##...#..#...#.#.##.### +.##.##.....##....#..#......#.#. +.#.....#..###..#.##.#.....##.#. +......##..........#..........#. +.##....#.....#..##.#..#.#..###. +..##.......#....#...##...#..#.. +.##...#.....#.###.#.#..#...#.#. +.....##.#.##..##...#........... +..#..###.##.#.#.###...###..#.#. +.#........#..#.#........#.#...# +....##.......#....#.#.##.#..... +....##........######..###..#.#. +#.#.#............#.......#..#.. +...##...#.##.....#.#..#......#. +......#.##.#....##..#.#..###... +##.....#.#....#....#.##.#.###.. +#..#..#..##.#..##.##.##.#.##... +.###.####..#..#........#.....## +.......##..#.......#........... +.##...#............#.#.##...#.. +....##.....#...##..#..#.#..###. +...#.....#####.#..#...##....##. +#.....#.#.#....##.......##.#.#. +......#.#..#.##.#######......#. +#.##...##....#..###.#.......#.. +.....##...#....#...#....##.##.# +....###......#...###..#......## +..#...##..##.######..#.#......# +......##....#....##..#......##. +.#...#..##..#.###.#......#....# +##....##..#..####.#.....#...#.. +.#.......#...#.......##......#. +......#...#...#........#....... +.#........#.###...#..####.#..#. +##...#.#............#.....###.. +.....###.#.##...........###..#. +.#.#...#.....#.#.##..##...####. +..##.......#..#.##.#....#.....# +.#..#.#..####.....###.#.....#.. +..#..###.....####..#.##.#.#.##. +.###..#.....#......#...####.... +...#.#..#.#..#...#...#....##.## +..###....#.##.....#..........#. +###...#####......##............ +..###.....#........##.#...#..#. +..##.##.#.....##........##..#.# +##..#.#...#.#..#..###.#....#..# +....#..#.#.....#..#####...#.... +....#.........#......##.##..... +.#...####.##......##..##.#..#.# +...#...#.##..#...##..###...#... +###...#.....#.##.###.###..#.#.. +..#......#.###.....#..##.#...#. +#.....##.########...#####....#. +........##..#..##..##.#........ +....#.######....##..#..#.##..#. +#.......#..##..#..#.#.#..##.##. +...#.#..#..#.......#......###.# +.#.#..#.#..#.##.#.............# +#....#.##.#.#.....#..#.#..#.... +...###..#...#....#.........#.#. +.#..#.....##..#.#..#.#.......#. +..#...##...#......#......####.. +....#..#.......#.......#.#..#.. +#...#..#...........#.#..#.....# +#...#.#.......#...#....###....# +.#..#.#.##....#......#........# +..#...#..##..#..#..#..#...#.#.. +..#.#.........#....#....##..... +##.....##.#.#.#.........##..... +.##...#.##...........#...#...## +.##..##.#.#..........##..##.... +#....#....#.#...#.#..#....#.#.. +####....##.....#..##.###....... +#..#....#......##.#.#....#..... +.....#....#.###.##.........###. +#.......#.####..#..#..##....... +##.#.......#..##..#....#..#.#.. +..###...#.#...#.....##.##.####. +....#...#.#....#..#..#.....#.## +#.....##.#.#..#.##..#..##...... +................###..#....##... +..#.##.....#..........##.#...#. +..#.#..#.#....#.#.#..#..#..#.#. +#...#..##.#.#...#..#...#..#.... +#..#.#.........#..###........#. +.#...#.............#..###..#..# +#.........#.#..#...#.#.....#..# +....#..#..#.#.#...#...#.....##. +##...###.#.####..#......#...#.. +..#..##...#.#......#.#.......#. +#......###....##.#.##.......... +#####....###..#...............# +##.#...####....#....#...#....#. +.#.......#..#.....#...#.....### +...#..#.#.#....##......##...#.. +...#.....#...#.##.#..#.#....#.. +#...###....#...#.#....#........ +.#.......#........#...##.##.##. +.....#....#...##.....##...###.# +....#....#.#..#...##.##.##..... +.......#............#...#.#..#. +.#............#.....##.......#. +........#....#....##......##.## +.......##..#.#..#.##..###..##.# +#..##..##.........####.#.###... +#....#..#...##...#............. +#...#...###..........##..#..#.. +....#...#..#.....##...#........ +#.....#......#.#.....#...#..#.. +..#.....#.....#....#..#........ +..#..#.....#.#.........#..###.. +................###..#.#....#.. +#.....#.....#.#.#.#.#..#...#.#. +#....#....#.#..........#.#....# +....#..#......#..##.#...##..... +..#.#...#.####....#.#..#.#..#.. +.........##......#.....##...... +##.#.###.#.....#.....####.#..#. +.....#.....#..#....#..###.#.... +##..#.#...#.##....#....#....... +.....#......#.#...##..#.#...... +....##..#...#...##..##.#....#.# +............#..........##.#.... +##..#..#.##..##..#.#....#.#.#.. +.......#.#...#...#.#...#..#.... +#....#.#...#...#........#..#... +...........#.......#...##..###. +.#..##......#.##.........##..#. +...#...#...###.#.##....##.#..#. +#...#..#.#.#.....##..#.......#. +.##..#.###.##......#.#....#.#.# +..#....#.......#..#..#.#.#.##.. +#...#...###...###.........#.... +.#.#...#.....##.#.#..#....#.##. +.........#.#.##.....#.#.###.... +...#.#...#......#...####......# +...##..##....##......##...###.. +###...#..#.......##.....#....#. +...#..#..#..###...##.##..#..#.. +...#......#......##..#.#.##..#. +...#.........#....#.#....#.#... +##................#..#.#.....#. +....#.##...#..#.##...##.#.....# +......#..##.##..###.#..#.##.##. +.#.#...###.....###.....##...### +.##.....#.#.#..#..###..#..#..#. +#.......#..#..#....##.....#.... +...#.#.##..#..#......##.##...#. +....##.#......#...#..#..#...... +.####.#..#.....#..##.#...##..## +..#..#...#..........###..#....# +.#.#.##.##...#............#.... +........##..##......#.##..#.### +...#.#....###......##.......#.. +..##...#...#.#..#.....#.....#.. +##..#...###..#..#.#.#...#...#.. +.....#..#....##.....##.....###. +....##...###.#..#.#....##..#..# +#......#...#....#......#...##.. +....#.##...#.#......#.#.##...#. +.......#.....#...#####...#.#... +...#.....##.#............#..... +...#.#........#.#.#..#......... +....###......#.#.#..#.####.#..# +#.....#.#.#.....#.#.#.....#..#. +..##.##......#...#.#........... +###..###....#.#####......###... +..##..............##.#.#....#.# +#..#...#..........#..#.#.#..### +##.###............#....#.#...#. +#.#..#.#..##.#.#....#...#...... +#....#...#..##.....#..#.#..###. +..#.....#.#....#.#..#.##.#..##. +...##...#.#.##...#....###....#. +......###.####.......#..#.#.#.# +.#..............##........#.... +...##.##...##....#..#.......#.. +.....#.....#....###...#..#..#.# +.#.....#..#.....#......#.....## +#.#.##.#..#..#.....#.##..###... +..#......#...##.###..#.#...#..# +......#.....#...##......#...... +##.#........#..........#.....#. +#........##.#............##.... +...#......##...#.#.....##...... +...##.......#....#.#..#.#.###.. +..#....##..##.##.....###....#.. +..#...#.#...#.....#..........#. +......#...#...#.#.##.#...#.#.#. +.#...#......#.##........#...... +.##.##..#....#...#.#...##...... +#..#......#.#...........#....#. +....##.#....#...#..#....#.#..## +#....##.##....#.#..##.#........ +.##.##.#....##.....#..#....#..# +...#...#.....###.#.##.......... +....#...#....##.......###...... +#.........#......#.#.......#... +#..........#..##..#.#.......... +.....#.......#..##.##....##...# +........................#.#.... +#..#.........#.............#..# +#..#.....#.......#....#....#.#. +..##..##.......##....#...#..... +.##......#..##......#.###...... +...#.#........#.......##..###.. +..##...###.###......#...#....## +#...#...#.....###.#.#.#..#..... +#....#.........#..##...#...##.. +#..###..#.#.#.##.#..#.#....#.## +#...#.#.....#.###.#.......#.... +..##..#..#....#.#...........#.# +#.........#.#......#...##...... +.######......#..#....#.#.#....# +##..#.#..####.###.........#.... +###########.....##.##...#..#... +#...##.#.#....#.#....#......#.. +...#..##..#..##..#......#....#. +.#....#...#....#.#..##....##... +#..#.#............#....#.#...#. +...#...#..#.#.##......#..#.#... +#.#...##.....#..#.##......####. +.#.#..##..#.....#.#..#.##...... +#.#.##......##.....#..#.#..#... +#..##...#.##.#.......#.##...... +..#.......#.#.#...##..##...#... +.#...#..#..#.#.........#..##... +#..#.......#....#.#...#.###...# +.......#..#.......##.#.#...#.#. +.#.................###.#..###.. +..........#.#.....##..#####...# +#......#.#..##.#.#...#.##.#.... +#......#.#..##.##.#...#....#... +....#..#......#....#....####### +.#...#......#....###......#.### +#.#....#.#...#.###......#..#..# +.###......#.#...#.####.#..####. +######.#.....###.#...#.#.....#. +.#.###....#..#.#.....#.....#### +.......###.#.........#..#...... +#...#.....##.#......####....... +..#.#..##.#.#...#...#..##..##.. +.....#...##.....#...##......##. +##..#..#.##..#.#......#.....#.. +##.........#.#.##.#..#.#....#.# +.#........###...#.........#.... +...#..#.#..#....####........... +#.#....#..##..####.#...#.##.... +.#.....#.......#..........#..## +...#.......#...###..#.....#..## +.........#.###.#..##...#.##...# +.#..........##..####...#..#.#.# +.#...##...#............##...#.# +...#....#.#..........#.#..#.#.. +.#.#...##....##.#.#.#....#..... +....#..#.....#.#..#.#..#.##.### +.....#.#.....#..#......#.#.#... +.....#.#.#..###..#.#..###...#.. +#.......####...#.#..#......##.# +....#..#..###......###.##....#. +##.....#.....#.............#..# +#..#..#...##.....##..#..#.#.... +.....#.#.###...#............... +#.#.#.....#.#..#.#...#.......#. +..##.##............#....#..##.. +#....##...#.....#.###...#.#.... +#...##.#.........#...#....#.... +##.##.#...#.#...###..#....##..# +....#....##..#..#.......#...##. +.#...#...#..#.....#..###.#..#.# +....#..###......#....##....#... +#.#.....#....##.#..#.#...###... +.......#............#......#... +.##..#.###.#.............###... +..##...##.#.#.#.....#........## +....#.###....#..#..#...#...#..# +.....#...#...#..#....#.....##.. +###.#.#.....#......####.....#.. +#.#.###............#......#.... +..#.....#..#..#..#....#......#. +#...######...#....#.##...##.#.# +##.#.#.#..##......##.#..#.#...# +............#.#..#.##....#..... +......#............#.#...#..#.# +.#..##...##..#.#.#..###.....##. +#.###.#...........#...#....#... +....##.....#...##...#...###.#.# +.####.#.#.....#.#..#.#.##...... +.#...##......###...#..##..#.#.. +.#......#...#....##.....##..#.. +..........##.....###.##.#...#.# +.#........##.#..............#.. +#...###..#...#.....#....#.....# +...#......#..#...#...#..###.#.. +.#...##..#........#.......#.#.. +.#.#.##.........##.##......#..# +#...#.#.#...#.....#.#...#.#..#. +#.#..#...#...#...##..........#. +.#...........#....#..#.#..#.#.. +#.......#......#..#...#........ +.....#..#...##..###..##........ +......#...#.....#..#.#.#....##. +....##..##..##....###.##....... +.#........##.#.#...#..#........ +.....##...##...#......#..#...#. +..#.....#....###.#..##....#..#. +......#..#...####.#.....##.#### diff --git a/src/adventofcode2020/data/day_04/day04.txt b/src/adventofcode2020/data/day_04/day04.txt new file mode 100644 index 00000000..36096909 --- /dev/null +++ b/src/adventofcode2020/data/day_04/day04.txt @@ -0,0 +1,1102 @@ +hcl:5d90f0 cid:270 ecl:#66dc9c hgt:62cm byr:1945 pid:63201172 eyr:2026 + +ecl:amb byr:1943 iyr:2014 eyr:2028 +pid:333051831 + +byr:1971 +eyr:2021 iyr:2015 pid:158388040 hcl:#18171d ecl:brn hgt:179cm + +byr:1936 +pid:707057570 iyr:2014 ecl:amb cid:299 eyr:2030 +hcl:#c0946f hgt:186cm + +hgt:163cm iyr:2013 ecl:gry hcl:#86e981 byr:1939 +eyr:2020 pid:241741372 cid:203 + +ecl:brn hcl:#341e13 +pid:686617364 byr:1929 eyr:2029 hgt:160cm cid:280 iyr:2020 + +byr:2002 hcl:#623a2f +pid:253005469 iyr:2011 ecl:hzl hgt:184cm eyr:2027 + +ecl:#bb984b eyr:2040 +hgt:188in +iyr:2005 hcl:c5be8e pid:174cm cid:161 byr:2004 + +ecl:oth iyr:2010 cid:128 hgt:153cm byr:1991 +pid:24061445 eyr:2025 hcl:#54d43e + +hcl:z +iyr:2023 pid:981178503 ecl:gmt eyr:2038 byr:2004 + +ecl:gry eyr:2022 iyr:1981 pid:566993828 +byr:1941 hcl:#341e13 hgt:176cm + +eyr:2027 byr:1976 +pid:350079989 ecl:blu iyr:2013 hgt:180cm hcl:#866857 + +eyr:2029 hcl:#ceb3a1 +ecl:lzr +iyr:2011 hgt:152cm byr:1986 pid:162999623 +cid:240 + +ecl:gry iyr:2017 hcl:#18171d byr:1926 +eyr:2027 hgt:68in +cid:310 pid:560836007 + +ecl:grn +cid:307 +pid:#cdc803 +byr:1975 eyr:2039 hgt:75cm +hcl:318b11 iyr:2022 + +ecl:brn hgt:179cm eyr:2020 iyr:2016 +pid:322103252 byr:1940 hcl:#b6652a + +hcl:#733820 hgt:188cm cid:70 eyr:2021 ecl:amb +byr:1996 +iyr:2013 pid:412419084 + +hgt:164cm iyr:2011 byr:1928 eyr:2020 hcl:#733820 pid:704914380 ecl:blu + +ecl:brn cid:267 eyr:2029 byr:2011 +hcl:z pid:467662306 iyr:2026 hgt:104 + +pid:224593036 eyr:2027 +ecl:brn hcl:#341e13 iyr:2014 +byr:1997 +hgt:181cm + +eyr:2005 pid:9756449964 +hcl:#fffffd byr:1999 ecl:dne hgt:152in iyr:2027 + +byr:1998 +iyr:2017 pid:618350852 hgt:156cm cid:193 ecl:amb +hcl:#602927 eyr:2029 + +byr:2021 pid:3395281192 +hcl:z hgt:167in ecl:grt eyr:2008 iyr:2025 + +cid:206 pid:735212085 eyr:2020 byr:1950 hgt:153cm +ecl:blu iyr:2019 +hcl:#733820 + +eyr:2021 pid:551149968 iyr:2020 hcl:#6b5442 +byr:1948 +ecl:grn +hgt:152cm + +hgt:76in cid:113 iyr:2019 eyr:2023 hcl:#888785 pid:131239468 ecl:grn +byr:1994 + +ecl:oth cid:240 hcl:#bed757 byr:2027 eyr:2021 pid:#ffa971 iyr:2022 + +cid:204 iyr:2011 +ecl:blu hgt:169cm byr:1985 eyr:2020 hcl:#18171d + +ecl:hzl iyr:2012 cid:344 hcl:#7d3b0c +hgt:190cm pid:599490023 byr:1954 eyr:2023 + +cid:333 +eyr:1971 hgt:193cm +ecl:#12421d hcl:#7d3b0c iyr:1991 pid:#7149ad byr:2008 + +iyr:2014 +hgt:151cm pid:190259199 eyr:2021 ecl:blu +byr:1975 hcl:#ceb3a1 + +hgt:164cm ecl:oth hcl:#c0946f pid:427760590 eyr:2023 iyr:2012 +byr:1979 + +hgt:193cm iyr:2023 ecl:#213711 hcl:z +pid:23861701 +byr:2020 +eyr:1924 + +pid:450691994 cid:191 +eyr:2028 +byr:1972 ecl:oth hgt:168cm hcl:#888785 + +iyr:2013 hcl:#18171d hgt:170cm ecl:blu +pid:040253250 eyr:2024 +byr:1954 cid:340 + +cid:185 byr:1956 eyr:2029 pid:454637740 ecl:hzl hcl:#efcc98 iyr:2019 hgt:73in + +hcl:#efcc98 +hgt:176cm +ecl:hzl cid:113 pid:747653564 iyr:2016 +eyr:2020 byr:1945 + +hgt:69in cid:264 byr:1971 hcl:#733820 ecl:amb pid:086130104 +iyr:2011 +eyr:2022 + +iyr:2010 +eyr:2034 +pid:501068596 +hgt:109 hcl:z byr:2018 cid:326 ecl:lzr + +pid:955229652 +eyr:2027 cid:175 +byr:1950 iyr:2010 ecl:gry hcl:#866857 hgt:177cm + +ecl:amb hcl:#888785 eyr:2020 +hgt:172cm byr:1991 +pid:556956304 + +byr:1930 +eyr:2011 +pid:734176827 +ecl:brn hgt:182cm +hcl:z + +hcl:#a97842 +pid:040278061 ecl:brn hgt:168cm cid:194 +byr:1973 +iyr:2016 eyr:2027 + +hcl:#623a2f +eyr:2023 +ecl:blu iyr:2016 pid:844348663 byr:1997 hgt:179cm + +hgt:188cm hcl:#a97842 byr:1972 +ecl:hzl pid:912948357 eyr:2026 iyr:2025 + +iyr:2011 eyr:2025 +cid:286 +pid:084736292 +byr:1936 +ecl:oth hcl:#a97842 hgt:166cm + +iyr:2012 ecl:blu hgt:159cm byr:1980 eyr:2024 pid:811644928 cid:105 hcl:#7d3b0c + +pid:530452683 hcl:#341e13 +iyr:2011 +hgt:163cm ecl:oth +cid:309 byr:1940 + +ecl:hzl +pid:144377866 +hcl:#18171d hgt:193cm +iyr:2013 eyr:2028 + +pid:868386570 +ecl:brn +hgt:161cm hcl:#18171d +byr:1956 +iyr:2017 +cid:307 + +iyr:2019 eyr:2026 ecl:brn +hcl:#866857 byr:1993 cid:299 +pid:603503348 hgt:186cm + +iyr:2014 +pid:852954158 hgt:73in byr:2021 +eyr:2020 hcl:#a97842 cid:260 ecl:oth + +hgt:164cm eyr:2025 pid:113005290 byr:1955 ecl:blu iyr:2017 hcl:#b6652a + +cid:179 iyr:2015 +pid:317467924 eyr:2025 ecl:gry byr:1996 hgt:180cm hcl:#a55f97 + +hgt:172cm hcl:#efcc98 cid:53 ecl:grn iyr:2016 +byr:1991 pid:337133478 +eyr:2025 + +hgt:150 iyr:2008 +pid:#3e66a7 ecl:#8b3133 eyr:2040 byr:2012 hcl:802d16 + +pid:577607614 byr:1924 hgt:173cm hcl:#341e13 eyr:2026 ecl:amb +iyr:2013 + +eyr:2020 iyr:2011 hgt:175cm hcl:316607 pid:738554684 +byr:2029 ecl:dne + +hgt:179cm iyr:2016 +pid:178cm byr:2015 +ecl:gry +hcl:#341e13 +eyr:1986 + +byr:2005 iyr:2028 ecl:#7be9b8 eyr:1941 pid:#e7e9cb hgt:177in cid:67 hcl:#602927 + +ecl:#0d50e6 +pid:192cm iyr:2014 eyr:2027 hgt:73cm cid:162 hcl:93ea2f +byr:1958 + +hcl:z +cid:292 hgt:184in eyr:2001 pid:7218132701 byr:2020 +ecl:grt iyr:2014 + +ecl:gry +hcl:#fffffd +eyr:2026 iyr:2013 +pid:117261833 + +pid:780384540 ecl:gry cid:52 eyr:2020 hgt:193cm hcl:#4ae223 iyr:2017 +byr:1984 + +ecl:hzl +pid:218314886 eyr:2030 byr:1948 hcl:#c0946f hgt:185cm iyr:2013 + +pid:175cm cid:340 ecl:blu hcl:#cfa07d eyr:2036 iyr:2018 byr:2018 hgt:70cm + +byr:1953 hgt:164cm ecl:hzl +pid:488831953 iyr:2010 +hcl:#fffffd + +byr:1961 hgt:165cm pid:506597451 +cid:122 eyr:2020 hcl:#cfa07d ecl:gry +iyr:2016 + +iyr:1970 +eyr:2040 +byr:2008 +hgt:188 +ecl:#b00a46 hcl:#fffffd + +hgt:179cm +byr:1972 eyr:2026 +cid:62 ecl:oth +pid:996355557 iyr:2013 hcl:#a97842 + +ecl:amb eyr:2026 byr:1936 pid:812982189 hgt:158cm hcl:#888785 iyr:2010 + +iyr:2020 +hcl:#7d3b0c hgt:160cm +pid:336806720 +eyr:2024 ecl:#7e0ae0 byr:1992 + +eyr:2036 pid:178cm hcl:z +hgt:133 byr:2009 ecl:dne cid:127 + +byr:1938 hcl:#fd309a +cid:104 iyr:2015 eyr:2022 pid:201047563 +hgt:160cm ecl:hzl + +byr:2023 pid:25086180 hgt:160cm cid:180 hcl:z ecl:grt eyr:2038 iyr:2022 + +ecl:grn hgt:167cm +byr:2023 iyr:2026 eyr:1928 hcl:z + +hcl:#efcc98 hgt:187cm byr:1925 +ecl:grn +pid:753746076 iyr:2017 +eyr:2021 + +iyr:2017 +byr:1934 ecl:grn eyr:2021 hgt:163cm +pid:688172460 hcl:#b6652a + +hcl:#c0946f iyr:2018 ecl:blu pid:676564085 +hgt:184cm cid:152 byr:1980 eyr:2023 + +ecl:grt hgt:70cm iyr:2022 hcl:58716b byr:2010 +pid:60834390 eyr:2037 + +iyr:2028 pid:270499403 +ecl:xry eyr:1947 hgt:152cm byr:2025 + +pid:091281559 hcl:#733820 +hgt:166cm +eyr:2021 ecl:grn cid:327 byr:1928 +iyr:2014 + +eyr:2025 ecl:grn byr:1938 hcl:#ceb3a1 +cid:234 +pid:549433891 +hgt:172cm iyr:2016 + +hcl:#c0946f hgt:173cm iyr:2014 eyr:2030 ecl:blu byr:1965 +pid:696577272 + +hgt:154cm eyr:2030 +pid:475642195 byr:1920 iyr:2013 hcl:#866857 ecl:blu + +pid:518398763 iyr:2010 +eyr:2020 +hgt:183cm +ecl:brn byr:1921 hcl:#18171d + +eyr:2023 pid:614116723 hcl:#7d3b0c ecl:hzl +iyr:2016 hgt:189cm byr:2000 + +ecl:oth hgt:178cm hcl:#733820 byr:2001 pid:862420089 eyr:2023 + +pid:851985534 eyr:2028 hcl:#18171d ecl:oth cid:238 byr:2001 +iyr:2019 hgt:166cm + +byr:1927 +hgt:170cm +pid:246933107 +ecl:amb iyr:2015 +cid:166 eyr:2027 hcl:#b6652a + +byr:1929 +hcl:#7d3b0c +cid:263 pid:317156081 hgt:165cm eyr:2031 iyr:1980 + +hcl:#866857 eyr:2021 hgt:179cm pid:206504353 cid:84 ecl:gry iyr:2012 byr:1952 + +byr:1986 ecl:hzl +hcl:#a97842 +iyr:2015 hgt:152cm pid:722601936 eyr:2025 + +byr:1921 +pid:563550743 iyr:2015 ecl:hzl +eyr:2026 hcl:#fffd7b + +ecl:hzl +hcl:#888785 cid:268 byr:1926 hgt:176cm pid:321394231 eyr:2021 iyr:2014 + +eyr:2021 cid:225 +pid:770796086 +ecl:gry byr:1961 +hgt:154cm +hcl:#6b5442 +iyr:2011 + +eyr:2028 iyr:1961 byr:2016 +cid:98 pid:587360691 hgt:70cm ecl:#ceaf1f +hcl:#c0b6db + +byr:1978 +eyr:2022 hgt:184cm hcl:#7d3b0c +cid:271 +ecl:amb pid:235352975 +iyr:2010 + +eyr:2026 pid:2844744 +iyr:1958 byr:2017 hcl:z +hgt:192in +ecl:#971530 + +iyr:2020 +byr:1960 eyr:2028 cid:162 pid:491912610 hcl:#fffffd hgt:59in + +iyr:2012 pid:365229485 ecl:amb byr:1933 hcl:#18171d eyr:2024 + +hgt:193cm pid:473100400 +hcl:#efcc98 +cid:201 eyr:2020 byr:1969 ecl:gry iyr:2016 + +eyr:2025 pid:137807160 iyr:2014 +ecl:grn byr:1944 hgt:168cm hcl:#ceb3a1 + +byr:2008 ecl:xry +iyr:2012 hcl:#efcc98 eyr:2028 pid:272344138 + +eyr:2024 pid:959415175 cid:148 hcl:#efcc98 +byr:1977 hgt:179cm ecl:amb + +pid:253742161 ecl:hzl hcl:#602927 +eyr:2021 hgt:191cm byr:1925 iyr:2010 + +ecl:amb hcl:#341e13 +eyr:2024 iyr:2017 +byr:1975 +pid:838040028 hgt:172cm + +hgt:172in +pid:311113967 iyr:2015 cid:111 eyr:2023 ecl:oth byr:2003 hcl:#866857 + +hcl:#888785 byr:1978 hgt:64in pid:442064310 eyr:2021 +iyr:2011 ecl:hzl + +eyr:2021 byr:1988 hcl:#a97842 +pid:290578586 ecl:hzl hgt:174cm iyr:2020 + +byr:1998 iyr:2020 hgt:163cm ecl:oth eyr:2025 +hcl:#6b5442 pid:913461954 + +hgt:173cm hcl:#18171d +eyr:2029 ecl:brn cid:313 byr:1980 +iyr:2011 pid:810497375 + +byr:1975 hgt:153cm eyr:2027 hcl:#fffffd pid:857730031 +ecl:gry iyr:2020 + +hcl:#18171d ecl:hzl +pid:185778821 hgt:178 iyr:2014 eyr:2028 byr:1974 + +iyr:2015 hgt:163in hcl:#c0946f ecl:#4844a6 byr:1979 pid:124626004 + +eyr:2024 +pid:737015681 byr:1952 +ecl:hzl iyr:2019 +hgt:192cm hcl:#cfa07d + +pid:2986469633 byr:2025 hgt:66cm hcl:z eyr:2011 iyr:2027 cid:311 + +byr:1962 +eyr:2032 +ecl:lzr iyr:2014 +hgt:70cm pid:94309916 +hcl:#fffffd + +cid:350 hcl:#602927 iyr:2019 hgt:178cm +pid:172238204 byr:1949 ecl:hzl +eyr:2028 + +hgt:153cm +hcl:#ceb3a1 +ecl:grn +byr:1997 +pid:266747822 +iyr:2011 eyr:2022 + +pid:839681159 hgt:150cm eyr:2024 hcl:4d6414 +ecl:blu +iyr:2018 byr:1988 + +byr:1930 iyr:2011 pid:352711700 hgt:174cm cid:67 eyr:2020 ecl:hzl hcl:#6b5442 + +byr:1949 iyr:2013 hcl:#623a2f eyr:2030 +hgt:176cm + +hgt:164cm eyr:2026 hcl:#866857 +iyr:2018 pid:922679610 byr:1974 +ecl:brn +cid:114 + +eyr:2038 cid:317 +hgt:166in pid:0384056779 byr:2013 iyr:2021 +ecl:xry + +cid:83 hgt:166cm eyr:2026 iyr:2018 byr:1994 ecl:brn pid:858360477 hcl:#ceb3a1 + +hgt:169cm eyr:2020 +pid:110129489 byr:1958 +ecl:oth hcl:#7d3b0c +iyr:2011 + +cid:279 +iyr:2019 byr:1995 eyr:2026 ecl:hzl +hcl:#7d3b0c hgt:185cm pid:085427066 + +hcl:#c0946f +iyr:2011 eyr:2027 +ecl:amb +byr:1943 pid:060674566 hgt:183in + +hgt:156cm hcl:#c0946f pid:242827141 +cid:152 +iyr:2018 +eyr:2025 byr:1963 + +byr:1925 cid:168 eyr:2020 hcl:#cfa07d iyr:2011 ecl:brn hgt:150cm pid:740118192 + +ecl:oth byr:1951 eyr:2025 cid:213 +iyr:2020 +hgt:154cm + +eyr:2025 iyr:2018 ecl:grn cid:91 byr:1925 +hgt:164cm hcl:#18171d + +byr:1997 +iyr:2018 eyr:2023 hcl:#602927 pid:251296833 ecl:blu +hgt:185cm + +hgt:168cm pid:556895048 +hcl:#341e13 ecl:oth eyr:2020 cid:64 byr:1940 + +byr:1996 pid:821204904 cid:250 ecl:amb eyr:2026 hgt:185cm iyr:2019 + +ecl:grn hcl:#b6652a iyr:2013 +eyr:2028 hgt:157cm +byr:1925 pid:158cm + +hgt:190cm iyr:2019 ecl:oth eyr:2028 hcl:#341e13 cid:334 pid:258135663 byr:1972 + +byr:1936 hgt:76in pid:748344702 cid:335 +eyr:2027 hcl:#a97842 ecl:amb iyr:2015 + +hcl:z hgt:66cm eyr:2029 +pid:#1589e0 iyr:2019 ecl:hzl + +hcl:#733820 ecl:amb +iyr:2013 +hgt:188cm byr:1955 pid:125663066 eyr:2020 cid:179 + +iyr:2017 +hgt:185cm ecl:grn +cid:298 eyr:2030 hcl:#5b1c03 +byr:1992 pid:092887457 + +eyr:2032 ecl:grn hgt:82 iyr:2022 +pid:180cm byr:2003 +cid:55 hcl:z + +pid:257666411 eyr:2023 byr:1982 hgt:179cm hcl:#18171d ecl:brn iyr:2010 + +iyr:2020 +ecl:amb hcl:#18171d +pid:971402454 eyr:2028 + +hcl:#efcc98 byr:1964 pid:577424639 eyr:2030 iyr:2010 ecl:brn hgt:169cm +cid:285 + +ecl:amb byr:1958 hgt:159cm hcl:#efcc98 eyr:2024 iyr:2016 +pid:029502840 + +hcl:ac11eb +byr:2007 pid:0489471320 hgt:69cm iyr:2030 ecl:blu eyr:2033 + +pid:3785138563 eyr:2020 iyr:2020 +hcl:#966583 byr:2008 hgt:186cm ecl:gry + +iyr:2014 pid:868785127 eyr:2029 +cid:220 hcl:#18171d ecl:blu byr:1948 hgt:171cm + +byr:1936 +pid:433437105 +hcl:#c0946f eyr:2020 iyr:2019 hgt:160cm ecl:brn + +iyr:2015 eyr:2024 hgt:176cm ecl:hzl +byr:1995 pid:101835436 hcl:#ceb3a1 + +eyr:1959 +hcl:#cfa07d iyr:2010 pid:9214728 +ecl:#42fda0 hgt:71 byr:2022 + +byr:1998 iyr:2011 cid:275 ecl:oth +pid:924517068 eyr:2024 hgt:191cm +hcl:#623a2f + +hgt:157 hcl:z +byr:1923 pid:#f6ce52 iyr:1975 ecl:lzr cid:100 + +pid:565022102 +eyr:2021 hcl:#efcc98 +byr:1988 ecl:gry iyr:2012 + +hgt:156cm +hcl:#b6652a eyr:2021 pid:969724332 +cid:126 iyr:2016 +ecl:hzl byr:1988 + +ecl:blu hcl:#866857 hgt:153cm +pid:798083560 +iyr:2015 +byr:1981 eyr:2030 + +iyr:2013 cid:103 hcl:#efcc98 eyr:2022 byr:1964 ecl:gry +hgt:161cm pid:950689613 + +pid:4316019547 +ecl:gmt +eyr:2029 byr:2011 iyr:2005 hgt:170cm cid:135 +hcl:567fd8 + +hcl:#6b5442 pid:843348901 byr:1960 +hgt:156cm +eyr:2028 ecl:amb + +eyr:2027 +pid:286247733 byr:2000 hgt:191cm +iyr:2014 +hcl:#341e13 ecl:amb + +ecl:gmt byr:2005 hgt:182cm pid:376332625 hcl:z iyr:2021 +eyr:1949 + +hgt:184cm +byr:1940 +cid:260 eyr:2030 ecl:brn +iyr:2011 pid:792881807 + +iyr:1936 eyr:2021 cid:133 hcl:#623a2f byr:2003 pid:197167496 +ecl:#8896de + +hgt:67in cid:110 +byr:1951 +pid:389358116 eyr:2028 iyr:2017 +ecl:grn + +hgt:161cm +cid:215 +pid:116325531 iyr:2019 +eyr:2025 hcl:#18171d ecl:blu +byr:1951 + +pid:787859682 hcl:#a97842 eyr:2020 byr:1948 hgt:190cm ecl:brn iyr:2020 + +pid:034440951 hgt:73cm hcl:803e55 +cid:350 byr:1985 +ecl:#a18487 eyr:2031 +iyr:1973 + +hcl:#40ee86 ecl:brn +iyr:2016 byr:1922 hgt:150cm pid:449374426 + +eyr:2040 hcl:260be4 pid:208681353 byr:2029 ecl:gry +hgt:178cm + +hcl:#18171d hgt:162cm byr:1983 eyr:2020 pid:328556776 iyr:2017 ecl:grn + +eyr:2029 +hcl:#a97842 +pid:#7bd019 iyr:2015 +hgt:168cm byr:1926 +ecl:grn + +ecl:grt eyr:2034 pid:640680934 hgt:189in cid:276 byr:1969 hcl:511eed iyr:2023 + +eyr:2039 hgt:182in cid:145 +hcl:4a259b iyr:2026 +byr:2004 +ecl:xry pid:#a3c9ea + +hcl:#866857 +pid:615665716 ecl:blu hgt:164cm iyr:2020 +byr:1948 eyr:2024 cid:286 + +hcl:#b6652a hgt:59in eyr:2027 +pid:752461325 ecl:oth +byr:1932 iyr:2019 + +eyr:2030 byr:1936 ecl:hzl +iyr:2010 cid:263 pid:186570962 hcl:#888785 +hgt:163cm + +byr:1949 ecl:blu +pid:407719342 +eyr:2030 +hcl:#b6652a iyr:2012 +hgt:186cm + +pid:154cm ecl:amb byr:1944 +eyr:2022 +hcl:z iyr:2017 + +byr:1980 hcl:#d2c954 iyr:2013 ecl:brn hgt:72in +eyr:2030 +pid:017095362 + +hgt:179cm +hcl:#ceb3a1 cid:61 eyr:2026 +iyr:2011 +pid:897403026 byr:1984 +ecl:amb + +cid:150 hgt:181cm +eyr:2028 pid:894689339 +hcl:#602927 byr:1933 ecl:grn iyr:2018 + +pid:125553946 byr:1942 eyr:2026 hgt:193cm +iyr:2010 ecl:gry +hcl:z + +eyr:2013 pid:1213613355 +ecl:#b08dca hgt:190in +hcl:06adb3 cid:303 iyr:2010 + +iyr:2019 pid:255938897 +eyr:2022 hgt:152cm +byr:1956 ecl:grn hcl:#ceb3a1 + +eyr:2029 +pid:670713784 +iyr:2020 ecl:grn +hgt:155cm hcl:#6b5442 byr:2002 + +byr:1925 hcl:#866857 pid:323449427 ecl:oth +eyr:2023 hgt:163cm iyr:2014 + +pid:841608722 byr:1955 hgt:150cm ecl:blu eyr:2029 +hcl:#6b5442 + +eyr:2023 hcl:#efcc98 +hgt:164cm ecl:gry +iyr:2018 +byr:1993 pid:501920795 + +eyr:2030 +iyr:2019 hgt:73in hcl:#bf908a +byr:1961 ecl:blu cid:86 pid:436811356 + +pid:#02516a hgt:131 iyr:1969 ecl:grt byr:2015 +eyr:2010 hcl:z + +ecl:#25fb6c cid:239 pid:167cm iyr:2021 +byr:2023 hgt:75cm +hcl:z eyr:1931 + +pid:279251948 +ecl:oth hcl:#6b5442 +byr:1943 iyr:2015 hgt:173cm eyr:2039 + +byr:1935 +iyr:2013 hgt:151cm hcl:#b6652a +ecl:grn +eyr:2023 pid:741958450 + +hcl:6beab7 byr:1986 +hgt:85 +iyr:2012 pid:#d98df3 eyr:2035 +ecl:dne + +byr:1929 +pid:764478810 ecl:grn +hcl:#866857 iyr:2019 hgt:155cm eyr:2022 cid:277 + +hgt:155cm pid:450816410 eyr:2030 cid:165 byr:1969 ecl:blu hcl:#866857 iyr:2019 + +cid:330 pid:168777528 eyr:2024 ecl:blu hcl:#341e13 +hgt:178cm iyr:2013 +byr:1921 + +eyr:2037 iyr:1973 hcl:a4ebf3 +pid:161cm +ecl:oth hgt:64cm cid:62 + +cid:235 +hcl:538f8a hgt:70cm +iyr:1970 pid:177837127 +ecl:#95700d byr:2003 + +ecl:hzl pid:375018246 hgt:161cm +iyr:2011 eyr:2029 hcl:#c0946f +byr:1956 + +hcl:#888785 +iyr:2016 +pid:161cm byr:1977 ecl:#0188d8 eyr:2029 +cid:104 hgt:63in + +byr:1979 eyr:2020 hcl:#ceb3a1 ecl:amb pid:752141341 hgt:150cm iyr:2010 + +cid:274 byr:1928 iyr:2018 eyr:2023 hcl:#a97842 hgt:173cm pid:186060112 ecl:gry + +hcl:#341e13 +ecl:blu iyr:2011 +hgt:190cm cid:292 pid:974271891 eyr:2020 byr:1927 + +hcl:#fffffd eyr:2025 +ecl:brn byr:1923 iyr:2011 +pid:037981552 + +ecl:blu pid:412817852 hgt:150cm iyr:2026 +byr:2026 +eyr:2020 + +ecl:brn byr:1988 eyr:2026 +hgt:178cm pid:008152501 +hcl:#602927 +iyr:2020 + +ecl:brn pid:877401308 byr:1923 cid:154 +hgt:170cm +hcl:#fffffd +iyr:2014 +eyr:2022 + +cid:56 hcl:ee020e pid:590581021 iyr:2018 hgt:72cm byr:2007 +eyr:1964 ecl:oth + +eyr:2029 +iyr:2012 ecl:oth +hgt:185cm cid:235 +byr:2002 +pid:064901580 + +byr:1956 hcl:#6c1a8c pid:497814257 +eyr:1964 hgt:155cm ecl:gmt iyr:2030 + +byr:1935 hgt:171cm cid:253 pid:033393224 hcl:#c0946f iyr:2012 +ecl:blu eyr:2025 + +byr:1977 hcl:#602927 cid:175 iyr:2010 +pid:9391986394 hgt:65in eyr:2026 +ecl:amb + +iyr:2011 hgt:158cm ecl:#31cae1 byr:1958 hcl:b94ad1 +eyr:2023 pid:#400a21 + +hcl:e205b0 pid:84195182 byr:2012 eyr:2037 ecl:zzz hgt:75cm iyr:2030 + +pid:102379515 +byr:1971 +hgt:169cm +ecl:amb +eyr:2020 hcl:#cfa07d iyr:2017 + +pid:236611157 +eyr:2020 hcl:#b6652a +iyr:2017 cid:194 byr:2001 hgt:169cm ecl:gry + +iyr:2012 hcl:a256b5 eyr:2040 cid:62 hgt:177in byr:2010 + +eyr:2028 byr:2009 iyr:2020 ecl:brn +pid:12371575 hcl:#866857 hgt:190cm + +byr:1965 eyr:2028 +pid:402013776 hcl:#bc4e9e cid:183 hgt:150cm iyr:2015 + +pid:0269051559 +byr:1936 hcl:z ecl:#ff0ab9 +iyr:2014 eyr:2031 +cid:346 hgt:153in + +hcl:#18171d iyr:1929 hgt:157cm +eyr:2036 byr:1970 +ecl:amb + +hcl:#733820 +eyr:2022 +pid:096076686 +iyr:2010 +hgt:192cm +byr:1957 + +hcl:#ceb3a1 ecl:brn iyr:2013 +eyr:2025 +byr:1953 pid:751516675 +hgt:175cm + +byr:1928 +eyr:2027 +cid:85 +hgt:179cm ecl:oth +pid:169307999 hcl:#3e07af iyr:2010 + +hgt:60cm byr:2008 hcl:z +eyr:1965 pid:167cm +cid:106 +iyr:1930 + +hcl:#1099d9 ecl:amb pid:638820661 iyr:2014 +byr:1998 eyr:2025 +hgt:162cm + +ecl:amb +eyr:2022 hcl:#623a2f byr:1956 +hgt:154cm +iyr:2010 pid:717452826 + +hcl:fc9ba5 +iyr:1928 +eyr:2029 pid:54503219 +byr:2020 +ecl:#d2155a hgt:124 + +eyr:2027 +hcl:#7d3b0c hgt:178 ecl:#63b8e6 iyr:2015 byr:1954 + +ecl:oth byr:1970 +pid:833178609 hcl:#c0946f iyr:2016 cid:81 eyr:1976 +hgt:69in + +hcl:#0cf4b8 pid:499271062 hgt:62in ecl:hzl iyr:2016 byr:1922 +eyr:2022 + +byr:1994 +eyr:2029 hgt:174cm hcl:#efcc98 +ecl:amb +iyr:2019 pid:297210449 + +ecl:hzl +eyr:2026 iyr:2017 hcl:#a97842 hgt:162cm +byr:1950 + +pid:091886000 hgt:179cm byr:1975 eyr:2020 cid:326 +ecl:oth +iyr:2015 hcl:#a97842 + +hcl:#efcc98 hgt:176cm byr:1940 iyr:2016 ecl:brn pid:514758507 eyr:2024 cid:313 + +eyr:2026 byr:1980 +hgt:155cm +iyr:2013 pid:367909831 ecl:oth + +byr:1965 +eyr:2021 iyr:2017 +hgt:185cm +hcl:#a97842 ecl:hzl pid:238901177 + +hgt:156cm pid:916654189 +byr:1943 eyr:2022 ecl:amb hcl:#341e13 iyr:2016 + +cid:305 iyr:2013 +eyr:2029 hgt:163cm ecl:blu +hcl:#fffffd pid:944033881 +byr:1952 + +pid:638190538 +hcl:#866857 ecl:brn +eyr:2030 iyr:2016 cid:78 byr:1943 hgt:186cm + +eyr:2024 iyr:2015 +pid:231006970 +cid:312 byr:2000 hcl:#623a2f hgt:190cm ecl:brn + +ecl:#f89e87 +hcl:#fffffd hgt:166 cid:215 +iyr:1961 +eyr:2027 pid:314310197 byr:1977 + +hcl:z eyr:1995 pid:951911095 hgt:154cm +ecl:xry +cid:154 byr:2023 + +hgt:66in hcl:#866857 +ecl:brn +pid:328148585 byr:1984 eyr:2024 + +pid:456453839 +eyr:2024 hcl:#fffffd byr:1990 ecl:amb + +eyr:2030 cid:149 pid:983735096 hgt:179cm iyr:2014 byr:1957 ecl:gry hcl:#341e13 + +byr:2001 hgt:157cm +ecl:hzl eyr:2021 +hcl:#ceb3a1 +pid:558527031 iyr:2018 + +hgt:122 ecl:oth hcl:z +pid:384664729 +iyr:2012 cid:298 eyr:2023 + +ecl:utc eyr:2024 +hgt:162in iyr:2018 pid:1722490341 byr:2027 +hcl:#18171d + +ecl:gry iyr:2017 hcl:#602927 cid:303 byr:1950 +pid:509264482 eyr:2030 +hgt:164cm + +hgt:192cm pid:967128169 iyr:2019 ecl:blu eyr:2024 hcl:#fffffd byr:1949 cid:301 + +ecl:blu +cid:71 hgt:164cm eyr:2022 hcl:#cfa07d pid:750303088 +byr:1949 iyr:2014 + +iyr:2014 +pid:401425898 byr:1981 +hcl:#7d3b0c hgt:167cm eyr:2028 + +hcl:#602927 hgt:160cm iyr:2014 +eyr:2023 byr:1940 pid:748539736 ecl:amb + +eyr:2025 +hcl:#c0946f pid:325296854 iyr:2020 +hgt:76cm ecl:amb byr:1921 + +hgt:190cm +iyr:2011 pid:082777116 +byr:1979 cid:73 ecl:oth hcl:#6b5442 eyr:2021 + +eyr:2029 ecl:amb hgt:151cm pid:144881592 byr:1964 hcl:#efcc98 iyr:2012 + +hcl:#efcc98 +iyr:2019 +eyr:2023 byr:1999 pid:645291123 +ecl:brn + +eyr:2029 pid:922956941 hcl:#623a2f byr:1934 +ecl:grn hgt:151cm +iyr:2019 + +byr:1992 ecl:brn +hcl:#a97842 +pid:269079906 hgt:187cm +iyr:2016 cid:218 + +byr:1951 ecl:oth eyr:2026 hgt:185cm +cid:82 hcl:#7d3b0c +iyr:2020 pid:052476816 + +eyr:2026 +cid:319 iyr:2020 +ecl:brn hcl:#888785 +hgt:172cm pid:327064207 byr:1956 + +hgt:178cm +pid:638854420 byr:1995 eyr:2030 ecl:gry hcl:#7d3b0c iyr:2018 + +iyr:2026 hcl:#b6652a +byr:1946 +hgt:186in pid:622875187 eyr:2028 ecl:gry cid:140 + +byr:1931 ecl:oth eyr:2030 +pid:437813485 +hgt:181cm +hcl:#efcc98 iyr:2018 + +byr:1999 +ecl:amb +hgt:160cm iyr:2013 hcl:#b6652a pid:043039693 +eyr:2022 + +byr:2025 +pid:#fd7ad7 eyr:2025 hgt:63in +ecl:oth iyr:2010 hcl:#b6652a + +ecl:grn +byr:1939 eyr:2025 hgt:171cm cid:134 iyr:2020 pid:090346629 +hcl:#cfa07d + +hcl:z +eyr:2031 cid:74 +pid:50216290 ecl:utc iyr:2030 +hgt:176in + +byr:1971 ecl:brn hgt:190cm pid:791682756 hcl:#fffffd +iyr:2020 eyr:2027 + +iyr:1931 byr:2025 hgt:76cm pid:735796617 eyr:2040 ecl:utc hcl:#c0946f + +hgt:163cm +hcl:#18171d +ecl:hzl +pid:628854394 cid:311 iyr:2020 eyr:2027 + +hcl:z +ecl:amb pid:#a8f973 hgt:94 +eyr:2027 byr:2020 iyr:2012 cid:202 + +pid:086190379 byr:1931 ecl:blu iyr:2010 eyr:2027 hgt:175cm + +ecl:#0dafcd byr:2025 iyr:2021 eyr:1970 hgt:63cm cid:260 hcl:75300a pid:208921120 + +pid:024722981 iyr:2011 hgt:193cm hcl:#efcc98 ecl:blu byr:2001 + +byr:2027 +cid:123 +ecl:xry hgt:183cm iyr:2019 eyr:2026 +hcl:#c0946f +pid:380513483 + +eyr:2028 pid:302044900 iyr:2011 byr:1938 hgt:190cm ecl:amb hcl:#c0946f + +eyr:2024 pid:672033747 byr:1931 +iyr:2020 hcl:#f01aed ecl:brn + +hgt:184cm hcl:#efcc98 pid:391597648 +iyr:2020 ecl:gry +byr:1961 + +iyr:2013 hgt:191cm byr:1935 eyr:2028 hcl:#ceb3a1 cid:195 ecl:brn + +eyr:2025 pid:322775528 hgt:155cm hcl:#efcc98 iyr:2015 byr:1996 ecl:oth + +byr:1960 +hgt:183cm pid:764315947 eyr:2030 +hcl:#ceb3a1 ecl:brn + +eyr:2029 hgt:168cm byr:1929 pid:800222003 ecl:gry hcl:#8f8aaa +iyr:2011 + +hcl:#623a2f ecl:hzl hgt:168cm pid:795434985 eyr:2020 iyr:2020 cid:209 +byr:1970 + +cid:325 +byr:2007 eyr:1933 hgt:188in +pid:713080083 ecl:#d624ca iyr:2030 hcl:z + +hcl:#7d3b0c pid:431742871 +ecl:hzl hgt:169cm cid:340 +eyr:2023 +iyr:2017 byr:1994 diff --git a/src/adventofcode2020/data/day_05/day05.txt b/src/adventofcode2020/data/day_05/day05.txt new file mode 100644 index 00000000..318d7041 --- /dev/null +++ b/src/adventofcode2020/data/day_05/day05.txt @@ -0,0 +1,807 @@ +BBFFBFBLLL +BBFFBFBLLR +BBFFBFBLRL +BBFFBFBLRR +BBFFBFBRLL +BBFFBFBRLR +BBFFBFFLLL +BBFFBFFLLR +BBFFBFFLRL +BBFFBFFLRR +BBFFBFFRLL +BBFFBFFRLR +BBFFBFFRRL +BBFFBFFRRR +BBFFFBBLLL +BBFFFBBLLR +BBFFFBBLRL +BBFFFBBLRR +BBFFFBBRLL +BBFFFBBRLR +BBFFFBBRRL +BBFFFBBRRR +BBFFFBFLLL +BBFFFBFLLR +BBFFFBFLRL +BBFFFBFLRR +BBFFFBFRLL +BBFFFBFRLR +BBFFFBFRRL +BBFFFBFRRR +BBFFFFBLLL +BBFFFFBLLR +BBFFFFBLRL +BBFFFFBLRR +BBFFFFBRLL +BBFFFFB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BFFRRR +FFFFFBBLLL +FFFFFBBLLR +FFFFFBBLRL +FFFFFBBLRR +FFFFFBBRLL +FFFFFBBRLR +FFFFFBBRRL +FFFFFBBRRR +FFFFFBFLLL +FFFFFBFLLR +FFFFFBFLRL +FFFFFBFLRR +FFFFFBFRLL +FFFFFBFRLR +FFFFFBFRRL +FFFFFBFRRR +FFFFFFBLLL +FFFFFFBLLR +FFFFFFBLRL +FFFFFFBLRR +FFFFFFBRLL +FFFFFFBRLR +FFFFFFBRRL +FFFFFFBRRR +FFFFFFFRRL +FFFFFFFRRR diff --git a/src/adventofcode2020/data/day_06/day06.txt b/src/adventofcode2020/data/day_06/day06.txt new file mode 100644 index 00000000..f9bfdbae --- /dev/null +++ b/src/adventofcode2020/data/day_06/day06.txt @@ -0,0 +1,2167 @@ +adgvrhblps +pghsdrbmalv +hrlbpdasgv +bgvsdplahr + +lgnpfhrm +hwmng +gunhmo + +txkeafsbgjuizd +etmcgdbfajuz + +xdtzjioqavmchsbfrkp +bzjkriqmvxedotpcf +azjckxmqovtidbprf +fcxmevrkojzpdibqt +roifztvxmbpwcndkjq + +ylcixrdoejn +dyoejlrcxin +dnorleijxyc + +u +u + +nfjrt +hvgqxculeszok +pmwryfdiab + +gh +ebzkr +byqusikr + +b +b +alyr +t + +jzbafspmynwgqdeuklxc +anbkgduyexjlzmpcfwq +zxdkiujqeglcfynwpamb +qwcubamjpxyngkdlzfe +upadgfkywmnxeqbhjzcl + +g +l +g +g +pg + +mazi +mnzdai +zmia +izma + +pqzl +pzql +zvciplq +szpqrl +plczqi + +mquiosghkwtjz +tgnewskmjuozqi +gjwzmqcntosuik +ybtjoqzuwmfgisk + +nvwocedxyqiahgt +zbjvipyfeacuwrt + +ojkhxmwqs +kqxhmrzjwo +mqkjxhwo + +t +t +t +t + +dhrxaqejfng +fhdlbxejqra +fqaeldhjrx +seaqjxzdfthr +adjhrqlxef + +t +bczrx +ueit +nu + +idtmkhnlpbsqfxcevjry +pricynubfvdhjqesmktlx + +wt +nw +w + +mhqe +ey +e + +kwclmuovtihabd +aqheucldfwno +adwnhoclqugez + +lbwnohgs +osnbghw +swogbhfn +hnbosgw +gsowhnb + +jsxyihpaotdlvckgeznqfbmwr +xkhfnwitojasqyrgcelpmbvd +synvibmdpfxwqltgcjohkare +grxicqelsovtdfhujwkanypmb + +druazhicbm +spqizhucrdabmv +imucbayhgzdr + +fnx +unqx + +zjm +qfwrycva + +uktvygcmf +yfktcxmv +ctlkvqysfmb + +j +jng +j +j + +t +tw +t +t + +vogs +ogsv + +tzgqxfauw +wgfxqkuaz +dkzawuftgq +gbuwaqzfjo + +iphexunlbs +tayqgzmkjfdcrvow + +fcdplxkhjbngwzqmiry +khuyrlgvxnpfbdmosqizjc +djzyxikqnmbrlgfhcp +jxycgeidnhlkzqpbmrf +xckrhgbzfnjlpdmiyq + +lezco +ezloc +zolec +ocelz +oeczl + +emgluf +flebmhg + +knafibd +kbrnfd + +xktmidfrz +fajlidmrtzy +wftzdm +omeqbfgdzpnut + +tndpxaveifhcmzyjrsqlub +oyanuslpqdcevfih + +hblawudzknspf +gxnstrmiyqpejo + +lesyaikhnvoguwftzrmqdcpx +pxuqoayiwjzvglstrhfkmcend +uvyfepmxokdrhzlcsniagtwq +ynfmkwxqalpdrezhoguvstic + +grscfn +azlgdcn +ovcgzn +lwxgctan +mgkbiyjhpnc + +ji +ji +iaj + +ivtkp +ikwp +ipko +pkiw + +p +p + +yushxnqa +uokzcaxni +xalvuyn + +elw +wle +wlre +wleq +uwel + +bvfxe +ebvfx + +roaygfv +udazcljhy +pbaryv +aptxy + +zdpkslmvnhyfua +czhfkylumrvgoqaspb +twenpsyzkjmihavuflx + +zsv +bnzjfcamkw +rvdzq +ltypirz + +q +w +q +q +q + +uic +uic +uic +iufc + +rdve +cvzre +fqls + +gxmnabhd +xdbwjngmra +gmxebadny +bgahdxomn + +gnoyc +olgy +poyfjg +wsdouiyghqe +jyog + +q +e + +adszvgclfomph +qavsicdlghozpfm + +czfhs +hzfo +zhf + +luzrpeivwagyfktjhnob +tlwynevkojgpbfuihr +gklbpjvyoituefrwhn +vhypwujfrbktonedigl +byknejlowfrptghivu + +xbu +xbu +xub +bux +xub + +vcqtxyf +tqcvfy + +vumkixjhaozgfbneydpr +yxeazjmvbnhukpigodfr +pjnomhaxuvdkbiryzfge +oezrxngvpajfkdmuyibh + +mkgdruoiawfh +dsumegkpjoq + +oucrtxbqienfvsmlzjkdwgpa +akrqisvxbudelwgpmnozcj +xreauzqglpcvmoidbskwjn +mwgpljcusakrbozxvndeqyi +jdrlvcimoewkpxgqasnuzb + +dshfqywgbc +eiqflapjh +vrmjfhnq + +kojresxi +ubclnpghf + +kuitbfh +ofdkqt +fztk + +lsawunycojgvi +ornsyijx +yojpdsnbxri +tjysrinoe + +ezuqslamgi +alimgeuqz +amgfqzluiew +nmalugivwqze + +lrm +mr +vmrgt +mr +mlr + +ybcnizhwt +ycbmztih +octgiqsyhxz +hktzcfyilew + +mqigxepzwudokytanf +ayztcxbigunordqlmhk + +wnfy +wzfp +fjlewksb +pcfwyn + +o +c +na +qku + +zg +gtl + +syr +pbnmqc +j +sk + +abenmqvsyotzrcjwglfdx +cnmqrxatjvowbylfgdezs + +kfzlgphuwqv +levuhkwqcpfg + +iazxrty +xryz + +ikxcpebaruwhlm +iqtxadbeyckuvsh + +wkfsrvgbyjxpq +rqbyxwfpkjgsv +fgwsyjqkxovrbp +frpyqxbjvwsgk + +po +o + +arbnupkvxqodcg +znpobhraxugvdckqt +mkaupgobdvscnqrjx +cbqknjavpgwxuord + +ftpka +vtifcl +dfwusmbyrhto + +y +q + +drsleaqghypbtinmfuo +gzinmrwudjbpyloefqahs +fiomngyurlpheqdabs + +v +bx +c +v + +kh +zk + +qkzicvjbgawfdpxmtsloye +ylofxwpvkqemsaigzjtcdb + +qf +fq +raf + +cbvxjytmsa +tbmxcvyjsa +ybmstxjacv + +aekpuyliz +eqpyxls +rwyepchjflomg +oedybpl +evnyclxqp + +yxtfnavdhopmcw +qlugbvjcz +xvcnymkrh + +yksamve +yksmvxea +mskavye +yamdswevk +eksayvmx + +p +k + +psrgzxmaif +ifraxgzo + +aehoplsvfqr +jfqvkpoas +vsjfxpqcoma +asmfoqpv +uvospqaxf + +ercgdyism +msrvebzc +mgrescq +desfrmico + +dborguxznkyqciavtfs +kzoymfndrsaihqtcbvgxu +anbcwfrdgjxktlyivouzsq +bgifuzsrekocxydqtnva +dtpsikyavoucxqgbhfznr + +jvyhfbpxtkizmlesw +fvmjhkesbpzywixtl +btlezmshjwpxiyfvk + +jawdspkghblyvornxmicuq +nrujdhxokcwgylimvqpba +lcrnhktgvipyubwqdomjax + +vhiatyrwksodemcxn +hdsamtvuikjqecnwryox + +ixthorcaevkp +xiyhrknlboczwjfm + +ck +kc +czkmyet +kc + +wxjqkpgnshue +qojwkefphzcrgaxn +ektphqjxgnwu + +raksq +mdu +a +asb + +putzomyciwaqkvbfsldng +absdvyntgikruqpzoflcmw +dkscznaiwulvogqfybmjpt + +sxbqjv +jqvxbs +vlqsxjbo +xsbqjv +jvqxbsy + +ynbakgvc +yvtnlbsjg +vrqxephwfby + +xhdjkrpltfoe +qjplehkotdbfrx +kxfdaotsperlhj + +ewgsmi +jafkti +yqkf +copzldurbx + +xc +ex +r +rtwce +slk + +zimewg +nmzrj + +qylbm +byqml +lqmyb +mxyqlbr + +egsktr +erskdgt +rkesgt + +zkgqireysupwjthdb +swkoyzdcqibpvnr +kyvmwzpirdqsfbclx + +jvytcgmkeqalzonhx +kvcjnwztxdmlyoaqg +lznqaxcvjytogkm +vabgfulyxkjoimqztcn + +q +q +q +fh +q + +xykitfhn +xnhytzilf +tiznfhx +tfxihnre +xhilzytfn + +zmxyoakgt +yawiomrgsd +oafgmyqr + +lpgqshiyuxjvabz +lzbuhyiqsjagepx +urisxlzjabpyqgh +xsuiqljypzgabh +gkylpamihsotqfdxzcbjwu + +jhf +htdejm +jtabh +cjeigmzh +suljqyorxh + +hcjkbvmlaoen +faojknvxmehblyc +nhmovlejcbka +vonhckilembja +kojnmvebtclha + +clamzrewgonksuqvpb +zusorlkmqpnvwaecgb + +uka +ea +aw +a +lxa + +lg +lwtg +tgl +glw +rlg + +vfsxidctgah +dvhcftsxgia +vdhxgimfsant + +tschpyqa + +ckn +xckznb +mnsvlfqaitjpdk +cwkzn +kzoyenb + +ro +ro +or +or +oer + +icumvltoqafdy +tfsxarpnh +atsfgw + +btfenmovgusqzijxpcrhdakl +diapqfxrnevlzutsycjgbkom + +utvbhgw +vbhgtwu + +nkfgajmvbpyowthxr +cwxrtknpmgfazjoy +rwxmfatgouckjypnd + +kdlubgiap +podcivgyueafkhm +purgnkixazd +sukdgixap +udkpglia + +ajnumbsgr +ibmjsrkagc +bsgozmra + +vkbso +ykglhto +gmodikp + +sxupqv +xvuqps + +x +r +c +x + +fjoyuhztseqrawpciglx +igfeplsxtrhaqyzojwuc +rpwgucisoyhflaxtzejq +yqzjphegfuxltawicsor +wzahifloypuxegjscqtr + +xeironzdugvqc +quevgsfronxzc + +wdjrsknlbihcqzxuv +bzlxjnukvhrsdicwq +cuqiwsxkzvjbrndhl +ubclivhszjdwqrnxk +jldqkihxrzuvsnbwc + +dzklrogfvmn +xuwpaqcetij + +d +o +m +d + +xhgzbj +jvbhg + +snbcamefqhuovxkjpz +htckmpybdgvrsaoeuj +pkcbewsgvojmhauidl + +i +k +tqj + +koyawh +auo +qaoer +zrapo +ioa + +broqhaylgsmxzkjtuvf +hatgluorzvkyxsmfjb +whytbkrvsumgzxoalfij +tzabxgfrqnusomvhjykl + +hoplnck +ayqxdjofr + +dmjspac +dhoazjp +idxfrwepyjo +qlpjgtvndub + +riabvstyxphgoez +projxgyhietsavz + +jhfqikpmz +kfpiyjvmzsqh +vphkqizjmsf +wpqfmlzkjheid + +diap +zkhacy +waog +fojgas +roa + +rujzxoygliqnmvkpc +vlonrgpjqzyxmfkic +zgxqkjocirpvlynm + +lzgja +jlza +kjazrcl + +vteiqrpkjybsmndhfl +lsndjpqertkvhbimyf +lpjmnbyqshvtdfirek +vpibqrehmsnflykjdt + +iwqlhotpjsa +slhjyuiotrdk +szjhlocimt +tiajhwsofl + +poz +dp + +yeqdmto +zgtqyvoli + +ahkfsocmdgnwp +cpwhjsmgodakf +clhudwakftvogsepi +dkargcowsphf + +p +p +p + +eqbcr +jceq +xeocqmi +fqwcve +mjebocq + +xkei +ivuaexqk +kxie +ikxe +kxei + +jsmzk +cmdpyf +xshm + +hdwlcgzyuvke +gjlaqpry +rlgomxy + +comszwhfrqlpnvytei +iqpvwolsmnfhray +oulphgswymvfrqnix + +lcisfxnzwy +csixywfbnlz +zelcfyiwsxn + +lmrsia +gowals + +lyknfogpu +zoiw +tesjova +moes +odi + +ktfajxloz +ojaxzflk +akzlfoxj +fxkolazj + +iwxzmukbhoy +xlzkymbiuwo +bkuzomwxtiqyd +wmokbizxyul + +kr +kr +skr +kr +rk + +bdpfgnwxtk +gwtkdflnjpzx +kngxpfwdt + +xkhmzvylowsgucrfepjai +xriqvhjlozpdkuemcfa + +avxoebdgzmqphfytcn +cvfrmneolxtyzdgpqh + +wjvslhmufgqxcnodz +fswclgdvxnumo + +t +uqi + +xopmekybt +pkrxytebm +mtpxbyek + +vkxcrizwuhtad +wairuvhdmzcxkt + +vrlpifawedksqzhcgnybtjxo +qoplwufekztbhdnvxgarjsciy +svzmteygfbkrlxohjqcpaidwn +rakocwstbpidlhxjgeqzfnuvy + +o +o +o +o + +ihzarybenqmtpg +zqbiyhanpgetrm +hqizynrpbagetm +yhbgrzeqnipatm +gteahmprbyqinz + +jv +uxkasvt +jrgv +qv +ivbpld + +sxigewcouvbj +xjwobcsugive +cbjvxsuowneig +uxobwigsjcev +ejogiwbxvcus + +enmvubp +pvubm + +qrjythvlzubgeikafo +necadbmrtzulvwypx + +rbuslgk +lgsbuzkr +lbkugrs +sgkbulr +rublgks + +whb +wbh +whb +bwh +whb + +khtcw +wkcth +wtkch +ckwth +kwhtc + +mkzdbo +dkjz +kbnzlmd +duytksvzgq + +brkxvtjpdhqw +ntjqizashkpvwd +dqfrptwkshmvzj +phegdjolwvkqtu +dkhnwqacjpmtvf + +bdrioxsqahp +adishrbqoxp +oiqpsbdtyrha +dapobrxsqih + +oqsgiptmzlwcxkhvrfedu +rpwhtlgkcuidvqfosazxjem +rmgkeisxzhqwopltcfvud +vfcxiruwlhgoszmekqdpt +hmprfdvoxetulgizsqwkc + +luzam +mwuplz +mlurjz + +xlpmhzudwriytscobnkfq +uinamwhrtpobfvqceyd +ibflutdsohnqrpcymw +nqprtwuyfdcmiohb +ufhwmrinodkcbtpjyq + +ns +ns +sn +sn + +dufzbegpjrsaiqcthv +pfzqdjhatbuvescrkig +tbehcpfsvagdqirjuk +tebiravqjpfushwgcdx + +gpjafzel +mzgftlead +bleynhgvfcs +egdqfalmz + +zbarcdwiukgoqhmtnyjps +sujqytgrbnwzdmhalicok + +fyvgdcbqx +fqcgdyin +etfmoqgdsjyc +gqfcdy +fyqcngd + +am +bjm +sdm + +frvkaupe +qzipevkya +vzabpkesd +bevpymka +pkxeva + +t +t + +dcveyjgtfkbuo +ebogjfydkvcut +gkoyfeudtcvjb +mvygqckjftuodbe +tujbkeocdgvyf + +bkthnlgp +tnghb +gthnb +gnhbt + +hpkybmeowacsrgnijfl +jzrsgyuwickpfbmolneh +hcflvrgqpwmdoknsjeyib + +qxincam +zdjrlksqhgt +cbafqwo +vqyei + +izdkxrpuqgjte +asyngkxrudpvmie +bdkwpgmexruci +opdiknuxger +gecixdrpluok + +jymuwvfrixclhga +invyhuglxmcjw +imwghculxvjny +gjmlhiwvyctux +yvjhixugwolnmc + +xbcwhv +chdwgxbv + +ujycfnsvgqkpwheal +erugwaykpqcnhomlf + +gyk +glhrk +gwk +qowygk + +vcnju +vuoijbczt +dvcujg + +rlsy +ryls +ylsr + +tjn +t +n +rixz +t + +i +i +i + +elq +qle + +ksahwvdjbtfle +lfksaebjhtwdv + +qfacst +qfaskg +fqasoktb +vmfuilqzprasd + +apuxh +uxpah +onahmwupxb +hxpqau +huqapsx + +hjbnwua +huwbranj + +dj +z +h +hz + +hzqo +oqz +uwsozq +zyqxo + +ckotpfx +lhrcnpmgfviwobd + +wecahmszdjnoix +hmxaijswzydtcgn +njcqtmzixsadlh +cudmxzeasjnh +mxzahjckbnpdvrs + +lsqahvixforkw +fxiqskaohw +afjhnxqowsik +xstiqkhmoafpbw + +htdcbm +ex +sxq + +pfgkrjhub +nptjfixgraubykhld +pmufkbrhjvg +jhrfbgpvuk + +sptnugvdfmckehw +wknfhmsucertpvg + +zolicbnrvtdwhy +oqdunzywp +zodykuwxgspn +wsanojdzxqy + +druisbhpckvwofna +wvcboafsnhipukd +bpsadlcvnkhfziuo +bqfujsvmhcoakitdpne +visaodpfuchkngb + +ewniqoulvgstzchkxdmpyajrbf +cbyihmnuradvlktxpjwsogzfeq + +zgsdqwj +qdzsg + +ombl +yeulqbnimw +hljodbmk + +wtzkorqhupxby +yzxhtkwpord +skwzpjtgyrxho + +mstgrlwo +rpyowgdts + +pidn +ipesrfv +owpdim +pibt + +tu +tu + +pcdatkohjgbelmqvfxwnu +ukevynsprjtclaxhgmdqfwb +twqungiobxflhckapedjvm +pgqvtowflujnmadbeckxh +damfntwkjlcvhbqepxgu + +ilksfovqamrhngcdjyexbt +htkvnbrqaefsloxgciymjd +qfgvrxmbaoeldnkyiswjhtc +ftxpoyhbjkcevdasmigrlqn + +oq +qdo +sdlqoa +eopbizq +sndqo + +iblpgzoekrnmwhjstay +tsropbkwgyaexilujn +salrwjgbtikpeyon +bsyirktpjonxualewg +teaqljpowyrigbknsd + +d +d +d +d + +zgqmhnlvekcyutxsbifw +zmkqgwvyjrcdfbu +ckoawvyzgumrfbqd +fdqbypumcgwvzk + +krqlncwuxvgbdpsmyjfa +lmuybxdqsvkrjfcpwnga +zkbqnhjspdcumrxgaelyfwv + +vafsedqzyrtnjpwug +gvcustypjedaw +owpydujgtaivsmke +tvadlgweiypsju +jebvtoysphugadw + +pyixcohfrvtenaugsdmjq +catjqrivdfseogunymx +tvquyscedoxrgifjman +qagtfiocrjmuvdsenyx +gmeufoqaxcrnjdvstyi + +p +p +p + +jagycukemiqdxw +cmuyadqgkewixjl +fqawimgzjkyuxbdec + +mahdekwibs +admswkhei +debamswk +maovdyeskw +mbsdkweaf + +wfqimrc +rtqhcwlgdxnkvpo +arwysquc + +kroumefnixa +lcn + +hvaugnsf +nfxqkugas + +wheyqtmdvljucnsbia +hvmyteblnuqacw +ehnultwbyacmqv +mlybuhqtcewvna + +pxhafcvymglkzoq +xhwkctlgabz + +or +jodr +or +gro +forha + +fzmohqld +szqf +iqawckfrp + +hkxuwmsbdrpt +ptysjhxkwbmru +tpmbsrkgwh +kphmtrusvwbq +krmhpftsbwzn + +r +r +otr +r +r + +sxtlkvjacpbngoziewq +jiskzqanlowbxpvtge + +r +r +r +r +r + +bqwsz +wsfb + +zwvyqaichxjre +whvayjrzicxqe +arxcivhewqyzj + +mpzasbnregjdwlxuqoft +dnxlrwubzkaosypq + +gfaizbqlchy +zibatqykfu +bsufzjqxyiam + +fsy +sf +efs +fs +fs + +asmugcxhbekl +dkhcluwsmegaxb +kubhcmalegsx +cgluxmbhekas +bajrhelscgumknx + +qdpwfec +wjdqfecy +cwdefqj +wqvdclsfe +dcqpfew + +r +jcowmyplv +itdru +shbfr + +soublfhe +lksfzjdymaw +ywfnrskcl + +zsybelirjfwm +sfxiznhmablgtj +jbcifusqlopmdz +znhjerlkfmybis + +knvmejaydo +mjoaevkw +jkmhcoave +agomevkyj +elqftajmoskvi + +ziajfk +zakifj +kazfij +zfajki +fziajk + +ujzyfat +tyuafjz + +xihdrjyzvl +axujhtldyr +xdohklyjr +xrlejhyd +bxolyrfkjdh + +i +i +i +i + +ocnxzlprutqmhsij +xgmloizutqj +xmtlgioujqz +guoxlamzitjq + +jhoepxcuwvn +xeuvnfaodjwpc +upjoxwcevn +xncelrvojupwg +qeusjvwynkpotxc + +etdilxy +lytdiex +hdeltgryiw +lyixvedt + +rge +gr +grp +gr +grp + +iquzsnh +qsfunwh +qtsgprvhcn + +lipmbftsh +myho +uqzngarkvw + +ybrtackvdgqsmonlezuw +ywlzmsgbtocakedrqnv +rbceqauytzgmowkldvns +tyncgkldqserbjoavwmzh +oydsvatnmwzgceqkrlbx + +qjb +irgfqjope +jkq +jqb + +ncjlbpzedywkshfmqvagxi +jfipaqbmevkgdxnschztl +gbvxnclahmsiqjdekzfp +kedsxbzcvijglphmqfna +szcadkbnpeghjvqifxml + +nfteow +ytewforn +estonfuw +erwtnfo + +vhawcorfpxydzieqmbg +opyqhzdabfwcegrximv +vbpfqzcierhdgawoxmy +dvprwqzfioagxbycehm +yhdvpxzimqeorcabgwf + +bfnrkixsut +jhywbrncziaxkp +iodknxrb +xbrknli +xkfironbu + +xwpqbhyakf +rxayi +ogaxy + +tnwl +wbnl +lhwn + +wjuroesafgizkmvplxc +nxvgfoeucjmprikwlsy +glwrfcumhejisvkpox +kjmuvrwclifaxepogs + +kjxygrvsodimabecwuzh +ihmxrogvjsaudbkwcezy +ykwovzjimbgashrudxec +jsewruvymigxdzkohabc +icmleouvhyzxdabjsgkwr + +wm +wm +miwkg + +slcdjyhbnpi +bxqvejnzwtfag + +a +a +a +a +a + +jxwonlf +jox + +wxhytgp +tpgywx +pgwyuxt +pgxyfwta +dpyzwxrg + +uygwfkxvane +hsdicwzkrenfgalqx +jaknwfxge + +mxs +msk +smx +msoqz +ms + +bxfwc +wcbxf +cxfbw +wkcbxf +cfwxbl + +om +om +a +n + +ikp +wi +iu +biej +i + +aokgqimrnlfbdxzjs +tmqxrbislngykoajd +lsgvboxnkjdqrima +orijsalbqnmdkgx + +zfpd +biok +bxcqnk +yikx + +sulwztbnqkvioafxchemr +qhmcvlexkazuinfrwbsto +mnfutiblxecdqwvkoszhar +bmxzpqrlkafheouvcsntwi +zmchneutwlqoakxbsifrv + +equacsmywgpkixfdv +anxwlcuypskjgfivbqr +iyaksgxmvoufehwpqc + +twfzqxsnr +aqdsp + +yj +dyoje +yj +yhqj +jy + +bhwsczaxunjr +xgcswaflpznruqb +ubzwjxkcsyrnmahd + +xyvgkjo +kgjvoyx +vxyokjg +govjkxy +jgyxokv + +hneolzrtywq +atbs +mtipgd +vts + +flu +lfu +ufcl + +ad +da +da +ad +tgqad + +xfw +bufw + +simdubgowtap +wgbsdomaiutp +bsmodwauigtp + +qi +o + +n +dthokli +nveq + +nvdt +cdglvi + +sdxfaveuwlqzgircnhyobtkjp +uiqjrdenyagwkzhvpxscobtfl +otiungzxecdbyksrfwqjhvlap +dtbcyojehfwvsnrpkliuzgaxq + +zgovqbryphxmjcasuktfl +bwcpqoutvfjykmashrzlgx +iecjhpmxsqytzorflungvabk +vacztqslhmkgoxyrpufdbj +amgfxjqsptdrhovclkzuby + +s +s +fs +s + +b +b +bm +b + +uzc +zbc +cz + +clmeswqpuahi +spahequmlwci + +hrclmu +nhlcdurfxzi +orshcluv +uheclr + +r +k +r + +da +ad +ad + +hlfmnga +amhgn +hgamn +geahwnm +malgnuh + +bhpgndjwecroq +iwxklmtyzsopf + +uqosfv +lmbihrxtedk + +gyrtdosqjnkalicmwvh +rmlygiwktqcoshdavnj +wimjknqvaglhdsocrty +wkosyadhtqgnmcrvijl + +tcpsjerzykogwmqbxinlad +iyzxcgrtqosnbkjaleudmw + +dyzsmnkvuegbwlt +iwrcgs +fpswgqc + +nawtjrgmpyxlibcshfudvkzq +jiblrgwyhtmxvucqz + +vcruatwneqxi +myhgldscjnfb + +qakljbptgwryiuxnmoh +mtquwoagbjknxyrlpih +aktuhpgmqxbwjyonril +wqriogjmubxpknvyltha +mpkuhlxgjtanwoiyrqb + +ptjrmc +ucfjpm +pjcsm + +jofrkgdves +gsdkrivfe +dgsevqkxrf + +fvs +vclsd +s +rehtuyi +vfk + +eafupodb +eyrdpgbujfoa +ukadqobefiwxp +pfgudeobay + +i +p +i +i +i + +udlqpozmayew +dsyalxmupwe +lipydaumwe +delyumpwsa + +zthwnjiuyosakfpxbclm +lcpyfmisbztuknaxo +xsnlcyfzbpokmatui +zblkpsficaxmyoutn + +n +nt +r + +meskuctxrwaflovdpzhj +koxzmhvrcydlbwpsjuae + +l +pqd +lh +f +h + +otzqusgdeyvc +aetugnycqrxz +fhzwtgjqmkyulip + +o +o +o +o +o + +frejdvqokushlxtcgwani +dmfesnxhwgluorjiayt +zdtispaxeobgjhunwfrl + +retxhvnmzsjqpbodif +txnphyomczqfisedrjb + +nmwra +rmvawn +arnwm +mnrwa +wnmra + +yatwdlfbuc +flydbtwacuo +upaybixdlfvtcrw +tncdbalyswfu + +lenfcbjv +jfecnvlb +jlvefcnbr +lvcgqfnaetbji + +bkuycegrnpimoxvfzl +xpmklivbuyrcega +lbktipremguxcyv +pbmirkvglyceux +ykibxregmlupcv + +rwjeyxizhgt +ywxetqgajzriol +wrigyezjtx +werygtjizx + +az +ja + +sumxgwqydjhe +whtdyeqguxsp + +pncwmq +ansluwbycmxoe +cwdnmj +wqhkmcn + +flucitkw +ilucwjktf +lwukticf +lcwifktu +flcubitwk + +qlhnvft +hnvtfl + +bwsegp +bmpgsew +gpsewb +bgwqesp +pgwbse + +ib +mgjsb +bzk +bpmsgj +xb + +bjerpdfuo +wjrbf + +dkmxn +nkmdx +ndxmk +ndmxk + +rnouk +j + +m +m +t + +mrzq +zpqj +qiz +vzq +zhqi + +tkn +nrkt + +yj +jsyqp +awyj +yj +jy + +xl +dlx +olx + +kqdluj +jlkvdqu +qdukjl +qdklpju +ukqldj + +wzy +zy +zy +zy +yz + +vea +aewk +berga +waek +lyaen + +miaoyj +yjvmoiza +yimajo +jymaoi +yjoiam + +azcrbo +bzero + +fig +jbsagif +gfi + +ed +de +ed +de + +naezbtk +ubat +batku +baqvtglmo +treba + +gozafjiuerdpyscb +lxuhqvmktwn + +ysqdjnvwhagmzitpf +vszdapqhijcyln +pcazqibvhsdjyn +rjuaqhspydikznv + +qhgazndtiwb +wtbqdahviou +zbqjhwgtai +qiabwntckh +siawbyfpmxtrheql + +ej +je + +vtqgbimyo +dpwihgamzovlbtf +tmgvboi +emntbvgcio +btgimvoy + +kisynhablrjwempcouxqgdftz +xnzrkiufjpmghsqcadotwebyl +rdqezcmgajpwoylnbusxfhkti +shejiunzgdpwxylqmatrbfkoc + +lcqenihaktdgurpvmysjfxzow +sldaifypqrkhcumextwvjongz +piyslcrajgfenhmdwuovtkzqx +esxwujvtarpzkoldmyfncihgq +xqfvgosbyruephwjdaztklincm + +gyofwzc +jyluxh +dpimyv +rtsbyqa +myluej + +iwcedhs +etdich +cwihaeb +ecihby +licvfeh + +nwlfiydcst +wnldtsfy +lsnwdtyf +fdwytsln +tfsywdnl + +diphkr +ihf + +osagihfnuptwcyxqevz +ynzjfrpqoicklmuvbw +nckfilwvquozjpmy +qzwoivcfpyjun + +tbjh +noyjvqt +ejzuligpxm +hnj +jysha + +fycqbrk +kcndb +czblkq +blfcky + +wpgk +putk +lqamxiv +rd +dcw + +wmludkgnozfe +aoezwflgkmdun +uzekmdgflnwo +kgflnuzowedm +goezkndmwufl + +zmbsxkiwqrh +grjcyiwptzseqxofd +iubrwqlkxzsvn +zaqswibmxr + +soealywdutckrfnbigpxz +dntrgfaopclubeykzwsix +gnswdzialxrckybtfuope +fwodizuepagysxnktlbcr +sbdiefgptynkuwzocxalr + +tkbry +fyxr +ory + +sio +oi +oi +oi + +fipqkjmorwcluenvzx +mvowrcjxsuqpfgikenl +cxrmwvkeulpfqnoij + +jhqfvlnetysazio +osjqykft +otqyjfuxs + +opfrbnw +dbqnhoftpruz +bgeyxrpnfol +royngfpbw + +rvmxfogsbcjkpqltyhandi +xafqvhinsodltpkcwy + +pqrkslwfijgdo +pymoxvzsg +vpszyog +sehgop + +qnmxjglwavzirceu +advwiomgshuqnclzjer +zjqumrcgaiwlevn +kvugjnewclizasqmr +jilzanmtbgfrequvcw + +szkftpg +stkpgzf +ptzkgsf + +mefgopznxlusjych +iocqfmjlzgyxkpunhe + +zemltjrnbso +stbxojkrzgmneqv +zpsjernombt +stjobrmzne + +yblxcozivekmqa +epsrvyigmc + +xs +s +s + +bnmz +fhqg +dxsin +zsm + +brpge +tpm +ptm +p +sp + +utpsykci +ituxbykcwr + +zvxityphsdnuagbmcjwoqrfl +qiuwkplbtczmnvyrsoxhafjgd +qynizxpujhfmbvdcgwleasrot + +y +tx +y +h +y + +fsqatkdlmpux +yxinuvasdpfml +tsdpxafblzomu +axtfpulsmdg +lxwfqpsajudmk + +joanzmhfldbsgwcipkxuqrey +oclnpxwkyqszdjreagiumfhb +ufvoiyxzbrpwdgkcmjsqlanhe + +ciqxenmrlh +ctrfhxiqpnl + +uoxfbrglpwjkhzstidmcyq +hzslfyjxbdgecairompwkqut +ygolzckfbxdmqtpivjshrwu +kpoxzdlhurgimcsftbqywj + +xhgfmplcvwrqneztju +vqbwxtiprfhl +wxaoytfrvhbsldpq + +iop +qvxihy +io + +ftlgqpix +bpigfl +ufbgiplr + +ek +ekb +kclifmge +key +ersk + +ytqglpedjriu +jidgqytrulpe +tgjyudrqplei +jeiytpurgdlq + +anuqyij +auczniy +yanklsxivou +byacinu +inazyue + +tmryzavsnfdoq +ngmjxatvosz + +yurzemitvfqnksxpbdlhgjwa +juwvmadgcpytrkfqnbezishlx +wzudtksjrpevnxagfihlbyqm + +a +xa +ya +a + +gnukiszbvj +nyzbvpksjgmu +sgujnbzeivk +uzgbnksjv + +xoq +qox + +xlberjukaztfnoycqsgwip +tscfaexqwgkrpouzbylijn +owaruypenjqtbslizcgxkf +jzcuswiqgkrbnpyoxletfa + +pxzmb +rzmxpb +bpxznmrc +umbgpzkyox +tzbmxp + +grspmxbyhojdizwlevqfkctu +fixgbtedqomczrjhswupkyl +tlsgyobzpmcqkhrdxewfuij + +xrhelazymwntkv +lhvamxeyrznw +vrmwalyhnezx + +mdbjcizwxh +jpcbzdmxiwh + +xakdgjtimlvzcshw +iskdxfjnlhwrmvtcz + +yrli +lriz +rli +irol +ilr + +lfamcngvojeqyzrkdspwi +slqcznmwdivkrfjopebayg +cwgodjahrqzyfivepknmsl +kyeuvpjmlnftsizrdogqcaw +kjvrcgypqzinwadmoefls + +hfmuzdvyibakcwnsor +cezounhbsydwakmif + +vsajkf +jvf +vofj + +q +v + +h +h +i + +frgo +ogfr +grfo +rofg +gfro + +saomp +mpdosa +posam +mspao +ompsa + +qbxi +xbiq +bixoq +axbqi + +oix +xoi +ixo + +zqkved +ztvydqe +vdekzq + +ubg +vgcub + +wdotn +akp +hv +ipj + +xfcprnv +dfpcrvu +jpvfirc +frphqvwboc +pcvfxr + +prx +rlxp +rxp +ixpr +pxr + +uaozgkwlbfxyvmi +zbkgoxalfwuvymi +yimugvxbkfolwaz + +hwvlbzcauseydgpxrkq +lamwdrzhsbqefkvytxoicu +zktxwlnhysevqbraducj + +vjuprhcl +vjfrlpm +jbplvr +pnvljrbfe + +cwygrulzbe +elyzgwbu +uygezlwb +yebuglzw +ygzwuble + +wbzecjtdrgiyqls +wlsycjgeizdr +zslyderwigcj +dwzcyjgerisl + +qkvegzmnobpuc +pogzvqmkbn + +cnepixbwhklmqzodvyautjgrfs +oepszjgmlcxkdiartnybwhfvqu +gvcxaintlrweupbzfsmykdjqho +xalwvjenruhpkmgfqtoysbdizc + +omrc +tcer +bguaf +vhtk + +rtednpkyxgcs +kxlsredupynt +bartsexnypfmqk + +lqrabmznuhgjfi +chligsdnbjrazum +jpghuibarnzlkom +bamhwrngzjfliuye +yuignrzsamhlxbjt + +aoslfqnjcghb +cnbflgjqaohs +oqshfljbncaxg + +av +av +va +dvqa + +lghqidarnczwfxyu +ylfnhqwczaiuxdg +wfdglzixauchnqy + +pfgknomr +nfegr +vihnlcfdqgy +fgrns +awogfn + +kfdntirsmqap +thjdknbugmr +nxfetkrmd + +ydabnisroqeghk +gryenohbaiqsk +sqbingvyoakehr +ngbkyfaicsrhqeo + +ghxtulq +ntgqxlsz +lgzqtxsi + +qvr +mqljsu +wlqu +gpoqytkbzf +evqw + +khybpm +rhboj + +rmcqdblnto +qlcnmor +rhmzalcsoq +lgxcrmnqovd + +wdfkpmalijbncuvr +qhnmikpzaygxwsovej diff --git a/src/adventofcode2020/data/day_07/day07.txt b/src/adventofcode2020/data/day_07/day07.txt new file mode 100644 index 00000000..8a0fea8c --- /dev/null +++ b/src/adventofcode2020/data/day_07/day07.txt @@ -0,0 +1,594 @@ +drab plum bags contain 5 clear turquoise bags, 5 striped aqua bags, 4 dotted gold bags, 4 plaid chartreuse bags. +faded cyan bags contain 1 dim brown bag, 5 wavy magenta bags, 3 vibrant chartreuse bags, 4 muted fuchsia bags. +shiny brown bags contain 4 dark maroon bags. +bright plum bags contain 3 dull tomato bags, 5 bright tan bags, 4 plaid lime bags. +plaid purple bags contain 2 posh black bags. +wavy turquoise bags contain 1 wavy white bag, 5 dotted maroon bags. +dotted aqua bags contain 4 dotted brown bags, 4 dim plum bags. +drab chartreuse bags contain 2 dark olive bags. +vibrant black bags contain 5 mirrored black bags, 3 dark chartreuse bags, 2 muted salmon bags, 1 plaid coral bag. +posh purple bags contain 1 faded white bag, 5 clear gray bags, 4 clear silver bags. +drab coral bags contain 5 dark salmon bags. +wavy silver bags contain 5 dotted turquoise bags, 3 dark bronze bags, 1 muted silver bag. +plaid silver bags contain 2 plaid tomato bags. +dark olive bags contain 5 faded olive bags, 5 dull chartreuse bags, 1 pale gold bag, 3 dull tomato bags. +mirrored lime bags contain 3 dull purple bags, 4 light teal bags. +bright green bags contain 2 pale tan bags, 5 drab tan bags. +posh lavender bags contain 4 posh indigo bags, 5 mirrored brown bags. +muted purple bags contain 2 posh chartreuse bags, 3 faded lime bags, 3 dim chartreuse bags, 2 striped fuchsia bags. +drab gray bags contain 1 striped indigo bag, 2 dim coral bags. +posh olive bags contain 1 dim tomato bag, 4 light gray bags. +posh yellow bags contain 2 posh purple bags. +clear cyan bags contain 1 dotted lime bag, 4 dark bronze bags, 5 wavy lime bags. +clear olive bags contain 2 drab coral bags, 2 bright olive bags, 3 vibrant indigo bags, 1 bright cyan bag. +dotted brown bags contain 2 muted tomato bags. +dim lime bags contain 1 posh purple bag, 3 pale gold bags, 3 light silver bags, 1 dotted turquoise bag. +drab aqua bags contain 4 dim olive bags, 1 light gray bag. +wavy beige bags contain 2 striped indigo bags, 4 faded crimson bags, 4 posh coral bags. +pale olive bags contain 1 muted blue bag. +drab teal bags contain 2 vibrant lime bags, 3 light turquoise bags, 5 bright lavender bags. +striped fuchsia bags contain 3 bright teal bags, 5 dim bronze bags, 3 faded cyan bags. +dark red bags contain 3 vibrant gold bags, 5 faded bronze bags. +posh cyan bags contain 2 light tan bags. +light salmon bags contain 2 plaid beige bags, 2 dull chartreuse bags, 1 faded beige bag. +clear indigo bags contain 4 plaid olive bags, 1 pale brown bag, 3 shiny fuchsia bags, 4 dotted tomato bags. +shiny olive bags contain 5 dotted lavender bags, 5 bright maroon bags, 5 faded maroon bags. +muted blue bags contain 1 dull violet bag. +bright red bags contain 2 dull bronze bags, 3 pale lime bags, 1 vibrant brown bag, 5 muted magenta bags. +pale violet bags contain 4 pale plum bags. +muted bronze bags contain 2 mirrored gold bags, 4 plaid crimson bags, 4 light cyan bags. +dim gray bags contain 4 dim tomato bags, 5 wavy magenta bags. +shiny crimson bags contain 5 muted brown bags. +dim indigo bags contain 3 striped beige bags, 3 clear gold bags, 2 bright gray bags. +dotted turquoise bags contain 2 striped red bags. +striped tan bags contain 3 light yellow bags. +muted brown bags contain 3 posh black bags, 3 striped brown bags, 5 light gray bags, 2 clear white bags. +clear blue bags contain 2 plaid gold bags, 5 mirrored white bags. +wavy purple bags contain 1 wavy magenta bag, 1 muted aqua bag, 3 dim gray bags, 1 dim tomato bag. +striped magenta bags contain 2 pale fuchsia bags, 4 light cyan bags, 2 shiny fuchsia bags. +dotted teal bags contain 1 mirrored blue bag, 1 posh plum bag, 2 dull violet bags, 4 dotted brown bags. +drab lavender bags contain 5 pale yellow bags, 1 clear silver bag. +dull beige bags contain 4 clear chartreuse bags, 4 drab gray bags. +faded indigo bags contain 1 pale cyan bag. +plaid chartreuse bags contain 4 muted aqua bags, 3 dim coral bags, 3 pale gold bags. +dull fuchsia bags contain 5 pale maroon bags, 2 mirrored bronze bags. +drab white bags contain 4 dull orange bags. +dark maroon bags contain 5 dim lavender bags. +pale black bags contain 2 wavy silver bags. +pale bronze bags contain 4 dim salmon bags, 5 vibrant lavender bags, 4 vibrant crimson bags, 1 bright crimson bag. +mirrored cyan bags contain 3 pale lavender bags, 5 dull silver bags. +dotted green bags contain 1 bright yellow bag, 5 drab fuchsia bags, 5 posh orange bags, 5 mirrored blue bags. +plaid green bags contain 1 wavy tan bag, 2 clear chartreuse bags. +drab beige bags contain 3 dotted lime bags, 4 clear brown bags, 2 dotted salmon bags. +light turquoise bags contain 3 dotted tomato bags, 1 muted silver bag, 4 striped brown bags. +light crimson bags contain 2 dark aqua bags, 4 bright violet bags, 1 mirrored olive bag, 4 mirrored violet bags. +wavy maroon bags contain 2 dull teal bags, 2 pale violet bags, 5 bright aqua bags, 2 faded tan bags. +dark coral bags contain 5 striped black bags. +faded orange bags contain 3 clear silver bags, 2 vibrant tomato bags. +dotted olive bags contain 5 clear gray bags, 5 striped indigo bags, 5 dim gray bags, 5 posh plum bags. +shiny salmon bags contain 2 wavy fuchsia bags, 4 striped gold bags, 5 wavy coral bags. +wavy red bags contain 1 clear silver bag, 5 dotted beige bags, 1 pale cyan bag, 4 dim beige bags. +light gray bags contain 3 dim coral bags, 5 striped indigo bags, 2 bright lime bags, 4 vibrant magenta bags. +muted chartreuse bags contain 2 dim tomato bags, 5 dim coral bags, 3 pale yellow bags, 5 drab gray bags. +pale turquoise bags contain 2 light gray bags, 3 faded salmon bags, 4 drab white bags, 3 plaid olive bags. +striped turquoise bags contain 3 pale plum bags. +drab cyan bags contain 3 wavy indigo bags, 3 clear white bags. +dark magenta bags contain 3 muted blue bags. +faded gray bags contain 1 muted green bag, 5 posh coral bags, 3 wavy magenta bags, 4 light beige bags. +posh crimson bags contain 1 faded lavender bag. +faded green bags contain 4 mirrored red bags, 5 plaid beige bags, 2 shiny maroon bags, 3 mirrored lime bags. +mirrored silver bags contain 2 wavy gold bags, 1 clear beige bag. +shiny aqua bags contain 1 bright teal bag, 4 wavy tan bags. +plaid lime bags contain 2 striped indigo bags. +clear beige bags contain 5 dim tomato bags, 2 plaid olive bags, 2 dark crimson bags, 5 dull turquoise bags. +striped beige bags contain 2 bright white bags, 1 pale cyan bag, 3 dark bronze bags, 3 vibrant gray bags. +dark indigo bags contain 2 striped plum bags. +wavy coral bags contain 4 posh cyan bags, 3 muted fuchsia bags. +plaid gray bags contain 2 clear maroon bags, 3 wavy beige bags, 3 light lime bags. +dim yellow bags contain 2 dotted olive bags, 5 wavy magenta bags, 2 mirrored tomato bags. +plaid fuchsia bags contain 3 dotted white bags, 1 dull purple bag. +bright violet bags contain 1 shiny lavender bag, 3 dotted tomato bags, 4 dotted white bags, 3 mirrored olive bags. +light cyan bags contain 2 posh black bags. +shiny orange bags contain 2 dull purple bags, 1 dotted maroon bag, 2 dull indigo bags, 4 drab gold bags. +pale purple bags contain 1 dotted magenta bag, 3 drab red bags, 1 posh lime bag, 4 muted turquoise bags. +dim brown bags contain 3 dull coral bags, 1 dark tan bag, 1 pale red bag, 3 clear chartreuse bags. +shiny maroon bags contain 3 mirrored indigo bags. +pale tomato bags contain 2 drab gray bags, 3 shiny lavender bags, 4 clear silver bags. +vibrant magenta bags contain no other bags. +plaid indigo bags contain 4 dotted black bags, 1 vibrant aqua bag. +striped chartreuse bags contain 2 pale orange bags, 5 pale maroon bags, 2 dim lime bags. +dim coral bags contain no other bags. +mirrored yellow bags contain 4 dotted tan bags, 1 dull blue bag. +clear lime bags contain 4 striped violet bags, 3 striped chartreuse bags, 5 drab crimson bags. +bright salmon bags contain 2 shiny plum bags, 5 faded white bags. +light green bags contain 5 mirrored bronze bags, 4 dull chartreuse bags. +vibrant beige bags contain 4 striped brown bags, 4 muted blue bags, 5 shiny crimson bags. +plaid tan bags contain 3 pale blue bags, 5 light gray bags, 3 posh tomato bags. +dull aqua bags contain 4 muted blue bags. +wavy green bags contain 4 drab orange bags, 2 vibrant yellow bags, 5 faded beige bags, 3 dotted turquoise bags. +muted yellow bags contain 5 pale magenta bags, 5 striped plum bags. +mirrored tomato bags contain 3 pale salmon bags, 4 shiny lavender bags, 1 dark bronze bag, 2 pale blue bags. +drab fuchsia bags contain 5 mirrored purple bags. +drab olive bags contain 3 wavy violet bags, 3 light tan bags, 4 pale brown bags. +faded brown bags contain 2 light crimson bags. +vibrant white bags contain 2 pale tomato bags, 4 dotted turquoise bags, 3 pale blue bags. +dotted yellow bags contain 3 clear chartreuse bags, 5 drab cyan bags, 5 striped magenta bags. +posh coral bags contain 4 light tan bags, 4 pale brown bags. +drab gold bags contain 2 light tan bags, 4 clear white bags. +mirrored purple bags contain 3 shiny gold bags. +posh green bags contain 4 wavy indigo bags, 1 dark crimson bag, 1 muted brown bag, 1 light gray bag. +bright maroon bags contain 5 dotted silver bags. +dim chartreuse bags contain 4 faded olive bags. +bright coral bags contain 2 bright olive bags, 2 light silver bags. +striped gold bags contain 1 dotted maroon bag, 4 posh maroon bags, 1 pale gold bag. +light chartreuse bags contain 3 plaid blue bags, 4 shiny gold bags, 4 dull teal bags. +clear salmon bags contain 5 plaid blue bags, 3 muted cyan bags, 1 mirrored tomato bag. +wavy blue bags contain 2 drab turquoise bags, 5 vibrant purple bags, 3 faded indigo bags, 2 bright green bags. +dark beige bags contain 4 faded crimson bags, 3 dim silver bags, 4 plaid green bags. +bright gold bags contain 1 striped indigo bag, 2 dark salmon bags. +posh bronze bags contain 3 dim gray bags. +mirrored lavender bags contain 4 striped maroon bags, 5 light blue bags, 2 wavy coral bags, 4 faded crimson bags. +pale tan bags contain 3 vibrant beige bags, 1 dark crimson bag, 1 drab brown bag, 1 bright olive bag. +mirrored coral bags contain 1 clear white bag, 5 dotted beige bags, 2 dull violet bags. +striped white bags contain 3 vibrant gold bags, 1 vibrant crimson bag, 5 muted indigo bags, 4 clear gold bags. +plaid white bags contain 3 light gray bags, 5 drab turquoise bags, 5 dark lavender bags. +clear brown bags contain 1 striped indigo bag, 1 muted cyan bag, 3 striped tomato bags, 2 bright cyan bags. +pale beige bags contain 2 bright fuchsia bags, 2 dotted fuchsia bags, 3 mirrored black bags, 3 dull gold bags. +shiny lavender bags contain 5 clear white bags, 3 striped brown bags. +posh salmon bags contain 4 mirrored plum bags, 1 dotted purple bag, 1 striped gray bag, 1 bright green bag. +posh magenta bags contain 4 dark gray bags, 3 shiny fuchsia bags, 5 dotted tomato bags, 2 posh yellow bags. +striped yellow bags contain 2 faded white bags, 1 dotted lavender bag, 2 posh coral bags, 1 light yellow bag. +bright tomato bags contain 4 shiny plum bags, 4 dotted olive bags, 4 clear purple bags, 2 dotted plum bags. +mirrored turquoise bags contain 2 wavy beige bags, 2 dim gray bags, 5 dark indigo bags. +vibrant lavender bags contain 3 pale magenta bags, 2 shiny coral bags, 4 drab white bags, 5 vibrant white bags. +faded magenta bags contain 1 plaid lavender bag, 2 drab teal bags, 5 dull beige bags. +dark yellow bags contain 1 mirrored gold bag, 2 dark lavender bags, 3 striped indigo bags. +posh silver bags contain 1 dull purple bag, 2 plaid olive bags, 3 striped red bags. +dull green bags contain 4 striped crimson bags, 5 dim coral bags, 3 vibrant aqua bags. +dotted black bags contain 4 posh plum bags, 1 muted blue bag, 4 shiny beige bags, 1 dotted lime bag. +light yellow bags contain 5 muted tomato bags, 3 muted fuchsia bags, 5 posh maroon bags. +wavy black bags contain 3 bright white bags, 2 bright lavender bags. +muted crimson bags contain 1 dark crimson bag, 4 pale salmon bags, 4 striped red bags, 2 dim tomato bags. +shiny yellow bags contain 5 posh salmon bags, 3 dotted olive bags. +striped olive bags contain 1 light black bag, 1 mirrored olive bag, 1 dull purple bag, 2 light orange bags. +light silver bags contain 4 clear silver bags, 4 mirrored black bags, 2 clear gray bags. +dull indigo bags contain 2 muted lime bags. +muted indigo bags contain 4 posh lime bags, 4 dull white bags. +posh red bags contain 2 posh cyan bags, 2 dull brown bags, 5 drab maroon bags. +plaid brown bags contain 3 clear silver bags, 5 dim beige bags, 3 dim lime bags, 4 striped blue bags. +pale green bags contain 2 shiny bronze bags, 3 mirrored plum bags, 4 light yellow bags. +plaid maroon bags contain 5 plaid cyan bags, 1 drab white bag. +dim teal bags contain 4 posh maroon bags, 1 dull gold bag, 4 muted coral bags. +clear lavender bags contain 5 striped brown bags, 3 posh plum bags. +bright yellow bags contain 5 clear tan bags, 2 striped salmon bags. +clear fuchsia bags contain 3 clear coral bags, 4 muted aqua bags. +muted maroon bags contain 3 dotted fuchsia bags. +dark plum bags contain 3 dotted tomato bags, 5 clear violet bags, 3 vibrant magenta bags. +bright magenta bags contain 2 plaid tan bags, 4 dotted purple bags, 3 wavy indigo bags. +dull plum bags contain 3 muted crimson bags, 4 mirrored green bags. +dull black bags contain 3 muted chartreuse bags, 1 posh cyan bag, 4 bright gray bags. +posh orange bags contain 5 striped violet bags. +vibrant teal bags contain 3 bright red bags, 1 wavy indigo bag, 3 pale brown bags. +pale gold bags contain no other bags. +faded plum bags contain 2 striped plum bags, 3 wavy maroon bags, 5 vibrant bronze bags, 4 clear green bags. +shiny coral bags contain 5 dull white bags, 1 clear tan bag, 3 shiny beige bags. +bright lavender bags contain 2 bright lime bags. +shiny indigo bags contain 4 dull coral bags, 5 posh coral bags. +muted turquoise bags contain 5 drab crimson bags, 4 drab teal bags, 3 vibrant bronze bags. +pale plum bags contain 2 dull beige bags, 3 dotted turquoise bags. +dull gray bags contain 3 bright salmon bags. +vibrant indigo bags contain 2 mirrored bronze bags, 3 light orange bags. +light lime bags contain 4 drab coral bags. +pale magenta bags contain 3 dark crimson bags. +clear aqua bags contain 2 plaid olive bags, 4 muted indigo bags. +light gold bags contain 4 vibrant white bags, 5 faded lime bags, 3 striped brown bags, 5 dim coral bags. +dull crimson bags contain 3 dim olive bags, 4 dim turquoise bags, 1 muted fuchsia bag. +clear gray bags contain 3 clear white bags, 4 dark crimson bags, 4 dotted plum bags, 3 light gray bags. +dotted tomato bags contain 5 mirrored blue bags, 3 dotted crimson bags. +bright indigo bags contain 3 wavy lime bags, 5 dark bronze bags, 4 shiny brown bags. +light lavender bags contain 1 dim fuchsia bag. +clear purple bags contain 4 dark red bags, 3 clear turquoise bags. +dark lavender bags contain 5 vibrant crimson bags, 1 vibrant white bag, 3 dull purple bags, 1 plaid tan bag. +vibrant green bags contain 2 wavy teal bags, 2 dull orange bags, 5 plaid coral bags, 2 striped yellow bags. +faded maroon bags contain 1 muted tomato bag, 3 pale gold bags, 2 muted fuchsia bags. +light tomato bags contain 3 shiny fuchsia bags, 4 dull turquoise bags. +light olive bags contain 4 dotted indigo bags, 3 pale coral bags. +faded blue bags contain 2 light gray bags, 3 muted brown bags, 5 dim coral bags, 1 light tan bag. +mirrored white bags contain 1 posh cyan bag. +dull bronze bags contain 5 clear lavender bags, 4 bright olive bags, 4 dull brown bags, 2 striped black bags. +vibrant coral bags contain 2 dim coral bags, 2 faded blue bags, 2 drab cyan bags. +bright lime bags contain no other bags. +wavy crimson bags contain 1 dim indigo bag. +vibrant blue bags contain 2 posh gold bags, 3 mirrored tan bags, 3 muted green bags, 5 faded beige bags. +light orange bags contain 5 posh black bags, 2 dull brown bags. +striped indigo bags contain no other bags. +faded lime bags contain 2 dull violet bags, 2 shiny lavender bags. +dim bronze bags contain 4 mirrored blue bags. +pale coral bags contain 2 clear magenta bags, 4 clear gold bags. +wavy fuchsia bags contain 3 muted olive bags, 1 dull violet bag. +mirrored indigo bags contain 1 clear magenta bag, 3 mirrored beige bags, 3 bright violet bags. +plaid turquoise bags contain 2 muted turquoise bags. +dull blue bags contain 2 dotted white bags, 5 mirrored green bags. +posh white bags contain 2 pale teal bags, 4 pale green bags, 5 dim bronze bags, 5 mirrored cyan bags. +mirrored teal bags contain 2 plaid blue bags, 1 drab crimson bag. +clear silver bags contain 5 striped indigo bags, 2 dim plum bags, 5 muted aqua bags, 5 light tan bags. +dull lime bags contain 2 plaid crimson bags, 5 light cyan bags, 1 dotted crimson bag. +dull yellow bags contain 3 plaid aqua bags, 2 dim red bags. +mirrored olive bags contain 4 faded blue bags, 2 posh purple bags, 1 striped brown bag. +vibrant fuchsia bags contain 2 light black bags, 2 vibrant salmon bags. +mirrored black bags contain 4 posh cyan bags, 1 wavy indigo bag. +pale yellow bags contain 2 faded blue bags, 5 muted fuchsia bags, 2 striped brown bags. +pale fuchsia bags contain 1 drab silver bag, 2 clear silver bags, 2 shiny lavender bags. +drab turquoise bags contain 5 drab cyan bags, 5 plaid cyan bags, 3 wavy tan bags. +vibrant red bags contain 4 mirrored beige bags, 2 wavy magenta bags, 1 light cyan bag. +striped red bags contain no other bags. +vibrant brown bags contain 1 dotted tomato bag, 3 vibrant magenta bags, 2 striped beige bags, 4 dull brown bags. +faded chartreuse bags contain 4 light gray bags, 5 striped salmon bags, 5 dark salmon bags, 3 dull orange bags. +mirrored tan bags contain 4 clear chartreuse bags. +light tan bags contain no other bags. +dim blue bags contain 2 dull white bags. +posh tomato bags contain 3 dull indigo bags, 2 striped red bags. +bright blue bags contain 3 shiny crimson bags, 4 muted brown bags, 3 dotted magenta bags, 2 pale salmon bags. +faded gold bags contain 3 clear white bags, 2 dotted turquoise bags, 5 light orange bags. +plaid orange bags contain 1 clear black bag, 3 striped red bags, 4 dark turquoise bags, 4 dull coral bags. +shiny tan bags contain 3 dotted coral bags, 3 posh orange bags, 5 vibrant tan bags. +clear plum bags contain 5 dim beige bags, 1 pale gray bag, 1 clear purple bag, 5 posh coral bags. +bright turquoise bags contain 2 plaid orange bags. +dotted plum bags contain 5 faded olive bags, 5 clear white bags. +shiny green bags contain 4 drab maroon bags, 2 drab purple bags. +plaid tomato bags contain 1 vibrant tomato bag, 2 posh coral bags, 3 faded beige bags, 2 faded chartreuse bags. +wavy lime bags contain 4 striped olive bags, 1 vibrant beige bag. +striped brown bags contain 4 drab gray bags, 2 clear white bags, 3 bright lime bags, 3 vibrant magenta bags. +dark orange bags contain 1 wavy silver bag, 5 muted magenta bags, 1 dim yellow bag, 1 vibrant purple bag. +dotted magenta bags contain 1 mirrored purple bag. +bright black bags contain 5 shiny aqua bags. +clear green bags contain 4 vibrant gold bags, 4 pale gold bags. +drab indigo bags contain 1 bright coral bag, 5 plaid tomato bags, 3 muted chartreuse bags. +shiny fuchsia bags contain 5 dim lavender bags, 2 light teal bags, 4 dim lime bags, 3 wavy purple bags. +vibrant crimson bags contain 1 dim lavender bag, 5 dark tan bags, 1 dotted turquoise bag, 2 striped red bags. +clear red bags contain 5 wavy magenta bags, 2 bright plum bags. +dotted red bags contain 3 pale cyan bags. +striped black bags contain 3 pale red bags, 1 clear beige bag, 3 dull coral bags. +plaid crimson bags contain 4 wavy violet bags, 1 clear gray bag. +muted silver bags contain 1 muted chartreuse bag, 2 shiny bronze bags, 1 striped brown bag, 1 posh coral bag. +drab green bags contain 1 faded white bag, 5 posh orange bags, 2 dim magenta bags, 3 wavy purple bags. +vibrant olive bags contain 5 dark yellow bags, 1 pale black bag, 1 drab olive bag, 5 shiny gold bags. +bright cyan bags contain 2 dim tomato bags, 2 plaid brown bags, 1 bright plum bag, 5 drab lavender bags. +dotted blue bags contain 2 pale tan bags, 1 striped green bag, 2 striped lime bags, 3 shiny tomato bags. +faded yellow bags contain 3 posh maroon bags, 1 dull tomato bag, 2 pale cyan bags. +dark black bags contain 3 shiny purple bags, 2 clear violet bags, 5 wavy brown bags. +vibrant bronze bags contain 5 pale salmon bags. +wavy chartreuse bags contain 1 posh turquoise bag, 1 vibrant silver bag, 3 plaid teal bags, 1 dotted salmon bag. +faded black bags contain 1 light tan bag, 1 faded beige bag. +dim beige bags contain 3 muted fuchsia bags, 5 striped plum bags, 1 faded violet bag, 5 clear chartreuse bags. +striped plum bags contain 1 posh black bag, 2 plaid lime bags, 4 clear white bags. +dotted silver bags contain 2 vibrant gray bags, 5 clear white bags, 2 vibrant tomato bags. +dull salmon bags contain 4 pale plum bags, 2 pale magenta bags, 1 light gray bag. +pale maroon bags contain 3 vibrant white bags. +light blue bags contain 3 mirrored maroon bags. +striped aqua bags contain 5 dark purple bags, 1 striped green bag, 4 mirrored coral bags. +mirrored beige bags contain 1 shiny fuchsia bag, 1 dim plum bag. +pale aqua bags contain 5 mirrored green bags. +dim red bags contain 2 mirrored maroon bags, 4 dotted yellow bags, 5 dim tomato bags, 4 faded silver bags. +light bronze bags contain 1 dim orange bag, 1 posh tomato bag, 5 mirrored white bags. +plaid coral bags contain 5 vibrant tomato bags, 5 pale bronze bags, 3 dotted turquoise bags, 2 drab brown bags. +dull violet bags contain 2 muted chartreuse bags. +wavy teal bags contain 3 shiny plum bags, 5 dark lavender bags. +wavy cyan bags contain 5 faded red bags, 4 light bronze bags, 5 shiny bronze bags, 4 dull silver bags. +faded olive bags contain 4 wavy magenta bags, 1 striped red bag. +drab tomato bags contain 5 plaid cyan bags, 1 plaid chartreuse bag, 1 dim tomato bag. +clear chartreuse bags contain 4 striped brown bags, 2 plaid lime bags. +dull olive bags contain 1 dull purple bag, 2 plaid yellow bags. +dim silver bags contain 3 pale tomato bags, 1 plaid chartreuse bag. +dotted coral bags contain 5 pale salmon bags, 4 dim coral bags, 4 striped fuchsia bags, 2 dim turquoise bags. +bright fuchsia bags contain 4 light gold bags, 3 shiny crimson bags, 3 clear white bags. +bright brown bags contain 1 vibrant tomato bag, 2 wavy teal bags, 3 dotted red bags. +striped cyan bags contain 3 bright lime bags. +clear turquoise bags contain 5 mirrored maroon bags. +posh brown bags contain 5 vibrant silver bags, 4 bright lime bags. +wavy aqua bags contain 4 wavy indigo bags, 1 faded crimson bag, 4 drab indigo bags. +pale chartreuse bags contain 2 faded salmon bags. +clear gold bags contain 2 faded turquoise bags, 1 shiny magenta bag. +muted beige bags contain 5 mirrored indigo bags, 1 clear violet bag. +light white bags contain 1 vibrant magenta bag. +muted cyan bags contain 2 plaid white bags, 5 mirrored black bags, 4 pale gold bags, 5 drab magenta bags. +muted teal bags contain 1 pale orange bag. +vibrant cyan bags contain 2 dotted magenta bags, 1 clear tan bag. +wavy white bags contain 1 faded blue bag. +striped silver bags contain 5 light crimson bags, 4 clear salmon bags, 1 shiny green bag. +shiny teal bags contain 1 wavy coral bag. +dim black bags contain 3 vibrant silver bags, 1 clear maroon bag, 4 bright chartreuse bags. +dim plum bags contain 2 posh coral bags, 3 dark crimson bags, 1 drab olive bag. +wavy bronze bags contain 2 faded olive bags, 2 dim red bags, 2 pale brown bags. +dim turquoise bags contain 3 dull teal bags, 5 shiny bronze bags, 2 striped orange bags, 1 dim fuchsia bag. +posh lime bags contain 4 muted tomato bags, 3 muted brown bags, 1 bright olive bag. +shiny cyan bags contain 3 faded purple bags, 5 wavy chartreuse bags, 4 shiny maroon bags. +pale blue bags contain 2 striped turquoise bags, 2 dull turquoise bags. +muted black bags contain 4 pale turquoise bags, 4 pale beige bags, 4 mirrored black bags. +posh gold bags contain 1 light brown bag, 4 posh yellow bags, 5 dim violet bags. +plaid olive bags contain no other bags. +dotted beige bags contain 4 clear tan bags, 1 shiny fuchsia bag, 3 posh green bags, 4 wavy purple bags. +dull magenta bags contain 3 muted lime bags, 5 mirrored blue bags. +striped green bags contain 5 light cyan bags. +dark white bags contain 2 wavy yellow bags, 5 dim salmon bags, 2 bright green bags. +muted lavender bags contain 3 dotted teal bags, 5 dotted bronze bags, 2 mirrored lime bags, 5 dim fuchsia bags. +dotted indigo bags contain 5 drab chartreuse bags, 1 dim lime bag, 3 plaid white bags, 2 shiny plum bags. +light indigo bags contain 5 bright tan bags. +faded turquoise bags contain 3 faded cyan bags, 4 dull salmon bags, 3 dark bronze bags. +mirrored magenta bags contain 1 clear turquoise bag, 4 wavy plum bags. +dull brown bags contain 5 dim tomato bags. +plaid aqua bags contain 4 bright teal bags, 3 dim gray bags, 3 clear crimson bags, 5 clear chartreuse bags. +drab red bags contain 2 plaid purple bags, 3 muted silver bags. +wavy plum bags contain 3 wavy indigo bags, 3 posh cyan bags. +bright aqua bags contain 1 dim magenta bag. +dotted violet bags contain 4 light orange bags. +wavy salmon bags contain 3 wavy turquoise bags, 1 dark lavender bag, 3 striped silver bags, 3 posh coral bags. +posh beige bags contain 1 pale black bag. +clear bronze bags contain 4 clear teal bags, 3 dim crimson bags. +pale teal bags contain 1 dark bronze bag, 4 plaid maroon bags, 4 light magenta bags. +mirrored violet bags contain 2 clear beige bags. +drab blue bags contain 1 faded yellow bag. +light violet bags contain 4 plaid aqua bags. +vibrant chartreuse bags contain 1 mirrored beige bag. +pale salmon bags contain 5 drab gray bags, 3 muted brown bags, 2 dotted plum bags. +plaid violet bags contain 5 muted blue bags, 4 wavy black bags. +bright tan bags contain 1 bright white bag, 4 posh cyan bags. +vibrant purple bags contain 2 dark plum bags, 4 bright brown bags. +drab tan bags contain 5 dull orange bags, 4 plaid fuchsia bags. +dotted tan bags contain 2 drab violet bags, 1 light turquoise bag, 2 clear indigo bags. +vibrant maroon bags contain 1 drab silver bag, 1 plaid plum bag. +dull white bags contain 2 dotted crimson bags, 1 light orange bag, 2 dark lavender bags, 5 plaid blue bags. +wavy orange bags contain 1 shiny fuchsia bag, 2 clear lavender bags. +faded fuchsia bags contain 2 dim purple bags, 4 muted yellow bags, 3 muted brown bags. +dim tan bags contain 1 shiny purple bag, 5 wavy magenta bags, 4 faded beige bags, 2 vibrant lime bags. +bright white bags contain 1 dim plum bag, 1 light gray bag, 2 muted fuchsia bags. +pale lavender bags contain 2 faded lime bags, 1 faded tan bag, 3 dotted maroon bags. +dim fuchsia bags contain 2 clear lavender bags, 5 dotted red bags, 3 vibrant chartreuse bags. +pale silver bags contain 5 posh black bags. +faded salmon bags contain 4 light white bags, 2 plaid brown bags, 3 vibrant yellow bags. +faded bronze bags contain 5 mirrored white bags, 5 striped plum bags, 4 dim magenta bags, 2 faded lime bags. +shiny gray bags contain 1 striped salmon bag, 3 clear crimson bags. +drab lime bags contain 5 light crimson bags. +bright orange bags contain 4 plaid tomato bags, 1 mirrored bronze bag. +dark crimson bags contain 5 striped red bags. +dull teal bags contain 4 wavy indigo bags, 1 drab brown bag, 3 light cyan bags, 4 dotted gold bags. +light maroon bags contain 2 bright violet bags, 2 dim gray bags, 3 shiny turquoise bags. +faded coral bags contain 4 dark teal bags. +shiny bronze bags contain 3 pale salmon bags, 3 pale plum bags. +dim violet bags contain 3 vibrant magenta bags, 4 shiny bronze bags. +pale red bags contain 5 drab silver bags. +dark tomato bags contain 4 shiny lime bags, 5 wavy purple bags, 4 shiny blue bags, 5 drab gold bags. +dull gold bags contain 5 light olive bags, 1 light gray bag. +posh tan bags contain 4 dull gold bags, 3 vibrant turquoise bags, 2 plaid aqua bags, 5 dim indigo bags. +bright gray bags contain 5 pale yellow bags. +plaid salmon bags contain 3 shiny indigo bags. +dotted bronze bags contain 5 mirrored black bags, 3 muted indigo bags, 3 faded yellow bags, 3 bright teal bags. +mirrored crimson bags contain 2 pale salmon bags, 1 plaid maroon bag. +wavy brown bags contain 1 drab turquoise bag, 3 posh yellow bags. +muted coral bags contain 4 clear blue bags, 5 dark cyan bags. +wavy yellow bags contain 2 drab brown bags, 2 striped olive bags, 1 wavy white bag. +muted aqua bags contain 2 light tan bags, 2 pale yellow bags, 5 plaid lime bags. +drab crimson bags contain 5 plaid cyan bags, 3 dim plum bags. +vibrant yellow bags contain 2 faded maroon bags, 4 mirrored olive bags, 2 plaid red bags. +faded silver bags contain 4 dim lime bags, 4 dark tomato bags, 5 muted magenta bags, 1 dotted red bag. +drab violet bags contain 2 vibrant aqua bags. +faded teal bags contain 2 light gold bags, 5 striped turquoise bags, 2 dim salmon bags, 2 posh tomato bags. +wavy magenta bags contain 4 faded blue bags, 1 muted brown bag, 3 pale brown bags. +vibrant salmon bags contain 2 posh turquoise bags, 1 dark crimson bag. +bright olive bags contain 4 light teal bags, 2 vibrant lime bags, 3 dull salmon bags, 2 dull tomato bags. +plaid teal bags contain 5 striped teal bags. +dark cyan bags contain 3 dull brown bags, 4 posh violet bags. +muted olive bags contain 1 faded blue bag, 5 dotted brown bags. +dark violet bags contain 3 mirrored beige bags. +drab orange bags contain 4 faded aqua bags, 1 striped red bag, 5 mirrored maroon bags. +wavy gray bags contain 4 mirrored green bags. +faded white bags contain 3 dim lavender bags, 3 clear silver bags. +faded lavender bags contain 2 posh violet bags, 4 striped violet bags, 2 clear silver bags, 2 faded cyan bags. +light red bags contain 2 bright white bags, 1 dull gray bag, 3 bright lavender bags. +bright beige bags contain 3 mirrored silver bags. +shiny magenta bags contain 1 light silver bag. +striped teal bags contain 1 plaid lime bag, 2 clear tomato bags, 1 clear chartreuse bag. +dim olive bags contain 5 pale white bags, 5 wavy black bags, 4 faded magenta bags, 4 dark red bags. +dull tan bags contain 3 dark lavender bags, 5 faded violet bags. +striped purple bags contain 5 wavy violet bags, 5 light gold bags. +dim crimson bags contain 5 striped magenta bags. +faded beige bags contain 2 striped brown bags, 3 dark salmon bags. +light purple bags contain 2 bright lavender bags, 5 vibrant lime bags, 3 striped blue bags. +mirrored blue bags contain 2 clear white bags, 2 drab cyan bags, 5 light cyan bags. +dull silver bags contain 1 shiny bronze bag, 1 dotted beige bag. +pale crimson bags contain 2 shiny turquoise bags. +wavy indigo bags contain 5 clear white bags, 5 plaid cyan bags, 1 muted brown bag, 1 pale yellow bag. +bright chartreuse bags contain 3 posh crimson bags, 5 shiny maroon bags. +vibrant silver bags contain 3 striped aqua bags, 5 striped gold bags, 2 dim lime bags, 4 clear chartreuse bags. +dark purple bags contain 4 plaid lavender bags, 3 clear chartreuse bags, 4 striped teal bags. +vibrant turquoise bags contain 1 light gold bag, 1 light turquoise bag, 4 muted indigo bags, 2 wavy magenta bags. +vibrant tan bags contain 1 dull purple bag, 5 vibrant beige bags. +dim salmon bags contain 1 striped violet bag, 5 light teal bags, 5 light tan bags, 5 striped brown bags. +muted violet bags contain 5 bright brown bags, 5 faded aqua bags, 3 clear purple bags, 4 plaid lavender bags. +mirrored gray bags contain 4 drab maroon bags, 3 posh violet bags. +striped blue bags contain 2 plaid cyan bags, 5 pale gold bags. +vibrant gray bags contain 4 pale magenta bags, 4 vibrant bronze bags, 3 drab silver bags, 4 posh tomato bags. +faded tan bags contain 4 plaid olive bags. +muted green bags contain 2 posh cyan bags, 1 plaid lime bag, 5 muted crimson bags. +shiny tomato bags contain 3 wavy violet bags, 4 posh coral bags, 3 striped red bags. +muted plum bags contain 2 plaid salmon bags. +pale indigo bags contain 3 pale cyan bags, 5 vibrant lime bags, 5 vibrant tomato bags. +mirrored fuchsia bags contain 4 posh gray bags, 3 muted tan bags, 4 dim blue bags. +dark lime bags contain 3 clear black bags, 3 dark tomato bags, 2 mirrored black bags. +muted white bags contain 3 shiny black bags, 5 dark purple bags, 3 vibrant silver bags. +striped gray bags contain 5 dark salmon bags. +dotted fuchsia bags contain 1 mirrored red bag, 3 dotted lavender bags. +posh maroon bags contain 1 mirrored beige bag. +vibrant plum bags contain 3 clear red bags. +posh turquoise bags contain 2 shiny magenta bags. +light black bags contain 4 light orange bags, 1 dark salmon bag, 4 striped plum bags. +clear yellow bags contain 1 posh aqua bag. +dim purple bags contain 2 striped green bags. +muted tan bags contain 4 mirrored gray bags, 1 dotted violet bag. +drab silver bags contain 5 clear chartreuse bags, 1 drab olive bag, 2 posh coral bags, 5 bright lime bags. +plaid bronze bags contain 3 wavy black bags, 4 wavy orange bags, 3 dim tomato bags, 3 muted teal bags. +dark green bags contain 5 dull red bags, 3 bright crimson bags, 5 shiny salmon bags, 1 muted purple bag. +bright silver bags contain 1 striped cyan bag. +striped lime bags contain 2 dim magenta bags, 5 faded chartreuse bags, 2 clear indigo bags. +dotted gold bags contain 2 light cyan bags. +drab black bags contain 5 faded red bags, 5 plaid orange bags. +dim magenta bags contain 5 dull coral bags. +light plum bags contain 4 light yellow bags, 5 shiny bronze bags, 5 posh purple bags, 5 plaid olive bags. +dotted cyan bags contain 5 light salmon bags, 4 dull tomato bags, 3 clear blue bags. +posh blue bags contain 4 muted brown bags, 2 muted aqua bags. +posh gray bags contain 4 pale green bags, 2 faded chartreuse bags, 2 drab blue bags. +clear tan bags contain 4 clear gray bags. +mirrored salmon bags contain 1 dull tan bag, 4 mirrored plum bags, 5 muted tan bags, 3 plaid blue bags. +light brown bags contain 1 dim chartreuse bag. +dull lavender bags contain 1 drab white bag, 5 dull indigo bags. +striped violet bags contain 5 muted brown bags, 3 plaid cyan bags, 2 light gray bags. +clear crimson bags contain 1 drab teal bag, 5 dark tan bags, 1 pale salmon bag, 4 dull turquoise bags. +dim white bags contain 3 bright olive bags. +dim green bags contain 4 light silver bags, 1 wavy green bag, 1 striped gold bag. +dull maroon bags contain 4 wavy magenta bags. +striped lavender bags contain 5 faded white bags, 4 mirrored tomato bags, 5 mirrored crimson bags. +faded tomato bags contain 4 pale gray bags. +pale cyan bags contain 1 dull beige bag, 4 light white bags, 5 clear tan bags. +wavy tomato bags contain 5 dotted silver bags, 5 faded gray bags, 1 striped teal bag. +dim tomato bags contain 4 bright lime bags, 3 dim lavender bags, 3 muted tomato bags, 4 dark crimson bags. +striped tomato bags contain 3 plaid chartreuse bags, 4 light cyan bags. +plaid gold bags contain 1 dark yellow bag. +dark silver bags contain 2 dull blue bags, 2 bright purple bags, 5 dim tomato bags. +dotted purple bags contain 4 striped blue bags. +dark fuchsia bags contain 2 light cyan bags. +dotted salmon bags contain 3 drab teal bags, 5 dotted teal bags, 4 vibrant white bags. +mirrored gold bags contain 2 striped salmon bags, 5 pale fuchsia bags, 3 dull purple bags. +posh violet bags contain 1 dim salmon bag, 5 clear gold bags, 1 bright salmon bag. +shiny beige bags contain 2 muted brown bags, 4 shiny gold bags, 5 wavy indigo bags. +plaid cyan bags contain 5 muted tomato bags, 4 drab gray bags, 2 dark crimson bags, 1 striped brown bag. +vibrant lime bags contain 5 dull magenta bags. +clear black bags contain 3 wavy lavender bags. +light coral bags contain 2 pale salmon bags, 1 striped brown bag, 5 mirrored plum bags, 1 drab gold bag. +faded aqua bags contain 2 pale blue bags, 4 drab lavender bags. +wavy gold bags contain 1 dotted plum bag. +shiny turquoise bags contain 4 dull gray bags, 2 dim orange bags. +dull purple bags contain 1 shiny gold bag, 3 plaid olive bags. +dull coral bags contain 1 faded tan bag, 4 clear chartreuse bags, 3 shiny crimson bags, 4 plaid lavender bags. +dull red bags contain 5 dotted beige bags, 4 striped tomato bags, 1 shiny yellow bag. +bright bronze bags contain 2 wavy black bags, 5 mirrored bronze bags. +faded violet bags contain 3 pale yellow bags, 5 posh cyan bags, 5 wavy purple bags, 5 vibrant magenta bags. +shiny blue bags contain 1 dotted teal bag, 4 wavy purple bags, 2 striped brown bags, 3 bright lavender bags. +striped salmon bags contain 2 light tan bags, 4 striped red bags, 1 striped indigo bag, 1 pale gold bag. +shiny silver bags contain 4 faded silver bags, 4 clear maroon bags. +faded crimson bags contain 1 faded bronze bag, 5 dull brown bags, 5 posh plum bags, 3 shiny plum bags. +vibrant tomato bags contain 3 plaid cyan bags, 5 drab teal bags, 5 dotted crimson bags, 5 light tan bags. +plaid red bags contain 2 vibrant gray bags, 5 shiny bronze bags, 5 dull black bags, 2 light yellow bags. +muted red bags contain 2 clear indigo bags, 4 dotted lime bags, 3 dim gray bags, 1 mirrored lime bag. +mirrored chartreuse bags contain 2 dull black bags, 1 dark white bag. +dim gold bags contain 3 plaid blue bags, 2 dotted purple bags. +pale white bags contain 3 pale yellow bags, 1 bright tan bag, 4 striped orange bags, 4 light yellow bags. +light magenta bags contain 3 light black bags, 4 muted turquoise bags. +shiny lime bags contain 1 drab cyan bag. +light teal bags contain 3 dim plum bags, 1 posh black bag, 3 dull beige bags. +plaid black bags contain 4 faded silver bags, 2 faded magenta bags. +clear orange bags contain 1 posh orange bag, 4 bright orange bags, 5 clear indigo bags. +clear coral bags contain 3 faded crimson bags, 1 dull silver bag. +muted lime bags contain 2 dim plum bags. +shiny purple bags contain 5 faded aqua bags. +vibrant gold bags contain 5 drab lavender bags, 4 striped red bags. +clear white bags contain no other bags. +posh aqua bags contain 2 light blue bags, 1 posh turquoise bag, 4 faded teal bags, 3 dotted purple bags. +posh black bags contain no other bags. +mirrored maroon bags contain 4 plaid blue bags, 3 dotted maroon bags, 5 striped plum bags. +dotted crimson bags contain 5 striped salmon bags, 1 pale brown bag, 1 posh black bag, 5 bright lime bags. +striped orange bags contain 4 faded olive bags. +posh teal bags contain 2 faded lavender bags, 3 dim indigo bags. +striped bronze bags contain 2 bright lavender bags, 2 plaid olive bags, 3 vibrant brown bags, 5 pale maroon bags. +dull orange bags contain 3 dark crimson bags, 5 pale salmon bags, 4 vibrant gray bags, 4 plaid olive bags. +clear maroon bags contain 2 wavy gray bags, 2 clear blue bags. +clear tomato bags contain 1 drab olive bag, 2 muted brown bags. +dark aqua bags contain 3 striped white bags. +dull chartreuse bags contain 3 faded tan bags, 3 light orange bags, 2 clear chartreuse bags. +dim cyan bags contain 1 shiny green bag, 4 vibrant brown bags, 4 faded yellow bags, 1 striped aqua bag. +pale orange bags contain 3 drab indigo bags, 4 plaid green bags, 2 wavy lavender bags. +dull cyan bags contain 5 mirrored turquoise bags, 3 posh indigo bags, 5 drab tomato bags, 3 bright aqua bags. +drab brown bags contain 2 clear tan bags, 1 faded yellow bag, 4 vibrant coral bags, 3 mirrored blue bags. +plaid blue bags contain 1 light teal bag, 1 faded tan bag. +dotted orange bags contain 5 dull fuchsia bags, 3 muted brown bags. +muted salmon bags contain 2 wavy coral bags. +pale brown bags contain 4 light tan bags, 3 dim coral bags, 2 plaid olive bags, 4 striped brown bags. +wavy tan bags contain 4 mirrored blue bags, 1 posh purple bag. +mirrored plum bags contain 4 plaid tan bags, 3 wavy yellow bags, 4 vibrant magenta bags, 3 pale lavender bags. +bright purple bags contain 4 dark red bags, 5 clear white bags. +shiny chartreuse bags contain 4 posh plum bags. +shiny violet bags contain 4 mirrored indigo bags, 1 faded beige bag. +drab maroon bags contain 5 posh cyan bags. +dim lavender bags contain 2 vibrant magenta bags, 4 posh black bags, 5 bright lime bags, 3 light tan bags. +shiny gold bags contain 2 muted fuchsia bags, 3 clear silver bags. +wavy violet bags contain 2 vibrant magenta bags, 5 striped red bags, 4 plaid lime bags, 2 bright lime bags. +light beige bags contain 3 pale tan bags. +dotted lavender bags contain 5 dim plum bags, 1 dull magenta bag. +clear teal bags contain 2 plaid yellow bags, 4 light blue bags, 4 striped maroon bags, 1 vibrant olive bag. +faded purple bags contain 2 clear olive bags, 4 mirrored teal bags, 2 plaid gold bags. +pale lime bags contain 5 drab yellow bags, 4 bright coral bags. +plaid beige bags contain 2 faded violet bags, 5 plaid tan bags. +wavy lavender bags contain 5 striped brown bags. +dull tomato bags contain 4 faded olive bags. +plaid plum bags contain 4 faded cyan bags, 2 clear olive bags. +dark gray bags contain 2 dark red bags, 3 clear indigo bags, 5 dim tomato bags. +plaid lavender bags contain 5 plaid green bags, 1 shiny tomato bag. +dim aqua bags contain 5 clear silver bags. +dark salmon bags contain 1 drab olive bag, 5 posh coral bags. +vibrant violet bags contain 3 dim plum bags, 3 dim turquoise bags, 3 striped orange bags. +mirrored red bags contain 3 dull gray bags, 5 mirrored violet bags, 3 vibrant coral bags. +mirrored brown bags contain 3 vibrant tomato bags, 1 wavy lavender bag. +mirrored bronze bags contain 1 striped orange bag, 1 drab gray bag. +dotted lime bags contain 5 drab cyan bags, 3 dotted maroon bags, 2 vibrant white bags, 5 plaid crimson bags. +dotted chartreuse bags contain 5 bright maroon bags. +clear violet bags contain 5 striped orange bags, 2 muted lime bags, 4 vibrant bronze bags, 2 drab silver bags. +plaid magenta bags contain 2 bright blue bags, 2 shiny chartreuse bags. +mirrored orange bags contain 1 striped yellow bag, 1 drab gold bag, 5 striped beige bags, 4 pale brown bags. +drab salmon bags contain 5 clear yellow bags, 1 dark beige bag. +drab magenta bags contain 4 dull gray bags, 4 faded tan bags. +dim maroon bags contain 4 striped teal bags, 5 striped black bags, 2 drab indigo bags, 4 vibrant beige bags. +wavy olive bags contain 5 faded chartreuse bags, 2 dotted lavender bags, 3 wavy brown bags, 3 dim turquoise bags. +light aqua bags contain 3 dark violet bags, 3 posh tomato bags. +dark chartreuse bags contain 3 light plum bags, 4 vibrant chartreuse bags, 3 dotted purple bags, 1 light turquoise bag. +shiny red bags contain 4 dotted maroon bags, 3 dull coral bags, 3 dim coral bags. +dark gold bags contain 3 dim chartreuse bags. +dark turquoise bags contain 4 dark olive bags. +plaid yellow bags contain 1 dark salmon bag, 3 drab olive bags, 4 posh fuchsia bags, 3 mirrored teal bags. +muted tomato bags contain 1 vibrant magenta bag, 2 light cyan bags. +dark brown bags contain 4 muted magenta bags, 3 light turquoise bags, 5 dim silver bags. +dark bronze bags contain 2 striped red bags, 4 vibrant coral bags. +posh fuchsia bags contain 2 faded tan bags. +dark teal bags contain 5 dark salmon bags, 1 faded violet bag, 2 drab olive bags, 4 dim plum bags. +drab yellow bags contain 4 plaid tan bags, 1 dull white bag, 3 dull violet bags. +dotted gray bags contain 2 vibrant lavender bags, 1 striped aqua bag, 5 drab violet bags, 1 light red bag. +drab purple bags contain 5 posh orange bags. +striped crimson bags contain 3 striped salmon bags, 1 posh plum bag, 1 pale orange bag, 5 posh indigo bags. +muted orange bags contain 4 muted silver bags, 4 dotted plum bags, 5 shiny blue bags. +muted gray bags contain 2 muted salmon bags, 3 bright bronze bags, 5 bright brown bags. +dull turquoise bags contain 2 plaid olive bags, 5 striped turquoise bags, 5 muted brown bags, 1 vibrant magenta bag. +dotted maroon bags contain 2 dim salmon bags, 5 clear white bags, 4 wavy black bags. +striped coral bags contain 2 shiny violet bags, 5 plaid maroon bags, 3 bright tan bags, 4 mirrored chartreuse bags. +dark tan bags contain 4 faded white bags. +posh plum bags contain 5 pale brown bags, 3 muted brown bags, 4 posh cyan bags, 1 light turquoise bag. +shiny plum bags contain 4 dull turquoise bags, 1 shiny gold bag. +posh indigo bags contain 1 bright brown bag, 2 dull silver bags. +muted fuchsia bags contain 5 plaid olive bags. +drab bronze bags contain 3 drab coral bags, 3 dull chartreuse bags, 2 posh turquoise bags. +shiny white bags contain 5 dark tan bags, 5 shiny magenta bags. +mirrored green bags contain 5 light maroon bags, 1 light gold bag. +mirrored aqua bags contain 1 striped chartreuse bag, 4 faded coral bags, 1 muted silver bag. +vibrant orange bags contain 3 plaid tan bags. +shiny black bags contain 1 mirrored gray bag, 1 posh fuchsia bag, 3 muted salmon bags, 4 dotted crimson bags. +dark blue bags contain 1 shiny tomato bag, 5 posh beige bags. +bright crimson bags contain 1 striped green bag. +posh chartreuse bags contain 3 dim magenta bags, 2 dull orange bags. +pale gray bags contain 1 drab coral bag. +muted gold bags contain 1 muted orange bag, 5 faded beige bags, 1 wavy tomato bag, 5 posh lime bags. +faded red bags contain 3 dark bronze bags. +striped maroon bags contain 1 dark salmon bag, 4 dim coral bags, 1 posh coral bag. +muted magenta bags contain 4 muted teal bags, 5 dotted turquoise bags, 3 pale plum bags, 4 faded bronze bags. +vibrant aqua bags contain 4 faded crimson bags. +bright teal bags contain 4 bright olive bags, 5 mirrored black bags, 4 drab coral bags, 3 dotted beige bags. +dim orange bags contain 2 shiny fuchsia bags, 3 striped magenta bags. +dotted white bags contain 5 mirrored blue bags, 3 shiny tomato bags, 1 dull coral bag. +clear magenta bags contain 3 dark teal bags, 3 vibrant white bags. +light fuchsia bags contain 5 light violet bags, 2 striped aqua bags. diff --git a/src/adventofcode2020/data/day_08/day08.txt b/src/adventofcode2020/data/day_08/day08.txt new file mode 100644 index 00000000..1134cb63 --- /dev/null +++ b/src/adventofcode2020/data/day_08/day08.txt @@ -0,0 +1,641 @@ +acc -8 +acc +19 +nop +178 +jmp +493 +acc +7 +jmp +267 +jmp +604 +acc +30 +acc +11 +acc -17 +nop +402 +jmp +81 +acc +20 +acc +19 +acc +36 +jmp +6 +acc +43 +acc +6 +acc +10 +nop +326 +jmp +228 +nop +371 +acc +49 +nop +140 +acc -11 +jmp +3 +nop +366 +jmp +74 +nop +229 +jmp +554 +acc +12 +acc +6 +jmp +163 +acc +43 +acc +23 +jmp +310 +acc -6 +nop +341 +acc +50 +acc +44 +jmp +378 +acc +28 +acc +29 +nop +76 +jmp +136 +nop +445 +acc +27 +acc -8 +acc +34 +jmp +199 +acc +39 +acc +25 +acc -14 +acc +1 +jmp +189 +acc +2 +acc -9 +jmp -7 +acc +28 +acc +28 +jmp +458 +jmp +1 +nop +299 +jmp +427 +acc +10 +acc +32 +jmp +340 +acc +26 +jmp +563 +jmp +1 +acc +9 +jmp +42 +acc +4 +jmp +468 +acc +1 +acc +3 +jmp +258 +acc +29 +acc +7 +acc -5 +jmp +288 +acc +22 +acc +32 +acc -6 +jmp +173 +acc +48 +acc +42 +acc +26 +jmp +380 +jmp +126 +acc +45 +jmp -27 +acc +50 +jmp +14 +jmp +472 +acc -19 +jmp +363 +acc +19 +acc -8 +acc +25 +jmp +450 +acc -7 +acc +27 +acc +44 +acc +17 +jmp +487 +jmp +89 +nop +216 +nop +345 +acc -1 +acc +37 +jmp +455 +jmp +294 +acc +20 +acc +38 +jmp +419 +acc +17 +acc +17 +jmp +125 +jmp +81 +acc +37 +acc -8 +acc +9 +acc +31 +jmp +218 +acc +24 +acc +28 +acc -4 +acc -12 +jmp -40 +acc +40 +nop +359 +nop +182 +nop +306 +jmp +296 +acc -8 +jmp +1 +nop +43 +acc -14 +jmp +239 +acc +13 +acc +10 +jmp +1 +jmp -36 +acc -16 +acc +2 +jmp +344 +jmp +442 +acc +35 +acc +2 +acc +27 +acc +17 +jmp -27 +nop +478 +acc +6 +acc +7 +jmp +454 +nop -145 +acc +20 +acc -6 +jmp +182 +nop +251 +jmp -37 +acc +26 +jmp +300 +acc +29 +acc +44 +acc +32 +nop +56 +jmp +31 +acc -16 +jmp +53 +acc -9 +jmp +84 +jmp +1 +nop +30 +acc -15 +jmp +262 +acc -19 +jmp +163 +jmp +441 +acc +27 +jmp +449 +acc +42 +acc +45 +acc +21 +acc +22 +jmp +338 +acc +24 +jmp +301 +acc +42 +acc +42 +acc +26 +jmp +348 +jmp +361 +acc -5 +acc -19 +acc +4 +jmp -117 +jmp +254 +jmp +1 +acc +47 +acc -3 +jmp +271 +jmp +388 +acc +2 +acc -17 +acc +37 +jmp -73 +acc +37 +acc +34 +jmp +1 +jmp -148 +jmp -56 +jmp +103 +acc -5 +acc +23 +acc +3 +jmp +405 +nop +255 +acc +14 +nop -41 +acc +12 +jmp +94 +acc +22 +acc +30 +jmp -107 +acc +12 +acc -2 +jmp +65 +acc +35 +acc -4 +jmp -174 +nop -159 +acc +47 +jmp -52 +acc +35 +jmp +73 +acc +1 +acc +19 +acc +35 +acc +15 +jmp -59 +jmp +312 +acc +20 +acc +25 +acc +45 +jmp -4 +acc -4 +nop -160 +acc -8 +acc +31 +jmp +166 +acc +20 +acc +16 +acc -1 +jmp +234 +acc +0 +jmp -45 +acc +47 +acc +17 +nop -187 +nop +206 +jmp +17 +acc +36 +acc +0 +acc +7 +jmp +263 +acc +32 +acc -6 +nop +35 +jmp -101 +acc +49 +nop -60 +jmp +118 +acc -1 +acc -7 +nop -94 +acc +21 +jmp +82 +nop +216 +acc +5 +nop -99 +jmp -47 +acc +31 +acc +2 +acc +26 +acc +27 +jmp -224 +acc +15 +acc +48 +jmp +220 +nop +152 +jmp -69 +acc +4 +acc +24 +jmp +200 +acc +14 +jmp +126 +acc +48 +acc +47 +acc +10 +jmp +26 +acc +16 +jmp -203 +acc +21 +jmp -158 +acc -15 +acc -13 +jmp -94 +jmp -136 +nop -247 +acc +16 +jmp -130 +acc +31 +jmp +115 +jmp -159 +acc +7 +acc +50 +jmp +52 +acc +22 +acc +26 +jmp +249 +acc -18 +jmp +1 +jmp -251 +nop +254 +jmp -127 +acc +37 +jmp -93 +nop +73 +acc +11 +acc +36 +jmp +277 +acc +29 +acc +16 +jmp -88 +nop +8 +acc +18 +acc +47 +acc -9 +jmp +184 +jmp -142 +acc +50 +jmp +287 +jmp -250 +jmp -296 +jmp -83 +acc +13 +acc +29 +acc +28 +acc +16 +jmp +40 +acc +33 +acc -13 +jmp +43 +nop +275 +acc +24 +nop -257 +nop -65 +jmp -112 +acc +4 +acc +38 +jmp -193 +jmp +1 +acc -18 +acc +15 +jmp -223 +acc -18 +jmp -55 +jmp -207 +acc -6 +jmp -215 +acc +16 +acc +44 +jmp +1 +acc +47 +jmp -35 +acc +47 +acc +47 +acc +35 +jmp +144 +jmp +1 +acc +45 +acc +25 +jmp -293 +acc +32 +jmp -381 +nop +65 +jmp +1 +acc +2 +jmp -74 +acc -13 +acc -9 +acc +4 +jmp -251 +jmp +1 +jmp +71 +acc -12 +acc +7 +acc +15 +jmp +11 +jmp -68 +acc +33 +jmp -330 +jmp +48 +acc -15 +acc -11 +jmp +97 +acc -9 +acc -10 +jmp +100 +acc +29 +acc +21 +jmp -134 +acc -18 +acc +38 +jmp +67 +jmp -12 +acc +27 +acc +26 +acc -8 +acc -2 +jmp -124 +jmp +165 +nop -245 +acc -16 +acc +25 +acc -19 +jmp -328 +nop -182 +acc -7 +acc +46 +jmp -250 +acc +45 +acc -7 +nop -256 +acc -2 +jmp +21 +acc +21 +acc +37 +jmp +156 +nop +32 +jmp -195 +nop -355 +acc -14 +nop -302 +acc +48 +jmp -407 +acc +50 +acc -9 +acc +47 +jmp -110 +acc +31 +acc +37 +acc +15 +jmp -162 +acc -14 +jmp -437 +acc +44 +jmp +1 +acc +24 +jmp -139 +jmp -362 +acc +40 +jmp -41 +acc +38 +jmp -231 +acc +31 +acc +23 +jmp +135 +acc -19 +acc +15 +jmp +148 +acc +16 +acc -18 +acc -3 +acc +1 +jmp -189 +acc -12 +acc -6 +acc -18 +nop -454 +jmp +83 +nop -190 +jmp -17 +acc -7 +acc +34 +acc -1 +jmp +94 +acc +42 +jmp +34 +nop -150 +nop +90 +nop -126 +jmp -161 +acc +5 +acc +11 +acc +20 +acc +38 +jmp -97 +acc +49 +acc +29 +acc +26 +jmp -36 +acc +4 +acc -14 +acc +30 +acc +42 +jmp -192 +jmp -336 +acc +34 +acc +31 +acc +2 +acc +33 +jmp +65 +acc +4 +jmp -459 +nop -399 +acc -6 +nop -256 +jmp -420 +acc -12 +acc -17 +jmp -276 +acc +45 +acc +40 +jmp -180 +acc +50 +jmp -501 +acc +17 +jmp -232 +acc +12 +jmp -109 +nop -291 +nop -345 +jmp +100 +acc +36 +acc +2 +acc -2 +jmp +1 +acc +23 +nop -299 +acc +24 +acc +30 +jmp -476 +acc +0 +acc +6 +acc +49 +jmp +6 +nop -461 +jmp -539 +nop -62 +acc +48 +jmp -526 +jmp -365 +acc +47 +acc +10 +acc +32 +jmp -490 +nop -148 +acc +42 +acc +5 +jmp -358 +acc -5 +jmp -101 +jmp -502 +acc +15 +acc +45 +nop -399 +jmp +1 +acc +31 +acc +47 +acc +49 +jmp -269 +acc +6 +acc +45 +acc -8 +acc -6 +jmp +36 +jmp +51 +acc +39 +jmp -64 +acc +47 +jmp +1 +acc -8 +jmp -102 +acc -8 +jmp -202 +jmp -18 +acc +1 +jmp -484 +acc +35 +acc +30 +acc +49 +jmp -562 +jmp -515 +acc -13 +nop -6 +jmp -369 +acc +27 +acc +18 +nop -477 +acc -10 +jmp -430 +jmp +1 +acc +7 +nop -111 +jmp -445 +jmp +12 +jmp -50 +acc +7 +acc +3 +nop -433 +jmp -390 +acc -5 +acc +50 +jmp -67 +acc +45 +acc -10 +jmp -446 +jmp -496 +jmp -17 +acc +14 +acc +33 +jmp -239 +acc +3 +acc -3 +acc +27 +acc -3 +jmp -162 +jmp -16 +acc +23 +acc +26 +acc +25 +jmp -346 +acc +40 +acc +45 +acc +42 +acc -4 +jmp +1 diff --git a/src/adventofcode2020/data/day_09/day09.txt b/src/adventofcode2020/data/day_09/day09.txt new file mode 100644 index 00000000..f361a719 --- /dev/null +++ b/src/adventofcode2020/data/day_09/day09.txt @@ -0,0 +1,1000 @@ +9 +1 +39 +30 +43 +2 +41 +50 +36 +21 +8 +37 +16 +13 +18 +4 +40 +33 +25 +11 +47 +10 +38 +29 +14 +53 +3 +49 +6 +31 +5 +12 +15 +56 +43 +57 +7 +8 +26 +9 +13 +16 +19 +22 +17 +39 +11 +10 +21 +24 +20 +14 +18 +63 +23 +25 +27 +28 +30 +33 +15 +29 +45 +32 +26 +31 +34 +35 +36 +53 +62 +60 +37 +41 +38 +47 +39 +68 +40 +46 +42 +43 +44 +51 +48 +91 +71 +67 +57 +115 +75 +69 +72 +73 +76 +85 +77 +78 +79 +114 +95 +143 +82 +84 +120 +86 +92 +99 +105 +123 +124 +126 +142 +129 +145 +152 +159 +148 +149 +219 +361 +157 +161 +163 +166 +176 +206 +234 +178 +304 +410 +324 +204 +228 +247 +253 +330 +271 +423 +293 +297 +306 +481 +487 +434 +323 +391 +327 +329 +342 +354 +499 +382 +475 +432 +451 +457 +497 +550 +500 +774 +564 +568 +665 +590 +603 +1064 +650 +681 +677 +652 +656 +1149 +671 +696 +736 +932 +833 +883 +1140 +997 +954 +1047 +1678 +1068 +1342 +1132 +1662 +1240 +1584 +1253 +1302 +1306 +1329 +1323 +1308 +1327 +2631 +2287 +1432 +2044 +1765 +1716 +2561 +1951 +3259 +2734 +2115 +2200 +2308 +2459 +2372 +3612 +4036 +2555 +2559 +2637 +2614 +5328 +3995 +2635 +2759 +3148 +6151 +3383 +3481 +3667 +4066 +4259 +4315 +8711 +4487 +4423 +4508 +5907 +6454 +8682 +8767 +5114 +9013 +6864 +5251 +17695 +6950 +5394 +7143 +6142 +7642 +15631 +9759 +7796 +13026 +12893 +8802 +8738 +8910 +12857 +8931 +10365 +15910 +12596 +10508 +12064 +13190 +10645 +11536 +11393 +12344 +14880 +26216 +13285 +14944 +22023 +19103 +19439 +16534 +17648 +17540 +17669 +17841 +35510 +20467 +19296 +21010 +24408 +21153 +23737 +22038 +23930 +22181 +22929 +24678 +25629 +34182 +53478 +30825 +36836 +47607 +34203 +38572 +40449 +35188 +35209 +84443 +54755 +39763 +40306 +79433 +55335 +43191 +44967 +44219 +45110 +68897 +75408 +69412 +64441 +56454 +91591 +65028 +67661 +69391 +70397 +72775 +122996 +74951 +123652 +117742 +109247 +82954 +80069 +111789 +203721 +87410 +88158 +182186 +143864 +101564 +125351 +329072 +126851 +124115 +121482 +132689 +134419 +197811 +139788 +143172 +210811 +155020 +157905 +204436 +181633 +168227 +379038 +167479 +175568 +188974 +220099 +280371 +223046 +281871 +293578 +349897 +261270 +245597 +254171 +338855 +290594 +359456 +310651 +328762 +298192 +323247 +416290 +439776 +335706 +436838 +412020 +581303 +343047 +364542 +409073 +624918 +578563 +468643 +698311 +499768 +582933 +536191 +755067 +670461 +621439 +588786 +608843 +626954 +737968 +633898 +848849 +967965 +957145 +752120 +776562 +707589 +931833 +811690 +773615 +908841 +1047206 +968411 +1004834 +1757690 +1088554 +1119124 +1553272 +1482151 +1222684 +1937403 +1707910 +1858896 +1584099 +1341487 +1682456 +1459709 +2020387 +1588252 +1481204 +1484151 +1519279 +1585305 +3072403 +1913675 +2131525 +3772571 +1973245 +3068250 +2207678 +2311238 +3522708 +2703888 +2564171 +3227189 +2801196 +2822691 +2860766 +2825638 +2926792 +4846025 +2940913 +3003430 +4556554 +2965355 +3397826 +3104584 +3498980 +3886920 +4121353 +6813712 +5434867 +4875409 +4911566 +5033316 +5015126 +5365367 +5268059 +5386862 +5623887 +5965350 +6045497 +7620333 +5752430 +8008273 +7950609 +7086708 +8119710 +6502410 +6069939 +6603564 +10663996 +7385900 +9154979 +8996762 +9890535 +9786975 +12995119 +12010847 +15200476 +10380493 +12888392 +12115436 +11432359 +11376317 +11717780 +16382662 +11822369 +12254840 +19501336 +19535472 +12572349 +22778927 +32530591 +20271028 +17979881 +21219334 +30911789 +25110555 +29426007 +21812852 +20167468 +21756810 +22098273 +22202862 +37481217 +41924278 +23491753 +22808676 +41292282 +23540149 +24827189 +32073685 +30234721 +50053566 +30552230 +43090436 +54287401 +38147349 +42369301 +55461098 +44015714 +105514664 +41980320 +44565486 +42265741 +42370330 +43855083 +44301135 +81237785 +67346836 +46300429 +96656702 +85996034 +48367338 +53774870 +109748499 +72922560 +60786951 +68699579 +84739631 +86831227 +91922219 +80127669 +119222989 +84246061 +84350650 +85835403 +189876168 +84636071 +86120824 +97629953 +88156218 +90601564 +94667767 +100075299 +155530806 +102142208 +122474449 +109154289 +138125520 +151388515 +172666630 +145423022 +148827248 +164373730 +189281958 +174952214 +164478319 +186492858 +187977611 +229773672 +178757782 +170756895 +172792289 +174277042 +206784242 +185269331 +334288588 +194743066 +209229588 +296885274 +224616657 +231628738 +247279809 +289514035 +294250270 +316179917 +319700064 +313200978 +328852049 +335235214 +389094976 +337270608 +398893699 +343549184 +397408946 +379986483 +358061620 +359546373 +369020108 +380012397 +394498919 +419359723 +514130692 +478908547 +613950334 +471896466 +521142773 +563459726 +583764305 +607451248 +686913669 +654935278 +642053027 +872192312 +672505822 +973496707 +680819792 +701610804 +1034921761 +717607993 +727081728 +728566481 +1235965548 +749032505 +774511316 +915641692 +891256189 +1608864182 +1264584097 +1085846800 +993039239 +1262386526 +1256270127 +1419218797 +1588147514 +1296988305 +1314558849 +1322872819 +1399587550 +2316713995 +1806897881 +1736532565 +1428692532 +1444689721 +1446174474 +2505065597 +1477598986 +1523543821 +2865134309 +2097384135 +1492208709 +1884295428 +2249309366 +2078886039 +2408719619 +2696575855 +2553258432 +2716207102 +2611547154 +2637431668 +3631272844 +2714146399 +3556485025 +3904282016 +5108871830 +3693999087 +2968233542 +2873382253 +2890864195 +6795146211 +5515568272 +3571094748 +3620927956 +6993167258 +3376504137 +3741518075 +8231775374 +4690433193 +4487605658 +5249834287 +5308123009 +5164805586 +5684440644 +5325693553 +5351578067 +5587528652 +5605010594 +5764246448 +7598281103 +8991352362 +10172046302 +15759574954 +6249886390 +15856486946 +6947598885 +6997432093 +7118022212 +12301290267 +8066937330 +7864109795 +8229123733 +9178038851 +15226555826 +10601412354 +13316771617 +13831183778 +23623684749 +14862479495 +15523624369 +10939106719 +14479010123 +11369257042 +12014132838 +13247318483 +24432596132 +13197485275 +13367908602 +13945030978 +18057128931 +14065621097 +16093233528 +18803216514 +17042148646 +15931047125 +22375524126 +26615227085 +19779451205 +21540519073 +21970669396 +35606140170 +26079753935 +22308363761 +22953239557 +23383389880 +24186425202 +24566742317 +24616575525 +25211618113 +26444803758 +57576809566 +26565393877 +27312939580 +43121902581 +29996668222 +43486952404 +32024280653 +49568466642 +32973195771 +41750120601 +47092390785 +44493758630 +67688644898 +47519981874 +46537411713 +47950132197 +45261603318 +45691753641 +47569815082 +86243879231 +48753167519 +62969863993 +49828193638 +51656421871 +53757743338 +53878333457 +56562062099 +95042522982 +74723316372 +76460148175 +64997476424 +79116671438 +114565943066 +118875809881 +92063573712 +91799015031 +97398008720 +90953356959 +92229165354 +92831418400 +105315229618 +141627208669 +161877291717 +96322982601 +116727607331 +98581361157 +260503018550 +114825670062 +105414165209 +211148652663 +146709751857 +152885044700 +359084379707 +139720792796 +163578837581 +144114147862 +170070028397 +189461582432 +222141772540 +182752371990 +203995526366 +183182522313 +185060583754 +209559025731 +189154401001 +335864152858 +194904343758 +293485704915 +201737147810 +213407031219 +220239835271 +245134958005 +249528313071 +463555733312 +331770335611 +402413357771 +283834940658 +303299630377 +307692985443 +327296670175 +417402557585 +408311374977 +365934894303 +513725540186 +444432656829 +398713426732 +368243106067 +525018553859 +503044730646 +522201013933 +396641491568 +465374793276 +587134571035 +832711539302 +433646866490 +735608045152 +720702187962 +533363253729 +630596300552 +649769834961 +591527926101 +610992615820 +634989655618 +675936091510 +693231564478 +762576385871 +764884597635 +1114037346466 +766956532799 +795354918300 +1198127186855 +1064243167042 +830288358058 +862016284844 +918842505501 +1200982838428 +899021659766 +967010120219 +1025174792591 +1044639482310 +1124891179830 +1163959554281 +1209299345239 +1202520541921 +1245982271438 +1226517581719 +1720575573820 +1974183942874 +1780858790345 +1944017298092 +1557931304171 +1531841130434 +1562311451099 +1597244890857 +1625643276358 +1817864165267 +1887191077435 +1797298478277 +2082802059782 +1866031779985 +1924196452357 +1943661142076 +2981823719548 +2069814274901 +2288850734111 +2327411721751 +2455281616677 +2758358712153 +4301595664625 +2472499853157 +3200701524593 +3089772434605 +3094152581533 +3120242755270 +3129086021291 +4269798331434 +4621613565039 +3809692922061 +3222888167215 +4232511876187 +3615162643544 +3663330258262 +3721494930634 +3790228232342 +6886218425477 +3867857594433 +6282192775218 +4358665009012 +6792416279553 +4616262455862 +4782693338428 +4927781469834 +5601585874448 +5562272287762 +6753102692867 +6210015189875 +6183925016138 +6214395336803 +6249328776561 +6351974188506 +7384825188896 +6838050810759 +7032581089276 +6944383097849 +7278492901806 +7453558490604 +13135547202038 +10039557008903 +7658085826775 +8226522603445 +8484120050295 +8974927464874 +14177241468449 +9544043925696 +9398955794290 +16152058487157 +10490053757596 +13158778434652 +11746197303900 +12393940206013 +12398320352941 +12433253792699 +12463724113364 +14329208286745 +13296357286355 +28550378840098 +21290241229596 +13976964187125 +14397941588453 +14732051392410 +15680081094049 +15884608430220 +49840620069694 +16142205877070 +25696102412853 +17459047515169 +39040432597694 +21862679907654 +24131007186700 +19889009551886 +33343655945389 +22236251061496 +24140137509913 +35773617982106 +33185366838241 +24831574145640 +27694298874808 +85614238051800 +52681386026798 +28976438380404 +50786629901594 +37174849659816 +28374905775578 +31856989103622 +39321727422823 +31564689524269 +32026814307290 +33601253392239 +47583308426694 +57553091516475 +65628067699529 +41751689459540 +56069204650386 +57316374024941 +42125260613382 +90738458354716 +48971711655553 +51834436384721 +53206479921218 +52525873020448 +76496577082639 +88881063549210 diff --git a/src/adventofcode2020/data/day_10/day10.txt b/src/adventofcode2020/data/day_10/day10.txt new file mode 100644 index 00000000..3286c1b9 --- /dev/null +++ b/src/adventofcode2020/data/day_10/day10.txt @@ -0,0 +1,92 @@ +47 +61 +131 +15 +98 +123 +32 +6 +137 +111 +25 +28 +107 +20 +99 +36 +2 +97 +88 +124 +138 +75 +112 +52 +122 +78 +46 +110 +41 +64 +63 +16 +93 +104 +105 +91 +27 +45 +119 +14 +1 +65 +62 +118 +37 +79 +77 +19 +71 +35 +130 +69 +5 +44 +9 +48 +125 +136 +103 +140 +53 +126 +106 +55 +129 +139 +87 +68 +21 +85 +76 +31 +113 +12 +100 +24 +96 +82 +13 +70 +72 +86 +26 +117 +58 +132 +114 +40 +54 +133 +51 +92 diff --git a/src/adventofcode2020/data/day_11/day11.txt b/src/adventofcode2020/data/day_11/day11.txt new file mode 100644 index 00000000..cbefdbd7 --- /dev/null +++ b/src/adventofcode2020/data/day_11/day11.txt @@ -0,0 +1,97 @@ +LL.LL.LLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLLLL.LLLL.LLLLLLLL.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.LLLLLLLL.LLLLLLL.LLLLLLLLLLLLLLLLLL +LLLLL.LLLLLL.LLLLLL.LLLLL.LLLLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL +LLLLLLLLLLLL.LLLLLL.LLLLL.LLLLLLL.LLLLLLLLLL.L.LLLLLLLL.LLLLLLLL.LLLLLLL.LLLLLLLLL.LLLLLLLL diff --git a/src/adventofcode2020/data/day_12/day12.txt b/src/adventofcode2020/data/day_12/day12.txt new file mode 100644 index 00000000..d7bc2699 --- /dev/null +++ b/src/adventofcode2020/data/day_12/day12.txt @@ -0,0 +1,755 @@ +F93 +R90 +F81 +E3 +F80 +R90 +W4 +R90 +F64 +N1 +R90 +W4 +F11 +W1 +L180 +F28 +R90 +W4 +L180 +F95 +N3 +F71 +L90 +W1 +F1 +E2 +L90 +F85 +W3 +L90 +F28 +E3 +N5 +F47 +S2 +R90 +N2 +L90 +W4 +L180 +W3 +F51 +F77 +L90 +W5 +N5 +W3 +S5 +W5 +R180 +N1 +W3 +S5 +F36 +W1 +F34 +N4 +F40 +E2 +S3 +R90 +W5 +S2 +N4 +R90 +S2 +L90 +N4 +L90 +S2 +E1 +F2 +N4 +F65 +N1 +F46 +R180 +F60 +N4 +F45 +R90 +S3 +L90 +F70 +W4 +L270 +N4 +F49 +E3 +F52 +R180 +F5 +E5 +R90 +F43 +L90 +S4 +F54 +N1 +F7 +S2 +F91 +S4 +N3 +E3 +S4 +L180 +F15 +S2 +F90 +W5 +S2 +F80 +N4 +L90 +R90 +N4 +E2 +R180 +E5 +F62 +L90 +N5 +F77 +N5 +F75 +E2 +L90 +S4 +F55 +E1 +N5 +F57 +R90 +F6 +L90 +N3 +E5 +L180 +N2 +L270 +N5 +F8 +E2 +F88 +E3 +N3 +E4 +R90 +N1 +W5 +R90 +N4 +E3 +S3 +R90 +N1 +E2 +F4 +N4 +R90 +N3 +W5 +L180 +E1 +F2 +N4 +W5 +F80 +S4 +F7 +L180 +F96 +L90 +F16 +L90 +E4 +F78 +W2 +R90 +S3 +F29 +W4 +R90 +E4 +F39 +N1 +F48 +E4 +L180 +E1 +R180 +E2 +R90 +N3 +R180 +W2 +N5 +W5 +E3 +F25 +E1 +L180 +N5 +F44 +L90 +N4 +W4 +L90 +F72 +L90 +S1 +E5 +N5 +R90 +N1 +W3 +S5 +R90 +W1 +F14 +L90 +W2 +R90 +W3 +F76 +S5 +W5 +F93 +W4 +R90 +F57 +E3 +R90 +S3 +W1 +R90 +S3 +F8 +R90 +N2 +F46 +W4 +S1 +L90 +E4 +W5 +L90 +W2 +F69 +N5 +W5 +F80 +N3 +E4 +L90 +E4 +F25 +S3 +R180 +F77 +R90 +W2 +F19 +E4 +L180 +W2 +F37 +S2 +F68 +L90 +E2 +F66 +S1 +R90 +F66 +E2 +L180 +F97 +N3 +W4 +F43 +S4 +R180 +N1 +R270 +E3 +N2 +N3 +F65 +L90 +S2 +L90 +N3 +L90 +S3 +F23 +L270 +W3 +S5 +E2 +R90 +S1 +F85 +N3 +R90 +W4 +F58 +E1 +L90 +N3 +L90 +E2 +S1 +F14 +E2 +N5 +W1 +N3 +E1 +L90 +E3 +F43 +E3 +N3 +F21 +E4 +F53 +E2 +L180 +E4 +F20 +E2 +N2 +E5 +L90 +N4 +W3 +N4 +S2 +L90 +W3 +F96 +L90 +S3 +R90 +N1 +E3 +S5 +L270 +F41 +N5 +W5 +S1 +W5 +R90 +F79 +W3 +L90 +E3 +F22 +N1 +L90 +E2 +L90 +R90 +F20 +L90 +W3 +R90 +W2 +L180 +W4 +F57 +R180 +N3 +L90 +F36 +L90 +E2 +R90 +N2 +E3 +N1 +W4 +W4 +N3 +E5 +F54 +R180 +F98 +W1 +R90 +F21 +S1 +L90 +S2 +L90 +S2 +F90 +E4 +S2 +R90 +N5 +F25 +N4 +W3 +N2 +F27 +S3 +E3 +N3 +F15 +L180 +S4 +F62 +W2 +L180 +E2 +N2 +L90 +R90 +F97 +R90 +S1 +R90 +E2 +F16 +W2 +E1 +F89 +W1 +L180 +S3 +W2 +S3 +E1 +F92 +F30 +N1 +E2 +S1 +F76 +E1 +S5 +W5 +F28 +W4 +L90 +F44 +E4 +N5 +F25 +R90 +F59 +S4 +F58 +S2 +F19 +W5 +S4 +E5 +N3 +F37 +E1 +L90 +F40 +E5 +F56 +S2 +W5 +F73 +N5 +F2 +L90 +F18 +E2 +N5 +L90 +F56 +R90 +F18 +W1 +S5 +E1 +N1 +L90 +W2 +E4 +N4 +E1 +W4 +N4 +L90 +N3 +R90 +W5 +S5 +F2 +R180 +F96 +R90 +W3 +F26 +L90 +S4 +E2 +F43 +S2 +R90 +F61 +W5 +F93 +R90 +F95 +L90 +E4 +R90 +N4 +F47 +R90 +W5 +L90 +F42 +L90 +W5 +F87 +R90 +N1 +N2 +E4 +F64 +S5 +L270 +F86 +S4 +W3 +S1 +L90 +F72 +R270 +W1 +F17 +S1 +E2 +R90 +W1 +N1 +F42 +N5 +L90 +F87 +F66 +L90 +N2 +W2 +L90 +S5 +F7 +R90 +N4 +L270 +F2 +W1 +N4 +F94 +W5 +R180 +S4 +F15 +E4 +F76 +N1 +E2 +F68 +S3 +F50 +R270 +E5 +F77 +R90 +S3 +E2 +N3 +S4 +F39 +S1 +E5 +S3 +L90 +E4 +S2 +W3 +F54 +R90 +F44 +L90 +W3 +F59 +R90 +N3 +F37 +E1 +F75 +R90 +F31 +W3 +F70 +S5 +L90 +E1 +F67 +W4 +L90 +S1 +W5 +S1 +S4 +W2 +E2 +S3 +R90 +S2 +E5 +L90 +F43 +R90 +E1 +S5 +F42 +L90 +W1 +N2 +E1 +L180 +S4 +W1 +L90 +F81 +E1 +R180 +N5 +R180 +N5 +L180 +F65 +R90 +F64 +W4 +S4 +R90 +F70 +E1 +S1 +F50 +E2 +S4 +E4 +N2 +S1 +R90 +E4 +R90 +F70 +R90 +N4 +F71 +R180 +F80 +S3 +L90 +N5 +L180 +F11 +N1 +R90 +W2 +N1 +R90 +W4 +R90 +F67 +W3 +R90 +W5 +L90 +E4 +F90 +L90 +N4 +L180 +F48 +R90 +W2 +F94 +R90 +N4 +L90 +W2 +F2 +L90 +W1 +E5 +S2 +W5 +S5 +E2 +N3 +W5 +N1 +F98 +S3 +W3 +L90 +S3 +W4 +R90 +W1 +F64 +N5 +R90 +S5 +W5 +F84 +S1 +E3 +L90 +S3 +E5 +F6 +N4 +W1 +R90 +E4 +F14 +N1 +R90 +F31 +L90 +F24 +F4 +N4 +F54 +S3 +R270 +F98 +E1 +L180 +F2 +E4 +F70 +W1 +R180 +N5 +F23 diff --git a/src/adventofcode2020/data/day_13/day13.txt b/src/adventofcode2020/data/day_13/day13.txt new file mode 100644 index 00000000..b1555302 --- /dev/null +++ b/src/adventofcode2020/data/day_13/day13.txt @@ -0,0 +1,2 @@ +1008833 +19,x,x,x,x,x,x,x,x,41,x,x,x,x,x,x,x,x,x,643,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,17,13,x,x,x,x,23,x,x,x,x,x,x,x,509,x,x,x,x,x,37,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,29 diff --git a/src/adventofcode2020/data/day_14/day14.txt b/src/adventofcode2020/data/day_14/day14.txt new file mode 100644 index 00000000..5e1b5bcd --- /dev/null +++ b/src/adventofcode2020/data/day_14/day14.txt @@ -0,0 +1,577 @@ +mask = 0101XX01X00X1X1011X1X000000101X10001 +mem[7625] = 333450 +mem[24015] = 49860 +mem[42377] = 14966 +mem[17961] = 3341 +mem[37065] = 2066541 +mask = 111101XX101X1110110101X01X101X100X0X +mem[17330] = 176272 +mem[20250] = 11696927 +mem[28122] = 103 +mem[23322] = 1224 +mem[20521] = 306265426 +mem[56993] = 5315703 +mask = 0101110101111X0010100000X10X000X1X1X +mem[52304] = 107295284 +mem[48546] = 12756871 +mem[26246] = 794803013 +mem[32041] = 796 +mem[20164] = 6770841 +mem[48951] = 2607 +mask = 110101110110X11X110X100110X110010110 +mem[33686] = 1985 +mem[36236] = 652423 +mem[1772] = 614 +mem[48552] = 61799 +mem[51199] = 1768 +mem[38041] = 13211 +mask = 11XX01011X111110X100X1000X100X0X1001 +mem[10184] = 61765 +mem[17636] = 883 +mem[63317] = 137 +mem[4641] = 602692 +mem[31656] = 7910 +mem[40895] = 3100935 +mask = 1101111100X0X110X0X00X00111000010X01 +mem[12544] = 1947 +mem[10149] = 1246276 +mem[2653] = 116139 +mem[41147] = 5353 +mem[49305] = 186429425 +mem[27914] = 675 +mem[30788] = 2718 +mask = 0101110101110100X010XX11011XX0011101 +mem[45140] = 129899 +mem[54670] = 2700003 +mem[21662] = 5681585 +mem[57364] = 44013091 +mem[11437] = 212 +mem[53267] = 45116 +mask = 11100101101X11101100X010000X10X110X1 +mem[4630] = 919 +mem[14230] = 228044604 +mem[25029] = 189185 +mem[41789] = 497795355 +mem[29298] = 1740608 +mem[55321] = 603 +mask = 00X1111110X010101X0101011X0110100X11 +mem[55427] = 6760330 +mem[16391] = 8497685 +mask = 01110111X010111011001X1101X1001X0011 +mem[59831] = 11449720 +mem[24494] = 21722136 +mask = 1111X011XXX010X0X100010000001001XX10 +mem[10149] = 2044502 +mem[26810] = 1824407 +mem[24894] = 495492533 +mem[13252] = 160075 +mem[23314] = 96205288 +mem[31410] = 123057882 +mask = 1X111011XX1001X011001101101X0X11100X +mem[17518] = 2310 +mem[33686] = 2407271 +mem[55864] = 15074402 +mask = 1101X1X1X011111110001X011010010100X1 +mem[6096] = 54975 +mem[10934] = 358 +mem[57154] = 1490 +mask = 111X0XX10X101110110001X101X0000101X1 +mem[64796] = 210910 +mem[4752] = 3068 +mem[5629] = 1532924 +mem[53057] = 8797918 +mem[16901] = 3392 +mem[971] = 297 +mem[48019] = 80129224 +mask = 11100111001011101100011111X1X0X001X0 +mem[4689] = 6580 +mem[61719] = 506 +mem[3114] = 231484 +mem[26961] = 157879585 +mem[10668] = 8177 +mem[5634] = 2471 +mask = 0101X1011011111X11100001X000010X1X00 +mem[36080] = 46408099 +mem[22073] = 419830102 +mem[35679] = 1702 +mem[53576] = 277386 +mask = 111110010X1001101100X10011XX00000100 +mem[21538] = 12730624 +mem[38041] = 5930570 +mem[41831] = 6150636 +mem[38958] = 152898386 +mem[41147] = 1057472 +mem[13265] = 1434313 +mem[6405] = 841 +mask = 1111X0110110X0101X00X100100101000011 +mem[15676] = 940 +mem[20515] = 97 +mem[23882] = 903041426 +mask = 111110110110011011XX00X11110001X0110 +mem[35745] = 981 +mem[24128] = 11108 +mem[4977] = 1279634 +mask = X1110101011X1110110001010X10X00X0110 +mem[23442] = 1781008 +mem[54225] = 13834 +mem[48910] = 39611 +mem[59114] = 1939 +mem[5139] = 922190 +mask = 1X11X1X1X011X11111011111X011X00010X0 +mem[16307] = 28883 +mem[35549] = 1434246 +mem[63781] = 101884 +mem[56134] = 113928 +mem[24099] = 20077761 +mem[7516] = 5573416 +mem[59069] = 14919 +mask = 11110X010110X11011X011011101X0010101 +mem[43391] = 791798 +mem[2652] = 12659 +mem[4799] = 17430 +mem[62099] = 10386985 +mem[2180] = 55661090 +mask = 1110010XX101XX1011X000100101XX000010 +mem[20835] = 105254603 +mem[39463] = 940293735 +mem[50577] = 2537 +mem[14690] = 130220 +mem[23057] = 121136841 +mask = 1110010101X01110110X01X10110010111X0 +mem[18309] = 297206536 +mem[17182] = 45095 +mem[61572] = 826 +mem[44910] = 2788180 +mem[37318] = 25645 +mem[49915] = 233629 +mask = 1101X010011X1011010001000X000100001X +mem[35857] = 19517506 +mem[5684] = 8268861 +mem[43961] = 777 +mem[65296] = 4313 +mem[11847] = 639775290 +mem[3832] = 5094416 +mask = X101X11100101XXX00100X1X0101X0110X01 +mem[11009] = 156925 +mem[6286] = 290862 +mem[63205] = 985 +mem[26579] = 32557999 +mem[57238] = 5759116 +mem[40172] = 16031 +mask = 011X01X110111110110X1X1XX11000XX10X0 +mem[12977] = 53152 +mem[34861] = 12118 +mem[58473] = 13657 +mem[58199] = 5196811 +mask = 111X0101001X11001X000100X0X11XX1X000 +mem[7162] = 58695 +mem[35819] = 264552401 +mem[41789] = 30314 +mem[49377] = 191785 +mask = 1111001101101XX0X1X00X010001X00XXX10 +mem[2291] = 30592 +mem[63205] = 491496 +mem[38504] = 1049100484 +mem[34919] = 178729 +mem[25424] = 156 +mem[65520] = 58112582 +mem[52035] = 323124091 +mask = X1011101X111X1X01X1001XX01X0000X1111 +mem[33094] = 31397 +mem[51348] = 56754 +mem[14230] = 41266 +mem[20522] = 11648 +mask = 11X101111X1011101X0101X100X1X111X01X +mem[11136] = 3560556 +mem[5587] = 921 +mem[18309] = 67938806 +mask = 11100101X011X1X001001XX000001XX01001 +mem[4833] = 3160 +mem[25408] = 123351536 +mem[25049] = 109348838 +mem[63781] = 390880058 +mem[55179] = 25336 +mem[6968] = 758 +mask = 1X1X010110111X1001001000X0X011001001 +mem[53455] = 9337510 +mem[14234] = 60613906 +mem[27428] = 11014923 +mem[50788] = 476612064 +mem[35743] = 54469469 +mem[1614] = 123865983 +mask = X11110010110011011000X01110000X0X001 +mem[47883] = 31228 +mem[31214] = 64574504 +mem[16405] = 23878 +mem[60239] = 101342 +mem[16684] = 146627857 +mem[16663] = 650 +mask = 1111001100XXX100X10X10001000100X0XX0 +mem[48927] = 5082359 +mem[2881] = 1779 +mem[24736] = 2016486 +mem[39479] = 2018954 +mem[18818] = 225 +mem[31119] = 12745 +mem[63944] = 1033694 +mask = 1110X101101X0X0001000101X01000001X00 +mem[37512] = 43119 +mem[33449] = 14364 +mask = XX01010X1111X1101100X1010011X0111011 +mem[44289] = 10155 +mem[36861] = 484156 +mem[5649] = 6231 +mem[44588] = 13058 +mem[36130] = 117 +mask = 110111X11X111110X11X1010111001X00000 +mem[52268] = 501592648 +mem[5815] = 66091 +mem[41650] = 95926 +mem[59871] = 6758 +mem[51464] = 5743 +mem[60497] = 62281782 +mem[20522] = 93843022 +mask = X0111011001001001100X00110X01X111101 +mem[53275] = 17387 +mem[60055] = 118119 +mem[8006] = 136 +mem[31684] = 438174 +mask = 111100010X1X1110110X01101001X0000000 +mem[7140] = 3017 +mem[29078] = 38418489 +mem[63673] = 171084 +mem[22294] = 3837 +mem[63317] = 313 +mem[27563] = 52466 +mask = 1111X011011X11000100X000011011X10101 +mem[46366] = 3934 +mem[39437] = 100546 +mask = 1111X0X101100110X100X100000XX0X10001 +mem[39576] = 21930920 +mem[65424] = 462 +mem[56340] = 353590342 +mask = 111001X1001111001100XX000XX010010X11 +mem[55316] = 706671322 +mem[25591] = 518584 +mem[50729] = 2900209 +mem[33498] = 11876 +mem[31561] = 259813 +mem[35113] = 147880795 +mask = 110101011X1XX1X0X1001110X0X1110XX000 +mem[29355] = 625 +mem[37409] = 220996783 +mem[37711] = 135727391 +mem[37047] = 3660 +mem[46341] = 426315 +mem[15120] = 1754833 +mask = X110010XXXXX11X01100010X00X100010001 +mem[53073] = 1381843 +mem[13260] = 93739 +mem[37872] = 52 +mem[32740] = 3704961 +mem[59346] = 1171 +mem[29949] = 16961 +mask = 1111X01X01X01X00111X000101XX10100110 +mem[40895] = 8972 +mem[41295] = 54333696 +mem[20850] = 2653 +mem[19282] = 19093 +mem[38608] = 11892 +mem[48832] = 206906 +mem[20432] = 871 +mask = X111001101101010X10X1X0101100X1010X0 +mem[29949] = 23166498 +mem[1906] = 8837 +mem[49790] = 1479345 +mask = 11X10110011X1X110100X0X000100X0100X0 +mem[53057] = 6958067 +mem[56592] = 937 +mem[36056] = 511488563 +mem[59203] = 1751 +mem[37047] = 20461 +mem[46044] = 11961 +mask = 0X011111101X1X10X101X10XX001001X0011 +mem[2180] = 290 +mem[51448] = 1927 +mem[33875] = 617047 +mem[62545] = 38166 +mem[24159] = 769 +mem[56134] = 763869 +mask = 11100X0XXX111110X10011100111000X10X0 +mem[46115] = 74662 +mem[31913] = 7995 +mem[1663] = 3351 +mem[15242] = 7255 +mem[38592] = 1282670 +mem[52969] = 54696 +mem[6096] = 1276 +mask = 1XX101010X111X111X0X0001X01000X100X1 +mem[22073] = 58445318 +mem[24069] = 44324 +mask = 11110011X1101010110X000110X00000011X +mem[16663] = 24384890 +mem[2762] = 37315460 +mem[52499] = 215572 +mem[19346] = 51671 +mask = 1111001100X1010X01X1000X10101X00X0X0 +mem[35139] = 73247 +mem[8006] = 8172 +mem[1578] = 11860073 +mem[45896] = 947482 +mem[58045] = 28856 +mem[8032] = 225912010 +mask = 1X11X0110XXX11X0X1001000X0X111010010 +mem[34167] = 7412 +mem[33617] = 11192 +mem[37247] = 13040665 +mem[64827] = 57758603 +mem[5649] = 520014659 +mem[7105] = 1558987 +mask = 110101XX1010111111000X101111X0000001 +mem[3800] = 328348 +mem[60536] = 66209620 +mem[5063] = 2271 +mem[32395] = 133940 +mem[11737] = 5453 +mem[48512] = 94680 +mask = XX010X10X11110110100X100XX1101010X11 +mem[26620] = 2476136 +mem[33872] = 930 +mem[21275] = 17463 +mem[13265] = 3033 +mem[13058] = 1658898 +mem[40725] = 430 +mask = 110111111X0111101X00100100001001X0XX +mem[18233] = 8421 +mem[17436] = 31387 +mem[53222] = 67556 +mem[20521] = 1141367 +mem[54918] = 2596 +mem[40403] = 1004410657 +mask = 0X1X010110X111X0X11100X001000111101X +mem[17673] = 118390439 +mem[27333] = 7879 +mem[29078] = 15837725 +mask = 01011XX1XX1X10100101010000X101X0000X +mem[59493] = 6025045 +mem[16555] = 21344536 +mask = 110111111X1XXX101010110X001000000101 +mem[39637] = 233 +mem[36506] = 939031780 +mem[47242] = 33211645 +mem[6561] = 217613 +mask = 111101010111X111100X10011X111000X000 +mem[63673] = 3846623 +mem[56658] = 329423 +mem[38481] = 547857 +mask = X1X10X110XX011101100000111011X01000X +mem[48927] = 6384 +mem[43391] = 5514 +mem[21936] = 131847 +mem[43030] = 810434897 +mem[57830] = 35743 +mem[7640] = 305 +mask = 01X11111101110101101001010XXX11XXX1X +mem[60143] = 90582 +mem[32081] = 7673 +mem[14349] = 25972726 +mem[23840] = 86305185 +mem[48353] = 608866275 +mem[62103] = 22452 +mask = 1110XX01X0110100X1001101X01X0110010X +mem[28115] = 27314978 +mem[19040] = 136523686 +mem[62545] = 322784 +mem[35413] = 6136384 +mem[35902] = 77354799 +mem[9741] = 79081 +mem[63898] = 1698818 +mask = XX0X11111X1X10101101XX10111001X0X110 +mem[33891] = 16545 +mem[40774] = 92261 +mem[59203] = 15655 +mem[45590] = 36588183 +mask = 1111010100101110X100X10X1010010X0X00 +mem[48951] = 11761726 +mem[40080] = 61805 +mask = 11111X0100100X1XX10011X101X1X0X11000 +mem[63205] = 2654080 +mem[61251] = 6112 +mem[38917] = 3928 +mem[43961] = 887252 +mask = 1111X0X10X1001101100XX0011000X1X0100 +mem[44267] = 991 +mem[22054] = 129208 +mem[24736] = 2063224 +mask = 000111111011101011X10XX00X0100100111 +mem[35194] = 9210267 +mem[50934] = 1766913 +mem[10934] = 21495328 +mem[610] = 412419 +mem[36953] = 11943 +mask = 1X1X01010010111X11000000X11X00010000 +mem[28679] = 637124 +mem[37318] = 881 +mem[57422] = 2767596 +mask = 1X10X100X1111X1011000X11X1X11110X1X1 +mem[27363] = 25462469 +mem[31504] = 28338 +mem[44316] = 1809290 +mem[15190] = 7443 +mem[50765] = 15365 +mem[40403] = 544499158 +mask = 0110011110XX1110110111X00110X0X1110X +mem[213] = 2945928 +mem[14529] = 34489340 +mem[24633] = 2265142 +mem[14164] = 42798 +mask = X101X1X110X1111011XX10011XX0110100X0 +mem[2881] = 253851450 +mem[38504] = 998965 +mem[49657] = 570454 +mem[971] = 41 +mask = X11101011011X11X110XX1011111X000XX11 +mem[29349] = 1319294 +mem[14166] = 116618287 +mem[53112] = 289785 +mem[55957] = 293394 +mem[4582] = 254866 +mem[18343] = 57127617 +mem[10149] = 15993396 +mask = 1011010X011111X11X01000101100001X001 +mem[21561] = 112597 +mem[13051] = 29108 +mem[12802] = 175602144 +mem[478] = 15086994 +mem[53889] = 55877423 +mem[46492] = 62745 +mem[48353] = 1279694 +mask = 1X1X010X1X110100X1X01101000000X0100X +mem[42565] = 233433 +mem[33409] = 387972295 +mask = 0110010X0110110X1X0X0X10100XX1110001 +mem[20392] = 423739412 +mem[17500] = 362907 +mem[36030] = 53419432 +mem[19860] = 15602203 +mask = 11X10101XX1X111X1X000X00X11000000000 +mem[64796] = 198944 +mem[21525] = 3974377 +mem[11737] = 136209878 +mem[54225] = 444434 +mask = X10111X1XX1XX1101X1010X01000100100X1 +mem[26125] = 490282156 +mem[7498] = 516 +mask = 1111X10X001X11101X00X101X10X1101000X +mem[59368] = 1003333 +mem[5649] = 730126 +mask = 1X0111X1111X01X011100X000X11X1X11X11 +mem[17709] = 6746 +mem[32839] = 3345828 +mask = 11XX0110011X1111010011101101010X0011 +mem[28541] = 60604 +mem[42817] = 1758 +mem[25224] = 902483 +mem[36265] = 120914 +mem[32519] = 5399 +mem[36622] = 834098 +mask = X1X1110101110XX011101110010010011101 +mem[32388] = 1033759874 +mem[63976] = 4606 +mem[64485] = 25543800 +mem[61692] = 64754077 +mem[6489] = 851 +mem[57647] = 8936 +mem[39558] = 10983494 +mask = XXX111111000X010100X0101X100100X0010 +mem[16499] = 450156060 +mem[28412] = 430144217 +mem[6561] = 786352 +mask = 100X0100111111101X001000001XX01X0X01 +mem[32046] = 24306 +mem[48960] = 26990757 +mem[39206] = 4884 +mask = 111X01110X101X101X001100000100011100 +mem[1131] = 1269 +mem[23819] = 14028 +mem[53267] = 104931 +mask = X1010010X1111X1101000X1010010X10XX11 +mem[23882] = 3644 +mem[51931] = 238578 +mem[4752] = 912 +mem[23830] = 1956722 +mem[27068] = 823297352 +mask = 0X0X1101111X0110X1100111010100001100 +mem[37047] = 3669952 +mem[9844] = 63716241 +mem[34635] = 897860 +mem[25683] = 1353 +mem[29342] = 1769 +mem[55576] = 400091397 +mask = X10101011X01XX101XX111011XX011110001 +mem[51710] = 821128099 +mem[33947] = 237866140 +mem[23402] = 1725292 +mem[51603] = 3384 +mem[610] = 21940 +mask = 1111001X01101110010X100101X111X0X000 +mem[62557] = 7498 +mem[1254] = 599 +mem[19803] = 2675 +mask = 110111X11X11111011101X10X1X000X1X0XX +mem[2762] = 258673 +mem[60042] = 20606346 +mem[3212] = 13178507 +mem[8887] = 412915 +mem[18462] = 619 +mem[10311] = 7584 +mem[63816] = 24680261 +mask = 1111011X01101X1XX100000000000X01X000 +mem[29821] = 883 +mem[57154] = 5765093 +mem[35745] = 73 +mask = 101XXX1101011100010010010001010XX111 +mem[4607] = 8269571 +mem[14234] = 6849 +mem[64727] = 3522 +mask = 0X011XX1X01111X0010101X011000110X011 +mem[50853] = 6689303 +mem[26913] = 129493 +mem[8439] = 8784 +mem[42377] = 5663270 +mem[64796] = 175 +mask = 111X001101X01X1011X01111110110110110 +mem[7758] = 28452 +mem[34374] = 559 +mem[3328] = 5312 +mem[46467] = 235850961 +mask = 111101110X1011X0110000010X0XX000100X +mem[17500] = 6530 +mem[16930] = 11847064 +mem[7140] = 188556307 +mem[6232] = 102869047 +mem[39269] = 51308 +mem[28924] = 4828 +mask = 11X10111001011101100X0100000011XX110 +mem[32674] = 684 +mem[12892] = 156288 +mem[21192] = 46944 +mem[48554] = 998041 +mem[18453] = 136061 +mem[22294] = 39009055 +mem[12802] = 63780 +mask = 11110XX1011011101X0X0000001000100X00 +mem[61692] = 1273 +mem[56716] = 12434142 +mem[31684] = 13133132 +mem[16545] = 2489415 +mem[39483] = 1048235210 +mask = 01X1X1X1101X11X011X1010001X101110010 +mem[53092] = 3823 +mem[47384] = 4573 +mem[50275] = 284570347 +mem[1129] = 28366135 +mask = 1X110101X01110111X010X0000000X0XX001 +mem[22024] = 945785 +mem[55321] = 56363 +mem[28412] = 3465 diff --git a/src/adventofcode2020/data/day_15/day15.txt b/src/adventofcode2020/data/day_15/day15.txt new file mode 100644 index 00000000..9cddb5ec --- /dev/null +++ b/src/adventofcode2020/data/day_15/day15.txt @@ -0,0 +1 @@ +7,14,0,17,11,1,2 diff --git a/src/adventofcode2020/data/day_16/day16.txt b/src/adventofcode2020/data/day_16/day16.txt new file mode 100644 index 00000000..0fa48ead --- /dev/null +++ b/src/adventofcode2020/data/day_16/day16.txt @@ -0,0 +1,260 @@ +departure location: 29-458 or 484-956 +departure station: 40-723 or 738-960 +departure platform: 30-759 or 784-956 +departure track: 37-608 or 623-964 +departure date: 31-664 or 685-950 +departure time: 27-498 or 508-959 +arrival location: 36-245 or 269-961 +arrival station: 35-808 or 814-973 +arrival platform: 40-831 or 856-951 +arrival track: 36-857 or 875-971 +class: 43-161 or 167-963 +duration: 25-75 or 91-966 +price: 37-708 or 724-972 +route: 39-370 or 396-971 +row: 47-280 or 299-949 +seat: 41-105 or 125-952 +train: 43-351 or 359-966 +type: 34-575 or 586-965 +wagon: 27-397 or 420-953 +zone: 48-206 or 226-965 + +your ticket: +61,151,59,101,173,71,103,167,127,157,137,73,181,97,179,149,131,139,67,53 + +nearby tickets: +136,368,517,218,187,318,185,172,146,646,804,747,816,625,695,701,420,588,167,302 +144,452,191,495,196,652,878,605,607,61,932,897,539,82,456,806,587,595,153,168 +517,981,569,738,886,608,935,882,943,627,884,644,228,698,640,53,748,570,880,322 +65,428,312,692,61,465,626,312,644,645,539,189,485,182,310,555,442,493,550,275 +701,547,434,796,278,451,179,397,233,645,741,512,442,800,693,213,188,429,654,707 +898,573,456,132,190,898,705,447,875,160,688,592,627,520,434,81,517,634,240,185 +155,433,198,917,513,425,143,149,421,131,815,13,69,887,928,451,497,923,623,347 +908,896,430,539,532,406,439,75,857,134,589,631,552,541,633,933,522,557,807,917 +367,397,712,343,276,195,334,131,137,881,884,912,197,548,817,744,54,226,457,899 +340,453,916,915,430,487,816,543,485,712,703,899,638,756,431,649,364,925,238,815 +525,70,427,894,279,430,792,365,278,946,624,568,371,61,453,595,324,947,598,104 +986,444,243,741,822,745,484,878,457,486,937,368,746,652,126,589,907,317,828,741 +171,830,687,65,815,368,508,799,71,230,560,595,364,303,312,757,112,274,597,881 +917,135,661,130,898,699,618,58,206,73,149,488,458,818,69,803,572,328,888,75 +270,133,228,458,519,56,425,450,277,750,365,538,591,522,925,201,533,982,857,190 +810,599,315,529,515,898,857,605,92,438,629,533,899,491,360,603,537,458,542,597 +307,128,930,489,156,323,924,900,309,216,101,127,312,647,605,491,237,523,746,875 +632,660,660,701,700,106,169,144,341,625,432,196,799,880,808,944,443,200,341,750 +349,881,943,793,541,772,643,171,540,572,647,55,882,569,934,365,944,199,278,568 +703,755,639,929,140,196,897,235,342,79,360,370,302,314,818,786,565,535,186,444 +936,458,393,624,509,563,540,830,788,902,200,628,896,917,795,95,496,332,941,308 +154,234,305,793,927,947,632,661,367,271,273,205,527,638,151,547,285,806,186,328 +641,530,616,660,626,274,368,171,280,149,269,456,658,336,306,194,659,102,318,149 +322,72,125,138,550,365,688,280,442,303,491,509,136,696,996,235,202,704,334,913 +640,571,170,700,803,650,592,545,421,703,600,638,590,242,316,203,3,531,906,233 +424,899,571,333,226,66,159,698,326,330,62,662,140,191,933,742,755,478,349,99 +645,790,316,205,637,935,187,700,565,485,746,947,130,188,436,726,311,827,309,58 +153,200,307,361,169,634,608,312,228,163,313,654,520,511,527,705,300,173,306,433 +125,56,770,177,237,447,425,55,557,192,275,652,160,568,495,508,525,100,487,588 +877,457,275,799,205,889,890,304,568,893,237,825,597,202,911,175,917,164,337,822 +312,306,427,893,562,326,904,931,703,693,946,71,181,631,328,566,552,190,750,709 +91,137,910,193,277,702,142,457,562,335,228,568,672,195,349,139,759,754,946,57 +548,892,303,808,883,514,69,705,942,615,128,822,514,366,54,934,554,420,433,926 +306,518,931,549,652,792,282,808,157,752,60,857,341,104,632,202,806,98,336,940 +144,991,568,185,756,367,893,695,784,631,901,797,607,69,545,696,369,944,948,641 +60,542,350,690,178,793,273,322,688,321,719,433,592,67,518,808,449,758,180,447 +901,740,339,828,898,913,895,284,93,794,789,894,529,238,75,439,519,797,54,890 +301,314,556,624,202,207,161,277,140,138,330,740,908,553,190,432,99,532,789,54 +534,67,160,994,129,272,550,599,657,630,786,556,626,319,245,692,64,948,397,532 +518,545,351,652,920,142,105,706,185,167,268,549,540,184,140,347,597,830,653,753 +275,75,743,916,512,918,162,805,150,798,797,178,67,935,603,300,94,494,491,452 +555,322,542,648,363,787,747,747,909,245,305,203,455,758,920,110,349,150,451,315 +640,309,891,542,541,519,69,720,699,435,799,131,699,686,948,541,520,703,529,696 +918,924,201,345,458,359,821,535,528,431,164,93,563,497,657,187,606,102,325,897 +154,877,828,160,346,675,144,300,304,174,605,708,437,831,934,234,234,911,550,793 +428,128,570,341,530,891,303,184,366,752,485,573,156,277,335,104,217,202,174,149 +500,558,336,927,881,135,640,440,931,242,648,304,338,235,895,232,126,61,308,551 +201,899,52,447,175,624,677,518,519,915,343,788,429,664,647,233,420,276,655,490 +396,884,892,744,877,186,988,203,639,103,143,181,900,510,346,556,631,788,742,177 +630,534,685,517,134,590,908,627,370,525,541,907,320,807,302,186,706,340,815,247 +791,490,78,232,73,273,890,589,543,271,655,169,180,530,441,137,629,918,278,920 +814,0,436,661,362,458,497,787,72,318,900,341,190,130,897,896,487,602,95,904 +918,179,141,508,886,99,307,894,686,634,641,318,546,232,563,165,543,885,705,929 +652,807,144,143,642,265,420,887,55,51,157,513,748,169,420,427,651,692,880,937 +318,565,305,929,754,587,318,308,306,825,568,457,72,218,146,805,160,342,269,70 +555,688,323,557,816,651,229,491,237,795,694,517,931,827,629,586,150,229,108,663 +907,230,149,455,109,536,910,601,801,548,346,942,159,125,158,59,74,174,446,496 +396,756,177,597,157,940,802,337,122,623,795,938,883,746,397,227,741,70,900,55 +536,159,803,195,336,426,228,888,434,911,887,753,888,735,309,185,876,920,799,623 +280,920,396,155,202,367,656,454,454,875,324,24,240,562,885,821,493,519,702,142 +491,199,150,134,433,186,949,200,101,97,546,152,706,788,337,56,760,366,145,857 +644,528,644,422,752,165,351,593,549,347,941,243,244,512,757,537,99,626,905,804 +631,901,747,424,904,510,206,99,594,820,180,910,357,171,231,488,59,328,805,656 +229,923,194,517,656,364,74,485,99,804,943,190,946,343,573,751,392,819,420,236 +616,823,922,633,149,746,565,558,322,593,319,897,695,496,914,568,552,511,94,587 +119,568,129,320,302,305,804,554,232,647,303,194,923,891,915,744,485,551,540,68 +74,336,432,197,715,923,914,527,278,660,910,53,692,452,422,513,568,531,650,944 +787,604,243,646,429,56,73,546,553,883,170,883,432,200,634,701,920,22,54,896 +318,271,875,590,360,445,177,63,999,154,746,637,535,329,92,892,949,204,442,435 +51,558,155,421,441,325,920,568,820,300,804,537,544,423,74,231,91,616,245,312 +659,652,941,431,349,351,50,662,520,646,305,642,96,490,350,697,671,637,495,797 +776,131,949,887,272,457,910,642,940,425,702,176,746,510,271,245,885,928,886,562 +313,420,594,938,946,571,193,999,938,534,161,100,607,136,101,894,934,595,561,590 +269,745,143,347,305,593,722,69,487,662,60,137,569,240,653,71,590,891,648,632 +542,623,629,806,515,178,898,230,496,143,748,509,485,604,518,445,918,981,818,626 +706,303,536,635,196,190,642,884,300,55,179,920,813,634,520,328,796,189,560,101 +239,542,116,685,104,801,759,52,567,436,322,745,628,487,687,520,203,856,191,641 +332,748,664,896,929,593,740,881,318,654,427,148,7,235,939,205,422,348,128,800 +919,553,103,430,426,727,437,663,368,368,795,103,912,751,933,922,361,492,231,516 +231,586,567,204,101,574,762,167,567,567,161,568,317,934,603,510,68,655,892,907 +491,273,431,135,161,192,930,484,167,361,396,197,247,830,938,454,939,363,605,931 +339,888,500,830,328,630,629,750,273,300,279,603,562,103,57,277,127,342,309,306 +733,68,884,341,650,602,804,656,307,891,551,789,201,485,185,488,69,188,183,600 +525,601,168,649,235,519,922,453,130,193,87,105,529,943,799,880,898,788,320,56 +822,164,814,195,519,700,546,896,595,94,916,492,457,745,491,919,597,278,67,894 +703,310,529,551,898,564,857,924,915,538,530,61,529,788,920,819,730,314,493,699 +497,337,168,443,698,502,911,496,700,800,814,905,422,62,493,202,881,820,430,891 +185,794,689,155,191,797,131,103,163,91,897,602,902,154,520,927,686,447,364,277 +927,607,746,440,322,752,202,596,427,101,194,22,346,630,127,128,752,947,561,508 +159,513,441,763,644,856,146,698,527,595,239,439,178,918,142,600,149,494,820,552 +343,557,340,70,452,655,381,883,785,137,130,908,496,653,877,894,940,791,151,433 +169,586,177,757,332,717,367,540,826,536,815,750,542,800,520,792,831,364,324,902 +935,516,687,946,99,337,447,625,936,422,351,518,79,661,149,826,184,457,73,434 +744,289,881,568,484,703,640,334,520,917,828,133,199,328,304,137,345,370,560,439 +804,487,367,273,67,239,739,587,892,697,158,508,929,143,523,909,418,637,184,135 +297,627,931,235,828,324,941,586,703,520,934,634,423,439,941,158,67,180,883,902 +432,155,443,557,254,311,340,450,807,239,277,243,628,817,789,689,591,554,696,517 +307,73,278,429,881,197,328,792,900,918,882,332,105,740,58,758,933,195,92,81 +697,759,167,816,537,430,875,444,790,943,498,649,144,525,655,359,463,909,324,573 +370,883,875,67,428,97,206,143,518,124,920,513,439,201,918,179,791,176,650,641 +792,63,139,564,738,520,175,520,365,591,694,932,631,249,887,438,103,946,174,98 +945,909,559,597,605,270,928,692,881,149,366,571,703,754,784,744,572,898,495,162 +754,316,191,157,704,153,111,551,883,535,362,800,925,130,929,949,425,686,91,923 +551,440,753,714,104,749,691,445,143,340,427,555,277,167,758,606,300,305,314,302 +433,604,649,372,751,889,568,305,654,160,194,536,921,930,573,337,230,552,303,817 +568,926,140,332,144,183,724,924,313,935,132,935,795,535,798,823,146,201,591,233 +351,605,724,662,56,704,443,562,896,787,347,234,793,816,494,561,659,898,552,454 +857,893,188,127,184,93,562,795,125,490,54,243,361,943,276,348,988,818,103,540 +308,787,793,232,426,273,704,397,740,907,830,311,126,100,985,542,628,636,157,485 +650,551,594,909,534,514,277,554,745,432,569,494,582,230,590,922,750,562,126,311 +814,904,444,204,821,160,492,205,324,489,792,912,699,454,828,341,983,275,830,187 +637,924,804,175,948,515,211,604,624,827,746,820,798,742,485,451,785,488,184,100 +153,208,199,827,200,56,530,185,655,821,177,700,148,170,535,337,707,900,343,521 +192,878,310,319,922,133,898,368,794,804,898,96,311,622,787,894,564,690,589,942 +242,899,820,143,58,623,811,52,661,342,702,562,878,146,538,510,307,206,795,900 +928,893,947,827,895,161,275,266,99,338,882,930,227,445,129,50,192,626,337,906 +756,554,564,101,96,287,198,800,192,92,798,639,687,878,932,321,785,694,153,631 +789,743,557,565,915,188,481,740,538,422,159,625,70,270,660,143,139,695,523,701 +437,657,397,336,698,592,329,175,452,913,492,816,492,478,313,923,915,181,819,645 +926,248,489,490,180,526,273,91,819,515,742,875,65,875,62,307,439,930,701,442 +787,892,816,592,332,299,331,786,151,547,161,755,798,95,572,235,499,567,644,311 +754,125,490,559,71,553,514,279,397,437,929,5,204,327,228,132,234,340,560,633 +913,87,426,522,242,240,184,193,708,750,510,558,697,103,151,651,625,332,948,571 +300,427,555,241,423,949,59,230,339,590,685,806,647,914,100,630,544,213,71,100 +755,343,926,350,822,445,943,693,932,200,905,97,129,664,159,916,251,450,557,589 +698,54,529,201,71,55,693,187,488,24,607,915,456,448,179,489,454,160,876,545 +437,756,54,565,445,901,194,206,945,821,349,59,696,496,902,532,166,160,633,150 +101,177,158,698,165,928,572,364,60,545,547,554,706,350,319,200,95,97,327,697 +51,68,223,67,883,827,533,432,949,643,497,906,519,66,312,593,188,97,635,66 +306,98,918,128,664,184,428,140,181,492,758,325,291,922,590,441,231,878,562,789 +468,541,235,433,334,946,192,97,449,940,168,61,495,155,560,639,657,825,587,948 +451,541,754,99,586,534,692,19,132,758,441,366,929,531,420,690,633,876,178,532 +553,331,320,193,887,433,104,817,241,374,91,700,708,498,269,708,151,269,635,739 +630,824,178,166,829,645,68,339,397,747,103,132,857,243,596,204,690,97,898,335 +550,741,634,426,58,381,934,363,456,895,345,487,898,703,99,906,528,498,635,360 +907,934,498,698,793,810,691,275,423,238,313,438,575,425,141,563,322,884,135,201 +14,330,588,105,146,173,309,897,59,176,334,891,785,656,492,315,571,426,104,795 +153,876,887,321,657,931,855,510,362,333,556,92,64,591,180,641,54,179,931,910 +361,328,275,565,359,532,894,133,61,567,701,632,470,67,509,806,626,747,911,271 +2,198,322,698,608,447,817,454,532,68,888,540,690,447,434,921,949,705,946,97 +182,361,485,348,368,922,52,799,433,187,298,369,238,168,693,797,156,631,200,936 +754,553,559,545,685,191,490,634,589,539,392,879,128,105,701,509,549,815,511,687 +882,564,261,156,564,655,455,908,739,359,137,516,485,426,904,933,597,307,349,660 +419,896,64,802,443,543,804,300,746,914,793,593,426,314,489,803,929,743,275,59 +171,636,681,93,927,315,520,587,168,694,50,130,333,441,795,628,702,202,68,920 +139,738,164,895,128,344,806,653,438,887,136,939,351,458,361,239,746,102,510,594 +921,911,367,799,548,897,51,122,366,934,929,229,625,157,685,945,130,513,916,367 +947,195,626,827,707,535,439,700,707,326,657,455,109,179,147,450,599,96,690,159 +438,95,521,520,937,226,794,364,522,127,883,645,424,423,524,704,312,917,1,344 +947,635,455,738,814,740,422,450,793,138,519,988,232,947,792,64,426,65,663,428 +840,367,447,188,909,333,130,245,927,241,73,315,574,173,229,325,273,508,878,689 +882,143,361,90,309,447,909,929,330,234,509,363,743,50,931,756,336,603,516,332 +129,829,154,143,646,350,105,155,524,443,171,65,338,345,336,742,302,644,982,688 +575,739,805,347,944,747,308,509,686,569,928,203,757,92,436,912,822,281,205,808 +744,710,565,141,237,67,694,569,147,434,664,949,700,528,820,623,337,597,68,340 +719,185,486,550,369,316,831,175,420,632,490,629,899,364,912,485,923,657,61,646 +885,276,511,745,789,313,400,545,573,708,687,650,72,692,876,625,202,823,750,608 +74,930,695,875,635,608,335,658,642,689,227,657,743,16,896,142,944,795,167,525 +423,831,603,795,452,351,794,238,857,97,606,360,735,426,426,895,931,336,514,315 +902,227,487,754,520,177,98,191,316,332,745,738,502,645,828,240,148,826,703,541 +136,173,317,265,640,348,653,894,75,686,563,125,949,443,641,183,634,104,650,334 +191,628,943,661,808,657,645,160,316,148,316,637,166,606,652,344,277,943,565,448 +370,949,693,569,147,938,204,926,796,700,880,437,328,891,172,308,5,100,635,145 +498,304,533,453,446,52,184,310,634,527,933,59,405,913,650,624,545,521,59,446 +451,14,454,313,143,799,643,784,485,690,651,58,565,938,330,742,300,756,193,556 +799,103,882,650,785,603,820,317,636,453,111,593,626,902,630,795,638,928,534,527 +303,134,527,820,145,127,548,825,200,232,801,573,594,598,920,456,925,723,593,341 +829,540,461,605,702,534,785,237,587,155,635,143,176,489,930,205,126,705,228,320 +915,144,484,559,142,804,158,76,237,335,921,660,531,370,194,457,891,660,627,508 +426,239,910,745,557,805,435,154,431,795,528,856,989,539,206,346,659,231,182,326 +54,893,815,195,567,142,940,452,628,638,533,319,936,760,547,425,569,695,749,818 +663,157,244,699,323,129,489,510,93,100,143,821,72,543,549,172,335,648,165,228 +597,426,936,829,799,315,787,148,98,259,913,497,200,326,344,641,276,278,201,822 +250,941,689,157,312,639,631,588,572,902,632,334,311,226,921,522,647,240,566,820 +746,928,535,791,342,51,931,167,637,935,155,655,848,831,926,342,881,882,126,136 +437,792,745,628,556,69,91,893,161,436,64,877,186,436,533,679,423,184,552,170 +147,192,755,556,570,199,181,642,103,128,125,549,593,741,934,202,984,435,101,308 +275,948,568,340,538,947,338,156,541,487,334,336,219,561,738,365,530,188,624,422 +531,397,664,617,908,57,93,171,149,364,598,148,875,818,199,823,455,128,328,820 +193,489,794,169,159,365,76,803,75,484,915,634,276,330,229,421,156,98,587,456 +324,159,6,66,237,458,489,167,887,155,530,934,321,53,226,97,748,605,359,179 +744,596,339,431,759,453,889,456,441,130,12,485,927,877,498,561,746,545,457,300 +944,194,517,587,426,489,129,96,136,885,801,788,554,157,457,538,615,154,527,428 +628,485,820,803,883,203,888,599,204,794,784,564,245,692,606,288,327,906,434,146 +510,314,660,644,698,568,262,351,359,513,946,361,657,607,56,310,351,884,624,498 +798,928,439,531,555,159,4,331,742,75,931,790,532,822,425,792,144,196,305,902 +786,751,749,893,808,91,190,445,944,877,921,887,686,165,97,820,135,234,337,662 +829,925,635,819,559,748,205,594,803,71,791,319,449,937,203,132,71,386,62,520 +892,226,631,900,803,172,203,305,495,397,143,175,328,194,72,171,588,130,722,320 +301,518,630,913,143,548,226,132,184,448,304,229,662,231,608,763,245,906,828,437 +453,273,189,550,269,600,441,703,125,299,631,759,436,321,882,125,644,263,815,426 +787,879,590,455,154,203,74,95,334,359,559,314,552,319,513,454,24,299,364,656 +429,437,322,739,827,230,168,197,708,701,186,441,749,312,635,856,445,777,902,635 +946,4,831,146,508,326,450,206,492,662,69,98,897,650,658,547,333,889,197,129 +300,917,642,791,661,825,306,450,278,237,940,943,188,158,138,713,630,946,550,817 +511,340,588,630,545,554,359,443,269,824,325,639,752,829,128,423,493,936,787,123 +928,92,807,754,161,280,317,337,877,493,299,546,940,802,820,877,716,143,707,902 +207,424,789,178,179,552,707,785,275,233,455,598,887,68,921,641,522,754,432,738 +514,116,60,191,534,633,598,427,327,369,341,54,130,599,347,572,707,337,102,232 +807,530,347,364,543,330,695,93,901,190,333,603,615,57,648,697,449,320,592,822 +878,696,303,298,892,366,697,234,754,186,443,572,488,188,172,700,443,935,927,183 +495,147,901,788,647,197,171,925,745,919,701,941,73,568,542,390,429,912,529,131 +800,696,330,793,655,914,59,180,447,816,50,321,806,917,58,51,78,900,430,881 +166,808,924,185,139,428,64,888,659,151,519,336,277,194,91,484,875,488,526,363 +875,172,904,364,919,794,926,236,915,816,816,135,909,118,595,750,530,925,656,193 +807,379,919,57,440,741,931,426,307,757,487,940,487,362,485,195,226,623,323,493 +206,789,424,130,573,831,355,945,60,658,790,368,931,944,548,534,757,942,341,486 +948,280,664,190,126,560,436,885,571,893,550,785,68,281,159,889,881,312,942,705 +557,542,818,697,913,351,635,130,801,930,66,946,351,230,170,260,508,93,438,903 +890,570,314,658,785,245,882,510,325,636,929,322,337,710,923,451,303,550,187,458 +891,790,943,449,689,549,519,588,2,443,304,160,556,240,553,75,320,275,436,572 +56,946,556,623,142,930,875,318,686,285,454,562,637,935,152,902,496,704,97,917 +637,102,294,643,179,522,493,442,546,453,884,185,351,652,178,206,129,341,931,168 +522,626,821,308,198,547,637,792,984,827,693,456,596,330,73,204,646,234,698,149 +198,327,324,564,815,904,947,702,798,70,203,758,233,129,647,96,880,269,2,904 +682,420,455,944,928,168,368,943,947,273,940,556,552,424,924,135,346,324,56,561 +508,101,190,526,934,622,945,925,341,159,586,549,180,703,437,820,65,368,635,396 +748,787,876,487,158,589,169,653,905,334,631,637,329,270,338,615,625,324,238,228 +183,803,751,563,206,204,320,876,13,949,594,647,568,317,750,628,877,155,546,880 +90,818,606,509,636,172,59,599,818,498,435,229,234,801,904,168,802,315,567,458 +522,327,105,857,186,641,131,234,821,154,817,887,718,608,232,140,566,598,804,485 +645,744,827,913,103,602,229,525,569,187,544,163,370,793,450,925,245,510,68,738 +932,365,93,115,147,237,654,137,50,913,485,92,458,787,342,174,898,58,817,910 +315,488,205,645,638,699,235,364,663,74,687,597,771,749,896,631,139,532,897,550 +145,130,336,914,322,76,492,338,359,798,536,64,361,509,917,370,95,586,934,935 +525,544,796,226,96,572,367,916,652,71,634,745,161,998,591,942,547,344,227,626 +794,806,486,897,231,361,808,739,183,370,227,192,69,136,560,439,887,109,269,331 +496,928,270,550,800,179,788,646,197,789,906,511,640,550,904,227,592,81,895,92 +396,334,738,230,104,929,502,137,302,440,927,175,449,169,304,451,421,559,901,513 +899,187,303,161,608,545,638,160,496,537,338,426,516,374,66,303,650,430,453,758 +95,991,554,932,943,95,740,276,323,190,856,697,888,270,498,595,600,786,149,454 +384,155,54,630,181,230,645,58,540,745,548,520,430,935,155,755,171,571,592,892 +892,695,529,937,330,605,60,901,520,539,553,330,205,588,538,472,689,753,934,423 +53,195,67,817,21,625,543,912,368,945,509,183,425,486,367,922,156,829,755,793 +271,337,271,229,827,947,313,163,548,278,823,186,687,747,59,328,149,897,926,892 diff --git a/src/adventofcode2020/day01.py b/src/adventofcode2020/day01.py new file mode 100644 index 00000000..5e617af7 --- /dev/null +++ b/src/adventofcode2020/day01.py @@ -0,0 +1,28 @@ +import logging +import math +from itertools import combinations + +from adventofcode.utils.abstract import FileReaderSolution + +logger = logging.getLogger(__name__) + + +class Day01: + @staticmethod + def compute_factor(input_data, n): + ints = [int(x) for x in input_data.split("\n") if x] + for x in combinations(ints, n): + if sum(x) == 2020: + logger.debug(f"Found the values {x}") + return math.prod(x) + return -1 + + +class Day01PartA(Day01, FileReaderSolution): + def solve(self, input_data: str) -> int: + return self.compute_factor(input_data, 2) + + +class Day01PartB(Day01, FileReaderSolution): + def solve(self, input_data: str) -> int: + return self.compute_factor(input_data, 3) diff --git a/src/adventofcode2020/day02.py b/src/adventofcode2020/day02.py new file mode 100644 index 00000000..531d14dd --- /dev/null +++ b/src/adventofcode2020/day02.py @@ -0,0 +1,88 @@ +import re +from typing import NamedTuple + +from adventofcode.utils.abstract import FileReaderSolution + + +class PassPol(NamedTuple): + at_least: int + at_most: int + letter: str + password: str + + +class Day02: + @staticmethod + def split(input_password) -> PassPol: + """ + Input `7-9 r: rrrkrrrrrnrrmj`, output is PassPol namedtuple + """ + results = re.match(r"(\d*)-(\d*) (.): (\w*)", input_password) + + # Make mypy happy + if not results: + raise ValueError(f"Match not found in {input_password}") + + passpol = PassPol( + at_least=int(results[1]), + at_most=int(results[2]), + letter=results[3], + password=results[4], + ) + return passpol + + +class Day02PartA(Day02, FileReaderSolution): + def validate_passwords(self, policy: PassPol) -> bool: + """ + Validate that `password` is valid, with the PassPol policy list + """ + at_least = policy.at_least + at_most = policy.at_most + letter = policy.letter + + # `letter` must be `at_least` time in the list, and at most `at_most` times + counts = policy.password.count(letter) + if counts < at_least: + # To little + return False + if counts > at_most: + # To much + return False + return True + + def solve(self, input_data: str) -> int: + password_list = [ + self.split(x.strip()) for x in input_data.split("\n") if len(x.strip()) >= 1 + ] + + results = [self.validate_passwords(policy=x) for x in password_list] + return sum(results) + + +class Day02PartB(Day02, FileReaderSolution): + def validate_passwords(self, policy: PassPol) -> bool: + """ + Validate that `password` is valid, with the PassPol policy list + """ + first_char = policy.at_least + second_char = policy.at_most + letter = policy.letter + + # `letter` must be at place first_char - 1 and second_char - 1, + # since it's 1-indexed and not zero indexed + # Exactly one of these positions must contain the given letter, xor. + if (policy.password[first_char - 1] == letter) ^ ( + policy.password[second_char - 1] == letter + ): + return True + else: + return False + + def solve(self, input_data: str) -> int: + password_list = [ + self.split(x.strip()) for x in input_data.split("\n") if len(x.strip()) >= 1 + ] + + results = [self.validate_passwords(policy=x) for x in password_list] + return sum(results) diff --git a/src/adventofcode2020/day03.py b/src/adventofcode2020/day03.py new file mode 100644 index 00000000..e2050fa8 --- /dev/null +++ b/src/adventofcode2020/day03.py @@ -0,0 +1,36 @@ +import math + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day03: + def solve_options(self, input_data: str, right: int, down: int) -> int: + count = 0 + pos = 0 + lines = input_data.rstrip("\n").split("\n") + for idx in range(0, len(lines), down): + line = lines[idx] + pos_mod = pos % len(line) + + if line[pos_mod] == "#": + count += 1 + + pos += right + return count + + +class Day03PartA(Day03, FileReaderSolution): + def solve(self, input_data: str) -> int: + return self.solve_options(input_data, 3, 1) + + +class Day03PartB(Day03, FileReaderSolution): + def solve(self, input_data: str) -> int: + numbers = [ + self.solve_options(input_data, 1, 1), + self.solve_options(input_data, 3, 1), + self.solve_options(input_data, 5, 1), + self.solve_options(input_data, 7, 1), + self.solve_options(input_data, 1, 2), + ] + return math.prod(numbers) diff --git a/src/adventofcode2020/day04.py b/src/adventofcode2020/day04.py new file mode 100644 index 00000000..2eecc743 --- /dev/null +++ b/src/adventofcode2020/day04.py @@ -0,0 +1,132 @@ +import re +from enum import Enum + +from adventofcode.utils.abstract import FileReaderSolution + + +class RequiredFields(Enum): + byr = "Birth Year" + iyr = "Issue Year" + eyr = "Expiration Year" + hgt = "Height" + hcl = "Hair Color" + ecl = "Eye Color" + pid = "Passport ID" + cid = "Country ID" + + @staticmethod + def validate(code, value): + if code != "cid" and value is None: + return False + + if code == "byr": + return 1920 <= int(value) <= 2002 + if code == "iyr": + return 2010 <= int(value) <= 2020 + if code == "eyr": + return 2020 <= int(value) <= 2030 + + if code == "hgt": + # hgt:179cm + unit = value[-2:] + hgt = int(value[:-2]) + if unit == "cm": + return 150 <= hgt <= 193 + if unit == "in": + return 59 <= hgt <= 76 + return False + + if code == "hcl": + regex = r"^(#)([a-z0-9]){6}$" + return re.match(pattern=regex, string=value) + + if code == "ecl": + return value in ("amb", "blu", "brn", "gry", "grn", "hzl", "oth") + + if code == "pid": + regex = r"^([0-9]){9}$" + return re.match(pattern=regex, string=value) + + if code == "cid": + return True + + raise ValueError(f"Unknown Code {code}") + + +class Day04: + @staticmethod + def validate_passport( + passport_lines, requiredfields, skip=None, validate: bool = False + ) -> bool: + if skip is None: + skip = [] + single_line = " ".join([line for line in passport_lines]) + + parts = {} + for field in single_line.split(" "): + k, v = field.split(":") + parts[k] = v + + for field_to_check in requiredfields: + if validate: + if not RequiredFields.validate( + field_to_check.name, parts.get(field_to_check.name, None) + ): + return False + if field_to_check.name not in parts.keys(): + if field_to_check.name in skip: + continue + else: + return False + return True + + +class Day04PartA(Day04, FileReaderSolution): + def solve(self, input_data: str) -> int: + passport_lines = [] + counts = [] + for line in input_data.splitlines(): + if line: + passport_lines.append(line) + else: + counts.append( + self.validate_passport( + passport_lines, + RequiredFields, + skip=["cid"], + ) + ) + passport_lines = [] + # And process the last line + counts.append( + self.validate_passport( + passport_lines, + RequiredFields, + skip=["cid"], + ) + ) + + return sum(counts) + + +class Day04PartB(Day04, FileReaderSolution): + def solve(self, input_data: str) -> int: + passport_lines = [] + counts = [] + for line in input_data.splitlines(): + if line: + passport_lines.append(line) + else: + counts.append( + self.validate_passport( + passport_lines, RequiredFields, skip=["cid"], validate=True + ) + ) + passport_lines = [] + # And process the last line + counts.append( + self.validate_passport( + passport_lines, RequiredFields, skip=["cid"], validate=True + ) + ) + return sum(counts) diff --git a/src/adventofcode2020/day05.py b/src/adventofcode2020/day05.py new file mode 100644 index 00000000..4f674961 --- /dev/null +++ b/src/adventofcode2020/day05.py @@ -0,0 +1,90 @@ +from __future__ import annotations + +from collections import defaultdict +from typing import NamedTuple + +from adventofcode.utils.abstract import FileReaderSolution + + +class BoardingTicket(NamedTuple): + row: int + col: int + ticketnumber: str + + @staticmethod + def from_str(input_str) -> BoardingTicket: + row = Day05.compute_position_row(input_str) + col = Day05.compute_position_col(input_str) + + return BoardingTicket(row=row, col=col, ticketnumber=input_str) + + +class Day05: + @staticmethod + def compute_position_row(input_str: str) -> int: + """Compute binary string to place in the plane, compute the row""" + hi = 128 + lo = 0 + for x in input_str[:6]: + total = hi + lo + if x == "F": + # Lower half + hi = int(total / 2) + else: + # higher half + lo = int(total / 2) + + if input_str[6] == "F": + return lo + else: + return hi - 1 + + @staticmethod + def compute_position_col(input_str: str) -> int: + """Compute binary string to place in the plane, compute the column""" + hi = 8 + lo = 0 + for x in input_str[-3:]: + total = hi + lo + if x == "L": + # Lower half + hi = int(total / 2) + else: + # higher half + lo = int(total / 2) + + if input_str[7] == "R": + return hi - 1 + else: + return lo + + def compute_seat_nr(self, input_str: str) -> int: + col = self.compute_position_col(input_str) + row = self.compute_position_row(input_str) + res = row * 8 + col + print(f"{input_str} = {res} ({row=} {col=})") + return res + + +class Day05PartA(Day05, FileReaderSolution): + def solve(self, input_data: str) -> int: + return max(self.compute_seat_nr(x) for x in input_data.splitlines()) + + +class Day05PartB(Day05, FileReaderSolution): + def solve(self, input_data: str) -> int: + tickets: dict[int, dict] = defaultdict(dict) + for boarding_str in input_data.splitlines(): + boarding_ticket = BoardingTicket.from_str(boarding_str) + tickets[boarding_ticket.row][boarding_ticket.col] = boarding_ticket + + # My ticket is missing; SOO there must be: + # TMT + # Where M is mine, and T = ticket found + for row in tickets: + for col in tickets: + # Check if our the seat next to us is empty, but the set after that is + # filled + if not tickets[row].get(col + 1) and tickets[row].get(col + 2): + return row * 8 + col + 1 + return -1 diff --git a/src/adventofcode2020/day06.py b/src/adventofcode2020/day06.py new file mode 100644 index 00000000..d4f1fec1 --- /dev/null +++ b/src/adventofcode2020/day06.py @@ -0,0 +1,34 @@ +import typing +from collections import Counter + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day06: + pass + + +class Day06PartA(Day06, FileReaderSolution): + def solve(self, input_data: str) -> int: + sum = 0 + for groups in input_data.split("\n\n"): + # Remove newlines and make it a set + letters = set(groups.replace("\n", "")) + sum += len(letters) + return sum + + +class Day06PartB(Day06, FileReaderSolution): + def solve(self, input_data: str) -> int: + sum = 0 + for groups in input_data.split("\n\n"): + # Remove newlines and make it a set + group_counter: typing.Counter[str] = Counter() + for person in groups.splitlines(): + group_counter.update(person) + + # And find how many counts have len(groups.splitlines()) + length = len(groups.splitlines()) + sum += len([x for x in group_counter.values() if x == length]) + + return sum diff --git a/src/adventofcode2020/day07.py b/src/adventofcode2020/day07.py new file mode 100644 index 00000000..2e5f46fd --- /dev/null +++ b/src/adventofcode2020/day07.py @@ -0,0 +1,142 @@ +from __future__ import annotations + +import logging +import re +from dataclasses import dataclass +from typing import Any + +from adventofcode.utils.abstract import FileReaderSolution + +logger = logging.getLogger(__name__) + + +@dataclass +class Bag: + """ + A bag has a color, and contains other bags. This is my node. + """ + + color: str + num_bags: int + contains: dict[Bag, int] # Edge + + def __init__(self, color, num_bags): + self.color = color + self.num_bags = num_bags + self.contains = {} + + def __repr__(self): + return f"" + + def add_bag(self, bag: Bag, number: int): + if bag in self.contains: + raise ValueError(f"Bag {bag=} is already in this bag!") + + self.contains[bag] = number + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, Bag): + return NotImplemented + return self.color == other.color + + def __hash__(self): + return hash(self.color) + + +class Day07: + def __init__(self): + self.bags: dict[str, Bag] = {} + self.root_bag: Bag | None = None + + def from_string(self, input_str: str) -> Bag: + """ + Return a bag with contents: + + vibrant plum bags contain 5 faded blue bags, 6 dotted black bags. + faded blue bags contain no other bags. + dark tan bags contain 4 faded white bags. + """ + + color_regex = r"^([\w\s]+) bags contain ([\w\s,]+)" + color_match = re.match(color_regex, input_str) + if not color_match: + raise ValueError(f"Match not found in {input_str}") + + color = color_match[1] + + logger.debug(f"Root bag with {color=}") + root_bag = Bag(color, 1) + + # See if we have any bags in our bag + contents = [bag.strip() for bag in color_match[2].split(",")] + + for child_bag in contents: + # Remove bag and bags + child_bag = child_bag.replace("bags", "").replace("bag", "").strip() + content_regex = r"^([\d]+) ([\w\s]+)$" + child_match = re.match(content_regex, child_bag) + if child_match is None: + # No bags in this bag + continue + + number = int(child_match[1]) + child_color = child_match[2] + child_bag_inst = Bag(child_color, number) + root_bag.add_bag(child_bag_inst, number) + + # Append root bag to our bags + self.bags[color] = root_bag + return root_bag + + def find_bag(self, color="shiny gold") -> int: + num = [] + for bag in self.bags.values(): + if bag.color == color: + # We cannot ourselves, + continue + res = self.resolve_tree(bag, color) + num.append(res) + + logger.info(f"{bag.color=} can hold: {res=}") + + return sum(num) + + def resolve_tree(self, bag: Bag, color) -> bool: + if bag.color == color: + return True + does_contain_color = any( + [ + self.resolve_tree(self.bags[child_bag.color], color) + for child_bag in bag.contains + ] + ) + return does_contain_color + + def count_bags_for_color(self, color="shiny gold") -> int: + cnt = 1 + for sub_bag in self.bags[color].contains: + # How many times does current sub_bag contain bag? + cnt += self.count_bags_for_color(sub_bag.color) * sub_bag.num_bags + return cnt + + +class Day07PartA(Day07, FileReaderSolution): + def solve(self, input_data: str) -> int: + for bag_line in input_data.splitlines(): + self.from_string(bag_line) + + # Now we should have all the bags? + # Count how many bags can make + res = self.find_bag() + return res + + +class Day07PartB(Day07, FileReaderSolution): + def solve(self, input_data: str) -> int: + for bag_line in input_data.splitlines(): + self.from_string(bag_line) + + # Find out how many bags we need to take with us + # And subtract one for the shiny gold one + res = self.count_bags_for_color("shiny gold") - 1 + return res diff --git a/src/adventofcode2020/day08.py b/src/adventofcode2020/day08.py new file mode 100644 index 00000000..0d54ace3 --- /dev/null +++ b/src/adventofcode2020/day08.py @@ -0,0 +1,51 @@ +from adventofcode2020.handheld import HandHeld +from adventofcode.utils.abstract import FileReaderSolution + + +class Day08: + hh: HandHeld + + def run_handheld(self, instructions: list[str]) -> int: + self.hh = HandHeld() + self.hh.load_instructions(instructions) + return self.hh.run(infite_loop_detection=True) + + +class Day08PartA(Day08, FileReaderSolution): + def solve(self, input_data: str) -> int: + return self.run_handheld(input_data.splitlines()) + + +class Day08PartB(Day08, FileReaderSolution): + def run_until_finished_handheld(self, instructions: list[str]) -> int: + self.hh = HandHeld() + self.hh.load_instructions(instructions) + return self.hh.run_until_finished_return_acc(infite_loop_detection=True) + + def solve(self, input_data: str) -> int: + instructions = input_data.splitlines() + + for location_to_change in range(len(instructions)): + # Create a copy from the instructions and change that + changed_instr = instructions[:] + + if "jmp" in changed_instr[location_to_change]: + changed_instr[location_to_change] = changed_instr[ + location_to_change + ].replace("jmp", "nop") + + elif "nop" in changed_instr[location_to_change]: + changed_instr[location_to_change] = changed_instr[ + location_to_change + ].replace("nop", "jmp") + + else: + # We only change nop and jmp instructions + continue + + # Run the program. If the program returns a value, we are done, else we + # continue + res = self.run_until_finished_handheld(changed_instr) + if res: + return res + return -1 diff --git a/src/adventofcode2020/day09.py b/src/adventofcode2020/day09.py new file mode 100644 index 00000000..e9b19104 --- /dev/null +++ b/src/adventofcode2020/day09.py @@ -0,0 +1,53 @@ +from itertools import combinations + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day09: + def check_preamble(self, integers: list[int], next_number: int) -> bool: + for x, y in combinations(integers, r=2): + if x + y == next_number: + return True + + return False + + def find_first_invalid_number(self, integers: list[int]) -> int: + for i in range(0, len(integers)): + begin = i + end = i + 25 + check_digit = integers[i + 25] + preamble = integers[begin:end] + is_valid = self.check_preamble(preamble, next_number=check_digit) + if not is_valid: + return check_digit + return -1 + + +class Day09PartA(Day09, FileReaderSolution): + def solve(self, input_data: str) -> int: + integers = [int(x.strip()) for x in input_data.splitlines()] + return self.find_first_invalid_number(integers) + + +class Day09PartB(Day09, FileReaderSolution): + def find_slice(self, integers: list[int], num_to_find: int) -> int: + for top in range(0, len(integers)): + for bottom in range(top, len(integers)): + total = sum(integers[top:bottom]) + if total == num_to_find: + # Add the largest and smallest number + cont_range = integers[top:bottom] + return max(cont_range) + min(cont_range) + + if total > num_to_find: + break + return -1 + + def solve(self, input_data: str) -> int: + integers = [int(x.strip()) for x in input_data.splitlines()] + + # First we have the find the first invalid number, again + invalid = self.find_first_invalid_number(integers) + + # And now, we have to find the a slice that adds up to those numbers + return self.find_slice(integers, invalid) diff --git a/src/adventofcode2020/day10.py b/src/adventofcode2020/day10.py new file mode 100644 index 00000000..a6bc2872 --- /dev/null +++ b/src/adventofcode2020/day10.py @@ -0,0 +1,58 @@ +import typing +from collections import Counter, deque + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day10: + def find_diferences(self, joltages: deque) -> typing.Counter: + # Offset higher is +3 + max_joltage = max(joltages) + 3 + + joltages.append(max_joltage) + min_joltage = 0 + differences: typing.Counter[int] = Counter() + + # Take the lowest + + while joltages: + top = joltages.popleft() + diff = top - min_joltage + differences[diff] += 1 + + min_joltage = top + + return differences + + def find_combinations(self, joltages: list[int]) -> int: + connections = {joltages[-1]: 1} + + for adapter in reversed(joltages[:-1]): + connections[adapter] = sum( + connections.get(adapter + i, 0) for i in range(1, 4) + ) + return connections[0] + + +class Day10PartA(Day10, FileReaderSolution): + def solve(self, input_data: str) -> int: + joltages = sorted(int(j.strip()) for j in input_data.splitlines()) + + # Dequee is pronounced as `deck` + dck = deque(joltages) + differences = self.find_diferences(dck) + + one = differences[1] + three = differences[3] + return one * three + + +class Day10PartB(Day10, FileReaderSolution): + def solve(self, input_data: str) -> int: + joltages = sorted(int(j.strip()) for j in input_data.splitlines()) + + joltages.insert(0, 0) + + comb = self.find_combinations(joltages) + + return comb diff --git a/src/adventofcode2020/day11.py b/src/adventofcode2020/day11.py new file mode 100644 index 00000000..5edb2d97 --- /dev/null +++ b/src/adventofcode2020/day11.py @@ -0,0 +1,150 @@ +from abc import abstractmethod +from collections import defaultdict, deque +from typing import Deque + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day11: + count_seats: int + + @abstractmethod + def count_next_to_it(self, grid, row, col) -> int: + """Count the number of seats next to it/ Depends on the part""" + + def str_to_map(self, input_data) -> dict[int, dict]: + grid = {} + for row, line in enumerate(input_data.splitlines()): + grid[row] = {k: v for k, v in enumerate(line)} + + return grid + + def generation(self, grid) -> dict[int, dict]: + # First we will compute the numbers, and then assign it to a new dict + # This works, but it not really performance proof.. + + new_grid: dict[int, dict] = defaultdict(dict) + for row in range(0, len(grid)): + for col in range(0, len(grid[row])): + if grid[row][col] == ".": + new_grid[row][col] = "." + continue + + count = self.count_next_to_it(grid, row, col) + if count == 0: + new_grid[row][col] = "#" + + elif grid[row][col] == "#" and count >= self.count_seats: + # If a seat is occupied (#) and four or more seats adjacent to it + # are also occupied, the seat becomes empty + new_grid[row][col] = "L" + + elif grid[row][col] == "#" and count < self.count_seats: + # Occupied but other then 4, it stays the same + new_grid[row][col] = grid[row][col] + + else: + new_grid[row][col] = grid[row][col] + + return new_grid + + def count_filled(self, grid, char="#") -> int: + rij = [] + for row, value in grid.items(): + rij += value.values() + + return rij.count(char) + + def print_grid(self, grid): + from time import sleep + + sleep(0.1) + print(chr(27) + "[2J") + print("\n") + for row, value in grid.items(): + print("".join(value.values())) + print("\n") + + def run_day(self, input_data): + average: Deque[int] = deque() + + grid = self.str_to_map(input_data) + + while True: + grid = self.generation(grid) + # Filled seats + filled = self.count_filled(grid) + average.append(filled) + # self.print_grid(map) + if len(average) >= 5: + popped = average.popleft() + if popped == filled: + return filled + + +class Day11PartA(Day11, FileReaderSolution): + count_seats = 4 + + def count_next_to_it(self, grid, row, col) -> int: + """Returns how many seats next to this one are filled""" + res = [ + grid.get(row, {}).get(col - 1, 0), # Left + grid.get(row, {}).get(col + 1, 0), # Right + grid.get(row - 1, {}).get(col, 0), # Bottom + grid.get(row + 1, {}).get(col, 0), # Top + # + grid.get(row - 1, {}).get(col - 1, 0), # Bottom Left + grid.get(row - 1, {}).get(col + 1, 0), # Bottom Right + grid.get(row + 1, {}).get(col - 1, 0), # Top Left + grid.get(row + 1, {}).get(col + 1, 0), # Top Right + ] + return res.count("#") + + def solve(self, input_data: str) -> int: + return self.run_day(input_data) + + +class Day11PartB(Day11, FileReaderSolution): + count_seats = 5 + + def find_recursive(self, grid, row, col, drow, dcol, offset=1) -> bool: + """ + Find if a spot is taken. + If a spot is the floor, it will look further. + If the seat is taken, it will return True, else it will return False + """ + spot = grid.get(row + (drow * offset), {}).get(col + (dcol * offset), None) + if spot == ".": + return self.find_recursive(grid, row, col, drow, dcol, offset + 1) + elif spot == "#": + return True + elif spot == "L": + return False + elif spot is None: + # Off the grid + return False + else: + raise ValueError(f"Unknown char at {spot}") + + def count_next_to_it(self, grid, row, col) -> int: + """ + Returns how many seats next to it are empty, but when a a seat + is next to the floor, we look ahead! + """ + res = [ + self.find_recursive(grid, row, col, drow, dcol) + for drow, dcol in ( + (0, -1), # Left + (0, +1), # Right + (-1, 0), # Top + (+1, 0), # Bottom + (-1, -1), # Bottom left + (-1, +1), # Bottom right + (+1, -1), # Top left + (+1, +1), # Top right + ) + ] + return sum(res) + + def solve(self, input_data: str) -> int: + return self.run_day(input_data) diff --git a/src/adventofcode2020/day12.py b/src/adventofcode2020/day12.py new file mode 100644 index 00000000..39f2ed59 --- /dev/null +++ b/src/adventofcode2020/day12.py @@ -0,0 +1,190 @@ +from __future__ import annotations + +import math +from dataclasses import dataclass +from enum import Enum +from typing import NamedTuple + +from adventofcode.utils.abstract import FileReaderSolution + + +class Instruction(NamedTuple): + action: Direction + value: int + + @staticmethod + def from_str(input_str: str) -> Instruction: + return Instruction(action=Direction(input_str[0]), value=int(input_str[1:])) + + +class Direction(Enum): + NORTH = "N" + EAST = "E" + SOUTH = "S" + WEST = "W" + RIGHT = "R" + LEFT = "L" + FORWARD = "F" + + @staticmethod + def get_next(direction: Direction, n: int) -> Direction: + directions = (Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST) + + # Current location: + idx = directions.index(direction) + new_idx = (idx + n) % 4 + return directions[new_idx] + + +class Location(NamedTuple): + vert: int = 0 + horiz: int = 0 + + def __repr__(self) -> str: + if self.vert > 0: + vert = "North" + else: + vert = "South" + + if self.horiz > 0: + horiz = "East" + else: + horiz = "West" + + return f"{abs(self.horiz)} {horiz}, {abs(self.vert)} {vert}" + + +@dataclass +class Ship: + direction: Direction + location: Location + speed_hor: int + speed_vert: int + + def __init__(self, direction: Direction): + self.direction = direction + # Set starting location to 0,- + self.location = Location(0, 0) + # For Part b, set initial speed + self.speed_vert = 1 + self.speed_hor = 10 + + def move(self, delta_vert, delta_horiz) -> Location: + self.location = Location( + vert=self.location.vert + delta_vert, + horiz=self.location.horiz + delta_horiz, + ) + + return self.location + + +class Day12: + ship: Ship + + def compute_manhathan(self) -> int: + return abs(self.ship.location.vert) + abs(self.ship.location.horiz) + + +class Day12PartA(Day12, FileReaderSolution): + def parse_instructions(self, instructions: list[Instruction]): + for inst in instructions: + action = inst.action.value + if action == "F": + # Move the ship forward x number of units + # (Vert, Horizontal) movement + directions = { + Direction.NORTH: (inst.value, 0), + Direction.EAST: (0, inst.value), + Direction.SOUTH: (-1 * inst.value, 0), + Direction.WEST: (0, -1 * inst.value), + } + + delta_vert, deltra_horiz = directions[self.ship.direction] + self.ship.move(delta_vert=delta_vert, delta_horiz=deltra_horiz) + elif action == "R" or action == "L": + # Turn left or right + # We have the values 90, 180 or 270 degrees turning + steps = inst.value // 90 % 4 + + # If we turn left, we go backwards + if action == "L": + steps = steps * -1 + + new_direction = Direction.get_next(self.ship.direction, steps) + self.ship.direction = new_direction + elif action == "N": + self.ship.move(delta_vert=inst.value, delta_horiz=0) + elif action == "S": + self.ship.move(delta_vert=(-1 * inst.value), delta_horiz=0) + elif action == "E": + self.ship.move(delta_vert=0, delta_horiz=inst.value) + elif action == "W": + self.ship.move(delta_vert=0, delta_horiz=(-1 * inst.value)) + else: + raise ValueError(f"Unknown action {action}") + + def solve(self, input_data: str) -> int: + instructions = [ + Instruction.from_str(input_str.strip()) + for input_str in input_data.splitlines() + ] + + self.ship = Ship(direction=Direction.EAST) + + self.parse_instructions(instructions) + + return self.compute_manhathan() + + +class Day12PartB(Day12, FileReaderSolution): + def parse_instructions(self, instructions: list[Instruction]): + for inst in instructions: + action = inst.action.value + if action == "F": + # Move the ship forward x number of units + # (Vert, Horizontal) movement + # Action F means to move forward to the waypoint a number of + # times equal to the given value. + deltra_horiz = self.ship.speed_hor * inst.value + delta_vert = self.ship.speed_vert * inst.value + self.ship.move(delta_vert=delta_vert, delta_horiz=deltra_horiz) + + elif action == "R" or action == "L": + # Turn the speed around: + if action == "R": + angle = math.radians(inst.value * -1) + else: + angle = math.radians(inst.value) + + x = self.ship.speed_hor + y = self.ship.speed_vert + + self.ship.speed_hor = (x * int(math.cos(angle))) - ( + y * int(math.sin(angle)) + ) + self.ship.speed_vert = (x * int(math.sin(angle))) + ( + y * int(math.cos(angle)) + ) + + elif action == "N": + self.ship.speed_vert += inst.value + elif action == "S": + self.ship.speed_vert += -1 * inst.value + elif action == "E": + self.ship.speed_hor += inst.value + elif action == "W": + self.ship.speed_hor += -1 * inst.value + else: + raise ValueError(f"Unknown action {action}") + + def solve(self, input_data: str) -> int: + instructions = [ + Instruction.from_str(input_str.strip()) + for input_str in input_data.splitlines() + ] + + self.ship = Ship(direction=Direction.EAST) + + self.parse_instructions(instructions) + + return self.compute_manhathan() diff --git a/src/adventofcode2020/day13.py b/src/adventofcode2020/day13.py new file mode 100644 index 00000000..f9787bc2 --- /dev/null +++ b/src/adventofcode2020/day13.py @@ -0,0 +1,56 @@ +from adventofcode.utils.abstract import FileReaderSolution + + +class Day13: + @staticmethod + def closest(depart_time, bus_id) -> int: + time = 0 + while True: + if bus_id + time > depart_time: + return (time + bus_id) - depart_time + else: + time += bus_id + + +class Day13PartA(Day13, FileReaderSolution): + def solve(self, input_data: str) -> int: + lines = input_data.splitlines() + depart_time = int(lines[0]) + bus_ids = [int(bus_id) for bus_id in lines[1].split(",") if bus_id != "x"] + + times = {} + for bus in bus_ids: + times[bus] = self.closest(depart_time=depart_time, bus_id=bus) + + # key = does not play nice with mypy + min_bus_id = min(times, key=times.get) # type: ignore + + return min_bus_id * times[min_bus_id] + + +class Day13PartB(Day13, FileReaderSolution): + def solve(self, input_data: str) -> int: + lines = input_data.splitlines() + + start_times = {} + for i, value in enumerate(lines[1].split(",")): + if value != "x": + start_times[int(value)] = i + + # What happends: + # Bus 7 : Match every 7 times + # This means we can increase the step with 7 + # Bus 13: Match every 13 times + # This means we can increate the step size with 7 * 13 + # Bus 59: Match every 59 times: + # This means we can increase the stepsize with 7 * 13 * 59 + # We are increasing the steps until we find the right solution + t, step = 0, 1 + for bus_id, mins in start_times.items(): + # check to see if bus is departing at current time + while (t + mins) % bus_id != 0: + t += step + # increase step multiple to find next min for next bus + step *= bus_id + + return t diff --git a/src/adventofcode2020/day14.py b/src/adventofcode2020/day14.py new file mode 100644 index 00000000..e74909cf --- /dev/null +++ b/src/adventofcode2020/day14.py @@ -0,0 +1,145 @@ +import re +import typing +from abc import abstractmethod +from collections import defaultdict +from dataclasses import dataclass + +from adventofcode.utils.abstract import FileReaderSolution + + +@dataclass +class Instruction: + address: int + value: int + + +@dataclass +class Program: + bitmask: str + entries: list[Instruction] + + +class Day14: + memory = typing.DefaultDict[int, int] + + @staticmethod + def parse_programs(input_data: str) -> list[Program]: + parts = input_data.split("mask") + programs = [] + for part in parts: + if not part: + continue + + lines = part.splitlines() + mask = lines[0].replace("=", "").strip() + + entries = [] + for line in lines[1:]: + matches = re.match(r"mem\[(\d*)] = (\d*)", line) + if not matches: + raise ValueError(f"Match not found in {line}") + + group = matches.groups() + entries.append(Instruction(address=int(group[0]), value=int(group[1]))) + + prog = Program(bitmask=mask, entries=entries) + programs.append(prog) + return programs + + def compute_sum(self) -> int: + return sum(self.memory.values()) # type: ignore + + @abstractmethod + def process_programs(self, programs: list[Program]): + """Process the program based on the version""" + + def solve(self, input_data: str) -> int: + self.memory = defaultdict(int) # type: ignore + + programs = self.parse_programs(input_data) + self.process_programs(programs) + return self.compute_sum() + + +class Day14PartA(Day14, FileReaderSolution): + def process_programs(self, programs: list[Program]): + """ + Process the instructions in the `programs` list + mask: + x - Don't case + 1 - Leave at 1 + 0 - Leave at 0 + """ + for prog in programs: + bits_zero = int(prog.bitmask.replace("X", "1"), 2) + bits_one = int(prog.bitmask.replace("X", "0"), 2) + + for instr in prog.entries: + value = instr.value + # Bitwise mask zero to zero, keeping X as 1 + value &= bits_zero + # Bitwise OR, keeping X as 0 + value |= bits_one + + self.memory[instr.address] = value # type: ignore + + +class Day14PartB(Day14, FileReaderSolution): + @staticmethod + def set_bit(value, bit_value, bit): + return value | (bit_value << bit) + + @staticmethod + def clear_bit(value, bit): + return value & ~(1 << bit) + + @staticmethod + def mask_to_addresses(address: int, mask: str) -> list[int]: + """ + Convert a mask, for example + 000000000000000000000000000000X1001X + With the address 42 + to all the applicable masks: + 000000000000000000000000000000011010 (decimal 26) + 000000000000000000000000000000011011 (decimal 27) + 000000000000000000000000000000111010 (decimal 58) + 000000000000000000000000000000111011 (decimal 59) + """ + # First apply a mask + bits_one = int(mask.replace("X", "0"), 2) + + # Bitwise mask zero to zero, keeping X as 1 + # Bitwise OR, keeping X as 0 + address |= bits_one + + # Apply X again: + addresses = [] + x_positions = [35 - n for n in range(len(mask)) if mask.find("X", n) == n] + + for bits in range(pow(2, len(x_positions))): + new_adr = address + bit_string = f"{bits:036b}"[::-1] + for idx, pos_index in enumerate(x_positions): + # Convert bits integer to bits, and put every bit on the right place + new_adr = Day14PartB.clear_bit(new_adr, pos_index) + bit_value = int(bit_string[idx]) + new_adr = Day14PartB.set_bit(new_adr, bit_value, pos_index) + + addresses.append(new_adr) + return addresses + + def process_programs(self, programs: list[Program]): + """ + Process the instructions in the `programs` list + mask. But this time, the mask is for the address line + X - Floating, 0 or 1 + 1 - Overwrite with 1 + 0 - Keep as is + """ + for prog in programs: + for entry in prog.entries: + addresses = self.mask_to_addresses( + mask=prog.bitmask, address=entry.address + ) + for address in addresses: + self.memory[address] = entry.value # type: ignore diff --git a/src/adventofcode2020/day15.py b/src/adventofcode2020/day15.py new file mode 100644 index 00000000..c0edcff7 --- /dev/null +++ b/src/adventofcode2020/day15.py @@ -0,0 +1,52 @@ +from collections import defaultdict +from typing import DefaultDict + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day15: + number_storage: DefaultDict[int, list] + round: int + + def process_number(self, number: int) -> int: + spoken_list = self.number_storage[number] + if len(spoken_list) == 0: + # Has never been spoken before, add it to the list and return 0 + self.number_storage[number] = [self.round] + return 0 + elif len(spoken_list) == 1: + # Has been spoken once before, add new round to the list and return + # 0 ? + self.number_storage[0].append(self.round) + return 0 + else: + # Has been spoken a few times before, fetch the latests rounds: + diff = self.number_storage[number][-1] - self.number_storage[number][-2] + self.number_storage[diff].append(self.round) + return diff + + +class Day15PartA(Day15, FileReaderSolution): + def solve(self, input_data: str) -> int: + start_numbers = [int(nr.strip()) for nr in input_data.split(",")] + + # Defaultdict will store the number + the rounds that it was last used + self.number_storage = defaultdict(list) + self.round = 1 + + for number in start_numbers: + self.process_number(number) + self.round += 1 + else: + number = 0 + + while self.round <= 2020: + number = self.process_number(number) + self.round += 1 + + return number + + +class Day15PartB(Day15, FileReaderSolution): + def solve(self, input_data: str) -> int: + raise NotImplementedError diff --git a/src/adventofcode2020/day16.py b/src/adventofcode2020/day16.py new file mode 100644 index 00000000..2b9609ee --- /dev/null +++ b/src/adventofcode2020/day16.py @@ -0,0 +1,159 @@ +import math +import re +from typing import NamedTuple + +from adventofcode.utils.abstract import FileReaderSolution + + +class Ticket(NamedTuple): + rule: str + upper_range_1: int + lower_range_1: int + upper_range_2: int + lower_range_2: int + + @staticmethod + def parse_input(rule: str) -> "Ticket": + """ + Parse input, for example: + departure track: 37-608 or 623-964 + """ + regex = r"^(.*): (\d*)-(\d*) or (\d*)-(\d*)" + results = re.match(regex, rule) + + if not results: + raise ValueError("Rule is not valid") + + return Ticket( + rule=results[1], + lower_range_1=int(results[2]), + upper_range_1=int(results[3]), + lower_range_2=int(results[4]), + upper_range_2=int(results[5]), + ) + + def is_valid(self, number) -> bool: + """Is this number valid?""" + if ( + self.lower_range_1 <= number <= self.upper_range_1 + or self.lower_range_2 <= number <= self.upper_range_2 + ): + return True + else: + return False + + +class Day16: + ticket_rules: list[Ticket] + my_tickets: list[int] + nearby_tickets: list[list[int]] + + def parse(self, input_data): + rules, my_tickets, nearby = input_data.split("\n\n") + self.ticket_rules = [ + Ticket.parse_input(rule) for rule in rules.split("\n") if rule + ] + self.my_tickets = [ + int(ticket) for ticket in my_tickets.split("\n")[1].split(",") + ] + + rows = [row.split(",") for row in nearby.split("\n")[1:] if row] + + self.nearby_tickets = [] + for row in rows: + self.nearby_tickets.append([int(x) for x in row]) + + +class Day16PartA(Day16, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.parse(input_data) + numbers = [val for sublist in self.nearby_tickets for val in sublist] + error = [] + for number in numbers: + valids = [rule.is_valid(number) for rule in self.ticket_rules] + if not any(valids): + error.append(number) + + return sum(error) + + +class Day16PartB(Day16, FileReaderSolution): + def remove_invalid_tickets(self): + """Remove the invalid tickets from self.nearby_tickets""" + valid_tickets = [] + for ticket in self.nearby_tickets: + valids = [] + for number in ticket: + valids.append( + any([rule.is_valid(number) for rule in self.ticket_rules]) + ) + if all(valids): + valid_tickets.append(ticket) + self.nearby_tickets = valid_tickets + + def compute_mapping(self) -> dict[str, int]: + """Compute the mapping from all the valid tickets + + We need to find the rules that we can apply here. Algorirm: + Create a dict aith all the options, and all the rows, eg: + class: 0, 1, 2 + row: 0, 1, 2 + seat: 0, 1, 2 + + Now we need to figure out from the right options. + So, for every ticket we seek the options: + Ticket 1: 3, 9, 18 + 3 -> Valid for row and seat. Delete 0 from class, no match + 9 and 18 -> Valid for row, seat and class. Do nothing. + + In the end we should end up with only one option per group. + """ + + options: dict[str, set[int]] = {} + + for rule in self.ticket_rules: + options[rule.rule] = set(range(len(self.my_tickets))) + + for ticket in self.nearby_tickets: + for idx, number in enumerate(ticket): + # idx will have the option index, number will have the ticket number + for rule in self.ticket_rules: + if not rule.is_valid(number): + options[rule.rule].discard(idx) + + # We now have eliminated all the options, but we have to remove the duplicates + # Eg in out test data: + # seat: 2 + # class: 1, 2 + # row: 0, 1, 2 + # This ends up as seat 2, class 1, row = 0 + # Loop for as long we have an set that is bigger then one + while any([len(s) > 1 for s in options.values()]): + for ticket_rule in options: + if len(options[ticket_rule]) == 1: + # We have only option, remove this option from the rest of the set + for remove in options: + if remove != ticket_rule: + options[remove].discard(list(options[ticket_rule])[0]) + + # Cleanup, remove set + cleaned_options: dict[str, int] = {} + for cleanup_rule in options: + cleaned_options[cleanup_rule] = list(options[cleanup_rule])[0] + + return cleaned_options + + def solve(self, input_data: str) -> int: + self.parse(input_data) + self.remove_invalid_tickets() + mapping = self.compute_mapping() + + numbers = [] + for rule in self.ticket_rules: + if "departure" in rule.rule: + index = mapping[rule.rule] + numbers.append(self.my_tickets[index]) + + # Compute the product + product = math.prod(numbers) + return product diff --git a/src/adventofcode2020/handheld.py b/src/adventofcode2020/handheld.py new file mode 100644 index 00000000..a02940b4 --- /dev/null +++ b/src/adventofcode2020/handheld.py @@ -0,0 +1,139 @@ +from __future__ import annotations + +import logging +from dataclasses import dataclass +from enum import Enum +from typing import Any + +logger = logging.getLogger(__name__) + + +class ProgramFinished(Exception): # noqa: N818 + """ + This exception is raised when the program is finished. + This exception is usually not a fatal error, but used for control structure. + """ + + pass + + +class Opcode(Enum): + ACC = "acc" + JMP = "jmp" + NOP = "nop" + + +@dataclass +class Instruction: + opcode: Opcode + argument: int + + +class HandHeld: + """ + My first handheld computer! + Brand: Snoby (Totally not related to Sony) + """ + + accumulator: int + program_counter: int + instructions: dict[int, Instruction] + pc_seen: set + + def __init__(self): + self.reset() + + def reset(self): + self.accumulator = 0 + self.program_counter = 0 + self.pc_seen = set() + + def load_instructions(self, instructions: list[str]): + self.accumulator = 0 + self.instructions = {} + + for i, instruction_line in enumerate(instructions): + opcode, argument = instruction_line.split(" ") + instr = Instruction(opcode=Opcode(opcode), argument=int(argument)) + self.instructions[i] = instr + + def process_instruction(self, infite_loop_detection=False) -> Any: + logger.debug( + f"Processing instruction - {self.accumulator=} - " + f"Instruction: {self.instructions[self.program_counter]}" + f"{self.program_counter=}" + ) + + op = self.instructions[self.program_counter].opcode + arg = self.instructions[self.program_counter].argument + + if not op: + # This instruction might not be needed + raise ProgramFinished + + if infite_loop_detection and self.program_counter in self.pc_seen: + # Another option here it to raise van InfiteLoopException with the + # accumulator value as argument? + # This will make returns in the future for other programs easier.. + return self.accumulator + + elif infite_loop_detection: + self.pc_seen.add(self.program_counter) + + if op == Opcode.ACC: + # acc increases or decreases a single global value called the accumulator + # by the value given in the argument + self.accumulator += arg + self.program_counter += 1 + + elif op == Opcode.JMP: + # jmp jumps to a new instruction relative to itself. + self.program_counter += arg + + elif op == Opcode.NOP: + # stands for No OPeration - it does nothing. + self.program_counter += 1 + + else: + raise ValueError(f"Unknown opcode: {op}") + + if self.program_counter >= len(self.instructions): + # We are done + raise ProgramFinished + + def run(self, infite_loop_detection: bool = True) -> int: + """ + Run the Handheld computer. + + When `infite_loop_detection` is enabled, the computer will return as soon + as instructions are repeated. The current value in the `accumulator` is + returned. + """ + res = 0 + try: + while True: + res = self.process_instruction(infite_loop_detection) + if res not in (0, None): + return res + except ProgramFinished: + return res + + def run_return_or_raise(self, infite_loop_detection: bool) -> int: + while True: + res = self.process_instruction(infite_loop_detection) + if res is not None: + return res + + def run_until_finished_return_acc(self, infite_loop_detection: bool) -> int: + """ + Return until we are finished and return the value in the accumulator + """ + while True: + try: + res = self.process_instruction(infite_loop_detection) + if res is not None: + # We are returning from an infinite loop, but we only care + # for the value when we reach the end of the program + return False + except ProgramFinished: + return self.accumulator diff --git a/template/{{cookiecutter.advendofcode2016}}/src/adventofcode2016/solutions/data/{{cookiecutter.directory_name}}/{{cookiecutter.file_name}}.txt b/src/adventofcode2021/__init__.py similarity index 100% rename from template/{{cookiecutter.advendofcode2016}}/src/adventofcode2016/solutions/data/{{cookiecutter.directory_name}}/{{cookiecutter.file_name}}.txt rename to src/adventofcode2021/__init__.py diff --git a/src/adventofcode2021/data/day_01/day01.txt b/src/adventofcode2021/data/day_01/day01.txt new file mode 100644 index 00000000..54e0795d --- /dev/null +++ b/src/adventofcode2021/data/day_01/day01.txt @@ -0,0 +1,2000 @@ +134 +138 +142 +143 +141 +142 +145 +140 +144 +156 +158 +163 +164 +170 +192 +193 +194 +218 +216 +229 +210 +212 +217 +219 +252 +254 +253 +256 +257 +258 +259 +270 +271 +273 +289 +314 +289 +315 +321 +330 +331 +307 +316 +325 +326 +330 +344 +347 +330 +342 +344 +337 +338 +341 +345 +347 +364 +394 +395 +418 +421 +422 +425 +426 +434 +432 +442 +443 +445 +446 +459 +460 +469 +464 +449 +466 +484 +485 +488 +489 +495 +499 +501 +504 +505 +508 +520 +530 +535 +537 +533 +534 +538 +539 +542 +544 +545 +546 +547 +565 +566 +579 +586 +596 +601 +602 +615 +623 +625 +626 +641 +645 +654 +657 +659 +658 +661 +678 +680 +682 +673 +682 +686 +689 +694 +704 +705 +706 +734 +735 +741 +746 +747 +756 +772 +773 +806 +807 +819 +820 +824 +837 +835 +837 +834 +842 +844 +860 +855 +862 +863 +873 +898 +904 +908 +909 +910 +911 +921 +922 +928 +930 +943 +949 +951 +947 +953 +963 +965 +967 +970 +975 +976 +979 +986 +1009 +1017 +1021 +1022 +1047 +1073 +1075 +1100 +1101 +1136 +1143 +1149 +1148 +1149 +1150 +1154 +1167 +1169 +1175 +1178 +1181 +1191 +1194 +1195 +1196 +1203 +1204 +1188 +1196 +1197 +1198 +1211 +1213 +1221 +1225 +1227 +1232 +1233 +1244 +1245 +1251 +1252 +1253 +1254 +1281 +1292 +1293 +1296 +1306 +1320 +1312 +1313 +1318 +1319 +1322 +1323 +1324 +1344 +1345 +1348 +1354 +1357 +1356 +1359 +1360 +1362 +1363 +1364 +1366 +1384 +1388 +1389 +1388 +1390 +1391 +1412 +1415 +1416 +1415 +1414 +1424 +1429 +1430 +1453 +1459 +1470 +1472 +1491 +1494 +1499 +1497 +1498 +1491 +1496 +1497 +1496 +1523 +1527 +1532 +1525 +1555 +1559 +1576 +1586 +1593 +1609 +1610 +1612 +1619 +1645 +1650 +1657 +1677 +1705 +1706 +1709 +1713 +1722 +1737 +1773 +1783 +1795 +1796 +1807 +1806 +1807 +1808 +1828 +1829 +1835 +1837 +1845 +1848 +1847 +1854 +1862 +1860 +1861 +1862 +1863 +1868 +1882 +1892 +1904 +1876 +1875 +1877 +1907 +1922 +1936 +1932 +1938 +1948 +1950 +1953 +1955 +1957 +1958 +1956 +1961 +1966 +1964 +1968 +1987 +1984 +1988 +1990 +1991 +2009 +2012 +2018 +2022 +2041 +2042 +2057 +2058 +2056 +2064 +2070 +2073 +2077 +2080 +2041 +2044 +2042 +2045 +2053 +2052 +2054 +2055 +2058 +2064 +2068 +2067 +2078 +2086 +2085 +2090 +2093 +2108 +2109 +2110 +2118 +2114 +2121 +2124 +2125 +2111 +2112 +2126 +2127 +2138 +2141 +2153 +2158 +2170 +2161 +2162 +2163 +2164 +2165 +2175 +2196 +2205 +2210 +2209 +2210 +2218 +2234 +2254 +2255 +2266 +2267 +2269 +2270 +2274 +2276 +2263 +2264 +2266 +2267 +2264 +2267 +2276 +2283 +2284 +2287 +2298 +2299 +2309 +2310 +2321 +2322 +2323 +2328 +2330 +2333 +2336 +2366 +2367 +2368 +2365 +2371 +2372 +2373 +2371 +2375 +2376 +2373 +2379 +2380 +2382 +2392 +2394 +2398 +2420 +2427 +2438 +2439 +2440 +2441 +2452 +2453 +2478 +2482 +2484 +2495 +2510 +2514 +2516 +2531 +2536 +2563 +2564 +2559 +2585 +2599 +2608 +2613 +2611 +2619 +2633 +2644 +2645 +2646 +2649 +2632 +2649 +2656 +2651 +2663 +2678 +2684 +2682 +2684 +2685 +2686 +2687 +2708 +2709 +2718 +2720 +2721 +2727 +2733 +2751 +2740 +2742 +2749 +2748 +2750 +2780 +2757 +2762 +2760 +2771 +2758 +2777 +2781 +2785 +2787 +2812 +2825 +2830 +2838 +2840 +2852 +2857 +2862 +2865 +2847 +2846 +2847 +2848 +2849 +2852 +2854 +2859 +2868 +2870 +2872 +2873 +2882 +2889 +2890 +2893 +2890 +2891 +2895 +2901 +2907 +2911 +2912 +2920 +2921 +2925 +2924 +2942 +2952 +2961 +2965 +2964 +2978 +2981 +2992 +3010 +3005 +3019 +3013 +3015 +3019 +3022 +3024 +3027 +3037 +3038 +3041 +3043 +3047 +3065 +3075 +3083 +3092 +3093 +3117 +3118 +3119 +3125 +3126 +3130 +3145 +3137 +3149 +3153 +3154 +3155 +3180 +3182 +3183 +3182 +3200 +3202 +3214 +3197 +3207 +3185 +3203 +3208 +3209 +3208 +3231 +3233 +3234 +3242 +3255 +3256 +3257 +3258 +3265 +3268 +3290 +3291 +3297 +3311 +3301 +3309 +3314 +3317 +3319 +3320 +3337 +3347 +3362 +3376 +3390 +3404 +3412 +3417 +3418 +3421 +3425 +3436 +3438 +3439 +3453 +3467 +3484 +3485 +3486 +3515 +3516 +3521 +3527 +3534 +3551 +3561 +3572 +3573 +3574 +3596 +3612 +3595 +3616 +3617 +3619 +3620 +3624 +3634 +3657 +3663 +3671 +3686 +3687 +3694 +3704 +3695 +3697 +3698 +3699 +3700 +3701 +3702 +3704 +3705 +3707 +3716 +3717 +3732 +3747 +3748 +3745 +3746 +3748 +3756 +3757 +3764 +3765 +3766 +3768 +3784 +3807 +3810 +3805 +3811 +3812 +3813 +3828 +3840 +3847 +3848 +3851 +3850 +3851 +3855 +3861 +3862 +3867 +3864 +3871 +3879 +3884 +3885 +3887 +3888 +3928 +3948 +3949 +3950 +3960 +3959 +3965 +3973 +3970 +3971 +3972 +3974 +3969 +3997 +3998 +4014 +4016 +4017 +4026 +4039 +4043 +4052 +4053 +4051 +4054 +4058 +4066 +4067 +4073 +4077 +4084 +4072 +4078 +4083 +4094 +4101 +4107 +4115 +4138 +4141 +4143 +4166 +4177 +4184 +4194 +4192 +4198 +4203 +4204 +4209 +4215 +4217 +4226 +4231 +4252 +4253 +4260 +4294 +4306 +4307 +4314 +4316 +4317 +4325 +4326 +4334 +4344 +4348 +4344 +4348 +4350 +4358 +4383 +4384 +4390 +4383 +4378 +4374 +4377 +4398 +4399 +4431 +4432 +4433 +4432 +4443 +4441 +4442 +4443 +4439 +4441 +4444 +4445 +4446 +4449 +4452 +4458 +4463 +4469 +4472 +4475 +4478 +4491 +4504 +4507 +4509 +4510 +4511 +4513 +4525 +4532 +4533 +4541 +4552 +4551 +4552 +4573 +4594 +4597 +4601 +4602 +4617 +4621 +4622 +4621 +4601 +4604 +4606 +4607 +4611 +4591 +4604 +4608 +4615 +4613 +4621 +4625 +4642 +4637 +4641 +4659 +4674 +4678 +4680 +4700 +4701 +4702 +4703 +4706 +4712 +4699 +4701 +4704 +4706 +4707 +4714 +4717 +4721 +4722 +4731 +4735 +4748 +4749 +4753 +4757 +4779 +4783 +4788 +4790 +4791 +4794 +4813 +4814 +4815 +4801 +4803 +4806 +4807 +4837 +4838 +4842 +4844 +4854 +4855 +4859 +4856 +4847 +4849 +4850 +4852 +4866 +4868 +4880 +4902 +4901 +4905 +4909 +4921 +4922 +4939 +4920 +4922 +4938 +4944 +4947 +4948 +4960 +4961 +4971 +4986 +4992 +4996 +5004 +5003 +5008 +5002 +5004 +5021 +5023 +5009 +5012 +5014 +5019 +5033 +5047 +5048 +5046 +5047 +5072 +5078 +5080 +5081 +5067 +5097 +5103 +5109 +5114 +5121 +5126 +5127 +5128 +5129 +5150 +5154 +5131 +5113 +5115 +5116 +5118 +5134 +5135 +5152 +5158 +5160 +5171 +5188 +5195 +5196 +5198 +5202 +5204 +5205 +5209 +5225 +5232 +5235 +5242 +5243 +5244 +5234 +5254 +5255 +5272 +5273 +5282 +5288 +5311 +5312 +5302 +5304 +5307 +5316 +5319 +5322 +5323 +5324 +5326 +5327 +5337 +5342 +5346 +5353 +5363 +5376 +5378 +5403 +5405 +5406 +5402 +5412 +5424 +5428 +5430 +5431 +5435 +5436 +5439 +5444 +5446 +5447 +5456 +5470 +5474 +5500 +5513 +5515 +5505 +5508 +5509 +5511 +5512 +5520 +5523 +5526 +5532 +5534 +5564 +5568 +5579 +5598 +5599 +5600 +5608 +5609 +5636 +5648 +5655 +5667 +5668 +5674 +5678 +5679 +5692 +5693 +5694 +5696 +5711 +5703 +5711 +5717 +5716 +5733 +5734 +5735 +5736 +5740 +5757 +5762 +5788 +5797 +5798 +5809 +5814 +5815 +5826 +5827 +5829 +5809 +5815 +5817 +5818 +5819 +5820 +5822 +5831 +5837 +5838 +5844 +5850 +5846 +5851 +5865 +5870 +5882 +5885 +5888 +5892 +5901 +5906 +5908 +5910 +5911 +5909 +5915 +5912 +5914 +5932 +5934 +5940 +5949 +5951 +5952 +5954 +5963 +5962 +5961 +5962 +5964 +5966 +5969 +6009 +6013 +6015 +6024 +6043 +6041 +6047 +6057 +6061 +6062 +6061 +6070 +6074 +6075 +6084 +6113 +6138 +6139 +6146 +6148 +6157 +6191 +6193 +6194 +6200 +6219 +6226 +6228 +6230 +6235 +6236 +6241 +6265 +6267 +6268 +6270 +6271 +6273 +6275 +6274 +6275 +6289 +6290 +6294 +6303 +6306 +6311 +6312 +6313 +6319 +6320 +6332 +6344 +6339 +6350 +6355 +6357 +6359 +6362 +6344 +6345 +6362 +6372 +6376 +6389 +6393 +6395 +6398 +6401 +6420 +6422 +6425 +6433 +6445 +6446 +6464 +6472 +6487 +6498 +6505 +6484 +6496 +6511 +6510 +6501 +6503 +6513 +6542 +6553 +6561 +6575 +6585 +6593 +6612 +6613 +6614 +6619 +6618 +6614 +6615 +6617 +6627 +6634 +6638 +6640 +6642 +6662 +6663 +6664 +6669 +6677 +6689 +6709 +6710 +6711 +6712 +6713 +6721 +6722 +6743 +6740 +6729 +6731 +6728 +6729 +6734 +6739 +6748 +6751 +6752 +6753 +6759 +6738 +6739 +6761 +6765 +6764 +6772 +6773 +6798 +6821 +6828 +6829 +6831 +6837 +6843 +6844 +6845 +6849 +6851 +6854 +6855 +6856 +6863 +6860 +6874 +6881 +6893 +6896 +6901 +6899 +6906 +6915 +6920 +6930 +6942 +6944 +6956 +6977 +6980 +6982 +6984 +6991 +6990 +7006 +7018 +7034 +7036 +7041 +7042 +7043 +7066 +7069 +7062 +7066 +7082 +7087 +7112 +7131 +7132 +7139 +7140 +7145 +7146 +7148 +7146 +7147 +7151 +7152 +7142 +7126 +7127 +7123 +7120 +7131 +7132 +7136 +7139 +7140 +7144 +7148 +7153 +7154 +7158 +7174 +7188 +7190 +7191 +7212 +7216 +7215 +7218 +7237 +7241 +7242 +7247 +7251 +7265 +7289 +7295 +7298 +7302 +7323 +7324 +7333 +7321 +7320 +7328 +7326 +7328 +7349 +7359 +7361 +7362 +7379 +7380 +7381 +7387 +7391 +7404 +7408 +7417 +7418 +7429 +7430 +7451 +7456 +7460 +7466 +7470 +7487 +7514 +7520 +7522 +7523 +7519 +7546 +7557 +7567 +7572 +7573 +7566 +7567 +7568 +7571 +7579 +7548 +7551 +7552 +7555 +7559 +7568 +7570 +7573 +7576 +7568 +7571 +7570 +7573 +7586 +7589 +7590 +7589 +7586 +7587 +7588 +7592 +7611 +7626 +7627 +7633 +7632 +7633 +7634 +7641 +7645 +7644 +7666 +7662 +7658 +7662 +7663 +7669 +7672 +7665 +7674 +7660 +7668 +7673 +7694 +7712 +7715 +7737 +7738 +7740 +7741 +7756 +7764 +7801 +7802 +7804 +7814 +7845 +7885 +7889 +7888 +7886 +7889 +7890 +7894 +7895 +7918 +7919 +7941 +7942 +7943 +7952 +7953 +7954 +7957 +7958 +7959 +7960 +7967 +7968 +7970 +7987 +7988 +7990 +7991 +7993 +8000 +8002 +7990 +7999 +8002 +8001 +8003 +8009 +8023 +8037 +8040 +8041 +8045 +8063 +8061 +8065 +8067 +8072 +8091 +8097 +8116 +8117 +8118 +8102 +8104 +8105 +8142 +8141 +8149 +8168 +8176 +8178 +8183 +8186 +8219 +8221 +8226 +8239 +8244 +8246 +8268 +8293 +8299 +8310 +8312 +8314 +8315 +8310 +8320 +8321 +8322 +8341 +8342 +8369 +8402 +8406 +8407 +8408 +8409 +8412 +8416 +8419 +8420 +8419 +8418 +8415 +8420 +8421 +8442 +8446 +8449 +8452 +8448 +8458 +8459 +8468 +8485 +8488 +8502 +8504 +8505 +8506 +8510 +8526 +8541 +8574 +8575 +8576 +8546 +8557 +8565 +8566 +8567 +8583 +8596 +8606 +8616 +8612 +8607 +8608 +8611 +8612 +8642 +8647 +8651 +8653 +8671 +8686 +8682 +8686 +8688 +8702 +8705 +8704 +8712 +8717 +8718 +8719 +8724 +8727 +8728 +8729 +8746 +8751 +8750 +8757 +8715 +8719 +8720 +8721 +8747 +8748 +8766 +8772 +8792 +8796 +8795 +8800 +8810 +8811 +8822 +8823 +8824 +8830 +8860 +8861 +8867 +8877 +8878 +8885 +8894 +8895 +8903 +8914 +8916 +8919 +8940 +8968 +8969 +8984 +8982 +8984 +8983 +8982 +8988 +8989 +8993 +8994 +9001 +9008 +9026 +9029 +9037 +9038 +9039 +9050 +9053 +9055 +9056 +9059 +9076 +9075 +9081 +9092 +9100 +9101 +9123 +9124 +9147 +9143 +9146 +9180 +9181 +9191 +9200 +9201 +9202 +9210 +9224 +9228 +9229 +9234 +9235 +9237 +9241 +9260 +9261 +9262 +9271 +9272 +9271 +9275 +9289 +9290 +9320 +9322 +9356 +9371 +9372 +9373 +9374 +9386 +9387 +9388 +9414 +9409 +9420 +9422 +9430 +9442 +9443 +9445 +9449 +9467 +9472 +9473 +9487 +9489 +9493 +9498 +9501 +9502 +9507 +9518 +9521 +9522 +9523 +9503 +9509 +9545 +9546 +9562 +9546 +9531 +9535 +9558 +9559 +9561 +9560 +9561 +9562 +9561 +9570 +9564 +9562 +9563 +9568 +9569 +9577 +9606 +9607 +9608 +9602 +9606 +9608 +9622 +9623 +9630 +9652 +9653 +9650 +9651 +9673 +9675 +9676 +9678 +9684 +9685 +9690 +9695 +9706 +9725 +9750 +9762 +9769 +9770 +9772 +9770 +9806 +9828 +9837 +9836 +9844 +9845 +9849 +9875 +9897 +9901 +9916 +9923 +9944 +9945 +9952 +9961 +9973 +9977 +9987 +9986 +9989 +9992 +9993 +9994 +10019 +10023 +10021 +10015 +10016 +10017 +10018 +10026 +10027 +10037 +10039 +10040 +10041 +10042 +10040 +10041 +10044 +10055 +10066 +10059 +10060 +10063 +10062 +10055 +10062 +10068 +10076 +10086 +10101 +10104 +10107 +10100 +10116 +10120 +10121 +10128 +10136 +10139 +10154 +10166 +10167 +10170 +10171 +10172 +10179 +10182 +10184 +10189 +10191 +10204 +10207 +10214 +10213 +10214 +10220 +10222 +10225 +10223 +10220 +10238 +10240 +10243 +10247 +10241 +10273 +10281 +10282 +10286 +10311 +10313 +10318 +10319 +10324 +10331 +10338 +10320 +10322 +10323 +10328 +10336 +10339 +10352 +10366 +10367 +10375 +10385 +10386 +10388 +10389 +10387 +10388 +10392 +10399 +10404 +10405 +10408 +10417 +10413 +10416 +10417 +10427 +10432 +10434 +10433 +10445 +10446 +10448 +10449 +10450 +10451 +10452 +10445 +10446 +10453 +10452 +10461 +10462 +10463 +10470 +10473 +10487 +10491 +10514 +10517 +10518 +10522 +10528 +10540 +10541 +10543 +10561 +10564 +10573 +10544 +10550 +10552 +10562 +10567 +10568 +10567 +10563 +10559 +10566 +10571 +10573 +10577 +10578 +10580 +10596 +10603 +10574 +10575 +10570 +10571 +10579 +10580 +10581 +10600 +10603 +10615 +10617 +10618 +10637 +10639 +10641 +10642 +10652 +10688 +10696 +10702 +10706 +10688 +10689 +10694 +10689 +10704 +10721 +10722 +10725 +10727 +10737 +10739 +10747 +10750 +10751 +10755 +10756 +10753 diff --git a/src/adventofcode2021/data/day_02/day02.txt b/src/adventofcode2021/data/day_02/day02.txt new file mode 100644 index 00000000..b3a0ece5 --- /dev/null +++ b/src/adventofcode2021/data/day_02/day02.txt @@ -0,0 +1,1000 @@ +forward 9 +down 3 +down 8 +forward 2 +up 3 +forward 5 +up 8 +down 2 +down 5 +up 7 +down 9 +forward 4 +up 5 +down 9 +forward 2 +forward 2 +forward 8 +down 6 +forward 2 +up 9 +up 5 +down 2 +forward 5 +down 8 +forward 3 +up 4 +forward 5 +forward 7 +down 8 +down 6 +up 7 +down 3 +forward 4 +up 8 +down 5 +down 3 +down 6 +down 8 +forward 1 +forward 9 +forward 4 +up 7 +down 4 +forward 7 +forward 3 +forward 9 +down 1 +down 3 +up 9 +down 3 +forward 9 +up 6 +up 9 +down 8 +up 3 +down 1 +up 8 +down 8 +down 2 +down 4 +down 4 +up 3 +down 6 +down 1 +down 3 +forward 1 +up 5 +forward 5 +forward 8 +down 2 +forward 6 +forward 2 +up 7 +forward 6 +down 8 +forward 6 +forward 5 +up 9 +forward 5 +up 5 +forward 9 +down 2 +down 4 +down 3 +down 8 +forward 9 +forward 6 +forward 2 +up 7 +down 7 +up 3 +forward 4 +forward 5 +down 7 +forward 5 +up 9 +forward 6 +forward 6 +forward 1 +down 6 +forward 9 +up 2 +down 7 +down 8 +down 6 +up 5 +down 8 +down 8 +forward 7 +down 6 +up 5 +down 9 +down 3 +forward 2 +down 4 +forward 8 +down 5 +up 5 +forward 7 +up 2 +up 2 +down 4 +forward 4 +down 5 +up 8 +down 2 +forward 4 +down 9 +forward 8 +down 5 +down 6 +down 7 +up 7 +up 5 +up 7 +forward 7 +forward 8 +down 2 +forward 3 +down 2 +down 7 +down 4 +down 2 +forward 3 +forward 5 +down 3 +down 7 +up 7 +down 7 +up 5 +forward 1 +down 8 +down 2 +up 4 +up 5 +down 8 +forward 9 +down 3 +down 9 +forward 8 +forward 1 +forward 1 +down 2 +up 9 +down 2 +up 8 +down 6 +up 8 +forward 7 +down 5 +forward 7 +down 8 +forward 8 +down 7 +up 9 +up 2 +up 6 +down 5 +down 9 +forward 2 +up 3 +down 4 +up 5 +up 4 +down 9 +forward 7 +forward 7 +down 3 +forward 4 +forward 9 +up 8 +forward 3 +down 1 +forward 2 +down 7 +down 3 +down 7 +down 7 +forward 8 +forward 4 +forward 7 +up 1 +down 4 +up 9 +down 2 +down 1 +forward 6 +down 3 +forward 7 +forward 8 +up 9 +up 2 +up 2 +forward 7 +up 2 +up 5 +forward 5 +down 3 +forward 8 +forward 1 +up 4 +down 6 +down 5 +forward 4 +up 9 +forward 8 +up 4 +down 8 +down 3 +down 3 +down 7 +forward 2 +forward 4 +down 9 +down 7 +down 2 +up 3 +up 3 +forward 8 +forward 7 +forward 8 +down 5 +up 5 +forward 3 +forward 6 +up 7 +up 1 +forward 2 +forward 5 +down 5 +forward 8 +down 2 +down 4 +forward 2 +down 7 +down 3 +down 5 +forward 9 +down 7 +down 8 +up 1 +up 2 +down 8 +forward 7 +forward 8 +down 8 +forward 5 +up 7 +forward 3 +up 2 +down 7 +forward 1 +down 2 +up 7 +up 4 +down 2 +forward 1 +up 5 +forward 2 +up 2 +forward 3 +forward 9 +forward 2 +forward 8 +forward 2 +up 7 +down 8 +down 7 +forward 2 +forward 7 +down 1 +forward 2 +up 1 +up 6 +down 3 +down 6 +forward 7 +down 4 +forward 5 +forward 6 +up 3 +forward 3 +down 6 +forward 8 +up 8 +forward 4 +down 3 +forward 3 +down 4 +down 7 +forward 9 +forward 2 +up 2 +forward 8 +down 6 +forward 6 +down 9 +down 9 +forward 8 +down 1 +forward 9 +down 1 +down 6 +down 8 +down 5 +down 5 +forward 3 +forward 3 +down 2 +down 5 +forward 9 +down 2 +down 8 +down 3 +forward 9 +up 2 +down 4 +down 9 +forward 9 +forward 1 +forward 5 +up 9 +down 1 +down 6 +forward 6 +forward 5 +forward 8 +down 2 +forward 8 +down 4 +down 2 +down 6 +down 6 +up 3 +up 8 +forward 1 +down 1 +up 8 +down 3 +down 4 +up 9 +up 1 +down 7 +down 7 +up 1 +up 2 +forward 5 +up 8 +forward 2 +down 3 +forward 1 +up 5 +forward 6 +forward 2 +down 6 +up 2 +forward 2 +forward 1 +down 3 +forward 4 +up 8 +forward 5 +down 4 +forward 2 +down 8 +down 7 +up 7 +down 8 +forward 1 +down 4 +up 9 +down 6 +up 6 +up 6 +down 2 +forward 1 +forward 8 +down 6 +up 3 +down 7 +forward 9 +up 1 +up 4 +forward 7 +down 7 +forward 1 +down 6 +down 4 +down 7 +down 8 +down 8 +forward 4 +down 6 +down 6 +down 5 +forward 6 +up 9 +up 3 +down 4 +forward 8 +down 7 +forward 6 +up 3 +forward 1 +forward 1 +down 8 +forward 7 +forward 4 +forward 6 +up 1 +forward 7 +up 8 +forward 2 +forward 6 +forward 8 +down 9 +down 8 +up 9 +up 4 +up 2 +forward 2 +forward 8 +up 2 +forward 3 +forward 2 +up 2 +up 5 +up 8 +forward 4 +forward 8 +forward 3 +up 5 +down 1 +forward 2 +down 7 +down 8 +forward 3 +up 1 +forward 5 +forward 7 +forward 9 +up 7 +forward 4 +down 4 +up 2 +forward 4 +forward 5 +forward 3 +up 9 +forward 6 +forward 8 +down 9 +down 1 +forward 1 +down 5 +down 2 +forward 9 +down 2 +up 9 +down 1 +forward 5 +forward 8 +up 2 +forward 6 +down 4 +down 9 +forward 4 +forward 1 +down 3 +down 3 +up 5 +forward 5 +down 6 +forward 3 +down 2 +forward 8 +down 7 +down 2 +down 1 +forward 2 +up 5 +forward 9 +forward 3 +forward 5 +down 4 +up 7 +forward 6 +down 3 +forward 1 +forward 7 +forward 1 +up 4 +down 2 +down 7 +up 9 +forward 9 +down 8 +down 1 +up 2 +down 3 +forward 7 +down 8 +down 5 +down 5 +up 8 +forward 1 +down 5 +forward 8 +up 7 +down 1 +forward 9 +down 4 +forward 8 +forward 5 +forward 7 +forward 8 +forward 3 +up 9 +forward 3 +down 7 +down 5 +up 8 +forward 3 +up 6 +forward 8 +up 3 +down 5 +forward 5 +forward 6 +forward 4 +forward 3 +forward 8 +up 9 +forward 2 +down 6 +down 4 +down 5 +forward 7 +down 2 +up 5 +forward 2 +forward 5 +down 9 +forward 8 +down 8 +forward 6 +down 9 +down 7 +up 9 +forward 3 +forward 3 +up 5 +down 2 +forward 5 +down 6 +down 6 +down 2 +down 3 +down 4 +forward 7 +up 1 +down 7 +forward 7 +up 1 +forward 3 +up 6 +down 7 +down 5 +forward 9 +forward 2 +down 5 +forward 9 +down 5 +forward 9 +forward 1 +down 4 +forward 9 +down 5 +forward 8 +down 6 +down 4 +down 5 +forward 9 +down 1 +forward 6 +forward 9 +down 1 +down 1 +up 2 +forward 5 +forward 3 +down 4 +up 8 +forward 8 +down 2 +forward 3 +forward 1 +down 7 +forward 6 +forward 5 +up 7 +up 8 +down 5 +up 3 +down 8 +forward 6 +forward 5 +forward 6 +up 1 +up 8 +up 7 +down 5 +forward 3 +forward 9 +up 9 +up 4 +up 7 +up 8 +forward 7 +forward 3 +forward 9 +down 7 +forward 3 +down 6 +forward 9 +down 1 +forward 3 +down 1 +forward 8 +forward 7 +down 2 +forward 1 +forward 6 +forward 7 +down 3 +down 2 +down 1 +forward 7 +forward 4 +down 6 +up 4 +forward 4 +forward 9 +forward 3 +down 1 +up 2 +down 3 +down 5 +forward 7 +forward 5 +up 1 +down 2 +down 3 +down 8 +forward 1 +down 4 +forward 5 +down 5 +up 6 +down 6 +down 8 +forward 1 +forward 9 +up 5 +forward 2 +down 9 +down 5 +down 1 +down 4 +down 9 +down 8 +forward 2 +forward 4 +up 2 +forward 3 +down 8 +down 5 +up 5 +forward 8 +up 2 +down 8 +up 3 +forward 7 +down 7 +forward 8 +down 7 +down 3 +up 6 +forward 5 +up 4 +up 5 +forward 9 +forward 6 +down 9 +forward 5 +down 5 +down 3 +forward 2 +down 1 +up 9 +up 8 +down 6 +down 1 +forward 9 +forward 4 +forward 2 +up 1 +forward 5 +forward 9 +up 5 +forward 8 +forward 4 +down 4 +down 4 +down 2 +forward 1 +forward 7 +down 9 +forward 4 +down 5 +down 4 +down 7 +down 2 +forward 9 +down 3 +forward 6 +forward 3 +down 9 +down 3 +down 4 +down 9 +down 9 +up 6 +down 5 +up 4 +down 1 +down 1 +forward 9 +forward 7 +down 9 +forward 4 +down 8 +down 7 +forward 7 +forward 4 +up 2 +up 5 +forward 2 +forward 7 +down 1 +forward 6 +forward 6 +forward 3 +forward 8 +down 2 +up 2 +forward 7 +up 5 +down 1 +down 5 +forward 8 +down 6 +forward 8 +down 5 +down 4 +down 6 +forward 5 +down 1 +forward 9 +forward 8 +up 5 +down 6 +forward 5 +up 5 +down 4 +forward 1 +down 2 +down 5 +down 3 +forward 2 +down 9 +forward 1 +forward 1 +forward 1 +forward 8 +forward 2 +down 8 +down 6 +up 1 +forward 6 +down 3 +down 4 +up 9 +down 3 +down 3 +up 7 +down 4 +forward 4 +forward 9 +down 3 +down 8 +forward 5 +down 3 +down 6 +down 7 +forward 1 +up 2 +forward 8 +down 1 +down 4 +up 9 +forward 9 +up 4 +up 2 +forward 3 +forward 4 +down 2 +down 2 +down 6 +forward 6 +forward 8 +down 6 +up 6 +down 5 +forward 1 +down 4 +up 9 +forward 1 +forward 3 +down 1 +down 4 +up 6 +forward 5 +forward 6 +up 9 +up 9 +down 2 +up 6 +forward 1 +forward 2 +forward 3 +forward 3 +forward 6 +up 2 +down 8 +down 9 +forward 7 +up 1 +up 3 +down 2 +forward 3 +down 8 +forward 9 +down 3 +forward 6 +up 2 +forward 7 +down 2 +forward 5 +down 4 +down 2 +up 8 +forward 3 +forward 5 +forward 9 +forward 5 +forward 3 +up 9 +down 7 +forward 4 +forward 2 +forward 7 +down 5 +up 6 +up 6 +forward 8 +down 2 +forward 1 +up 1 +up 9 +up 8 +up 3 +up 4 +down 2 +up 7 +down 4 +up 5 +down 1 +up 9 +down 5 +down 9 +down 4 +up 2 +down 8 +up 2 +up 7 +up 9 +forward 4 +forward 2 +forward 1 +forward 6 +forward 8 +up 5 +forward 5 +forward 5 +down 4 +up 6 +forward 3 +down 9 +down 7 +forward 4 +down 3 +up 1 +forward 4 +down 2 +down 6 +up 3 +up 1 +down 9 +down 7 +down 9 +forward 3 +forward 8 +down 8 +up 7 +up 6 +down 2 +down 9 +down 1 +down 9 +forward 6 +up 4 +down 3 +forward 5 +up 3 +up 9 +up 8 +forward 6 +down 8 +forward 6 +forward 6 +forward 5 +up 4 +down 4 +up 6 +up 4 +forward 2 +down 5 +forward 9 +up 7 +up 6 +down 4 +forward 7 +forward 6 +up 2 +down 8 +down 6 +forward 5 +up 2 +forward 5 +forward 1 +up 9 +down 8 +forward 7 +up 4 +forward 8 +down 4 +forward 3 +forward 3 +down 9 +forward 4 +forward 9 +up 8 +forward 7 +forward 3 +forward 9 +forward 4 +up 3 +forward 2 +forward 7 diff --git a/src/adventofcode2021/data/day_03/day03.txt b/src/adventofcode2021/data/day_03/day03.txt new file mode 100644 index 00000000..4e8cfce6 --- /dev/null +++ b/src/adventofcode2021/data/day_03/day03.txt @@ -0,0 +1,1000 @@ +010000010010 +011001011100 +110011011101 +110100100001 +000110011110 +110101000101 +100110111001 +110000000000 +100101100111 +001001011000 +010010011010 +001110111000 +001011111010 +110010111011 +001001010101 +111111011111 +101001001110 +011001000101 +001001111100 +000101110000 +101000101101 +101000011101 +011011001111 +010100011001 +100010001000 +100010111010 +000110101100 +100101010111 +110111101111 +011101111001 +111001110110 +101101000000 +010010111101 +111101111101 +010000001110 +000111111001 +010111100101 +011101100000 +001011011111 +111010000110 +111010001001 +000000010111 +001110011110 +100011100010 +111110010111 +100111111111 +100000011011 +000110111101 +010100010111 +110000011111 +011011011001 +101110011100 +010110001111 +101010111001 +100010011111 +011110110101 +001001101010 +000001001000 +101101011000 +101100001111 +000110000011 +011011100001 +010011100001 +101111011100 +110110100000 +010100010000 +110111111000 +110000110111 +011000000101 +001100011111 +111000011010 +000110101010 +011000101001 +110010100110 +100011111010 +011111000111 +010001100101 +101000011110 +011110010010 +111001100000 +000011011010 +000011111110 +101001001001 +100110010010 +110101010111 +010011111000 +010111001111 +010101001011 +111001010100 +011001011001 +110011110111 +110001001011 +101101001011 +000110010111 +110110111010 +001001100110 +111010011011 +001101000101 +100110001011 +010000101000 +101111001011 +110011011110 +011110111001 +101100000010 +010101101101 +010100001010 +000111010101 +001100000111 +010001010010 +001110000110 +000001010000 +100010000101 +010010101101 +011000110110 +111111100000 +111111010011 +010100010001 +101011000010 +111010101000 +011010001010 +111001000001 +111010010000 +101010101100 +101011110110 +110010100010 +011001001100 +100100111010 +101011011101 +110000001000 +010011011101 +000011011000 +101100101111 +110001111111 +110010010010 +001011011010 +110101111110 +110000111010 +011100011110 +110110001000 +000101000001 +100000010100 +110000110000 +110000101100 +101101000001 +110011101001 +101110010101 +110101110101 +000110100000 +100111101111 +111101011001 +110001111101 +100010100001 +101011111100 +000011010111 +110100110101 +111100010100 +011001110011 +010000110000 +110110011100 +001000110101 +010001111111 +001000000110 +101001001100 +011000001011 +101101010110 +101100011101 +001111001010 +110011000010 +010110111001 +000011000000 +011110100000 +111001001010 +110010100101 +110001101001 +001100110100 +110100011111 +100010001001 +100101001010 +110001011000 +111110011111 +001001000010 +101011001010 +110111111001 +101000000111 +000110000000 +110011110000 +111001011110 +110000010010 +010000101101 +010010100101 +011110010000 +010011100011 +111011100110 +001001000011 +110000010101 +010010010100 +110100100111 +111111010110 +111001110010 +110100010010 +011111111010 +110000011011 +001011000101 +101010000010 +000111100011 +010000110110 +111111011001 +100001001001 +111010011100 +001111110000 +010111111001 +101101000111 +100110011111 +000000100111 +111001111010 +100001110000 +010110101101 +111111111110 +101101011010 +101101000011 +010011001001 +111111000010 +011110000010 +101110101101 +110010110010 +101111100101 +101011100000 +000001110111 +010011011000 +010011000101 +101101010000 +111011110111 +100111111010 +000001110010 +010011110100 +011100001010 +101101001111 +011101100001 +001111001011 +000000010101 +000100110101 +100111001011 +000111011001 +100010011110 +111100100101 +011010111001 +011011111101 +010100111011 +010100110100 +101111111001 +110001100110 +110001110001 +010110100011 +111111110100 +011101000010 +011111101111 +001101001011 +001010100110 +111001010000 +111111100110 +001101001100 +010110011010 +011101111000 +101000010111 +100110010101 +011000111010 +011100010011 +110011000111 +001101010101 +101110001101 +000001011100 +001011100111 +111111010101 +000110010110 +100110000011 +011000111011 +111001011111 +100001010000 +001000100011 +011011111111 +111001001110 +000001010111 +001001001111 +001001100010 +111100101110 +101101100100 +000111101010 +011101101110 +101111001000 +010101110111 +100001011111 +011110011111 +010111010000 +101100110100 +001110011010 +000110001100 +110100101011 +101010001101 +010100001101 +111101011111 +011110111111 +110100001001 +101010000001 +110100011001 +100011011011 +101001111111 +111101100011 +100101001100 +000010101011 +101111010010 +100001110111 +010000011100 +011101110100 +100000001111 +100010110111 +101011110101 +000001000111 +010011110110 +000001000010 +101010010010 +100111110101 +000010001111 +001110000100 +110100001101 +011001001011 +000100110000 +000000011101 +011011100000 +011000001110 +000011101111 +110111010101 +011000001010 +010001111101 +011111011001 +001010111011 +010000011111 +001100000011 +110110001110 +100000000010 +010101011010 +101001100110 +000110011001 +110101001110 +100111000111 +111101101100 +100101111011 +011111100000 +000000101011 +001111011110 +101100100100 +010010110001 +000110110001 +011100111001 +001011000100 +111100001101 +100010001101 +010101010111 +001011101110 +110111101110 +000010000101 +101111001111 +101110000000 +010000011110 +101111000101 +000101001011 +011101000100 +001001111110 +001001111111 +100111000110 +000101110010 +011001001111 +100000111110 +101000001100 +001110010001 +010101011111 +010110001101 +000001000101 +010100111101 +100000101010 +111111111101 +011111001101 +111000001111 +100100001011 +101111010011 +111111110111 +100101111111 +100111100111 +011000110111 +011010000001 +010010110000 +111000110100 +111100010110 +100010100111 +011010111111 +110101100011 +001111100001 +101001011110 +100011110011 +100111110111 +100000100100 +111010110011 +001011100101 +101101010001 +111010111110 +000100010110 +111101001111 +101001001111 +000001010101 +111011101001 +010101111111 +111110101000 +101101111011 +010100001100 +101011110001 +010011101111 +011001001001 +001000001001 +100100011111 +010111100001 +111101011110 +110011110101 +100101000010 +100011110001 +000111111010 +010001011111 +011110011011 +100100000000 +011010011001 +010001100000 +011111001100 +101011000110 +110100101110 +101000111011 +011011001000 +100111000010 +101110011101 +000110000001 +001101001101 +100110011000 +011110111010 +110101010000 +100100111000 +011111000011 +111101010101 +100011101100 +000101110100 +010110101010 +101001111110 +011100010110 +001100010100 +010101110001 +100101110111 +110110100101 +100011000011 +100101000101 +001111110011 +101100010111 +001011110101 +001010110001 +110000010011 +100111100100 +100110110010 +101101110110 +000100101011 +101111100100 +011010110110 +101110010111 +000010101110 +001000000111 +100000110110 +001000000000 +111011101000 +111011011001 +000011111011 +000010101101 +011100111011 +000111010000 +000010110001 +011100110101 +001111110111 +000110100011 +010010001010 +010100000001 +111101101101 +010010010011 +110101100100 +011001010100 +100101110100 +110111011100 +110001110011 +011011001011 +110011011011 +101110101111 +111011000001 +110010001111 +000001000000 +101101111100 +000111000001 +000001011001 +110100110000 +110101011100 +010110011000 +010110010000 +010110000011 +010010010000 +100001100010 +011110110001 +111100101010 +101111111010 +101010110001 +000110011011 +010110000001 +001110111001 +000111101011 +010110110110 +000000000101 +000100010000 +110000010000 +001011011101 +011111000101 +001110101010 +101110110111 +110101110111 +101111000110 +110110000011 +110001110010 +011111101000 +010111100110 +011100111111 +111101100100 +110111110100 +100010010000 +110101000111 +111000000111 +111111011010 +100001111010 +010011011100 +011011100101 +110100101000 +001101110010 +000010110100 +110001010101 +100000011100 +101101100111 +011100111110 +111110001110 +010011101101 +001001001110 +011001100001 +001010010100 +010011010011 +001111100010 +001110001100 +011011010010 +010100000100 +011010010011 +101110011010 +001111101000 +001110011011 +000001111110 +110110101001 +101000000110 +000010000111 +100111111001 +110111001101 +110101101011 +110101100110 +101010110011 +000110100001 +110011100100 +001011101101 +011001001010 +100101100110 +010001100001 +110110001101 +100111011001 +100100111100 +000001111010 +110000111011 +110101100000 +001111111111 +010010100110 +001011111100 +111011000110 +101011010110 +001100011110 +010010010001 +011001110111 +110110110001 +010110100000 +110010011001 +001111000001 +100100010100 +000001111100 +000011101001 +101001110010 +011100000111 +001000011110 +010001111100 +010010110100 +110000111000 +100100001100 +010111100010 +010010001000 +100110001110 +111101110100 +011111011000 +001000110000 +000010100000 +010111000000 +001111101110 +000111110101 +001000001011 +111100001001 +011010011111 +011101101111 +000101011011 +000100000101 +001000010101 +000011000001 +011011010100 +011101100101 +000010110111 +001101000011 +000111001000 +001010000111 +111010101110 +100001111111 +101101110000 +010111011101 +111010111000 +011111000110 +011100001011 +101011100110 +011011100100 +010010000001 +001100101011 +000110111010 +010110011101 +010100101101 +100001100101 +011011010111 +111010111001 +111000001010 +100101011110 +001000011001 +101001101001 +011111000001 +010010111110 +101110110110 +111110010011 +100111011100 +001100100011 +100010101100 +111100001110 +010101101111 +010001000111 +110101111010 +011100100101 +110001010011 +000011100001 +001010111001 +011100011010 +010101010101 +001011000000 +101011110111 +011001110010 +010000001011 +000011100010 +010010000011 +011001111010 +000101011100 +111010000101 +001011111011 +011011101101 +100100110111 +111000101010 +100001110101 +101110010100 +000001100111 +101001101111 +100000001100 +110000101000 +110111011010 +010001001010 +000100000001 +110110101011 +011111101011 +101001100010 +000111100001 +010010001011 +101001010110 +011011100011 +000111011101 +100000100101 +000010100011 +111010001011 +111110111111 +101000111000 +110100100011 +010001110010 +001000010000 +111101011011 +110100011011 +010101100110 +010001101111 +001111011111 +101111110110 +011011101111 +000010101111 +000000110011 +011011000111 +010001000110 +010111101111 +110101011111 +001001000111 +011011001110 +100111110110 +111100100001 +111010100010 +010010000010 +000111110111 +111101000100 +000011110011 +111000101111 +110010011111 +000001101001 +001110101001 +011111101110 +110111010010 +011100110010 +100011000111 +000000010011 +011011111100 +011110010101 +110111101011 +011001111101 +010101010110 +011110011001 +111100011100 +011001010001 +000110110101 +000111010010 +101011101011 +101010100000 +011101011001 +001110111111 +011011010110 +110111100001 +100011111011 +001010011101 +111001101101 +011100001000 +011010011100 +100111010011 +000010010110 +010110010001 +111010010110 +111111110101 +100011000101 +011010001001 +111010001010 +000100000110 +011010001000 +100110101001 +010111111011 +010111100011 +011101010100 +101000011001 +101001110111 +111001010101 +100110111111 +111010110110 +100000011000 +110010100001 +001110011111 +010001011010 +011100100011 +010111011110 +100110110100 +111000001000 +110110101000 +000000001111 +010111101010 +000100000100 +111000110010 +011111110011 +001100100001 +010100000111 +111010100111 +010001101110 +101111110010 +011111000100 +101100111110 +010111101100 +011110111000 +110001000100 +011101000111 +011011101000 +000100100110 +100110100110 +000000001011 +010101001111 +110001000001 +100011010011 +101000100011 +011011010011 +100010001110 +100111101001 +101111111111 +111010011001 +011000010100 +110101011101 +100110101011 +010000011001 +010011011001 +010101000101 +010100011111 +100111001000 +111110100011 +000110010010 +000000010010 +101110001100 +111010000011 +100001001000 +000011010101 +000100011000 +001111111100 +011110101000 +101111011111 +100000111011 +101001100011 +001001100100 +000100010100 +010111101101 +101001111010 +011000101011 +111011010010 +011001101001 +011101010110 +011011110011 +010010101010 +001111010100 +100000010110 +001101000111 +000010101010 +110010001001 +011001111100 +000100001000 +010111001011 +101111100111 +100111100011 +100001010101 +100111011011 +100101000110 +011010100110 +100011101110 +111010110010 +010000100000 +100100110110 +011001101101 +011111100100 +101100101101 +101010110100 +101001000111 +110100010100 +011101001000 +101110101100 +111100010001 +001101011101 +111111110110 +101110001011 +001100101111 +110000001010 +110011001000 +011100000110 +011001101000 +001100001011 +111000111011 +111100000111 +010000000001 +000101011111 +001000101110 +101101101011 +111111110010 +111000001110 +110101111100 +101100010011 +010011110111 +100100010111 +111001101001 +101000001011 +110001110111 +100011111100 +000101011110 +011000101000 +001010011110 +100111111110 +100000111010 +001111010101 +011111010100 +001101101100 +010011111001 +001010101100 +001110111101 +000101010000 +100101101011 +010100101010 +000000001001 +010011000100 +010001000100 +110101100101 +110011011111 +100001010111 +111111011000 +010111111100 +111000101000 +101011101100 +111111011100 +001110110100 +000010100010 +111101110001 +101011000000 +101101000101 +110000000100 +110111111101 +101110100110 +111011000000 +001011010000 +100100101001 +111110101010 +111011110011 +111000000011 +000101101001 +110100011100 +111101000000 +100000100001 +010110001011 +001100111011 +110000100010 +111001010111 +100100001111 +110111111110 +010111000101 +110000010111 +100011010000 +101010110111 +011100101110 +001110001000 +110011100001 +100101001110 +110110110110 +101110001001 +011011001001 +110000101101 +001000001101 +001000000010 +110110010000 +011110001100 +100001011101 +000001010100 +010100111110 +101110111111 +101010101110 +001100010000 +100000001011 +010011101100 +101011011001 +111100000000 +011011110001 +001110001110 +010100100101 +111011101100 +011110101101 +010110100010 +101010001111 +110110000101 +101000110110 +101101001110 +111111101111 +001001110010 +001001011010 +111100100110 +000101010011 +100100001000 +110111010000 +010010001111 +000000100101 +001101110100 +101010110010 +011110010111 +100011001110 +111011010011 +110011111001 +110100100100 +110101001000 +110001111011 +010110001100 +011110111100 +010100000101 diff --git a/src/adventofcode2021/data/day_04/day04.txt b/src/adventofcode2021/data/day_04/day04.txt new file mode 100644 index 00000000..2a593328 --- /dev/null +++ b/src/adventofcode2021/data/day_04/day04.txt @@ -0,0 +1,601 @@ +90,4,2,96,46,1,62,97,3,52,7,35,50,28,31,37,74,26,59,53,82,47,83,80,19,40,68,95,34,55,54,73,12,78,30,63,57,93,72,77,56,91,23,67,64,79,85,84,76,10,58,0,29,13,94,20,32,25,11,38,89,21,98,92,42,27,14,99,24,75,86,51,22,48,9,33,49,18,70,8,87,61,39,16,66,71,5,69,15,43,88,45,6,81,60,36,44,17,41,65 + +76 82 2 92 53 +74 33 8 89 3 +80 27 72 26 91 +30 83 7 16 4 +20 56 48 5 13 + +67 7 75 66 4 +35 97 21 29 95 +58 98 56 71 65 +55 61 19 64 9 +38 34 42 30 2 + +79 97 63 98 75 + 1 13 0 76 46 +56 59 58 55 86 +43 27 73 67 31 +33 81 26 19 3 + + 3 37 33 8 19 +34 69 82 9 51 +56 45 15 85 79 +32 55 81 22 12 +42 20 48 7 75 + +16 68 45 31 54 +57 40 77 5 76 +67 24 84 14 41 +21 23 27 36 7 +56 8 86 50 22 + +28 53 81 26 40 +59 29 49 89 48 +10 44 3 42 7 +79 87 32 31 54 +15 23 65 69 56 + +86 20 47 1 94 + 3 91 77 14 83 +79 93 4 92 65 + 0 67 30 36 7 + 6 48 59 35 73 + +75 87 7 28 25 +31 71 35 52 32 +47 99 0 80 33 +41 59 24 50 17 +93 58 26 81 53 + +41 77 15 55 86 +20 5 54 79 93 + 3 61 57 47 7 +85 98 91 39 13 + 4 81 63 72 24 + +27 37 57 38 72 +86 99 14 2 15 +94 25 73 13 54 +19 26 56 3 7 + 1 49 33 24 21 + +11 79 12 89 1 +23 98 49 66 48 +15 30 90 57 31 +55 47 61 9 74 +76 93 81 63 95 + +51 92 84 77 26 +85 42 80 89 25 +82 41 73 58 49 + 6 36 75 4 40 +62 11 56 24 69 + +19 79 35 75 18 + 7 4 12 78 70 +44 52 26 94 60 +71 65 61 89 87 +83 95 73 93 13 + +36 79 62 91 58 +12 46 9 55 93 +98 32 68 87 69 +27 90 51 45 2 +15 43 29 26 40 + +29 47 78 54 31 +98 65 71 8 72 +75 51 13 80 2 +93 69 20 52 96 +33 91 3 37 62 + +94 74 2 23 71 +16 95 52 31 80 + 3 4 28 9 50 + 6 40 47 62 48 +97 43 85 11 99 + +20 64 23 36 39 +22 31 75 45 24 +53 19 17 58 51 +66 4 81 72 37 +34 82 42 91 48 + +22 15 43 97 13 +73 71 88 1 48 +84 4 29 87 95 +90 40 11 67 6 +23 10 12 64 99 + +29 61 2 34 89 +93 87 10 42 65 +13 45 88 30 69 +71 78 1 20 19 +44 75 9 84 37 + +48 89 80 68 45 +81 12 1 64 77 +79 87 21 26 40 +44 82 46 78 54 +33 63 8 0 98 + + 0 62 13 43 93 +11 66 99 86 55 +27 89 51 98 46 +39 76 73 24 37 +23 68 72 80 64 + +37 89 58 78 76 +41 9 22 97 82 +40 39 73 96 8 +91 4 84 35 34 +70 12 79 75 7 + +26 18 12 88 97 +10 51 62 53 79 +24 47 31 89 21 +57 96 1 17 80 +58 92 7 14 60 + +12 23 6 71 64 +82 40 15 18 29 +53 21 76 52 84 +32 86 89 22 91 +74 58 80 2 63 + +71 96 10 39 87 +45 68 94 76 33 +59 60 11 62 88 +13 37 63 47 7 +44 79 24 21 16 + +80 71 39 36 1 + 9 23 55 58 91 +65 60 19 25 22 + 0 88 98 83 93 +82 69 43 78 8 + +67 80 42 49 97 + 7 18 92 98 89 +21 95 61 8 64 +76 63 52 68 87 +47 34 84 45 96 + +40 0 45 33 79 +18 56 83 6 58 +66 7 4 25 61 +91 46 60 22 99 +62 65 64 84 17 + +68 18 96 88 61 +89 55 81 20 70 +60 76 17 69 40 +37 63 41 54 11 +43 94 58 47 31 + +60 63 64 26 21 +87 99 49 11 16 +70 41 50 1 38 +45 98 94 67 62 +13 34 61 92 40 + +56 64 37 26 34 +69 16 72 75 77 +19 8 50 38 98 + 0 2 99 48 20 +68 35 88 57 90 + +17 41 40 48 54 +67 52 63 25 78 +95 26 12 85 37 +69 93 58 62 11 +47 33 14 35 81 + +26 51 80 31 64 + 2 7 59 37 57 +70 78 52 91 50 +86 0 15 20 25 +85 79 41 98 83 + +91 86 31 63 4 +81 37 77 94 74 +45 95 88 23 40 +29 46 79 18 70 +75 14 20 51 68 + +30 59 37 56 99 +74 14 4 21 53 +61 49 84 40 33 +20 51 79 66 27 +58 23 88 17 75 + +46 64 31 6 61 +38 14 77 83 59 +13 81 91 17 24 +11 96 90 10 49 +73 82 1 69 45 + +21 57 79 10 41 +67 74 96 20 94 +29 40 78 9 85 +23 25 49 0 39 +59 88 58 86 92 + + 1 22 49 43 32 +47 56 18 16 25 +42 57 48 53 46 +78 20 89 36 96 +24 28 76 39 29 + +53 66 38 11 94 +49 27 25 1 82 +12 72 50 61 51 +97 92 96 4 89 +47 44 21 24 81 + +16 70 78 12 63 +87 32 95 99 64 +68 54 85 53 94 +88 22 52 3 23 +48 27 1 58 31 + +71 62 41 44 49 +67 98 61 48 46 +47 9 24 30 51 +29 76 57 53 34 +23 96 42 5 73 + +50 72 56 97 2 +20 5 3 55 93 +24 7 22 9 96 +58 60 38 17 36 +11 54 79 28 53 + +13 21 35 79 91 + 8 28 68 54 6 + 0 25 82 78 1 +29 99 41 46 95 +66 72 17 55 76 + +43 42 7 85 90 +91 80 79 72 8 +34 77 44 30 92 +48 49 40 70 86 +28 69 27 84 73 + +17 94 67 26 63 +68 77 71 23 13 + 6 96 11 21 73 +53 33 80 62 99 +60 36 38 32 75 + +75 83 50 32 29 +61 94 4 35 51 +52 77 54 69 5 +36 89 76 26 71 +74 19 13 33 18 + +29 24 28 5 54 +56 86 37 45 83 +34 77 42 58 76 +82 1 4 39 64 +61 26 99 72 89 + +25 80 23 88 2 +76 93 90 86 52 +17 62 55 83 7 +57 81 24 0 99 +67 44 27 4 94 + +71 26 62 63 31 + 4 15 38 0 89 +41 77 34 42 19 +39 90 45 30 73 + 3 33 8 50 55 + +65 26 20 8 70 +96 24 88 29 46 +22 6 21 4 72 +59 32 18 49 61 +28 58 66 67 92 + +68 45 62 77 40 +53 1 21 11 83 +44 88 81 56 89 +29 32 47 0 50 +26 74 78 59 6 + +52 56 23 84 74 +64 21 45 35 75 +82 86 60 97 83 +69 78 15 20 37 +68 36 17 43 28 + +92 33 36 48 34 +75 77 79 39 88 +61 28 21 2 94 +84 89 17 22 67 +38 41 7 80 12 + +27 34 91 21 87 + 5 65 7 70 36 +31 3 38 49 61 +96 62 50 97 20 +47 37 16 59 76 + +39 50 3 25 31 +37 36 88 40 14 +26 70 75 30 9 +97 42 86 90 20 +38 66 22 4 69 + +62 64 72 11 79 +50 0 89 30 70 +83 53 93 39 22 +90 20 80 55 32 + 6 12 19 27 2 + +17 85 24 50 13 +12 41 75 74 35 + 3 88 69 73 1 +77 34 71 32 44 +96 26 37 46 9 + +84 20 33 4 21 + 5 22 19 91 51 +23 56 44 43 68 + 6 50 70 47 46 +75 81 34 32 13 + + 6 36 27 32 59 + 4 75 63 86 48 +81 49 44 7 25 + 0 69 11 43 91 +87 39 23 47 98 + +53 16 97 94 69 + 4 43 9 67 33 +21 83 32 87 35 +55 78 68 28 75 +51 19 82 54 24 + +50 84 63 21 92 +51 52 97 66 1 +22 44 31 64 49 +83 24 2 35 45 +15 16 71 60 58 + +54 83 48 63 2 +43 82 65 20 42 +52 86 58 27 75 + 7 76 64 18 11 +77 93 67 0 25 + +12 60 93 99 37 +29 44 47 4 89 +30 63 52 66 91 + 2 38 72 84 6 + 1 96 5 18 33 + +76 61 58 41 43 +21 69 55 18 79 +40 59 9 7 36 +77 82 47 84 89 +92 13 49 6 62 + +33 68 74 92 24 +28 3 15 77 37 +83 72 21 71 29 +88 64 47 35 44 +51 18 31 95 99 + +71 50 97 18 77 +29 30 0 88 49 +98 99 95 11 1 +46 83 64 55 56 + 9 6 59 87 19 + +71 41 13 33 4 +23 22 26 28 82 +95 62 7 34 64 +10 68 14 21 37 +73 53 88 81 1 + +16 87 61 58 95 +90 27 3 65 38 +35 17 85 6 47 +69 22 54 83 82 +28 67 96 48 88 + +17 47 81 13 77 +64 86 82 62 24 +40 41 52 50 15 + 4 71 2 90 22 +61 38 20 78 34 + +65 51 54 10 16 +52 28 68 75 8 +26 97 96 49 73 +95 17 64 80 34 + 5 76 25 66 77 + +30 10 42 72 75 +67 85 36 64 25 +61 48 59 96 98 +81 89 3 4 46 +33 84 32 78 80 + +93 24 5 21 95 +18 1 66 57 31 + 2 17 62 8 28 +73 10 38 25 63 +91 71 48 44 4 + +92 54 34 5 74 + 8 31 94 24 44 +43 2 64 49 21 +73 19 99 60 78 + 0 23 16 86 85 + +25 34 6 67 71 +79 76 39 81 32 +23 36 82 92 50 +10 51 55 40 80 +20 44 30 24 28 + +74 22 58 26 10 +36 43 76 93 15 +87 55 6 91 37 +81 86 8 99 30 +78 62 50 44 54 + +16 14 79 80 42 +27 83 26 82 29 +43 76 9 66 5 +75 77 99 45 10 + 2 61 32 73 91 + +16 60 83 81 47 +23 27 59 85 24 +75 33 36 86 15 +70 91 55 93 63 +25 32 53 14 82 + +98 87 40 52 0 +86 58 74 2 84 +24 99 61 41 92 +77 17 1 43 57 +62 70 94 89 19 + + 7 18 19 85 98 +40 0 99 45 63 +59 49 37 42 5 +58 82 25 53 4 + 2 1 62 68 33 + +21 87 18 29 34 +53 24 26 67 25 +49 77 4 64 59 +52 12 97 2 36 +66 76 9 74 95 + +92 44 14 18 48 +31 74 79 86 58 +68 12 33 55 56 +97 94 25 41 65 +29 36 53 60 62 + +23 26 85 88 7 +96 1 75 76 9 +49 44 18 78 59 +64 83 19 30 74 +52 95 66 62 22 + +43 99 38 73 33 +36 46 24 32 91 +47 68 15 5 81 +37 20 0 97 50 +12 30 53 4 55 + +26 33 49 91 30 +61 22 7 12 82 + 4 36 1 6 11 +96 14 35 90 50 +97 25 28 32 58 + +92 36 56 10 62 +73 35 60 25 34 +96 24 16 53 84 +37 51 30 58 1 +20 80 43 63 45 + +39 68 53 30 91 +11 97 10 12 55 + 6 76 57 77 48 +56 51 98 71 82 +46 27 54 33 5 + +19 38 63 64 61 +48 28 29 60 72 +99 94 55 25 76 +98 37 7 3 80 +10 2 16 35 50 + +16 68 75 19 58 +28 21 56 11 46 +60 25 32 88 30 +53 62 69 7 91 +73 94 24 6 38 + +69 4 37 70 54 +67 17 2 57 16 +72 30 43 58 1 + 6 56 28 86 18 + 7 94 55 35 77 + +73 32 57 79 1 +89 17 26 44 29 +11 86 94 38 74 +49 98 54 76 6 +67 45 87 21 51 + +14 73 22 48 69 +78 89 4 32 18 +96 59 26 43 92 +68 33 97 53 35 +61 52 87 57 31 + +86 1 22 31 20 +14 84 23 38 18 +57 67 5 90 6 +91 21 52 65 36 +61 56 3 51 25 + +60 5 98 31 76 + 3 44 24 16 63 + 0 96 56 25 84 +88 18 71 93 19 +26 77 86 23 65 + +62 58 11 34 26 +35 56 97 67 90 +20 65 27 73 77 + 4 84 19 82 45 +43 92 18 68 55 + +33 46 21 41 75 +98 73 67 80 81 +84 16 44 93 94 + 1 9 26 97 52 +88 74 12 95 99 + +46 83 30 22 79 +72 26 42 74 33 +54 41 94 86 82 +27 81 31 34 12 +77 6 38 56 71 + +22 80 82 60 24 +20 49 51 58 59 +47 35 67 92 78 +15 8 71 97 63 +37 27 98 16 38 + +71 94 59 27 83 +81 68 58 61 43 +12 75 93 70 56 +19 28 99 39 20 +18 22 34 78 13 + +43 70 54 13 60 +17 24 31 47 84 +88 15 40 45 76 + 7 78 63 75 56 +23 66 96 26 46 + + 2 16 13 57 32 +26 70 37 50 68 +58 17 3 96 67 +33 95 72 59 42 +94 43 51 20 60 diff --git a/src/adventofcode2021/data/day_05/day05.txt b/src/adventofcode2021/data/day_05/day05.txt new file mode 100644 index 00000000..39de4e8f --- /dev/null +++ b/src/adventofcode2021/data/day_05/day05.txt @@ -0,0 +1,500 @@ +419,207 -> 419,109 +300,888 -> 803,385 +104,959 -> 457,959 +987,951 -> 987,385 +173,602 -> 919,602 +173,70 -> 305,70 +341,19 -> 486,19 +128,579 -> 128,100 +210,867 -> 969,867 +880,493 -> 880,58 +937,831 -> 131,25 +520,921 -> 476,965 +760,147 -> 461,147 +646,108 -> 646,27 +99,906 -> 99,591 +19,956 -> 19,273 +89,201 -> 326,201 +275,948 -> 962,261 +292,489 -> 689,489 +674,109 -> 20,763 +861,861 -> 529,529 +155,200 -> 273,200 +628,803 -> 209,384 +654,401 -> 578,325 +723,625 -> 828,730 +137,406 -> 862,406 +893,45 -> 41,897 +631,10 -> 941,320 +618,435 -> 537,435 +939,29 -> 30,938 +505,796 -> 505,244 +799,779 -> 77,779 +938,576 -> 427,576 +522,635 -> 405,518 +244,89 -> 946,89 +447,791 -> 316,660 +560,731 -> 687,731 +16,878 -> 835,59 +45,707 -> 45,565 +767,166 -> 404,529 +791,260 -> 791,950 +373,949 -> 373,156 +38,774 -> 38,557 +445,537 -> 445,370 +817,756 -> 959,898 +472,551 -> 952,71 +696,381 -> 657,420 +43,829 -> 43,190 +101,635 -> 728,635 +197,532 -> 140,532 +693,368 -> 299,368 +433,140 -> 433,610 +136,58 -> 136,666 +472,294 -> 886,294 +690,883 -> 671,864 +141,598 -> 141,118 +56,651 -> 56,957 +747,82 -> 747,91 +219,455 -> 55,291 +444,131 -> 444,802 +326,459 -> 528,661 +245,965 -> 143,965 +916,316 -> 630,316 +263,55 -> 977,769 +262,451 -> 587,451 +960,178 -> 960,564 +960,88 -> 476,572 +314,259 -> 314,169 +404,742 -> 429,742 +830,921 -> 409,921 +181,396 -> 463,678 +338,293 -> 23,608 +851,667 -> 851,350 +181,859 -> 718,322 +314,240 -> 870,796 +778,984 -> 77,283 +476,178 -> 440,178 +935,357 -> 841,263 +695,683 -> 414,964 +760,241 -> 306,241 +390,355 -> 791,355 +460,710 -> 851,710 +559,448 -> 870,448 +161,526 -> 301,386 +935,495 -> 633,193 +205,536 -> 383,536 +290,626 -> 290,94 +55,972 -> 946,81 +240,531 -> 631,922 +189,806 -> 573,806 +518,827 -> 866,479 +239,829 -> 260,829 +151,51 -> 849,51 +301,736 -> 532,736 +23,889 -> 336,889 +284,124 -> 284,933 +637,610 -> 67,40 +610,828 -> 610,159 +763,590 -> 763,963 +804,576 -> 804,694 +689,872 -> 82,265 +440,377 -> 190,127 +933,330 -> 310,953 +873,99 -> 873,328 +756,808 -> 860,808 +119,64 -> 928,873 +74,144 -> 489,559 +957,938 -> 838,938 +148,320 -> 932,320 +386,171 -> 386,985 +357,171 -> 494,171 +254,67 -> 254,95 +196,910 -> 827,910 +107,114 -> 758,114 +971,40 -> 801,40 +504,602 -> 215,891 +184,310 -> 720,846 +280,300 -> 955,975 +49,637 -> 49,572 +352,512 -> 739,899 +610,123 -> 585,123 +808,881 -> 758,881 +646,980 -> 818,980 +948,482 -> 384,482 +115,144 -> 852,881 +506,836 -> 547,836 +985,369 -> 374,980 +883,975 -> 48,975 +447,664 -> 312,799 +24,597 -> 24,331 +45,19 -> 979,953 +210,689 -> 210,430 +704,806 -> 704,612 +985,982 -> 124,121 +70,174 -> 550,174 +463,12 -> 637,12 +107,97 -> 716,97 +935,265 -> 390,810 +42,223 -> 42,86 +60,245 -> 60,473 +695,735 -> 208,735 +547,265 -> 802,265 +941,667 -> 941,806 +250,286 -> 611,286 +10,64 -> 630,64 +482,889 -> 482,150 +441,820 -> 776,820 +529,474 -> 529,265 +533,465 -> 217,149 +242,473 -> 242,830 +633,160 -> 476,317 +942,24 -> 942,784 +80,313 -> 92,325 +295,109 -> 295,712 +31,964 -> 857,138 +285,255 -> 955,925 +650,610 -> 650,366 +722,586 -> 625,586 +580,384 -> 580,531 +78,407 -> 896,407 +296,310 -> 730,744 +717,966 -> 924,966 +524,551 -> 524,671 +44,127 -> 784,867 +214,849 -> 238,849 +749,320 -> 749,241 +886,146 -> 336,696 +889,933 -> 455,499 +644,232 -> 79,797 +400,979 -> 626,979 +433,681 -> 433,523 +447,57 -> 676,57 +185,416 -> 659,890 +849,645 -> 257,53 +633,721 -> 633,901 +766,355 -> 766,56 +669,393 -> 669,523 +833,336 -> 833,58 +52,114 -> 52,413 +699,957 -> 109,957 +14,953 -> 945,22 +641,15 -> 929,303 +25,874 -> 866,33 +856,73 -> 28,901 +94,892 -> 592,892 +256,357 -> 256,700 +960,579 -> 31,579 +940,859 -> 940,987 +507,673 -> 820,986 +164,361 -> 133,361 +210,424 -> 876,424 +28,186 -> 28,376 +452,149 -> 531,149 +142,160 -> 142,435 +180,801 -> 180,439 +681,267 -> 42,267 +724,414 -> 786,476 +762,492 -> 762,427 +902,808 -> 227,133 +70,923 -> 821,172 +468,12 -> 457,12 +208,129 -> 986,907 +78,786 -> 78,352 +573,869 -> 820,869 +780,680 -> 520,940 +276,66 -> 276,244 +423,629 -> 592,629 +888,507 -> 888,139 +869,878 -> 869,951 +274,614 -> 625,965 +926,289 -> 982,233 +102,687 -> 102,214 +52,264 -> 52,12 +904,43 -> 657,43 +184,685 -> 184,628 +506,912 -> 601,817 +356,524 -> 87,524 +202,260 -> 202,276 +970,63 -> 83,950 +402,332 -> 950,880 +195,666 -> 843,666 +13,82 -> 892,961 +614,28 -> 614,871 +892,162 -> 892,101 +363,665 -> 59,665 +768,208 -> 410,208 +483,300 -> 295,300 +590,108 -> 881,108 +837,967 -> 837,326 +368,731 -> 368,913 +900,921 -> 873,921 +896,931 -> 848,979 +562,939 -> 857,939 +85,351 -> 598,351 +917,30 -> 624,30 +605,314 -> 605,303 +382,655 -> 340,697 +949,115 -> 653,115 +667,311 -> 370,608 +971,983 -> 39,51 +178,687 -> 178,69 +906,197 -> 296,807 +947,886 -> 383,322 +551,667 -> 551,238 +86,65 -> 916,895 +589,887 -> 865,611 +332,53 -> 84,53 +361,148 -> 55,148 +883,205 -> 661,205 +415,552 -> 52,552 +46,42 -> 46,952 +955,13 -> 39,929 +677,482 -> 208,482 +414,268 -> 927,268 +101,509 -> 101,149 +946,971 -> 139,164 +223,597 -> 223,517 +805,896 -> 796,896 +565,875 -> 878,875 +472,431 -> 472,732 +643,15 -> 643,202 +618,725 -> 618,284 +376,532 -> 376,120 +807,981 -> 415,981 +716,401 -> 61,401 +893,955 -> 743,805 +264,935 -> 264,677 +586,908 -> 638,908 +780,277 -> 780,418 +234,410 -> 428,410 +899,214 -> 899,703 +948,51 -> 948,509 +238,664 -> 879,23 +20,877 -> 638,877 +146,738 -> 109,738 +670,893 -> 524,893 +317,423 -> 27,713 +91,600 -> 477,986 +902,63 -> 902,797 +647,839 -> 647,667 +227,358 -> 236,349 +985,541 -> 660,866 +86,562 -> 86,949 +368,851 -> 863,356 +327,905 -> 57,635 +561,275 -> 781,495 +196,65 -> 626,65 +110,688 -> 720,78 +720,472 -> 115,472 +817,135 -> 817,876 +752,387 -> 752,104 +78,127 -> 635,684 +812,170 -> 155,170 +606,718 -> 804,916 +843,494 -> 979,494 +919,346 -> 454,346 +866,828 -> 818,828 +114,115 -> 114,250 +895,308 -> 370,308 +665,893 -> 690,893 +939,275 -> 741,275 +290,321 -> 290,910 +747,327 -> 107,967 +734,715 -> 391,372 +368,497 -> 506,359 +773,945 -> 391,563 +772,537 -> 733,537 +271,679 -> 488,679 +665,745 -> 665,984 +143,177 -> 685,719 +671,860 -> 147,860 +674,365 -> 857,182 +343,74 -> 985,716 +284,46 -> 180,46 +595,800 -> 20,225 +57,278 -> 792,278 +649,285 -> 165,769 +600,24 -> 600,116 +862,939 -> 862,871 +153,917 -> 682,388 +117,884 -> 257,884 +726,763 -> 531,763 +810,985 -> 899,985 +718,942 -> 718,466 +674,19 -> 674,203 +117,677 -> 117,918 +928,261 -> 928,945 +719,390 -> 719,321 +822,601 -> 484,263 +725,793 -> 725,111 +201,745 -> 588,745 +404,889 -> 908,385 +981,39 -> 610,410 +148,426 -> 711,989 +128,260 -> 319,451 +325,306 -> 325,585 +557,415 -> 557,745 +915,101 -> 648,101 +104,636 -> 104,520 +93,964 -> 641,416 +201,709 -> 201,90 +921,571 -> 798,571 +313,624 -> 313,510 +343,649 -> 28,649 +688,246 -> 24,910 +696,610 -> 353,610 +126,310 -> 126,394 +457,98 -> 457,981 +277,707 -> 277,531 +943,721 -> 37,721 +959,295 -> 702,295 +23,547 -> 891,547 +209,114 -> 931,836 +737,174 -> 737,195 +208,890 -> 115,797 +170,401 -> 726,401 +11,218 -> 11,297 +989,10 -> 10,989 +866,86 -> 487,86 +867,31 -> 867,334 +846,414 -> 861,414 +478,315 -> 478,697 +572,843 -> 731,843 +657,12 -> 161,508 +903,194 -> 142,955 +612,321 -> 147,786 +813,920 -> 259,920 +834,389 -> 651,206 +824,153 -> 824,557 +399,871 -> 115,871 +270,785 -> 270,120 +469,640 -> 753,640 +620,132 -> 620,175 +620,234 -> 666,234 +594,409 -> 948,55 +670,323 -> 670,89 +262,65 -> 262,379 +879,617 -> 284,22 +493,423 -> 761,423 +17,931 -> 906,42 +512,494 -> 473,494 +122,230 -> 122,87 +15,207 -> 533,207 +216,183 -> 50,183 +360,107 -> 280,107 +403,841 -> 941,841 +913,442 -> 500,29 +864,947 -> 864,85 +500,516 -> 634,382 +283,20 -> 669,20 +916,770 -> 176,30 +966,73 -> 252,787 +847,841 -> 171,165 +163,219 -> 766,219 +482,515 -> 275,308 +528,949 -> 240,949 +725,574 -> 847,696 +109,131 -> 109,538 +655,837 -> 476,837 +803,631 -> 803,51 +977,83 -> 149,911 +207,231 -> 171,231 +617,29 -> 617,294 +838,708 -> 446,708 +711,597 -> 612,498 +975,942 -> 279,246 +315,128 -> 315,293 +146,962 -> 873,235 +448,180 -> 54,180 +177,680 -> 866,680 +891,265 -> 741,265 +656,949 -> 414,949 +909,456 -> 196,456 +574,286 -> 58,286 +861,691 -> 861,383 +779,351 -> 779,827 +459,989 -> 459,350 +936,480 -> 936,699 +645,309 -> 348,606 +861,62 -> 621,302 +568,324 -> 568,358 +889,221 -> 889,335 +538,759 -> 538,266 +780,736 -> 780,827 +866,518 -> 983,401 +67,871 -> 840,98 +432,664 -> 664,664 +146,24 -> 755,24 +964,585 -> 964,770 +372,144 -> 809,144 +688,827 -> 867,827 +137,916 -> 137,942 +846,131 -> 846,46 +764,21 -> 457,328 +140,66 -> 799,725 +703,224 -> 83,844 +557,67 -> 557,681 +355,544 -> 764,135 +625,893 -> 126,394 +842,214 -> 842,322 +582,778 -> 582,762 +341,861 -> 341,859 +143,767 -> 52,858 +114,109 -> 114,200 +394,210 -> 396,212 +861,353 -> 861,652 +873,553 -> 62,553 +44,962 -> 984,22 +734,56 -> 734,828 +798,516 -> 950,516 +367,755 -> 367,618 +868,637 -> 868,780 +192,952 -> 192,734 +603,109 -> 705,211 +12,17 -> 984,989 +910,147 -> 910,620 +515,749 -> 515,517 +775,136 -> 761,150 +662,636 -> 662,21 +894,490 -> 310,490 +956,732 -> 297,73 +514,99 -> 140,99 +308,419 -> 691,419 +485,86 -> 485,187 +737,783 -> 979,783 +90,76 -> 869,855 +959,112 -> 84,112 +879,494 -> 879,257 +933,425 -> 933,619 +64,391 -> 64,21 +106,305 -> 253,452 +324,152 -> 853,152 +666,225 -> 39,852 +370,904 -> 257,791 +592,845 -> 592,15 +936,971 -> 267,302 +147,210 -> 62,210 +308,323 -> 495,323 +212,918 -> 110,918 +229,392 -> 685,848 +896,132 -> 326,702 +483,143 -> 605,265 +251,317 -> 130,317 +758,93 -> 445,93 +156,286 -> 458,286 +401,904 -> 383,904 +244,256 -> 851,256 +928,411 -> 612,411 +642,920 -> 642,420 +494,707 -> 494,225 +87,112 -> 87,256 +972,907 -> 83,18 +139,104 -> 139,761 +493,725 -> 493,529 +981,145 -> 459,667 +390,240 -> 702,240 +466,982 -> 807,982 +320,143 -> 692,515 +477,649 -> 477,206 +456,254 -> 456,578 diff --git a/src/adventofcode2021/data/day_06/day06.txt b/src/adventofcode2021/data/day_06/day06.txt new file mode 100644 index 00000000..445de957 --- /dev/null +++ b/src/adventofcode2021/data/day_06/day06.txt @@ -0,0 +1 @@ +1,1,3,1,3,2,1,3,1,1,3,1,1,2,1,3,1,1,3,5,1,1,1,3,1,2,1,1,1,1,4,4,1,2,1,2,1,1,1,5,3,2,1,5,2,5,3,3,2,2,5,4,1,1,4,4,1,1,1,1,1,1,5,1,2,4,3,2,2,2,2,1,4,1,1,5,1,3,4,4,1,1,3,3,5,5,3,1,3,3,3,1,4,2,2,1,3,4,1,4,3,3,2,3,1,1,1,5,3,1,4,2,2,3,1,3,1,2,3,3,1,4,2,2,4,1,3,1,1,1,1,1,2,1,3,3,1,2,1,1,3,4,1,1,1,1,5,1,1,5,1,1,1,4,1,5,3,1,1,3,2,1,1,3,1,1,1,5,4,3,3,5,1,3,4,3,3,1,4,4,1,2,1,1,2,1,1,1,2,1,1,1,1,1,5,1,1,2,1,5,2,1,1,2,3,2,3,1,3,1,1,1,5,1,1,2,1,1,1,1,3,4,5,3,1,4,1,1,4,1,4,1,1,1,4,5,1,1,1,4,1,3,2,2,1,1,2,3,1,4,3,5,1,5,1,1,4,5,5,1,1,3,3,1,1,1,1,5,5,3,3,2,4,1,1,1,1,1,5,1,1,2,5,5,4,2,4,4,1,1,3,3,1,5,1,1,1,1,1,1 diff --git a/src/adventofcode2021/data/day_07/day07.txt b/src/adventofcode2021/data/day_07/day07.txt new file mode 100644 index 00000000..23b9031b --- /dev/null +++ b/src/adventofcode2021/data/day_07/day07.txt @@ -0,0 +1 @@ +1101,1,29,67,1102,0,1,65,1008,65,35,66,1005,66,28,1,67,65,20,4,0,1001,65,1,65,1106,0,8,99,35,67,101,99,105,32,110,39,101,115,116,32,112,97,115,32,117,110,101,32,105,110,116,99,111,100,101,32,112,114,111,103,114,97,109,10,51,812,37,278,203,12,1699,10,24,482,200,197,433,141,1854,148,529,748,46,1366,41,329,300,29,159,767,661,238,586,940,139,1606,273,1093,1687,694,232,1069,264,162,752,250,138,471,828,72,285,136,817,258,586,308,191,478,43,750,570,38,207,1221,434,124,1410,125,743,7,827,963,873,263,478,938,686,250,1022,7,917,717,1354,618,639,24,113,417,550,279,919,736,75,117,1173,32,172,88,1435,15,442,232,272,102,253,113,173,86,57,536,1282,111,18,197,117,738,427,910,740,861,90,706,520,8,1,129,80,79,36,788,1545,119,971,1435,945,808,821,1080,227,1257,973,39,303,818,669,7,197,819,1683,50,2,1248,1459,669,210,653,978,76,509,173,304,183,228,45,1032,672,792,12,540,839,135,153,55,29,1190,42,395,626,487,54,831,956,1,1012,1461,929,561,34,733,629,49,146,469,220,1368,89,265,128,521,402,557,1121,853,240,655,100,341,137,525,371,288,1389,430,1148,398,130,174,176,982,74,923,1438,469,572,33,261,126,456,300,174,27,60,1052,428,196,403,394,392,40,474,27,351,194,619,657,722,181,300,448,1037,525,1388,854,1459,967,211,46,1708,1175,1225,613,1315,479,973,573,324,887,2,116,752,447,3,1074,1135,72,595,601,632,511,1349,267,164,6,1300,172,412,3,298,1120,93,161,176,141,150,67,37,144,421,45,1451,781,1120,205,487,344,372,150,136,614,265,536,1740,265,1367,0,322,204,76,97,1112,717,444,418,279,943,597,309,322,205,1167,292,18,383,367,621,770,13,243,1641,500,313,785,106,184,310,615,248,664,98,221,740,450,460,7,23,1226,183,75,449,806,721,1057,266,254,1083,0,125,27,151,16,664,73,94,44,1347,73,325,958,475,862,1096,1523,114,307,1418,46,113,188,462,194,535,282,1144,26,1106,1465,39,133,445,177,481,233,696,181,72,1466,747,266,44,311,1061,505,140,956,360,716,98,844,1059,305,162,1679,817,873,969,793,1079,320,318,70,417,1170,628,1628,1515,894,482,1757,423,1024,267,1280,10,474,806,684,378,425,816,243,388,27,116,569,777,946,593,646,91,639,508,63,405,1310,639,380,323,75,860,67,42,58,198,35,58,180,75,530,25,194,1743,476,1092,795,243,121,1326,409,1300,218,1393,371,64,412,209,255,648,480,71,125,1398,45,1035,1245,1426,1765,596,187,353,0,261,774,958,1303,397,1024,1076,1225,307,69,789,307,450,143,203,259,21,2,297,963,1236,1292,595,784,100,1194,1246,1820,534,58,244,12,194,1316,211,368,192,741,1232,23,87,551,291,12,512,6,42,1513,619,62,1339,375,743,137,1486,254,53,274,299,1443,844,899,753,414,241,161,52,163,66,86,503,823,528,150,376,403,1346,125,363,412,774,374,1090,1001,177,1379,74,193,49,92,294,679,108,228,199,1203,324,64,321,89,601,32,46,1274,519,1089,1107,63,379,1062,1034,129,736,716,156,526,445,1,299,388,444,1080,1016,101,735,315,517,13,390,537,155,140,1119,975,259,254,402,277,1160,372,55,392,1022,1119,4,735,266,260,1550,389,824,1426,23,65,480,151,176,1761,0,16,139,152,383,358,1155,95,1138,310,232,71,1073,22,1,335,1168,792,136,902,33,204,59,146,1063,1012,103,1083,160,885,445,499,473,278,451,191,1940,249,37,722,325,495,615,70,85,50,107,560,597,75,206,767,990,113,530,94,1343,250,116,67,417,390,500,633,736,132,473,646,1502,249,119,228,3,64,212,19,1005,324,14,418,619,847,20,878,533,204,49,820,216,34,60,62,119,680,88,359,8,473,882,138,387,297,419,664,693,420,101,53,829,3,101,272,726,639,368,363,0,33,70,0,626,525,364,784,271,73,536,318,598,794,34,314,1248,1596,764,34,202,1383,635,158,1095,76,0,119,176,1158,301,409,796,242,1765,808,59,0,278,4,8,359,1111,818,931,220,109,292,353,532,750,333,223,725,1476,199,1,201,55,72,117,37,210,400,108,619,863,187,372,15,574,380,635,332,1,1210,64,897,501,12,822,508,250,263,1044,72,15,210,901,219,471,292,179,572,733,422,1354,1197,202,538,662,261,973,0,465,522,412,9,166,325,237,757,115,1046,273,549,174,30,96,215,113,7,1032,671,262,202,332,1078,629,555,26,8,29,349,206,123,1093,673,1356,513,1454,518,1240,337,96,115,1160,17,331,1450,114,107,782,995,168 diff --git a/src/adventofcode2021/data/day_08/day08.txt b/src/adventofcode2021/data/day_08/day08.txt new file mode 100644 index 00000000..9c4aa3cd --- /dev/null +++ b/src/adventofcode2021/data/day_08/day08.txt @@ -0,0 +1,200 @@ +fdceba bafdgc abeg afbdgec gbeacd abced bgc fcdge bg bedgc | bafdec cgefd gcebd ebcgd +gbfac fegbda fcedagb bea ea abcdef dgbfe gfabe dgea gbdfec | gdea bgefdc bea efdbg +eg dagef gbcfeda ageb cegbfd gfe dbefa facdg abfged cedbaf | befda daefb egf gcdfa +edgacfb gcfd dgb degfab bcega bdagc cgafbd fbacd gd fceabd | fbdac gd gdbcaf dgb +eaf bedgaf dbafc bfceag fedcbg eafdcgb debfa ae adge gdebf | abcdfeg febdg ae daebf +afbdc aefg ea edbacfg dbefg eab gcbfde abecgd bgefad bfdae | gfea bfdea gbdef fcdebg +deagf daegc dcgabe abcgdfe gc cabg fedgbc cdg dcafeb ecabd | ebfcdg gcade cfegdb dcg +agecd bdegca cfea af abdgef fbcaedg gaf dgcfb fadgce afdcg | fadgcbe ecadg bgefad fag +degcba cfbge cdgaefb gbecfd ae gafdc gfcaeb beaf cae cefag | feba abdcge becagdf bagefdc +bfcga ecgdbaf facedg cdfae abecf eb dbae ebf ebcdfg cefabd | bafec ebf afdce egadfc +cfaegbd adbecg ebgca debafg cdfge fa afg cafb fgaec afbcge | gcbaef cdfeg efgacb gaecb +efacdg egdbfca bcdagf ceadg dface daf bafec dfeg fd cdgabe | efbca cdgae daebcg geafdc +beg dgfab geaf gdeab fbcagd efdbcag cbdefg edbgfa ge baced | gdfab ge gcbdfa badfg +gdab bfdeca bgfeac becagd abegdcf edcgf dcb edbcg bgcae bd | dbegc dfbeac cafgbe db +cefga dc fedcgb dcf fdabe ecbfda dcfea dabc debgaf bfgadec | gafec aebdcgf agdbfe cfega +bfdec gbac bda dagfeb becdag cagebfd agecd feacgd ab cdaeb | ab bacde ba decgaf +dbg ecabg gacefd dbaf agefd gebdcf fdacegb bedga fgbade db | dgb gbcefad dbg bdagef +fbge gaedb eg dbeacf dgcafe gedabfc cdgab aegfdb dbfae ged | dgcba abegd bdacg begda +abefg ad gcebd dae dfbgce bdeag dgacfe dcab cgafebd geacbd | agfbe ebcgd dagcbe egbda +gdcfab cdeafb fg dbeacfg gcafe cbeafg gdcea ebcfa gaf fgbe | acfeb fag dcgae acfbgd +cegfad fedb fbgadce bacdfg acbeg bad fcdabe debac db cefad | fdgcae cfgdea edfcab cefad +fbg bgec efbac fbgca gb fbcdea bfdgea bdcagef fgadc cbeagf | fgb fegdba fbaedc aefcdb +aecfd agcdfe bdegcaf efbad bfeadc eb aegbfc dcbe bef dbagf | bcfead fgbcea eb aefdb +gedab cfdbg egca dfegab gedcb fdebcag acfebd ce cbe decgab | acdbge bfacde bgade cedabf +edfg fbgdae bagec feagb fbg abgdcf dbefa bdeafc agfdbec fg | dfeg daebf dcbfga gf +bcgaefd cfbeg cdefgb fcde adgbec acgbf efb gebdc fe dabfeg | abgcf aegbfdc bedacgf edgabc +dgfbc bfaegc fad dcea adcfg edagbf da eadfgc cdafegb geafc | da fcgad gdbfc afgbce +cdea bafdgec gcbeaf bcafd fdbga bcd cd ecfba fcebdg efdbac | dfgebc cbd fcbad cdae +afcegdb edagf ab gbfce ceab gdfbec fdgcba gbeaf gab cgbaef | ecbgaf bgafecd cbea gacbdf +efgcab ecb bedf be cbfgaed bcdea cdefab ecgad fdacb gafbdc | adfegbc gcafbe fcbgae adecb +gfecad gc egcf afcbgd ebadcf cag eagcd acefd bagefdc dgeba | gc acg dcafe begad +dacgb cbadge dcf cf cdbaf afgc bfeda dgfebc bdafgc feabcdg | cgfa dbagcf fcag fagc +fgb fcabd fdage bafegc bg dgface afgcedb adbgef dfbga bged | abfdc ebfagc agbdf dcfegba +afd cdfega cdbgfe bgefad dfegc becfa feadc bcfdega da agcd | deafgc fabce da gbcdef +fcdgb baefgcd fe dgeabc ceabd fde eafc febcad defbag cbedf | bfedca gdcbf daceb ebgdfa +cbgf bg decafgb ecadgf dcagf gfabd bgcafd gbd cbadge dfeab | cgfb edbfa dbagf gbd +bda dfgbec efdga cagb bgead egcbad ba dfceba degcb egabcfd | gfead ba gbac egbdc +bd dab cbgdea dbge bcdga gdcaf fbdgeca abgce abdfec cbegaf | abd bd gebcadf dafcg +faegcbd bdagcf cdgbfe cb efbdg gdafbe bdc aegcd becf degbc | bc cb fgdabc bc +cfbae bcfged cafdeg fa acf febcg fegcdba bagf afcgeb dabec | cfgbe egdafc fbgdec cbfea +dabfgc gdcfbea cedaf gebda dagfec ecbf beacd bac bc cafedb | begda bc decab defcga +ecd decgf gebc ec dcgaf cfaebd efdbga afebdcg bfedcg dbfge | dgfecba cgeb bfdecg aedbfg +efb afbgdce fdceg aebg afcbg gdfbca efcgb be dcbfea fagebc | bgfaedc afbcg efdgc cgfeb +eb adcfeb eab dacbg gebcfad gaedb cgbe gafde gedcba gcfbda | abgde bgdae daefg cfbagd +cdfeab cgfead bfgdca bfgcead dfcea bdeaf aedgb bf becf bfd | cefb dafce dcebaf edgcafb +acfbegd bf gfb cbaeg gaefd fegab cafb agebdc bfgdce bcfega | fdbgec faegd eafgd gbf +eadfg gdc fegbcd ebdfc debcga bceafdg eadcbf bgfc gecdf gc | dcfbea debcf gdefc gdc +gdb afbdgce gb gfdce dacefg edbfcg bdaecg fegb bdafc gbcdf | cfdbg dbfgc fcdegb debcga +bfcdg befcd efgb cgdbea ceb eb fdeca efgcbda dcbfag dcebgf | gfbcd ebagdc dabfgc dfbgc +acefdb afbgd cda ac adcgfb bdgeafc gcaf gabedf bgdac ecbgd | gfbdac dbgca edacfb dfeagb +cfadb dfcgea aebdgf ba edfacb eafbdgc baec cdbfg abf cadfe | dgcfabe aceb edgcaf afdgeb +cgfda ec cgdbea gedcabf dfgcab egcf beadf dfeac ecgadf eca | gfcbad feadc fcead gcafd +edgfa gfbd bg adfcbge agfbde edcgfa abfec abecgd eabfg agb | fcaeb dgcefa facedg bdgf +db eabcdfg gefcda cbegdf dcbg bdf gedfb edcfg fdecab beagf | ecfadg cgdb bcdg gcfead +dbeca cdbafg gcdaeb ec feagcbd fdbea cbe gdce bdgac abefcg | cadbg dacbg cbadg bagcef +cagbfde gbaec cfbage fa bfcadg efacb ecbadg cbfed bfa afeg | gefa abcef dbfcga fbeca +cdefg degacf dbfca dfcga cedgbf fdgaceb gaed gca ga gcefab | ecgdbf gedcfa gdcef gcdef +abcdgf acdge eac ea dabefc aegdfbc edcfg cebdag abgdc agbe | aegdc bcgad dcgfe fedacb +egbcdfa becaf ecbdaf dcaf edabc cbf fc ebgfa bgdaec bdefgc | ebdcfa ecbfa fcb cbagde +bacfed ecagf ad gadfe aed bdga fdgbe dfaegb gdbefc dbcafeg | gafec gfdeb fadbcge dcegbf +fcdgbae bgcadf bged eabdc ed bcadg baefc acgdfe eda cdgbae | fbgcda bgcad faceb eagdcf +fbcd ecfba aegdc dab bceagfd fbdeac db afecbg decab fagbed | cegda bd cgeda bd +gcdeab gbedcaf gefc defba ced faedc cbgdfa dgcaef ce cgdfa | abgcfd cfgbad cgeabfd dfcga +ba gfdbac bdgecaf eafcb gface bfa eagb cgefad dfbec bfegca | ebacf ab gdafbc cgfeab +feadcbg fbg decbag ebgdfc faebdg dabeg feab fb dacfg fgbad | agfdc gefcadb gdfba gfcdbea +bcgfead adecfg dcfb dbg agfdc egcab fdgbac bd gdbca gfabed | bagedcf gebca fcadg gbd +adbfec afgecb edf cbefd fegcda deab cfbgd ed cebaf cefbgad | efbcd fegcda bfdacge fgcbd +bf gcabdfe adefg fdgab adbgc bcgade efagbc cfdb bfa bcgdaf | abf fba bdgaf fagbdc +fgeadbc bfcgd dcga cd bfedca abcgdf badgf fcegb daegfb cdf | cfd dc bdgcf gcebf +bgecdf geab abd begdc defcba agcbd ab becagd dcgaf abfcedg | agfdc bda dab dbacfe +egca gcf aedgf gc dbfgae gebdfc fecdga adbfegc dcbfa afgcd | gfeda deacgf ecgfda deagbf +cdfbg dafb gcbde bfc aecfbg fagdc agdcfb bf bgcdeaf cagdfe | ceafbg adgcf gdecb bf +geabfc ecgfa fgebd dgeabc aedgf facd fcedga ead da fbecgad | degfa cdaf aed bacdeg +dcg cbde abfgcd fcgeab gaceb dc dacbgef cgaed degfa degbca | dcfabg dacgeb debc dcfbga +agc fcgdaeb gdba dfabc fgced gecbaf efdcba agdcf gcadbf ga | cdefg fcebag ebdfca fcbega +feabdgc badef fg acfbdg gfed afbge afg dbeafg begac bfcead | fedcab fabge agbefd fcdbae +bfcead cfe bdgafe cadefg fbdc bacef cgeab fc dbagcfe fbdea | adgfce cfbd cdfage fgacde +cedg ebcda ebfcga efdbag dcfba cgeba de badcge eda fbcagde | cgaebf beagfd cbgae efagbd +cfead acegd cedbgf cdafgeb dcebg dabcgf acg aegb ga eacbgd | dcefa agdce ga abge +ac bdcgf acbefgd cgdaf fdgbca dbcefg bgecaf cbad cfa gfade | gaecfbd adbc fdcgeb adcb +dcgebfa fcdbg adcgbe bdfcae dec abcfe ed fcebag ebfdc defa | aecgbd dgcfb gcbaef bdfgc +becdg ag dbcfge fadegb dga ecgbda dgbaefc cafde gbca gaecd | agdebc bfegdc dcafe debfgca +debgfc dcbaegf dbg afgcd fecgb acbdeg bfgace gcbdf db bfed | fbed bgd db dfcbge +dcegba gebac adfcg egd debc debagf agdec ecbfga ed fbecdga | dfbage deg efbadg fagceb +cf dbfgec bfedac bcf egfc bdceg dbaceg fabcdge gbdfc gdabf | cfgdeba dgbcf cedfab cbf +gaedbfc bdfae gfe fdgeab dbefg gcdeb fdbeca fg efgacd agbf | feabd fdegb dbafe bfead +fgbce cgdfa ab gdbfea cafbdge cagfb cdgfbe ebgfac bace bfa | ceba afcdg ecfbagd efbgac +cedgf gc gedaf faecbd dbfceg dcbg cge efbgca bfcde fcbdgae | eafgd cbgd fagde edafg +dbgfc dbfce de dbe cbgefd dafbcg cabfe debafg fceadgb edgc | abefc cbfadg bcdfe cdeg +fabde db fbeac dbf dfega ebcfdag cefdba cdbfge dcab gfbace | dgefbc bfd db dacb +fgaedb ecd dcbfe edafgc dc bgefc edfcab dcba afedbcg fabde | bgcfe fgaedc cd dfgaeb +adcfe dbcga eb dbe bceda cafgebd aefgdc bedcaf fagdeb fbec | abgdc bde deb bcadgef +dacgf gafdeb ag cabfdeg bfdac dbfcge gdeacf geca afg cdgef | fcgbde cegfdb fdecga degfc +fc cbf gfbadec dabef cbfda acebgf gdcf bfgcda bagdc gdebac | gecabf dcgf fbc cdgf +cbdafe fdabe gdafcbe bcgade adcf dfegb abd agfbec da febca | acgebf bdfaec adb agecbd +ebgfd fdgcbea dc gfdecb edgc dgabcf afceb dbc bgdfae cfbed | dcebf afebdg adcfbeg gbefdc +faecbgd gd gabd cdebg dbecf deg cagfed bcaeg fcgabe abdceg | cedgb gebdc cefgad aegcb +de gbedf dgcebfa gbfae cbde cbadgf dcfgb fedcbg edg cgafed | fgadce daegfc de eagbf +gadfbc ec bagcf edfacg begfc ecab gdbef cgedafb ecf bgfeca | fbcga dgecaf fce cbea +afe abdfgc egfcbda gabcf edcafg gcfeba acefb abeg ae ecbfd | degcfab dfaecg gdafbc ecafdg +acgdb fbgd decfa fg bcegad gfa debfagc gfcbae cabfgd acfgd | bdcga dfgca dagcb cfabgd +gefac ecfdb acdfbe adfegb gabefcd gd dbcg gdefc cfdebg egd | gdbcfe decgf efdgc gd +adgfe gfcdeab fgdbea aefcd dfbgec abgf eag egfbd cdbage ga | fgdcbae dbgfae bgdaef edgaf +bgfae degb cadbef cbagfe dba db gcabdfe fgbad dbegfa gdacf | adgfb dbgaf fcedab dba +fb cabdgf becgda bgaf gbdfce dagbc cabdf bdf bfagced edcfa | dbcfga badcf aedcf bagdfc +bdaegf ebgd gdfeacb gd gafbc agd bafgd ecgadf fdbeac dbfae | degacf egdb ebadf dfbeagc +dfecg bdceg dcbafg cafgedb begdca gcf afedg gdbfce cbef fc | dcfgbe egdabfc cfg fdega +dgfcab cdefga fcebdag cb bcd abcg dfagc bgfcde cadbf dbfea | bcd fdcbeg gedcfab gcdabf +edgcbaf gcaf dcbfeg edfcg adcge dceafb cfdage dbeag ace ca | dcbfge fadceb cdegf befacdg +gacde bgdac gdcbaf fdagb bdc cfbeagd bc gcbf abcfde fbedag | dabfg eafbcd bgcda aefcbd +ebdcaf cegbd afdbceg faeb cgdefa bfced ef cbfda cef bagdcf | dfebc cfdbag ebcfd aebf +becgaf adceb decg cad dcafgbe efdba fdbcga bdcaeg cd gebac | bagce dac gbcfad adfbe +dcaeb geb dgcfb gbafec ge eadg daecfbg ebdacg deacbf ebcgd | dgcbe beg adbec bfadce +bcfega gcdba gfcab cebgd bdcgafe agd afcd geafdb ad dcagbf | fdca agfbc fadbeg gefbca +cbdea ecbfd gecafbd def ef efcg fabgcd agedfb bdfcg egbcdf | ecbad fbgced bcfdg fde +ebgacfd gbfeac gcbde degac ace gbadce gfdac fgbdce ea abde | fdgeabc bedgca ebdgca bdegc +ca gaedfbc cfa dgfabc bcdgf fbdgec geadf agcfd cbag bedafc | fdcgb bcefdg gdbcf acf +fcg bcadf cg cfgbde gfbca ebdfacg geca defabg befga acbgef | gfaecdb gbfca fgc gebfa +cafegb dc gcd dfacg cefga dfagb cade bcedgaf dfcgae bfecdg | cbedfg ecad cd cgaef +dfcba ad gbdafce bfgdc fgebac dacebf dab dcae gebfad bacfe | bcdfg caed ad cbgfd +abfegc dbfea aedfgc fdcag cdbg bc fcb fgcdba cfegabd cfbad | fdcab fegcab bdeaf bc +bcedf abdec ae daegcf gabe bdcga facbdg daecgfb dae edagcb | dea cbdfe bage ea +eagdfcb adceb dc fecagb cedgab cbeag daebf dgbc adc acdegf | dbgfcea cbead gbfcea geadcfb +ebadg cdb afbgced badgef bgacf dbcag daec cbedag cd gfcbde | baecgd acfgb adebgc fbdcega +ceagf egdac aegdcf bgeadfc edc afbecg cfbdae ed gedf bgacd | cgebaf fegacb efcagb ebafcg +adfgbce acgef adbgef egcfad cafdb cafgb fgbeca gfb gb bgce | bedcafg eacgf gfdace gbf +baefgdc deacfb egfb gdace bcaefg bg gba aegbc eabfc cdgfba | caged dfaecb gbef ecgbfad +ca edgacf abdgf gcefba dace gca ebgfcad bdfegc agcdf dcfeg | adefcg fgcbde afgdb ac +cdafg gdf agcfe fgaebc df dcabg dcfbge acgdef fead gfeadbc | gdfac gcdab fd fagec +bedag dbfca gdfe gedfba baecgf fe efa dcgaeb defba efgbadc | dgbea bagde aefdb abedf +cabegf ecbagfd aebcgd dg cbgad gaecb dcge cadfb bgd ebfagd | cegd abgcde gdb afcbd +abfcd agdef efc bdafgce ce acge gdfcae efgadb efdgcb edcfa | acbdf cfabd cafde gfdeba +egca bcg dfbaec gefdb ebdac cfbgad cg egcdba becdg bfgecda | ebgacfd becdg ebfgd edgabc +bfaegdc gfeda ecg ec bacfg cdae aedgcf efgac egdcbf begfad | gabfc adfge afbcgde fbgca +gacbf adgfbe gdcbfea bcgfea bdf agcfdb cdegb df fbdgc cadf | cedbg gdcbaf gecbd cgdafb +fgbac fbgad gefcba dbeaf abcfgd dg fdg bfdagce gadc fcebdg | fbdea dbegcf abfgced acfdbg +gae cfabg dbceg fabgced ea fcbdag ecfa aecbg bfcgae faegbd | aebgc eafc acgbe bcfadg +fbcad gcbefa acbfdge ecgd cegabd ec dbage aefbgd ecb cbaed | ecadb agebd bgdaec decg +begac eg ebcfa fgbdca eag gcabd gdcbefa adebgc cged dagbfe | eg eagcb gfacbed cgeba +gfcdea dbeac ebc bdfceg gfecbad bega agdec bcadf eadbcg eb | cegad cdaeg ecgad gedac +efbag egfdba agbd fdage gaebdfc daf gceafb cdegf da afcbde | abfge abdg begafc ad +ceda gfedac ad aegfd egfcba edfgb agfec agd gafbcd gbcdafe | gfdeb ebdgf fcbgea aedbgcf +fagb cdeag bgfde af afe dgfaceb feagd cabfde bfdgec adbfeg | fcbegd gfaed fea fea +efcbdg fdagcb de cefba fdcgb dfcagbe fed cegd gdfeab ebdcf | ed gced cdeg ebfgda +cbdeg bdgac bca aecbdf bdgfec cafgd acdebg ceabgdf ab gaeb | gaebdc geba cbgade ebag +gedac afcgdeb begc bgaecd fabdcg cga efdac eagdb cg daefgb | dafgebc eacdg gc cbeg +gaceb bgefca eg bfeg age aebfgdc ebafc abcgd badcef gafdce | bfcage bfeg fcdbgae gabec +ebgdcf aedf gcfda gefdca eabcfg dgf fd agcdb ecfag fgbeacd | cgdaf gdcba feagcb fdg +efbag efg ge fdgab befca dfbaeg gdae afbdgc gedfbc fgdbcae | ebgaf edfcgb fbage fge +gaefbd bf agfecd efadg agfb dbgef ebdcg acefdb feb aegcbfd | egfda gafde gbfa bfe +dafebgc bfdecg cdaebg da gcdbe dab bfceda adge bdcga bfgca | dcgbae da cagbfed daeg +ba gcfad adbfg fabdeg dbfegc dbcgfae acdebg aebf bdgef abg | faeb bdefag cgeabd egcabd +gafb ga fdcgba ebcad gbfcd deacfg dcbga cfegbd agd agebcfd | gecfbd cfbegd cbafdg cegfbd +fa fab cfbea gbeac cefdb cebagd cdegabf cgfa dabgef faebcg | abf efcab bgaedf gcaf +cdafeb bg aedcg gab acbfedg gbfd bfaecg bcfda gabdc gdfbac | bg gcdae bgdcfa fbgd +afdgc gefbda ebfc dgfec dbfge cbdfeg gadceb ced ce dbfcgae | ce edfcg bcef dcgbef +egbafc fdag ad dcbfaeg cgfba dfacb baecdg dac gcabdf edbcf | fgabecd bacefg agdf befcd +dcefgba edaf ebafc gbecaf de cedfgb bdace cbfead agdcb dec | gfaceb ed gcbad begfac +dcea aefdb eaf badcfg ebfdg beafcg ae befdca ceafgdb bacfd | aef dfbea fdgabc afe +ag bgac dgfebca gea gdace bceda gedcab bcafed egcdf ebdfga | cabed bdeac dcfeg eadcb +eacbf ecabgd abcegfd cbage agdcef dbge bgc bg dgfacb dagce | cagbe cebdgfa edacfg bg +abd db cdbefa dagfeb dceaf fcaedg cbade fcbd egbca abfcdge | decab aebcd cafbed cadbe +gdefb deg bfgaed ebgaf afed fgbcd fbedgca adecgb ed gabfec | fdbcg faegdb fgbae egcfbda +decf dbfgce ecdfabg acbfge dbe dfbeg fgabd fcegb bdagce de | cegbf bedgf de fadbg +abgedf cbag fecgd ebcfg fcb bc cebfad abfcge egabf bcegdfa | egfdc abcdef fegcd cgefadb +cadf feabc da cbgafe bfcdea adb bdagec bfdae bdcegaf gfbed | bcafe adbegc cbfae defcgba +bdfe db gcdbfe bfcag edbgcfa abegcd fbcgd dfgec gbd adfgce | dgabecf dcgfe db gcfdb +acf afbceg dbfae cf ecfba abdecgf cgbea gcef fgabcd dbaegc | cfge afedb aebcg gdbcafe +dgabce fbcea eafdbcg fdcg cd fgdecb fedgb afdegb dbc dfecb | cd dbc aedfbgc cdegba +fagdbce abd fgbedc decfb bfdace baedc ebfdag agdec bcaf ba | daecb acfdbe cadeb dba +dfceb bcfedag gbecdf dgfe ebdcaf fg fcg cafdgb ebgca gfbec | bedcf dcefb bfcaed abdefcg +gcfba badegc bga afbdcge ag fgebc bfacd dfcegb bafegc faeg | gedcfb cadbf fbacg bcgefd +cbg aedbcf ecbgfda cg fgcdbe ecfbd bcegda afegb bfcge dcfg | fbdce gc bcefd gcedfb +dgbcf ebgd fgdbca agdfec bdfec ed efcgbd cdgaebf fde fabce | fedacg cdbgf ed efabdgc +eafgbcd afcgb gbfcda gecabd efgcd acgfeb gecfa ea gae feab | edbgcaf dbgeac gacbf beafgc +acgfdeb cegabf beacg bacfd dbcea gacbed gcdbef de edb eagd | de dgcbfe ed daeg +defa cdbagf bfa agbfced cfbegd efdgba egbaf egfbd bcgea af | fa fbadcg gadfebc cafbdg +dgebcf degab afed gafbd gabfed df gdf bafgc bdcega daecfgb | cebfadg debga abgfd abgfecd +gdeca dcegba dcagfe ageb acefbgd egdcbf bgd adcgb bg bcadf | fgedbc gbdcef ebag gfbced +dc edbgcaf cbadf fdc bfdgac bgadf cbgdef fdageb ebafc adcg | dgbaef dfc bfeac bacfe +eagcbdf caefdb fceda egfab bdca gbdfec efcdga bc ceb eabcf | bface bc bfdeca faecb +gadec becgdf aedcb gfcdae edagfbc dg gefca acegfb fgad egd | cdeab fagec gd dcgafe +abdc cedag cd fabdcge agebcd gdeab feagdb gaefc ced gdbcfe | baged fbceagd ecd edc +gcadeb gabed gfab bdfec abfged fa ecgafd fad gfedcba dbfae | fbced gbaf aegcdb acdgef +df bcgfe fdb beacgd gefdcab fead aefdbg fbcgda edabg dgbef | efbdg gdefb eafd baefdgc +daec bfgde gedabcf bgcad ae dbgaec age afcdbg dgeab cafbeg | eag beagd edfbg degbac +fgbcad agbcd aecbd febcgd fdagceb gdc gc gfdba cafg gaedbf | geafdcb dgefab ecabd dcaeb +bfgca febag dgefba egda efcbda eab fdbge ae egfcbd gacdbfe | aedg efgba dcagefb efdacb +bdagec ecbfa daebc gafcb cgdfea efa fdeb dceafb ef gcfdabe | efcba cabged gfabc fbacde +fe gfabe dbaceg aegcbdf dfcbea fcabg deagb gfde edagbf efa | aedcfb efa afe fe +adfceb eb gdeb fegbda bcfagd fbe agbdf fgeac gafeb defbacg | ebafg feb agfbe bgde +cgdaeb ade agbcefd adfecb febad aecfb efgabc fadgb ed fecd | acbgef facbe cgbafe deabf +bfc fabdgc agcbe dfeac fdabceg ecabf fb bdfe edfcag bdfeca | fb cadebf gdabfc cfbdga +cfbdge adegfbc cdgeab fbg gedf baecgf bcfda fg cdbge cdgbf | fdge gbecd egfbca cfadb +dbcfeag gecda bed eb dfcab abeg agfced dcebfg adgceb abecd | be gabe bed fbdac +fbagec ecfga fgdac ec cbfe agbef gce aefgbd fcgbdae gdaceb | fbadge cfgda gfbace egcaf +bdcfge cbaefgd cagbde fecab fdecga gafd dfe fd gdace edafc | efd daecf cdaefg eacbf +cefgda daefc agecfb fce cgdbefa dfcga dbaef ce badgcf gced | fbdgcea ebafd gdefacb fdcag +ebagd fb fbgd cefda ebcagf cgfbade afegdb bdagce bef badfe | ebafgd bfdgea ecdfa bfdcega +gcedb fdcb aebgcd bf fcgabe cfbaedg fdbceg bfegd aedgf gbf | bfg cdgeb fdebg cebdg diff --git a/src/adventofcode2021/data/day_09/day09.txt b/src/adventofcode2021/data/day_09/day09.txt new file mode 100644 index 00000000..e2e538a9 --- /dev/null +++ b/src/adventofcode2021/data/day_09/day09.txt @@ -0,0 +1,100 @@ +7678999878989655432345789645679998765678998765434567897854323489543467898999785456789123989109765458 +6567898767878943101234678923678987654599987533323468976543212379954578967898654398993299879998754387 +5428988654567893212645699213567898543689876321013456897654323567895699656799543237894988659876543235 +6219876532178954324596988901289999698799965434565567998865439878976789545678932146999876545995432124 +5301988631079966546689877892397898799899876567677678989876545689989897234999943239898985432987654265 +6212987432367897656899756789456789989943987878998789878987659792196976546899865498767994321398754376 +5429876543456789897998767896569898978932198989949896569999798943235989756798976987656789520999866789 +6534989654678898999239878987698987567893239996823987698898987894476799868987897896547897639898997894 +7676798798799967894345989399897696457894547895612998987657896789987897979986789987535679798767989923 +8787899999895459965456895499987545348987656954109899996532345996598965499765678996547899987955679434 +9898998798986578977567896989876432167899767963298789987831234897679879987654567987698929896434598945 +9949987696598789898978999876989643456789878974987679876542546789889999998543479998999019765323597896 +8939998985439896789989389965597656587898999989876545989753657895999989899697568919998998943210126789 +7998999874321965889991278954498768998987999899976432399864798934989876789987678924987987895434335991 +6877999965439654567892469893349879019876789789876541989878999329876545678998789439876896796545449890 +5456889879998963456953998792123989929965456699987799876989987912983534767999896598965345689987659789 +5345678998787999769899877689934599898766344578999989545697896899892123457899987987421236799998998678 +1234589987656787998787654577895789789654213799098765433456895698789012456999699876434349988999987567 +2455689898546876987665343456789895698766439893129876212356924997679133477897578987646498877899999456 +3576798765435455696543212567899964569987898993298865101248939876568949588926496798797987765698976567 +4799897654321234987854343456999653456798987989987654312346795325459998999212345699998986564567899688 +6989998767433345699765454567898799999969876678999985323489893210298987992101296789029897423456998789 +8979879876544476789876565778919987878954965567899876544678954321987676789212989893298775212347999893 +9769865989699988895987986789929876565969854349965988965989875439896565678939878965997654303567895932 +8949876798987899954598987899899975444898765456894999876898986698765434567898767899876543212347894541 +6732987987896789543459998987698765323789878677923899988987897987854324678987656999989754323456943210 +5421299896785678952349879999549886212678989989765789199876759876544215799999545698999865534568964721 +7532398765654679893499767897632998343567893598986891098765345975432106789987234997964987665778965673 +9678998544263456789988959789543987657678932467897932129954234596543312899876129876853498786899876789 +8989876432102345679876434678954598767899743478998943498764345987986324678944098765432129897999998996 +7899987653212456789954323499765679898987654589129654569895456798875435899432129874321012979998999765 +6789998764343568899983212389876789999598765699939765678987667899986545986543298985435433567897898654 +5698999889654689969874301278987899995439876799898996789998789967987676897684987899876574679946999543 +4567894998788797645965212367998978989567988899787789898999895456798789999895996212987989789035698912 +3459943219899895434596776456789765878979899987645678987689954345679896798999854301298999892124567901 +2588954323999954323987886567898954569898789895434567998567893234699945987998765412569321943235678912 +1467975754798765102498997688967932456789698765423478899455789124989239886569885323457939654345679324 +2356899765679843212349998799456891348995569543213456789324678939878998776457995434567898965567789535 +4567899879789764334467999890345989969544398754302398893213999998767987654349876776699957896788998745 +7679943989999878876578987921235679898931239965614689965354899989654398768124997898789546789899987656 +8789432199899989987679765434356898777999459877323567896765789878965459878236898949895435899987898769 +9996431098788991098789879865468999656788968986545978987976899769879878989356999434976567978976989898 +6797643989657989199894989976789987547897899898767989898988998656989989198767898921297678967965678997 +5989859764546778987953299987898798623456798769878998789999987545699993239878957890998989456894567986 +4578998943436567996592109798987643214567989657989987667999987636798954569989346989879594345993479875 +3459976832323456789489297659298754323579876545699876557989999947997895678994219878965432256989599854 +1569765321012367892378989432129898734567988435689764345678998799896989789875699767895421019878989763 +2979876465433458921269878993234987655689876324997653256789989654765678999986987656789532198767978932 +9899997598545769210359767989345698978789995436789767967999978943234568989999876545679673299956767891 +7678998987656898521298655678956789989890987545679978979998767894345679878998765434568984987845656789 +5467869998769987439987834567997891299991987676789989999987656789459894567899875323479895996434345679 +4328956999878976598765423456789920198989998789897594987654345679767893479999983212998789875321234589 +3212347899999987689896514567895439987878999899969423498543234578978942346789765929877678995434345699 +4323456789998998799987625678976598965456899998754312987654547899989321457899879898765534987646656789 +5436567998987899989699876789987987854345799879876533498987656789795452567954999789854424987657898896 +9597778987656999879545987899898996543236878965987645569998768995696563467892987689943215598768959934 +8989899876545698768996798998759897652123467894598786689999879654989694598993995578994103469878948923 +7678956989656987656989899987545789643014989912989897899898989769979989679989894469989912456989237894 +6567899998768996545678956795437699654423458909878969998797899898768778989977673234767893567890146789 +5454578999899998656989349989326578967434567898769459997656999987855667899866582123456789678921237993 +5323457898988998767892198975412468998658998987658998878546689876543556789954321014569899989743678932 +5434578987677789878989987654301656789767899498767897651234579994312347898765432785678999998654568941 +8656789876435678989678999765212345699878901399988999530145678987523556789879545676789898999875678932 +8798999754323699094567899874323456899999213989999998921456789797687678999988657887896787893986989543 +9899898765214589123789998765474587998765439778899876542347895698798789999899767998965345932397899655 +8946789874345678934690989987565678999876598656789987673656954329899898898789898979873234991098998976 +7657894995456789545791976798786789989989987545791298784967899212945997787678999965432125789199687897 +9767923987877897656999875899897899878998996434690249899878998909896985678567899876553239899987545699 +9898934998988998987899987899998999767987654323589356976989876898799864323456789998674999989995432378 +3939999879399899598978998998789998656798895212679467895499965536567973212345892139799889578976653467 +2123989765456789799767899887699987545989987825678978954349873213459854323456999012998778989987854578 +1034979876789894987656789765569895239875498434569989767459654323498765456567897999875667899998769989 +3249867987899965986545678954498764345984399565878999878598776434789896587689966789943458999879898999 +4398756798959896965434989543359895459865987676789999998679986565699987678797655698965567896567987678 +5987545789349789874323478921239876567978998787899989598789997676789998889893234987896689965439876567 +6798435678998678955412567890124989878989799898998879329899898789897899997992109986999791986323965456 +8999323699987589432101678921265696989997678999997568912998759897996987656789298975698910987439854345 +9998434598765478943312989892376965399876546798775467893498942956889876545678987764567891296598763234 +6987545789876569765529899789499894236995435987655345679987621345678965434786796543456799397998521065 +5698656795998978997698765678998789945989412396543238789296549496789876212345987432345678989997432156 +4569767894349989989899876789987687899875324987652146790197698989997984101456798543456789979876543234 +7695979943256997878999989899876546798765459876543234892398797678976543219597987654767899865989754546 +8983598954569876557998998913985434569878969987656345789989986567897655998989998866978998754599867656 +9672567895698987445987897654954323678989978998765456999879876458989769897778999877899999863212998767 +8543479976987894323456789799899939899497989549877667898765964345678979786667899988989987654201239879 +7656567899996789434569899988767898954345798767998788987654321234589998654557898999678996543212378989 +8767678998987896545678999875456787943234679878999899876543210156799987543238967976579998754323567898 +9878789987698939876789398754346896795345799989989942987654921234578975432123459985458999895454578967 +2989999896579920987996209543212345689567989899875321298769832345689986543234567894367899986895789456 +3499998755465891298965498932101234567978978789965433349987655466789987654355678965456989998999892345 +9567897645234789349996987893323346788989865667899564559998776567894298765696989796567978999998921234 +8978965432145679959889896894894487899998754345978975698989897678992199896787897689679867899867890123 +7899876541034567898775765789765698910987543234567896987676998989989987979898976578998956989656989934 +6987998643123456789654324899876789991299654345678999876545789999879876569969323488987645678945679895 +5476789654234569898775013678989898989399865476789998964335679986567965498653212346986534799134998799 +4345698765545878959898723459994967979988976597998997643212398765457894329965623678997656789029898678 +3236989876676789543997634678943459869877997689367899854323459854346965939876784569789867997998767567 +2135678987798994312498545689642399759866859789245699978754667965457899845989765679679878956999543458 +3446889398919865324987656796530987649754349890134589989765778976579998756799897789545989349898742455 +4587993209101965435698787895421298432101245932375678999876899987678999867899998996432191298765431234 diff --git a/src/adventofcode2021/data/day_10/day10.txt b/src/adventofcode2021/data/day_10/day10.txt new file mode 100644 index 00000000..8023311c --- /dev/null +++ b/src/adventofcode2021/data/day_10/day10.txt @@ -0,0 +1,102 @@ +(({({({(({{<{{()<>}}>}}([<[(<>{})(()()))[[{}[]]{<>{}}]>(<(<>[])<[]()>><[{}[]]([]<>)>)]{{({{}[]}{{}{}})}}) +[{(<(<<([[[{(([]{})<(){}>)<{<>}(()[])>}]]{[([(()[])[[][]]]<((){})((){})>)({{{}[]}<{}>})]}]){{[[<<{<>}(< +((<[([(({<<<{{<><>}({}<>)}{{<>{}}[[]()]}>>([<[{}{}]>{[()<>]<<>()>}]<(<{}()><[]{}>)<<[]<>>}>)>}[<{<([<><>]< +[<[<({{({{[({[[][]]<{}<>>})<[<{}{}>]([<><>](<>{}))>]{[{[[]{}}{{}{}}}<(<><>)({})>]{({()()}[<>()]) +[<{<<({[{{{(<({}()){{}[]}><(<><>)[[]{}]>)}<(([{}{}]{<>[]}))<(<<>[]>){<[]>(<>{})}>>}({{((<>())< +{[([<[<({((([<[]()>{{}()}]<[{}{}]{[]()}>){{<<>[]>}(<<>()>)})([<({}<>)<{}()>>{[()[]]({}[])}]))(([{< +(({[<[((<([[(<[]()>{{}[]})([[]{}]<<><>>)]({{{}()}((){})})]<[<{[]{}}(()<>)>{(()[])<(){}>}]((<() +([<[[((<<({({([]{})<()()>}({()()}([]())))<{(<>[])<()[]>}>}>{{<[[<>()](()<>)](<[]{}><<>()>) +[[{{(<{[[<<{{<()()>(<>())}<{<><>}<<>[]>>}>{<<({}[]){()<>}>([()[]]({}<>})>(({<>()}[[]<>])<{()<>}{<>()}>)}>[[[ +<[<{[{{[[(<[{<[]>[[]{}]}<[(){}]<[]<>>)]><[<(<><>)(<>{})>{<<>{}>[[]{}]}]<[[[][]]<<>()>][<<> +<{[<<({[(<[<((()<>)[<><>]){((){})[()[]]}>[{([][]){[]<>)}{[{}[]](<>{})}]]{{{({}[]){()()}}({(){}}{()})}[[{[] +[<([[(<[{<<<<{[]()}<<>{}>><{[]{}}((){})>>>[<<(<>())<{}<>>><({}<>][<>()]>><<[{}[]][<><>]>(<()[]>{{}})>]>}(<<[ +(<(<[({([{(<([[]()]<()[]>)[(()())]><({{}[]}<(){}>)[(<>[])(<>[])]>)[<[<<>{}>[{}[]]]<<<>[]>{()()}>> +[{[{<[<(<<<<([()<>]{()<>}){({}[]){{}{}}}>{([[][]]([]()))<<<>{}>{{}[]}>}>{({{[]<>}[<>{}]}[<[]()>((){})]>[([{} +[{{({<<{(<(<(<<><>><<><>>){<{}[]>)>)>)}>>{[<{[<<{(()<>)<{}{}>}{<()()>(()[])}>([<<>[]><()<>>]<[{}{}]<()<>>>)> +<{<{({<{<<<{(({}{})(<>[]))}[([{}()]({}<>))]>[<[<<><>><[]<>>]>]>[[((<[]<>>)[[()[]]<[][]>])<<{{}[ +([([(({<<(({{((){})[{}()]}((()()){{}<>})}[[(()())]])(<(((){}){[]()})({{}[]}{{}{}})>{{[<>[]]{[]()}}[[{}< +{[[{[{[{<({[<{[]<>}({}<>)><[<><>]>]<<({}<>)<<>()>>>]<([{<>{}}]<<<>[]><{}()>>){<[()[]][<>{}]>[<<> +<<[<[(<<(<(((<[]<>>){{[]()}(()[])})[<{[][]}(<>())>{<()<>>{()[]}}])(({[[]{}]<{}<>>}(<()<>>[()[]]))<[[ +<[<([([([{[<[[<><>]]{([][])[<>{}]}>[{{[][]}{<>()}}(({}[])<[]{}>)]]{<({[]}[()[]])>}}([([(()<>)]{([]{}){{} +{<<[{[{[{(((([<><>](<><>))[<(){}>{<>()}])[{<<>{}>}(<<><>>[()[]])]>({({()<>}({}{}))<[{}[]]{()<>}>}< +{(({((((<[{(<(<>())><([]<>)[{}()]>)[([{}[]]{[][]})[<[]{}>{<>()}]]}<[{{{}<>}[{}[]]}]{<<()>>}>][({(<{}()><{}[] +[([[<<[[{[{<<[{}<>]>(({}())(<>{}))>}]}{{[(({{}{}}[()<>])<(()<>){[]()}>)<<{[]<>}{<>[]}><[[]{}]([][])>> +([<{[(<([{<{[<<><>>[[]()]]<({}<>)[{}{}]>}<<[[]()]{<>{}}><<[][]>[{}()]>>>}{<{<{[]{}}[[]()]>(< +((<<[[<(<[(((<<>{}>(()[]))({[]{}}([]<>)))[{<<>[]><{}[]>}{(<>[]){(){}}}]>[[[[{}<>]<()()>]](<(()<>)(<>)>{[ +[(<((<<<[(<<<<[]{}>{()()}>>>{((([]())([]()))){{{[]<>}{<>[]}}{[{}()]{<>()}}}}}]{<<{(([]{}))[<{}<>>({ +<<[({[<(<[{(({{}()}{{}<>}))}<<{[[]()][<>{}]}({<>()}<[]<>>)>>][<(<[()<>]>[(<>[])<{}{}>])>[{<[{}{}]([]())>((<> +[{{[<<[<[[({(({}())<<>()>>{{<>}[<><>]}})<<[[<>[]][[]]]({()<>}<()()>)>{{{<><>}}([(){}]<[]>)}>][{<{((){ +{[({[[((([{<<<{}{}><()()>><([]{})>><[{()()}{<>{}}]>}][<[<(<>{})(<>{})>((<>{}){{}<>})]<{<[]()>(<>{})}(< +((<{({({({<{<<{}[]>({}{})>[<[]<>>({}[])]}>})})})}({{(<[[([<([]())([][])>][({()()}{{}{}})])[[{ +{{{{{[((([({<<<>{}>(()<>)>{[<>[]]{{}()})}[(<[]{}>[<>()])<(()<>)[<>()]>])<({[{}()][()[]]}{[{}<> +{[(([{(<<<[([<{}{}>[{}<>]]<<<>()>[{}()]>)([[<>{}][{}<>]]{{{}()}<<>[]>})]><{{[([]{})[{}[]]]}{({<>< +{<{([<[{[{[[[{{}{}}<{}()>]<{{}()}>]]([[([]())[(){}]]<<[]<>>{(){}}>]<[[{}()](()[])]{{()()}}>)}[(<[(( +{{{{{[{{(<(((<<>[]>([][])){{()<>}[()<>]})(<{()[]}{<>[]}>({<>()}[(){}])))>)}((<{{<<()[]>(()<>)><<()()>[{ +[[[(<[{[{([<<<<>><<>>><[[]{}](()<>)>>]<{[(()<>)[[]<>]]{<[][]>[[]()]>}[<([]<>)[{}{}]>{[(){}]([] +<[<(<{{{{<{[{(()())}[{(){}}{{}()}]]<<[<><>]({})>[(<><>)]>>>({{{(<>[]){()()}}<((){}){()[]}>}({({}() +<[{{[<([[[(<<<()[]>({}())><[{}[]]{[][]}}>)<([{[]()}{{}{}}]{[[]{}][{}<>]})[<<<>{}>><{[]}<<>()>>]>]{ +{((<<{[{<[(<[[<><>]{[]<>}][[<>()][{}{}]]>[<{{}()}({}[])>[[<>[]][<>[]]]])<{<({}{})>{<{}<>]{(){}}} +<[{([<<{(([((([]<>))<<{}()>(()[])>)(([()[]]{[]()}))]<[<<{}()><[]{}>><([]<>)<(){}>>][{[<><>][<> +[<(<{[{[[(<{<[<>()]>}([<<>[]>{<><>}]{(()[])(()<>)})>)]((<<(<()<>>{[]{}}){<[]()>}>([<{}<>>([]()) +{({[[<<{{[{<{<[]()>}{<{}<>><{}>}>(<{()<>}((){})><{<>{}}([][])>)}][[<{{()()}({}[])}<{<>{}}<<>{}>>>{<<[]() +[{<([<<[{[[<(<<>()><[][]>)>(<<<>{}><{}()>>[[{}<>]<()<>>])]][{([[{}()]]{({}())(()()]})(<<()<>>(()[])>)}<[([[] +[([((([[[(<<{[()<>][{}{}])([<><>]<{}>)>((<{}<>><()<>>)({{}<>}<{}{}>))>[{((()[])[(){}])}({{{}{} +<{[<[[{{<[{([[<><>]]<<{}()>([]<>)>)([(<>[])][({}()){()<>}])}{<([[]<>][<>{}])(<()()>({}[]))> +([{({[({{<((<(()<>){[]{}}><<<>[]><()[]>>)(<{[]<>}[{}[]]><{{}()}[[]()]>))>}}{[[[[<(()())<<>()> +{<<<[<<<{<<{<({}()){[]{}}>}>>}><{<{<[{[][]}(<>)]([[]<>][<><>])>}([{({}[])<{}{}>}]{[[()[]]][[<>[]]<[]{}>]})>}> +[[[(<<(<((([<([]<>)[<>]><([]<>)<{}{}>>]{({{}[]}<()<>>)[<()<>>]}))){{<{<[[][]](<><>)>{<{}{}>{{}[]}}}<[[[]{}] +[[{({[[((((<<(<>{})(()<>)){[<>[]]}>))[(<<<[]<>>{<><>}>>(({{}()}(<>{}))))(<[{[]<>}((){})]{<{}<>> +<<<(([[{{<<({{<><>}<<>{}>})>{[<<<>>[()[]]>[{()[]}{<>[]}]]{{[<><>]}(<{}<>>(<>[]))}}>}}<{<[(({{}{}}{[]()}) +{({(({<({[{(<({}<>)[()()]><[<>{}]>){{(()<>){[][]}}([<>()](<>()))}}{[<<{}()>([]{})>[<<>()><<>{}>]][ +{<{[(<([[{<({<()[]>[<>[]]}[[<>()]<()()>])>{[[{()<>}{()()}][[{}<>][{}()]]]([{{}<>}]<{<>[]}([])>)}}[<[[<[]( +({(<({([{<[[[(<>]({}{})][<()><()[]>]]]<(<[()<>]>{{()[]}[()[]]})([[<>[]][()<>]](({}())([]())))>>}]{(({ +{[[<<{[{<[[<((<>[])<{}{}>)>]{<<[(){}]<{}{}>>>[<{()<>}<{}<>>><[()<>]>]}]>><[[({<(<>[]){()<>}>}[[[{}<>]]([[]<>] +<{<<{[{<{([{[[[][]]]}]((<{[]<>}{()}>(<[]{}>[()[]]))<{{()()}[[]{}]}<{<>[]}{<>[]}>]))}<{[([<[][]> +({[({[[[{(<[{(<>())([][])}<([]())({}())}]>({(<()<>>{{}{}})<[()[]]<<>>>}([[{}[]][()]]{{{}[]}<[][]>})))[ +[{[{{{([{[({{<[]()>[{}{}]}<{()}<{}<>>>}<[<()[]>{[]()}]>){{{[<>{}][<>[]]}{<()<>>{<>[]}}}[{(<>[])<()[]>} +<<[[{({([([{{(()())<<><>>}}]<(({[]<>})<<(){}><<><>>>)>)(<{{({}[])<[]()>}{({}[])[<>[]]}}>)]<<[<[{()[]}<{}>] +{{[{<(<[<(({<<[]{}]><[[]<>]<<><>>>}<(<(){}>)>)[[([{}{}][[]{}])[<()()>]]<{{{}[]}{{}}}[[[]()]<{}[]>]>]) +{<({(<{[[[({(((){})([]()))<(()())([]{})>}[((()()>([][]))])][{[{{{}()}{()()}}[[[]()]{[]<>}]]}{(({[]<> +([{{<<<([<[({<<>[]>{[][]}}(({}{})[<>{}]))]{{((<>{})){<()()>(<>())}}}>]({[([([][])]{[(){}](()[])}){<[{}()}>} +<[{<[<<{[[{[[({}())<{}()>]]([(()<>)][(()())(()[])])}<(<[[][])<()()>>)([[{}](<>[])](<{}()>{[][] +(<([{({{(({{{({}[])}({{}<>}<[]()>)}<<<{}>{()<>}>({<><>}{<>[]})>}({{[<>()][<>[]]}}(<({})<[]()>>) +[{(<[[[<<{{{(([]())([][]))<{()<>}(()<>)>}<[{[]()}[()()]][[[]()][{}()]])}({<(<>()){<><>}>}[[(()()){(){}}]{(< +[(([[{[{((((<<<>()>({}())>{{{}()}[[][]]})<<<{}{}>([])>>)<[{[[]{}]}{<{}{})<{}>}]<(<{}{}>{<>[]}){<[]{}>{ +<{<<<((([(<{<<{}[]>[[][]]>[<<><>>]}>)<[[[<()()>{<><>}](<(){}>[[]{}])]][<{{<>()}({}<>)}>{[{<><>)]{(()<>) +(((<(([([[[({<[]>[[][]]}[{<><>}<[]()>])<({[]()}(()[]))>]<[{[{}{}]}(<[]{}><()()>>]<(<()()>)({<><>})>>]<(< +[[{<{({<(((<<{[]()}(()<>)>([{}()][()<>])><[([]<>)[()[]]]{{()()}(<><>)}>){[(<[]>)[[[]{}]{[]()}]]}){[[{<()[ +{([{(<{({<((<[()]<()<>>>({{}}[{}<>])))>><{<{<[<>[]]<[]{}>>}<[[{}]({}{})]{(<>())<()()>}>>(< +<[<{{[({{([{{{{}[]}({}<>]}{<[]{}><()[]>}}<[[()][()()]]{{()()}({})}>]{[(<()<>><{}<>>)[[()]{[]{}}]]<{<[] +(<<<[((<[((<[<<>[]>(()<>)]{{[][]}<{}<>>}>[[<{}()>[{}<>]]{{(){}}[{}()]}])<<([{}[]]{(){}})(<[] +({({[<[[{<<([((){}){[]<>}])>({[<()>(<><>)]})>[[({{(){}}}[[<>[]]<[][]>])[<(()())(<><>)>{([])}]]({[([]<>) +<[[[{(([[<[((<<><>>(<>[])}[{<>[]}[<>[]]]){<[<><>]>[(()[])[[]{}]]}](<{<[]<>>(<>[])}((()())<[]<>>)>({<(){}> +[{{{[[{([{{[{(<>())([])}]<(<[]><{}>)>}}{[{[<()[]>{()}][{()<>}{[][]}]}((({}<>)({}()))(<<><>> +[[{[[{{{{{<(<[[]<>]{[]}>)(<<()][()<>]>[{[]()}{<>[]}])>[(<<[]()>{[]<>}>(<[]<>>{<>{}}))[[{<>()} +([[{[[[([(<{[{{}{}}{<>[]}]{{<><>}}}>)<(<{<(){}>[<>[]]}{<{}[]>{{}[]}}>[[({}<>)(()())]<<{}{}><[]()>> +({{{([[({({({{()[]}({}{})}({()<>}[{}<>]))}{{<[{}[]>[[]()]>{[{}()]<[]<>>}}[(<()()><{}{}>)({[]<>}<<><>>) +{{<{{{[{((<[([[]{}]<<>{}>){<<>()>(<>[])}]{{([]()){[]{}}}}><({{{}[]}<[]()>}{<<>[]><[]{}>}>{<[()()](<> +[{([<[<([[[<<(()[]){(){}}>[[{}{}](<><>)]>({[{}()]}<(()<>){()[]}>)]]<<[[(()[])<<>{}>]{<()<>}<{}<> +<[{<({{[([[((<{}>[{}[]])((<>[])([]{})))(([{}[]]{{}()})({{}()}(<>{})))][[(<<>[]>){[{}{}]{[][ +<<<<[(({{({([<{}()>{<>[]}](({}<>)<<><>>)){([[]()]{<>{}}){(<><>)}}}){<{[[<>()]]({{}{}}<()()>)}>[[([()](()[]))] +<({[({{{({<{([<>()]){[[]{}]([])}}(<[<>[]][()<>]>([<>[]][<>{}]))>[[((())([]()))<([]<>)((){})>]< +((({[<((<{<([({}{})[{}<>]][<(){}>({}{})])({[[][]]{<><>}}<<<>()><()()>>)>}([[[{<>[]}][{<>[]} +[{[[(((<{<{({(()[]){[]{}}){([]())[<>[]]})[(({}){[]{}})({[]{}}{()()})]}<{({<>{}}){({}<>){()()}} +{(<{[({<(([<<([]{})<(){}>>([{}[]]{{}{}})>]{<{[<>()]{[]<>}}>}))>({{<{<(<>{})([]{})>}<{{()<>}<[][ +{(<<[([<[<({([()[]]{<><>})[[<>[]]([][])]}{({[]{}}[[]])(<[]()>)})>]>{<(({[[[]][{}[]]][<{}{}>(()<>)]}<{[{}<>]({ +{<({<<{(<{([[<[]<>)[<>[]]](<()[]>)])[[{{()[]}<[][]>}{[()[]][<><>]}][{<{}()>([]<>)}(<<>[]>({}[]) +<({[[<{{<[{[<{()<>}>][<[[]<>](<>())>({{}()))]}[((<{}()>([]{}))(([]{})<<><>>))<<{<>{}}[{}[]]>> +{[({[(<([([<[<{}<>>[<><>]]{{<>()}{()()}}><([()<>]<<>()>)({<>[]}({}()))>]<<[[()[]]<<><>>]<((){})(<>< +<((({<(<({{{[({}())(()())][(<>)]}[[{{}[]}[<>[]]]([[][]]{()()})]}({{([]{})<[]()>}[(())({}<>)]}<{{[][]}{()()}} +[{{([[([{{{(<<[]()>[()[]]>{{[]<>}[[]()]})[<([]<>)<[][]>>]}}}(([[{(<>{}){[]{}}}{[(){}]{<>[]}} +([[{[{<[([[<[[()[]]([]())]<{<>{}}[<>[]>>>{{(<>())([]<>)}<({}[])<[]{}>>}]{<<{[][]}{<>()}>{(()())<(){}>}>< +(<[({<(<(((<[<<>()>{{}()}]{(<>)<()()>}>([(<>[]}<[][]>]{{{}()}(<>)}))[[[{{}[]}{{}}]([[]<>]<{}()>)]])[{<[{[ +{<([{(([[[[{((<><>)(<>())){({}())<[]{}>}}<{(<>[]){<>[]}}<{{}<>}[(){}]>>]]][[(<{<{}()>{[]}}[<<>>{{}<>}]>([ +<{[[<({[[({([{()()}{[][]}]([[][]]<{}>))}{<[<{}())<[]()>]{(()()){{}<>}}>({[{}<>]{()[]}}<{()<>} +[<<((<(([(<{[[()<>]{{}<>}]([[]()][<>[]])}{(<[]>)((()[]){[]()))}>{{(([][])({}{}))<[(){}]>}}) +[<[<{[{{[[[<<((){})<()>><{{}[]}{[]()}>><((()){[][]})>][<{<<>[]>[<>[]]}({<>[]}{()()})><{(<>{})<<>()>}>]][([[ +([<[<{<{(((<([{}<>])([<>[]]([][]))>[<([]())<()<>>><<()()>{{}()}>])>[<<<{()<>}<<>[]>>{<{}() +<({{<(<([({<[{<>[]}]<[{}{}]{()[]}>>(({[]()}))}[<<{(){}}([][])>(<()()>{()})>{([[][]]<<>{}>)<<[][]>([]())>} +{[(([<([[<[<{[()]}>[<[<>{}][<><>]>{[()]{<>}}]](<{([][]){[]()}}[{()()}(<>[])]><[[[]<>][[][]]]< +<<({<<<({(<<[<[]()>{[][]}][<{}{}>{[]<>}]>[{{<><>}<()()>}(<{}{}>(<>))]>{[[<()()>[[]()]]{<<>[]><[]{}>}]}) +[[[(<<(({[(((((){})(<>{}))<[[]()]{{}{})>)(<[()[]]{[]<>}><[<><>]{<>{}}>))([<({}<>)({}[])>[[(){}] +{[[{<[{([<[<{(<><>)}({{}}([][]))>]{{<[<>{}]>(<<>()>[[]<>])}}>({[<<{}<>><()<>>>(<<>()>{<><>})]}[(<<( diff --git a/src/adventofcode2021/data/day_11/day11.txt b/src/adventofcode2021/data/day_11/day11.txt new file mode 100644 index 00000000..03ecedae --- /dev/null +++ b/src/adventofcode2021/data/day_11/day11.txt @@ -0,0 +1,10 @@ +8548335644 +6576521782 +1223677762 +1284713113 +6125654778 +6435726842 +5664175556 +1445736556 +2248473568 +6451473526 diff --git a/src/adventofcode2021/data/day_12/day12.txt b/src/adventofcode2021/data/day_12/day12.txt new file mode 100644 index 00000000..e1a22751 --- /dev/null +++ b/src/adventofcode2021/data/day_12/day12.txt @@ -0,0 +1,24 @@ +pf-pk +ZQ-iz +iz-NY +ZQ-end +pf-gx +pk-ZQ +ZQ-dc +NY-start +NY-pf +NY-gx +ag-ZQ +pf-start +start-gx +BN-ag +iz-pf +ag-FD +pk-NY +gx-pk +end-BN +ag-pf +iz-pk +pk-ag +iz-end +iz-BN diff --git a/src/adventofcode2021/data/day_13/day13.txt b/src/adventofcode2021/data/day_13/day13.txt new file mode 100644 index 00000000..aef0a4af --- /dev/null +++ b/src/adventofcode2021/data/day_13/day13.txt @@ -0,0 +1,916 @@ +1213,736 +1158,890 +626,303 +98,10 +878,268 +1208,143 +112,400 +865,894 +1218,179 +1089,418 +535,886 +726,515 +1263,786 +589,270 +80,518 +288,322 +1101,483 +989,308 +1002,707 +467,18 +1036,364 +552,591 +445,280 +912,40 +1268,761 +984,47 +883,574 +815,784 +719,236 +865,166 +836,581 +656,735 +228,264 +23,466 +1099,515 +1284,665 +432,268 +195,493 +1001,308 +430,222 +1294,537 +427,646 +574,381 +1116,829 +1143,808 +950,578 +293,579 +28,751 +169,341 +326,159 +257,721 +773,670 +1231,556 +306,436 +454,520 +1267,522 +85,309 +1273,358 +1019,208 +870,504 +647,175 +408,544 +1310,386 +912,854 +512,10 +674,770 +273,742 +626,584 +112,10 +736,420 +1198,884 +214,620 +139,751 +448,782 +771,646 +709,796 +755,460 +179,838 +360,578 +274,364 +656,401 +810,61 +194,310 +584,515 +773,238 +184,241 +932,661 +105,333 +1096,838 +959,838 +252,341 +1237,338 +112,884 +746,812 +735,556 +45,75 +815,838 +654,719 +1225,309 +1226,892 +453,465 +783,520 +987,446 +348,458 +976,175 +487,392 +1307,558 +1279,882 +145,509 +909,444 +1310,389 +626,527 +356,527 +363,774 +142,130 +246,581 +1064,581 +925,837 +166,842 +529,877 +124,341 +709,546 +651,490 +372,16 +537,614 +1004,213 +1198,661 +1240,40 +701,504 +1103,120 +638,462 +857,351 +269,794 +1099,122 +624,360 +1284,217 +902,26 +102,672 +691,208 +850,287 +1083,698 +636,770 +475,539 +1280,735 +495,712 +1273,655 +217,854 +1109,687 +345,565 +939,43 +902,203 +803,241 +35,838 +169,624 +206,236 +413,718 +617,599 +729,786 +372,430 +467,242 +771,324 +924,268 +574,854 +167,502 +141,738 +166,52 +659,336 +1240,123 +672,462 +902,581 +883,320 +37,655 +209,0 +897,875 +823,630 +1074,264 +385,794 +1131,838 +1151,504 +1294,357 +1260,396 +1228,768 +209,57 +1225,360 +1111,710 +333,586 +996,371 +954,140 +790,367 +843,348 +1058,877 +252,509 +181,385 +1218,267 +1123,428 +191,98 +1039,372 +214,504 +274,260 +359,751 +1109,753 +659,359 +10,674 +835,56 +730,490 +378,1 +0,539 +35,182 +276,661 +469,626 +1061,533 +783,432 +656,847 +281,707 +187,428 +1275,568 +716,143 +938,878 +663,117 +738,254 +954,86 +467,796 +966,761 +405,311 +209,651 +38,98 +1233,824 +430,837 +1290,841 +865,280 +1123,18 +985,170 +182,859 +1164,245 +656,607 +979,784 +634,10 +460,829 +768,172 +1126,317 +1000,805 +1198,830 +629,536 +208,542 +1193,747 +328,60 +1123,751 +1004,10 +1056,571 +254,571 +1086,57 +192,815 +1287,204 +1012,754 +838,411 +1225,361 +380,310 +616,117 +621,243 +1165,509 +706,781 +564,530 +905,311 +162,763 +354,889 +975,103 +10,226 +326,847 +184,317 +1261,143 +1310,65 +310,462 +1208,672 +402,17 +85,361 +129,847 +1020,486 +16,462 +618,856 +440,102 +686,381 +925,794 +453,65 +1287,639 +180,656 +507,91 +460,65 +893,271 +344,581 +609,208 +246,432 +781,246 +185,268 +311,696 +736,488 +346,707 +875,708 +38,565 +420,267 +433,18 +1101,651 +159,222 +420,627 +1245,446 +905,361 +954,527 +909,450 +495,392 +755,434 +179,429 +1230,868 +1129,621 +932,681 +211,122 +344,313 +52,530 +602,288 +947,326 +433,113 +634,557 +529,17 +647,117 +1253,324 +331,502 +580,205 +1111,184 +359,143 +52,36 +32,409 +1280,584 +112,661 +1143,392 +1228,126 +32,485 +28,310 +768,436 +1000,761 +281,502 +753,214 +443,646 +1213,680 +97,515 +939,820 +112,172 +1068,674 +371,43 +1089,642 +1064,82 +1131,429 +947,840 +684,751 +420,264 +1082,660 +965,553 +52,82 +795,751 +351,98 +1143,726 +815,224 +80,656 +900,605 +897,360 +706,333 +880,57 +676,841 +119,877 +938,16 +393,176 +1001,586 +507,388 +31,194 +405,182 +35,470 +185,716 +1310,57 +733,70 +391,658 +815,182 +31,65 +868,866 +356,140 +628,229 +841,492 +691,712 +1195,696 +634,287 +523,65 +345,138 +310,49 +663,623 +474,581 +520,639 +224,57 +1287,428 +328,579 +323,392 +351,504 +1287,255 +815,360 +194,136 +207,269 +542,436 +432,178 +110,634 +878,716 +201,829 +897,718 +52,726 +328,159 +1258,502 +1307,87 +1129,733 +979,315 +323,427 +1002,187 +351,639 +938,430 +527,520 +870,176 +1069,639 +1307,467 +36,856 +23,31 +413,534 +402,341 +687,65 +619,120 +634,884 +1258,858 +18,203 +542,885 +604,781 +1282,758 +5,553 +1294,385 +378,437 +1096,56 +835,838 +23,876 +1111,278 +1011,33 +308,707 +117,798 +331,763 +470,241 +830,732 +1265,691 +982,287 +950,709 +755,196 +691,694 +776,12 +1290,765 +619,40 +738,640 +1121,88 +938,464 +951,143 +537,208 +736,518 +405,126 +453,543 +365,694 +157,329 +385,57 +37,358 +482,341 +442,28 +870,457 +984,336 +693,239 +917,176 +45,158 +892,264 +1258,812 +1113,534 +303,7 +1004,661 +569,869 +281,158 +378,681 +569,534 +16,509 +435,708 +373,840 +1192,542 +721,606 +1041,794 +1151,392 +343,646 +684,143 +1064,740 +552,751 +1151,182 +1143,616 +698,313 +1064,812 +446,800 +564,812 +1191,717 +452,105 +85,360 +947,504 +380,82 +937,483 +319,551 +922,815 +1213,515 +984,607 +73,556 +309,852 +50,661 +1181,847 +1300,535 +448,560 +291,854 +447,8 +0,91 +1191,625 +932,233 +371,689 +361,131 +865,798 +1169,738 +446,94 +966,581 +110,309 +74,404 +1000,49 +1,842 +798,354 +20,884 +1233,406 +1230,243 +492,267 +867,248 +346,187 +1245,472 +736,406 +656,287 +962,590 +572,640 +544,260 +927,522 +841,786 +1029,392 +169,278 +378,445 +420,630 +488,52 +626,751 +927,372 +691,854 +803,355 +3,87 +1230,26 +154,341 +612,313 +823,560 +802,245 +216,137 +987,427 +207,120 +775,877 +897,176 +1266,654 +541,191 +159,110 +1275,182 +678,268 +1153,565 +1274,856 +991,656 +15,696 +172,341 +691,504 +310,705 +1275,470 +574,243 +448,637 +1111,262 +951,751 +619,390 +539,324 +626,143 +733,809 +656,281 +0,837 +529,429 +862,180 +1279,194 +947,568 +227,574 +378,400 +418,364 +556,182 +969,481 +500,61 +947,774 +761,333 +1012,136 +1258,530 +574,518 +666,311 +326,558 +512,130 +870,718 +689,682 +1104,658 +1101,614 +187,876 +1237,556 +313,861 +222,716 +676,884 +201,375 +336,28 +1058,509 +469,492 +1081,232 +361,763 +42,761 +1183,462 +1148,110 +1273,239 +905,712 +863,438 +905,518 +736,474 +1034,445 +1088,716 +1022,677 +117,224 +1265,686 +1171,751 +862,112 +0,165 +1123,546 +1310,508 +49,143 +880,837 +976,719 +684,361 +1233,70 +28,478 +82,126 +1053,721 +131,625 +900,289 +1193,278 +373,65 +1272,796 +490,617 +1016,633 +413,176 +82,96 +1116,584 +469,786 +867,646 +843,652 +1118,815 +775,886 +624,829 +166,500 +555,574 +385,837 +455,278 +487,840 +65,446 +1139,819 +1211,460 +1169,114 +1101,894 +624,381 +227,250 +119,269 +1029,56 +616,98 +905,126 +937,449 +1096,504 +1141,624 +1099,772 +201,687 +1116,65 +217,40 +708,136 +787,65 +1273,648 +1155,338 +659,87 +201,207 +402,161 +1091,708 +440,722 +447,269 +1022,572 +939,205 +497,329 +1058,553 +542,661 +863,886 +155,338 +622,857 +92,715 +612,133 +962,458 +634,159 +28,30 +288,677 +1028,878 +1183,520 +169,176 +23,428 +1292,203 +754,182 +555,320 +35,208 +701,75 +1022,322 +684,533 +320,623 +857,95 +18,770 +214,50 +7,777 +398,406 +261,176 +783,462 +709,98 +1123,815 +440,457 +708,168 +447,625 +359,418 +1278,485 +1012,143 +159,504 +38,796 +1230,332 +418,530 +877,255 +654,505 +28,136 +912,406 +1193,320 +485,46 +351,838 +1265,75 +758,143 +1300,226 +1282,527 +612,761 +575,556 +979,763 +77,70 +654,607 +688,261 +766,585 +145,385 +363,504 +676,287 +788,607 +857,465 +1128,35 +574,513 +1200,309 +10,668 +169,553 +654,57 +1064,868 +191,796 +45,686 +982,159 +795,79 +413,361 +761,863 +473,273 +0,401 +1017,579 +840,808 +99,434 +79,556 +162,784 +459,418 +798,10 +195,418 +651,404 +520,527 +959,887 +965,565 +288,217 +730,404 +1282,478 +602,364 +803,315 +962,304 +820,617 +741,534 +549,333 +862,714 +363,326 +102,222 +348,436 +1156,553 +1064,463 +97,214 +609,691 +214,722 +827,208 +372,688 +453,519 +385,401 +622,633 +70,40 +455,616 +949,763 +693,599 +194,758 +512,541 +1169,786 +617,536 +1086,837 +112,494 +910,161 +984,495 +959,56 +977,586 +454,262 +1141,341 +609,203 +748,19 +1143,560 +656,508 +541,703 +1181,495 +1183,246 +542,102 +736,189 +433,866 +661,756 +659,490 +331,446 +236,630 +610,688 +3,467 +446,268 +694,117 +308,35 +537,350 +1101,243 +951,418 +127,432 +979,110 +802,705 +741,86 +787,829 +1198,233 +808,890 +1279,12 +50,396 +1183,14 +23,255 +636,124 +448,714 +1236,205 +1193,798 +1103,625 +945,694 +1139,108 +522,287 +624,513 +997,33 +1190,658 +35,56 +1275,406 +773,208 +1125,716 +69,621 +1093,518 +1310,837 +1125,268 +865,448 +1102,94 +306,10 +373,483 +442,866 +858,105 +602,168 +624,159 +334,719 +480,162 +870,172 +602,736 +0,508 +1064,154 +1056,712 +582,161 +1261,591 +661,308 +35,200 +92,19 +214,390 + +fold along x=655 +fold along y=447 +fold along x=327 +fold along y=223 +fold along x=163 +fold along y=111 +fold along x=81 +fold along y=55 +fold along x=40 +fold along y=27 +fold along y=13 +fold along y=6 diff --git a/src/adventofcode2021/data/day_14/day14.txt b/src/adventofcode2021/data/day_14/day14.txt new file mode 100644 index 00000000..b0bcae67 --- /dev/null +++ b/src/adventofcode2021/data/day_14/day14.txt @@ -0,0 +1,102 @@ +FNFPPNKPPHSOKFFHOFOC + +VS -> B +SV -> C +PP -> N +NS -> N +BC -> N +PB -> F +BK -> P +NV -> V +KF -> C +KS -> C +PV -> N +NF -> S +PK -> F +SC -> F +KN -> K +PN -> K +OH -> F +PS -> P +FN -> O +OP -> B +FO -> C +HS -> F +VO -> C +OS -> B +PF -> V +SB -> V +KO -> O +SK -> N +KB -> F +KH -> C +CC -> B +CS -> C +OF -> C +FS -> B +FP -> H +VN -> O +NB -> N +BS -> H +PC -> H +OO -> F +BF -> O +HC -> P +BH -> S +NP -> P +FB -> C +CB -> H +BO -> C +NN -> V +SF -> N +FC -> F +KK -> C +CN -> N +BV -> F +FK -> C +CF -> F +VV -> B +VF -> S +CK -> C +OV -> P +NC -> N +SS -> F +NK -> V +HN -> O +ON -> P +FH -> O +OB -> H +SH -> H +NH -> V +FF -> B +HP -> B +PO -> P +HB -> H +CH -> N +SN -> P +HK -> P +FV -> H +SO -> O +VH -> V +BP -> V +CV -> P +KP -> K +VB -> N +HV -> K +SP -> N +HO -> P +CP -> H +VC -> N +CO -> S +BN -> H +NO -> B +HF -> O +VP -> K +KV -> H +KC -> F +HH -> C +BB -> K +VK -> P +OK -> C +OC -> C +PH -> H diff --git a/src/adventofcode2021/data/day_14/day14_test.txt b/src/adventofcode2021/data/day_14/day14_test.txt new file mode 100644 index 00000000..b5594ddf --- /dev/null +++ b/src/adventofcode2021/data/day_14/day14_test.txt @@ -0,0 +1,18 @@ +NNCB + +CH -> B +HH -> N +CB -> H +NH -> C +HB -> C +HC -> B +HN -> C +NN -> C +BH -> H +NC -> B +NB -> B +BN -> B +BB -> N +BC -> B +CC -> N +CN -> C diff --git a/src/adventofcode2021/data/day_15/day15.txt b/src/adventofcode2021/data/day_15/day15.txt new file mode 100644 index 00000000..6936fa56 --- /dev/null +++ b/src/adventofcode2021/data/day_15/day15.txt @@ -0,0 +1,100 @@ +4186687989147999814661259829898977359647291819692699791589716697144967221276869433756649999295588871 +9579993679749288818462777979758389899855345699193951989579278675969459999771962775579518839338298959 +1894738811988829986939897965935486686617499991722996261993912481731199465919971986799399278712999782 +1798991999197599646882937687934577816793967249952136268979847913269346518916498238994739961511228199 +9435574999917188935889117454871237663681989719878743978685998643691852827889659294379989962189789397 +1287186485994768936859699815284782585998129781252852173994242594377218959522199456634287944896997477 +6871578685828444387466578691916461497421152984838997196971189849994217987462378568989112149961927162 +7768274969889132821379748891197337985999948668439879482957941547449986946969485998964739447974228199 +6119899848149845561175416892733976799153716987399849877688336359684788884925393779796985288168899689 +4996845932219644899659769779189949876689119199183768989763889857597819948719839521871979981993129997 +7971499518898381939993989968259841935786594299996668987418876241327929297499819168198774999935791789 +8989294919949989983962199991969649393768661242699997841129192918937761747992122625495987832497983839 +9193796854893698637899476297986944265798698814799938624992771227255589146257383921899989994776679887 +4334756645129733983199962473969489983391681896779948161888991958648992243799384951799484369968254197 +3897589718983888479499598486927599567991132535134176992998995528842653199838733759892691848919911965 +4679148996923438189941447789895191885899459228929969898955955149985546372179997888628657881619286194 +1937118887998986388482681782881457248688899158899789393499516488888462374326483236682998798615722853 +6195689398286838812371235192382116119318689749931893894699698728798112662462496988978199379898598866 +3598667272723491779627997242171698925739726186131177716968968996294417188885959345953827817132998916 +1519944142993199841941699294968698995369578867997917889486654246227818996739169669789783299682355389 +2218941499973319799449881275891614179598919311996995957544919198794848543979791884958959516939969219 +4969928867619586693815519699979837583397199899918239596989778919912718374562614761899323839812288883 +4855936491799949827125398889219996936966517688267989677877842817994535586775274925946999881433891957 +8286417898919511938725961691419591991718373621643197999428795392499517199181988921727949563179969937 +9799598842359999396315192721781796533395715957931195589679878962197894922584827998655919193882119747 +3596733995839917716256199122869916639699959191297487195198993981413883281881552818597499287994468921 +9949671259478897959558191915993198527179777513987286587968219695819717127199299999879994937372821471 +8249378982728396361285738518898489561395947793198621191918625935167998972944978648799726557998719965 +7619899787644498454282294163869114967398789836916526984791998996919139923399297147674389898585574776 +9111942711987883739917663118136911569869319778278994967178891769352338555498946169756877871931961982 +6954989628268695715489341165279919911929481331551514988377791678884689194626861899418189486988187196 +1819462714769811679339886649561184398943387381398374111893259263332462196663147969995978399985318239 +5937768118219191763293327629979394977197738665738899438171642995279694299219969159988395799597763668 +3291461484869889296977898298697429828289173149834423478945292182199415824177922916549799949953193879 +1938461244782856465297371494738596381799882745998197821555993687969996966286984128951579924456677666 +8886638972849948981279741919995595932462545197979478998888914891944269388691325898218761298944166847 +7769849843768975899579798663973882717917968179272968568988548353899829895969988942852739512849485839 +4919596981981199955396675779996973999115926318193769749858719429971435898898314541967918326262744692 +9428939863833456979949424997963112359568769457278772998214895922715716385828918118573181991931578573 +8919945114733399891857766867695887955299831314167987975798587699981852813182999668179217892885195717 +7829615636974128183729818178423852991286772241293984977736229951972653397977497982358118999979169527 +7678454168594951256517753759991589135985669199864949749979918888196592217499387199589133343552966949 +8119422818994191498579782647911968168369995353791886975894926897878195878273141879915185929899178913 +7812329158697789168971359189386971899579317149271996991878952964259175719498918358285996776631995878 +9798118835784749981579198674539868489483271923274791976877789892996338187898927994658982979997349969 +9477273878881877647882189728959299613586151139161966464289278681991998184686824768175919871511961966 +9919857379986667695988843749559544986945219991581945889944986929171111598994534999698186266698791899 +3364916489314919992195598739915711141128797962959982289869485229925786798316399838178937926382446575 +2912818892939859927197913851983396399515367773169977525919619892913778889736959997599938212997888999 +4269497115948499995519869489549197186338685988659588411268899899999195999277982898938479978149797899 +3138855298787916946189938289951966994893842399691932599386799774317826775321856863511339949735888591 +9733897918582559589982799938529959926219289553149439458798698918481698369293743899488672761241316887 +9619798992686999691852898789982336699137977478998561325989934554968868839199199849981989993956997737 +7814666463672918637235789938316749389166781969998932176878578551998868999959242799791163889899846618 +9752949893221898553499187799825682346799828142188861139653882938139928866836991245459863829858998188 +1294949935197948898211198819881821296119727851997212621698896779992584166151297999339447798989362865 +8857979499916691528235697973684821799598587795559197649942299182627691961754119479999397919999371999 +3639897596779561927789269443848789921551926711437415122732687969549143999812994994747148755956729799 +8189479699613591819419668445977548487918995489881996918529279195193653419211963279279488981196293619 +7769942161582739292291418918979238651767948597494938529498673335548793472916599629718619835683689798 +1443967882579519328556279988497355736822198149965929928867655364991863978624745431379799339814955462 +5927776538139999925395875739879971665969766377989855978985783316288891613911888192698992898496228999 +4498985971959196199898917257998721838949758577899699735618359619799765639325393752685931618839988982 +9271222993569417892936854989116919891916539499279699988988898912117194275188367347638899733999979479 +8949989981139499681975917393649688481934651921792679664191179486897183131928956968554995139981686389 +7962191923797875755447715827951379682855832437385839853577933144793497869981692875314354882519799553 +5128992922139559144923714752298595495672285988967293398448786911569199838943982999883117961297426499 +8887837819981395371469995591499812138687318489899589978711887586394316979829994752182888967999761941 +4893681718664157399988831419917865893379899824267999937689388942879969961988914852729672599794989919 +7312248188168819929919689984145998136999978866527958937869919995191889731964921422187913124158695483 +1995934118941529285329887951189939691994429296585739819181789891673771872761593319915593993359726869 +9178376188129495278157697583261964544798698662866449989548461168168994978883239965197992958259599417 +7663919381992298699792692185886119999619811741985984739951258951892913583767867857796887568417584593 +1297266781979951199991649899679929931554418138836998455744999971949192119966823664131889997645798969 +8232788388116981227918324519818347881696857569359958951859757893979496939319984967569346237349273857 +7238773794974819897958369992455877898617314138977999717721957364986479592853498471899729926854869798 +9878391892942689799673598628127189965914153991439798619189934269994189455718998379949117112176126989 +9973929724199999992691868979977851999589176846396911972898448289929187798994952812949496537671125959 +1999851559969582846994467995235249717871112937689273578288997999768999986918289729893872577599984999 +9639826949219419566648894893837467732548988641394718891963892129987789893997796988568119615849999292 +1789137499185696488578593116637776338811819819798897946799969999744936599977888992679598939814897239 +1898993919394812832691851739965989948599194617868799718436871959793778678152119469859885428989444875 +1928955817982693248957597176639577981934989444431377942375978689893966694969892673148697975965192967 +8939156599764959959624971858589817896299742515985991299629359293282898975995912994954899227188668259 +8347281993854997297951752467199916978618961316199881528383111998414679491485978958179782188115849599 +5153997217916411589639859739789296988862783439847938765879419419634265745421494282419788839588246771 +2498243979184715495742999998369689934798698692644248568728399838817475436568389586831934126588893791 +4269939791423799419849919851965159959197193319919446157531719199919647964852391954979787982752341889 +6888256495877821981959988897683657317979826991598259398399299894767999928935187864988998975719984713 +4516931875987991198444993999799912151866812927497985932581555999965919919896959219487969442855879795 +9117831286616618595952876951875959363319581619969847599913699789975737878813381279496799929179788952 +7155199582375177596239771834968736274537947828931257491992596349776938519629696192934989339917928959 +6154956939632968579969697178792319286739276642566898371421967928644337849993942923767955592861812737 +4953717561541462467713819911357819672328259763884449131189691872817494893258598965966394994368176862 +5798245473891383899999774482987686879993965686253893589656876299192799821792599679911948989319876219 +9663939886297395558994245189842687789786296421287286839148327197544259239498959126144988376992925925 +4854219729975244181379867291974957856869989846345783749989995133294615198981592844612926397559878688 +7392655881995888883398631561439948996957297196649154296958969899189769924689955593884962128277983469 +6697192855668444397469674996629985762592998746173742294384883989692259269891721199591851199192193737 +9994937637611891863444164899866981592248937698819756642199582891967599998156894879699913976933911189 diff --git a/src/adventofcode2021/data/day_16/day16.txt b/src/adventofcode2021/data/day_16/day16.txt new file mode 100644 index 00000000..4eb72284 --- /dev/null +++ b/src/adventofcode2021/data/day_16/day16.txt @@ -0,0 +1 @@ +005532447836402684AC7AB3801A800021F0961146B1007A1147C89440294D005C12D2A7BC992D3F4E50C72CDF29EECFD0ACD5CC016962099194002CE31C5D3005F401296CAF4B656A46B2DE5588015C913D8653A3A001B9C3C93D7AC672F4FF78C136532E6E0007FCDFA975A3004B002E69EC4FD2D32CDF3FFDDAF01C91FCA7B41700263818025A00B48DEF3DFB89D26C3281A200F4C5AF57582527BC1890042DE00B4B324DBA4FAFCE473EF7CC0802B59DA28580212B3BD99A78C8004EC300761DC128EE40086C4F8E50F0C01882D0FE29900A01C01C2C96F38FCBB3E18C96F38FCBB3E1BCC57E2AA0154EDEC45096712A64A2520C6401A9E80213D98562653D98562612A06C0143CB03C529B5D9FD87CBA64F88CA439EC5BB299718023800D3CE7A935F9EA884F5EFAE9E10079125AF39E80212330F93EC7DAD7A9D5C4002A24A806A0062019B6600730173640575A0147C60070011FCA005000F7080385800CBEE006800A30C023520077A401840004BAC00D7A001FB31AAD10CC016923DA00686769E019DA780D0022394854167C2A56FB75200D33801F696D5B922F98B68B64E02460054CAE900949401BB80021D0562344E00042A16C6B8253000600B78020200E44386B068401E8391661C4E14B804D3B6B27CFE98E73BCF55B65762C402768803F09620419100661EC2A8CE0008741A83917CC024970D9E718DD341640259D80200008444D8F713C401D88310E2EC9F20F3330E059009118019A8803F12A0FC6E1006E3744183D27312200D4AC01693F5A131C93F5A131C970D6008867379CD3221289B13D402492EE377917CACEDB3695AD61C939C7C10082597E3740E857396499EA31980293F4FD206B40123CEE27CFB64D5E57B9ACC7F993D9495444001C998E66B50896B0B90050D34DF3295289128E73070E00A4E7A389224323005E801049351952694C000 diff --git a/src/adventofcode2021/data/day_17/day17.txt b/src/adventofcode2021/data/day_17/day17.txt new file mode 100644 index 00000000..190b8dda --- /dev/null +++ b/src/adventofcode2021/data/day_17/day17.txt @@ -0,0 +1 @@ +target area: x=244..303, y=-91..-54 diff --git a/src/adventofcode2021/data/day_18/day18.txt b/src/adventofcode2021/data/day_18/day18.txt new file mode 100644 index 00000000..7b840519 --- /dev/null +++ b/src/adventofcode2021/data/day_18/day18.txt @@ -0,0 +1,100 @@ +[[[5,3],[[8,6],[7,1]]],[8,0]] +[2,[[3,6],[[3,6],1]]] +[9,[[[7,1],3],3]] +[[[3,[3,9]],[3,9]],[[[7,4],4],3]] +[[[[1,8],[9,6]],[[1,1],2]],[[[3,1],4],6]] +[[[[4,0],[2,5]],[9,4]],[[[6,9],[0,1]],1]] +[[1,[[3,7],[5,3]]],[[[9,9],[9,6]],[0,9]]] +[[[2,[9,9]],[3,3]],[[[5,1],1],[9,0]]] +[3,[3,9]] +[[[[1,6],[4,3]],3],[[9,[4,0]],[[2,0],4]]] +[[2,[6,7]],[6,2]] +[[[9,[3,3]],[5,[8,7]]],[9,[[7,7],[0,6]]]] +[[[4,[7,5]],[9,[9,0]]],0] +[7,[[3,8],8]] +[[[7,0],[9,9]],8] +[4,[[[9,4],[8,1]],[2,[3,5]]]] +[[[2,6],[5,[5,5]]],[[[7,0],[2,2]],[9,8]]] +[[0,[0,[1,1]]],9] +[[[2,[7,9]],1],[8,[[8,8],[6,8]]]] +[[8,[[5,3],[4,4]]],[0,[2,[3,7]]]] +[[[2,[1,3]],5],[[9,[9,8]],[[8,4],[9,7]]]] +[[[9,9],[[0,1],[6,2]]],4] +[[[0,3],[[8,0],4]],[[7,5],2]] +[[[0,[1,7]],4],[[7,4],[[0,6],[2,8]]]] +[[[2,[8,3]],1],[[[5,6],9],[[6,8],[3,9]]]] +[[[0,[5,9]],[7,7]],[4,[[2,3],[6,8]]]] +[[2,[9,7]],[5,0]] +[[1,[[8,1],[1,7]]],[3,5]] +[[[[2,7],0],[[8,6],[0,4]]],[[1,[5,5]],[[0,1],[2,8]]]] +[[0,4],[[1,1],[9,[6,2]]]] +[[[6,[6,0]],7],[3,[4,[3,7]]]] +[[[3,[9,6]],0],9] +[6,[[7,[1,6]],[7,8]]] +[[4,[8,[6,6]]],[[[0,1],1],[6,[9,0]]]] +[[[8,4],[2,[6,0]]],[[9,5],[[7,9],0]]] +[[[7,7],[[7,3],9]],[[3,7],6]] +[[7,[9,0]],5] +[[1,5],[2,[[6,4],[5,0]]]] +[0,[[0,6],[[5,1],7]]] +[[3,0],9] +[1,[8,[[9,8],[6,5]]]] +[[[7,8],[0,[8,2]]],[1,[1,[2,4]]]] +[[[2,[5,6]],3],[[4,[9,5]],[9,8]]] +[[[[0,0],[8,7]],[[9,1],2]],[[9,[6,9]],4]] +[8,[[9,6],[[2,4],5]]] +[[[2,[0,4]],[2,[3,7]]],[[[8,1],[9,4]],4]] +[8,2] +[[[3,7],0],7] +[[0,1],[[2,4],[1,5]]] +[[6,[2,2]],[[[3,3],1],[[4,0],6]]] +[2,[[5,8],6]] +[7,[5,[5,5]]] +[[1,[[2,4],0]],[[2,[8,3]],[4,[3,7]]]] +[[[5,1],[[7,6],3]],[[[4,8],[5,9]],8]] +[[[8,[3,5]],[[1,8],[0,3]]],[[0,[1,8]],[6,8]]] +[[[[0,8],8],[[0,5],[7,6]]],[2,1]] +[5,[4,[7,0]]] +[[7,[[6,5],[5,2]]],[4,6]] +[[2,6],[[2,1],[[2,3],[2,3]]]] +[[[0,[4,9]],[3,[8,9]]],[[[9,0],[6,2]],[2,1]]] +[6,[6,[0,[3,1]]]] +[[[9,8],[[4,9],8]],[[[3,2],[9,1]],5]] +[[[[2,6],[0,9]],[2,7]],[1,[9,2]]] +[[[5,[7,9]],[[2,3],2]],[[[9,5],0],[[9,6],[3,3]]]] +[[[[6,3],[2,1]],[[7,6],[6,8]]],[[[0,2],[8,0]],[0,[9,5]]]] +[[[[2,0],0],1],[4,[[3,6],[3,1]]]] +[[[3,1],[5,0]],[[[3,3],[0,2]],[5,8]]] +[[[[1,0],8],[[2,3],[2,1]]],[[4,[5,5]],[[9,8],3]]] +[[[8,[0,5]],[9,9]],[[[7,0],1],[[7,2],7]]] +[[[[3,0],4],7],[[3,9],[4,[9,7]]]] +[[[8,3],0],[6,5]] +[[2,[[3,8],6]],[[[3,2],[1,4]],[[1,6],[9,4]]]] +[[[[6,2],[4,7]],[3,9]],[[1,[6,5]],4]] +[[[[8,3],2],[8,2]],5] +[[[9,[9,0]],[4,7]],[[[5,9],2],6]] +[4,[[6,0],3]] +[[[5,9],[8,3]],0] +[[[[6,1],[4,8]],[9,[1,6]]],1] +[[[8,5],[2,2]],6] +[2,[5,[[5,7],[6,0]]]] +[[[[3,6],[2,3]],6],[[6,[6,5]],[[6,4],[6,9]]]] +[[4,[[1,3],1]],1] +[[2,[7,[4,3]]],0] +[[8,[[1,1],1]],[[4,1],[[9,6],[1,3]]]] +[[8,1],[3,[2,[5,7]]]] +[8,[[[2,4],[8,3]],[[8,7],[2,8]]]] +[[0,[[5,7],8]],[[3,[6,6]],[0,8]]] +[7,[[1,3],[2,4]]] +[[[2,0],[0,1]],[[[8,9],[7,0]],[3,6]]] +[[[1,6],[[6,9],[6,3]]],[2,[1,1]]] +[[1,[7,[8,1]]],[[[0,3],[9,1]],[[1,5],2]]] +[[[[1,3],2],1],[[[0,4],5],[[5,0],[1,1]]]] +[[[2,[0,1]],[5,6]],4] +[[8,3],[[6,4],[[0,9],5]]] +[[[[2,7],4],[7,0]],[[[6,7],2],[3,8]]] +[[[[9,3],9],[[2,9],[9,0]]],[[[7,5],3],[[8,8],8]]] +[[[[0,1],[8,4]],[4,[8,5]]],[2,[1,[0,2]]]] +[[5,[[3,5],[9,2]]],[[[2,2],3],[[4,7],3]]] +[[[7,8],8],2] +[9,[2,1]] diff --git a/src/adventofcode2021/data/day_19/day19.txt b/src/adventofcode2021/data/day_19/day19.txt new file mode 100644 index 00000000..1366db27 --- /dev/null +++ b/src/adventofcode2021/data/day_19/day19.txt @@ -0,0 +1,780 @@ +--- scanner 0 --- +-757,414,492 +-593,762,-478 +-608,779,-508 +-761,323,468 +-583,-536,626 +539,660,453 +745,-932,544 +419,509,439 +62,-24,118 +338,-793,-584 +-775,808,-521 +708,771,-798 +-90,-99,12 +400,-811,-639 +850,-816,468 +715,652,-760 +-820,276,460 +737,-883,437 +716,659,-718 +-619,-458,-521 +-551,-451,-643 +477,574,399 +-653,-464,-508 +-596,-505,704 +438,-706,-637 +-589,-621,598 + +--- scanner 1 --- +-386,481,-530 +568,822,748 +56,78,41 +-653,837,672 +-825,-465,-698 +-842,-495,-683 +517,-321,717 +401,-495,-638 +442,717,-695 +-661,-765,361 +558,611,-702 +-871,-508,-516 +-339,473,-471 +-709,-772,450 +441,-376,741 +-477,505,-534 +388,-630,-740 +473,639,-708 +-528,845,807 +-610,763,777 +583,809,645 +502,-587,734 +395,-508,-672 +-37,-6,-116 +-623,-735,471 +505,810,757 + +--- scanner 2 --- +-695,364,-810 +-642,483,453 +745,-960,-441 +743,235,-394 +15,-139,-14 +-452,-639,536 +635,652,646 +810,-702,549 +700,-762,505 +-453,-534,569 +621,-860,-431 +695,501,604 +-510,489,384 +-706,370,-596 +-536,388,405 +-628,402,-625 +633,540,465 +802,-735,390 +606,-923,-539 +578,271,-459 +105,-2,-130 +-517,-596,-542 +-571,-576,-529 +-486,-440,473 +654,315,-514 +-443,-634,-618 + +--- scanner 3 --- +812,-526,-776 +447,879,691 +-2,88,14 +-853,-613,-699 +868,-612,-712 +-746,793,-620 +-860,-681,-577 +491,-498,660 +-529,-701,302 +502,814,567 +-540,613,383 +445,628,-447 +355,810,596 +403,-351,685 +-807,800,-831 +-33,-43,-159 +-731,776,-886 +583,616,-432 +-582,553,534 +-602,-816,250 +471,485,-398 +872,-622,-827 +-568,-778,372 +377,-461,620 +-721,615,495 +-847,-579,-712 + +--- scanner 4 --- +-383,-542,-722 +703,879,-598 +587,-459,579 +-424,322,707 +-398,371,564 +113,1,1 +629,-610,639 +-400,-767,313 +-455,-643,378 +777,869,-619 +-308,-672,382 +793,544,399 +-536,356,576 +828,-723,-592 +-389,-498,-592 +768,-571,577 +854,755,392 +-621,489,-516 +-611,512,-432 +849,-622,-566 +-443,-593,-655 +753,753,-624 +778,810,416 +780,-628,-698 +-654,590,-372 + +--- scanner 5 --- +366,-674,-398 +646,574,-495 +810,-712,775 +-776,-616,-664 +709,499,-484 +538,832,519 +-851,-513,601 +330,-736,-449 +-832,-477,488 +754,549,-531 +534,-704,-421 +589,756,371 +-769,699,-884 +742,-698,801 +-608,351,427 +616,920,401 +-821,-527,-723 +-149,-42,-32 +-775,702,-638 +-576,337,535 +-750,-560,-579 +-717,658,-756 +632,-708,837 +-18,44,105 +-824,-294,581 +-538,374,539 + +--- scanner 6 --- +-670,706,-858 +342,376,641 +405,-867,-344 +-768,-540,-416 +-591,518,863 +-711,414,845 +-776,-509,-579 +281,-922,466 +-464,-713,728 +378,352,-541 +288,342,-625 +287,-929,-439 +-757,-508,-659 +-18,-130,-81 +-577,685,-840 +371,-842,552 +-550,433,837 +-523,-701,877 +303,376,-402 +247,-928,631 +-659,-686,773 +333,388,704 +445,389,626 +-433,677,-834 +358,-840,-351 + +--- scanner 7 --- +-608,662,-491 +-421,395,723 +537,400,-654 +-801,-707,334 +-716,-378,-908 +-606,481,-603 +-691,-669,364 +722,-794,-779 +-712,-755,327 +-551,-443,-872 +-64,-119,-13 +50,75,-130 +590,472,837 +655,-609,-741 +-668,620,-642 +-445,471,778 +569,546,847 +-428,456,512 +595,496,721 +733,-580,-773 +563,421,-755 +669,469,-660 +-627,-498,-828 +799,-779,496 +860,-721,542 +820,-593,474 + +--- scanner 8 --- +529,-663,-800 +519,-548,-804 +-429,-739,586 +271,298,-446 +-718,433,-595 +505,549,874 +562,-663,915 +615,-599,-744 +-729,576,-465 +351,484,-448 +-529,-792,673 +305,358,-378 +-68,-144,62 +498,443,758 +528,-676,921 +-836,389,447 +-828,282,496 +-796,-643,-252 +-491,-794,568 +-652,604,-655 +492,471,843 +-653,-636,-220 +460,-798,928 +-941,313,563 +-115,1,182 +-609,-662,-266 + +--- scanner 9 --- +819,-614,-852 +-394,-498,662 +-568,774,-852 +-488,737,-781 +-672,-417,-703 +-664,-337,-815 +652,-627,-823 +498,457,699 +595,-492,407 +-568,636,624 +645,572,-483 +575,387,738 +47,-73,82 +-546,514,691 +697,-627,420 +-442,625,-847 +-356,-496,767 +-671,-375,-696 +460,335,665 +745,655,-394 +663,-614,414 +865,584,-431 +637,-657,-806 +-700,627,697 +-294,-551,749 + +--- scanner 10 --- +12,120,-29 +-342,-679,-939 +530,-282,501 +-809,684,-468 +489,-308,416 +572,350,621 +-403,-504,359 +577,584,627 +403,-417,-730 +-66,14,-156 +414,664,-519 +598,-372,-703 +650,-300,397 +-506,-519,372 +-884,650,-644 +-765,612,-643 +-394,-441,371 +462,-268,-718 +-374,674,418 +-308,-514,-945 +398,839,-455 +-344,592,336 +363,708,-493 +-479,717,344 +623,433,604 +-432,-593,-859 + +--- scanner 11 --- +891,-554,-721 +-666,637,-444 +-607,-541,-415 +29,2,4 +162,154,-54 +-404,-217,531 +532,510,-451 +713,-606,830 +928,-640,-742 +-654,574,-435 +-681,-584,-520 +-609,441,448 +-689,-459,-385 +-398,-451,536 +743,571,-458 +921,-592,-831 +534,611,565 +477,586,-475 +781,-478,790 +408,661,539 +-653,652,-547 +759,-664,769 +-524,415,489 +418,587,560 +-421,-300,582 +-628,433,609 + +--- scanner 12 --- +-377,614,-406 +-552,-831,694 +527,-699,-733 +-754,618,829 +-411,-958,-621 +745,422,-840 +509,-816,-841 +-425,703,-413 +849,417,-798 +605,657,787 +-689,453,793 +-338,-820,700 +772,341,-775 +649,784,719 +670,-589,575 +-539,-918,-553 +-353,-897,-575 +-463,593,-443 +463,-695,-855 +130,-179,-79 +513,-525,626 +-634,529,749 +703,610,736 +45,-46,33 +661,-442,574 +-523,-753,662 + +--- scanner 13 --- +909,550,-668 +112,-89,-14 +-273,384,725 +824,456,386 +-373,374,601 +-793,-530,-506 +-594,-593,-472 +787,-689,-321 +-657,472,-591 +717,-801,-298 +821,591,-739 +-310,482,586 +-637,485,-537 +493,-740,530 +749,-693,-284 +724,419,337 +474,-627,566 +-531,-606,790 +-33,37,38 +-471,-562,680 +501,-647,347 +618,425,401 +-699,-626,-473 +944,544,-718 +-498,-447,782 +-599,561,-463 + +--- scanner 14 --- +551,-821,-732 +-578,-311,780 +558,-481,467 +-688,548,475 +743,667,230 +628,740,282 +-667,-431,700 +384,-850,-719 +-866,523,-640 +608,409,-597 +-743,-376,744 +-94,25,-89 +458,-392,550 +-849,538,-906 +566,-804,-762 +506,422,-732 +-493,-640,-462 +-603,-602,-492 +705,701,352 +-582,-688,-455 +338,-429,479 +-873,462,-851 +540,416,-719 +-626,687,514 +-686,729,363 + +--- scanner 15 --- +-702,-746,443 +739,592,-374 +597,814,559 +763,-590,-410 +-670,658,-388 +682,788,518 +727,655,-365 +-335,568,609 +-345,642,630 +-858,-671,-565 +-459,719,-381 +-404,643,-405 +438,-883,401 +-843,-533,-553 +701,796,679 +-892,-559,-696 +409,-907,638 +-725,-756,527 +-624,-789,383 +430,-889,545 +726,577,-477 +-80,-67,-39 +-461,618,635 +773,-674,-320 +58,23,81 +739,-451,-335 + +--- scanner 16 --- +-755,578,-603 +487,691,-754 +593,698,-638 +20,82,-38 +-923,-807,452 +382,-791,415 +-559,792,522 +-834,-736,364 +-836,-723,-539 +552,845,568 +-922,-847,-618 +-610,838,475 +-739,456,-638 +394,-761,-691 +678,891,498 +358,-716,554 +382,-752,-628 +738,925,566 +565,704,-723 +348,-806,638 +-667,922,511 +-779,551,-493 +-916,-813,-453 +-153,145,64 +-861,-689,357 +395,-649,-613 + +--- scanner 17 --- +664,-630,-754 +805,704,436 +-431,686,597 +-587,-662,388 +-631,-532,382 +569,439,-825 +400,-738,620 +-717,-556,-781 +-461,651,805 +-984,750,-627 +423,-822,610 +-711,-688,-850 +459,413,-747 +674,775,343 +780,-635,-778 +790,-656,-704 +-840,657,-649 +-53,56,-150 +-812,-662,-829 +451,333,-808 +-112,-109,-68 +-936,553,-605 +-682,-599,442 +708,813,465 +501,-882,653 +-541,612,682 + +--- scanner 18 --- +552,283,-704 +606,-679,-568 +33,2,166 +471,-600,469 +15,-169,53 +-565,601,731 +-501,373,-422 +-680,574,833 +846,372,668 +634,306,-684 +-534,478,-421 +563,-505,400 +703,258,-627 +-665,-549,-505 +-466,-662,726 +618,-629,465 +552,-774,-505 +-521,541,841 +-617,-644,-611 +-605,-701,664 +804,401,618 +-686,-650,-479 +-424,-813,666 +893,472,557 +-597,279,-455 +546,-730,-635 + +--- scanner 19 --- +835,-511,-678 +895,455,462 +650,-578,-640 +-505,-664,948 +-359,-696,-553 +161,-95,23 +790,538,-336 +749,472,-391 +888,283,439 +30,-35,133 +-384,431,727 +-455,-638,822 +-462,405,617 +820,-434,597 +-380,-670,-654 +784,307,460 +699,385,-327 +621,-500,-672 +-401,325,609 +-428,-564,-559 +-560,649,-682 +762,-373,643 +-604,545,-778 +-431,-643,938 +634,-413,575 +-582,742,-826 + +--- scanner 20 --- +-600,-782,533 +596,577,-670 +620,550,-780 +-646,690,-519 +286,-347,543 +763,-848,-655 +-541,-753,-645 +413,595,320 +321,586,395 +-752,697,-635 +-75,63,-4 +677,-724,-734 +-518,-812,451 +-554,-650,-660 +-526,-677,576 +-882,525,309 +-724,703,-550 +-890,466,262 +-24,138,-191 +461,-391,471 +-175,5,-154 +462,-272,509 +-553,-762,-582 +-858,529,400 +373,551,219 +580,455,-635 +757,-814,-820 + +--- scanner 21 --- +-377,-514,-910 +844,-627,-723 +759,-599,-717 +-445,-454,-944 +-402,821,411 +929,642,-755 +749,-810,733 +734,-797,630 +812,-798,742 +-294,-810,772 +-514,787,542 +-376,772,554 +875,-705,-710 +876,388,726 +-447,-640,-864 +916,507,-653 +800,333,702 +-433,-834,697 +-803,392,-696 +-517,-844,787 +922,520,-687 +-743,443,-600 +22,-64,-168 +160,4,-35 +815,599,719 +-799,507,-686 + +--- scanner 22 --- +817,529,-684 +728,823,688 +-473,-503,418 +-72,102,143 +-547,657,684 +559,-544,861 +-476,801,651 +821,-620,-435 +699,781,638 +-521,742,740 +628,870,577 +-465,-410,601 +526,-703,853 +622,-557,-401 +-721,-457,-213 +727,-524,-402 +-528,962,-575 +499,-588,751 +-580,834,-534 +-689,-349,-227 +66,6,64 +794,611,-664 +842,680,-607 +-446,-523,637 +-522,716,-578 +-759,-461,-250 + +--- scanner 23 --- +-352,-697,-348 +432,569,514 +-44,-72,111 +-406,627,809 +-581,-621,391 +-473,788,-390 +819,-664,596 +877,399,-834 +566,-655,-584 +782,-784,667 +366,523,626 +473,-689,-636 +-378,729,728 +-410,628,711 +730,-564,679 +-673,698,-393 +-334,-673,-384 +-432,-525,427 +361,649,477 +-528,-485,420 +-310,-680,-500 +151,90,68 +-518,655,-370 +946,312,-770 +592,-590,-584 +865,328,-773 + +--- scanner 24 --- +-519,780,-365 +634,802,-649 +-674,902,562 +105,13,-47 +-667,878,446 +-662,-634,635 +-479,684,-358 +465,-735,700 +-522,-563,-663 +704,539,455 +430,-788,740 +757,-463,-300 +-606,-678,-646 +677,-509,-447 +794,739,452 +-657,-639,463 +-706,-723,627 +735,834,-666 +-595,-597,-832 +575,-753,793 +661,694,432 +-62,53,53 +633,806,-747 +678,-478,-454 +-691,860,410 +-615,631,-329 + +--- scanner 25 --- +183,2,-88 +656,638,481 +894,-843,430 +-325,-646,403 +-658,-347,-552 +619,806,-682 +657,512,589 +562,876,-811 +5,-20,46 +-679,-329,-645 +-650,-353,-408 +-315,-562,313 +536,-608,-751 +586,835,-891 +-759,588,-782 +701,481,532 +-639,600,608 +867,-836,383 +-349,-785,328 +567,-771,-743 +956,-748,312 +535,-528,-732 +-702,558,533 +-554,511,-793 +-765,497,-720 +-786,627,617 + +--- scanner 26 --- +568,-612,-772 +-494,-703,-776 +689,-640,-900 +512,-573,342 +765,568,275 +-699,525,741 +508,448,-580 +558,403,-627 +-458,-494,437 +58,44,-10 +-695,623,-517 +-620,-556,487 +-452,-603,-788 +-689,415,705 +929,541,305 +675,-619,407 +479,-562,414 +-703,347,679 +-665,791,-494 +-527,-407,477 +128,-52,-173 +583,511,-591 +698,-517,-736 +-727,827,-545 +-409,-773,-839 +841,619,423 + +--- scanner 27 --- +743,-494,-529 +20,142,-6 +374,-668,657 +-568,-551,-817 +374,719,-731 +-538,-500,730 +-515,-415,-788 +-385,-491,820 +-427,-538,747 +-393,697,-399 +411,815,380 +-365,799,-480 +530,822,418 +420,-486,700 +-702,757,526 +-419,-455,-781 +403,-501,670 +-626,716,631 +-397,698,-497 +157,78,120 +379,593,-582 +523,823,460 +445,639,-694 +832,-594,-612 +-640,682,457 +795,-714,-541 diff --git a/src/adventofcode2021/data/day_19/day19_test.txt b/src/adventofcode2021/data/day_19/day19_test.txt new file mode 100644 index 00000000..4e496e9e --- /dev/null +++ b/src/adventofcode2021/data/day_19/day19_test.txt @@ -0,0 +1,136 @@ +--- scanner 0 --- +404,-588,-901 +528,-643,409 +-838,591,734 +390,-675,-793 +-537,-823,-458 +-485,-357,347 +-345,-311,381 +-661,-816,-575 +-876,649,763 +-618,-824,-621 +553,345,-567 +474,580,667 +-447,-329,318 +-584,868,-557 +544,-627,-890 +564,392,-477 +455,729,728 +-892,524,684 +-689,845,-530 +423,-701,434 +7,-33,-71 +630,319,-379 +443,580,662 +-789,900,-551 +459,-707,401 + +--- scanner 1 --- +686,422,578 +605,423,415 +515,917,-361 +-336,658,858 +95,138,22 +-476,619,847 +-340,-569,-846 +567,-361,727 +-460,603,-452 +669,-402,600 +729,430,532 +-500,-761,534 +-322,571,750 +-466,-666,-811 +-429,-592,574 +-355,545,-477 +703,-491,-529 +-328,-685,520 +413,935,-424 +-391,539,-444 +586,-435,557 +-364,-763,-893 +807,-499,-711 +755,-354,-619 +553,889,-390 + +--- scanner 2 --- +649,640,665 +682,-795,504 +-784,533,-524 +-644,584,-595 +-588,-843,648 +-30,6,44 +-674,560,763 +500,723,-460 +609,671,-379 +-555,-800,653 +-675,-892,-343 +697,-426,-610 +578,704,681 +493,664,-388 +-671,-858,530 +-667,343,800 +571,-461,-707 +-138,-166,112 +-889,563,-600 +646,-828,498 +640,759,510 +-630,509,768 +-681,-892,-333 +673,-379,-804 +-742,-814,-386 +577,-820,562 + +--- scanner 3 --- +-589,542,597 +605,-692,669 +-500,565,-823 +-660,373,557 +-458,-679,-417 +-488,449,543 +-626,468,-788 +338,-750,-386 +528,-832,-391 +562,-778,733 +-938,-730,414 +543,643,-506 +-524,371,-870 +407,773,750 +-104,29,83 +378,-903,-323 +-778,-728,485 +426,699,580 +-438,-605,-362 +-469,-447,-387 +509,732,623 +647,635,-688 +-868,-804,481 +614,-800,639 +595,780,-596 + +--- scanner 4 --- +727,592,562 +-293,-554,779 +441,611,-461 +-714,465,-776 +-743,427,-804 +-660,-479,-426 +832,-632,460 +927,-485,-438 +408,393,-506 +466,436,-512 +110,16,151 +-258,-428,682 +-393,719,612 +-211,-452,876 +808,-476,-593 +-575,615,604 +-485,667,467 +-680,325,-822 +-627,-443,-432 +872,-547,-609 +833,512,582 +807,604,487 +839,-516,451 +891,-625,532 +-652,-548,-490 +30,-46,-14 diff --git a/src/adventofcode2021/data/day_20/day20.txt b/src/adventofcode2021/data/day_20/day20.txt new file mode 100644 index 00000000..23921b71 --- /dev/null +++ b/src/adventofcode2021/data/day_20/day20.txt @@ -0,0 +1,102 @@ +##..#.#...##.####..#..###.#.#.#.#.####.#.##.....#####.##..#..#.#.##.......##.##.#.#...#....#.####..#.##.##....###..##.#####.##....##.#.#.#.#....####...##.#......#.#..##......##..#..###.#..####.###...##.#.##.#..##.##..#.#.#..###..##.####.#.#.#..#.##...#..##...##.#####..##.##..#...#..###.#.#...#..#..##...#.#..........#...#...#.#.#.#..#.###..##....####..#######.##.#.....#.#.###...##...###...#.##.##.##..#......#.###...#.#.#.#...##.#.#.##.#..###.#...##...##.......####.##..#.#....#.#####..#..#####.#.....#....#.#. + +.##.#...##..##.#..........#####..#.##..######.##..#....#..#####.#.#####.#..#...#..#####..#.......##. +.#.#.#.#####..##.#.###..#.##.##.......#.####.#............#.#....####..#.#####.##.##.#.###..#..##... +.##.#.#...##....#.#..#...........##.#.#..#####...#..##.###..##.###..........#####..##..##.#.####.... +##..####.####.###.......#....#.#####.##...#....###...##...###...#...##..####....####..#####..##..### +...###.##.....#......###.#.###..#..###...#.#..#.#######.##..#..#..#..##.##..#####.#####.###...#.###. +##.###.#....##..####.#..#.###.##.#.##..#...#...###.###.#..#..#.#.###.##.#..###.#.###....###.###..... +#.#.##..#.....#.....##....######...#........#.#.#.#.######..#...##.#.######...#.##########..#.###..# +.##.#...##.#......###..####.##.#...#..##.#.####...##..####..#####..##.###.#.###...#.#.######.#.##### +..#..##..#.#.#...####..###.#..#...#..#.#.#.#.###..####.#...#......#..#..####.#...#.#.#......#...#..# +#...###..#.#.###.#.##.##.#.#.#####....#....#.....#####...#..#..#.#####..##.....#..###.#..###.#..#... +..##.#.#..##.#.#...#...#.#.#..#.#.##....#####....#.##...#..#..#.#....###...##..#.#.##.##.#.......#.# +##.##.#######.###.#..#....#..##..#.###.....#.###..#.#..#....#.#..###.##.#.....#.#.#.##.#...#..##.#.. +.....#.#.#.#.####.#..####.#....##.###.###...########.#.#....#..##.#.#####...##....##....#.......#.#. +##..#...#..#.#.####..#.#..####.#####.#####.###..#.#####.#..#...##.######.###.#..#.##.#.#..#..#.####. +#.##.##.#.####...#.#.#.#..####.#.#...###...#.#....##...####.#..#####.#.####.#..#.....###.#..#...#.#. +.#..#.##...####...##.####...###..####.##........#.#.##..#..#.##...#....##.#.#..#.#.###...##.......#. +..#..#..#.###.##...###....#.#..#..##..#...###.###...#..#.....#..#.####.#.#.#.##..###...#....##.#.### +###.##....##.#.##..####.#.###...###.###.#####..##.###.....#.#####....#.##..##.#####.##..###....#.... +###..#...###..#....#..#.#...#....###.#.####.##..#.#..#.###..#..#.##.#.#.......#...#....#...###..#.## +#...#.#.#...#.####.##.#.#..#...##.....#..##....#..#.##..##.####.#.#.###..##..#.#.#.###.#.#..####..## +.###..###.##..###..#..#.##..#...#.##.#.......####.#..##.#...#.##..#..........##..####..##.###..###.. +###.#.#...###..#...#####.####..#..#######.#.#.###.##.###.#.####.##.#####..###.#####.#...####.##..##. +.##..##..##.#...######.###...#.##.##....##.#...##.#####.#...##..#.#...#.#..#.##.#....##.####.#.##.#. +...####..#...#...####.#.#...#...###..#.##...####.#..######.##.....##..#...#...####.###.#..##.##..#.. +#.#####.##.##..#..##.#.####..##.#.#...#..####.##..###.####.##.##...#.#...#.#.#####.####.#.###..#..#. +..#.....#..##..#...#####..##.###..##.#..##..##..####.#..#.####.###...#####.#.###.....#..#.####.#.##. +#####....###..##.#.######.#.##..##.#.#####.##########.#...##...###....###.#.....#.....###.#.#.#.##.# +##.....#.###.###.#.##.########....##.##.###...#######..##..#.#.#..#.##..####..#.###.#.###.#.#......# +..##..#...#.#.#.#.###.#..#####.#.#..#......####..#.###..###...##...##.##..#..#..#.##.#..###..##.#.#. +.#.#..#..###.##.#.#...#.#...##...#.###..#.#.##.#....#..####..#.#.##.#..#...##.#.....##...####.....#. +##.#..##...#..##.####.##....##..#####.###...#..######..#....#..#######..#..#.####.#...##.##..##..#.. +..##.#.###....#..#.....#..#.#.#.#........#..##.#.#.......####.##...#.#.##.######..##..#....#.#...... +.....#....#.#.##...#..######.###.###.##....##.#.##.###.....#..#.#....#####.#..##.#.....#..#.##....## +##.....#.#...####...##.##.#.##.#.##......#.#########.#.##..##...###.##.#..#....#..##.####..#######.. +##...#.########.###.#....#...#..##.##.###....##...#####..##.####..##..#..#####.#..######.####...#.#. +##.####..##.#####..#..###...##.......#...#.###.#.#..#..#....#.#..##.....#.#....####.###...#.#..##.#. +#.#.#.#.###..#.#####.#...##...#.###.##..#.#####.....#...#.#.#..#...##....#...####.####.##.#.....#### +..###.##.#......#######..#...##..###.##....#....#.#..###...#..###.#.#...#..##...####.###.###..#.#.## +.#..#.#.##..###########.#.#..#.###.######...###.##..#.###..##.#...#.#...###.#.##.##.#..#..#..#.#...# +.#..#.#..##....#....####.#..##....#.###.####..#.##.#.#..###.#.##.#........##.#...###.#.......##.#... +...###.#.#.##.##.##.....#.#.#..#..#.##.#######...##....#.#......##....##.#.####.####.###.#....##..#. +.#.##..#.##.##.####.....##...#..###.###.###..#..##.####..##...#.###.##..##..#####.#..###....###.##.# +#.###...#####.#..#.####...##.#..#...######.....#.#....##.#.#...##....#...........##.##.##.#...###### +##..#..##.....##..#.#..##.##.#..#...####.######.......###..#..##.##..##..##..###..##.##.#.#.....#... +#......###..#####..#######.#.#..#.###..##.#..##.##.##.#..###.###..##.##.....#.#..####.#.##...##..### +.##...#..###..##..#.#####.#####.###...#.........#.##.##.###.#.#.#...###.#..###.##.##.#..#..#...###.# +#.###.###.###.#.###.#.##....##..##.......#....##.###.###.#.###..#..###.#.##.##..#.#...######.####..# +..#####.###.##.#..##.##.#..#.###..#.####....#...##.#.......#.#..##.#.......##.##.#######...######.## +#.##...###..#..##.....#.#.##.#..##...##.#####..#...##...#..#.####.#.##.##.#....##.###.#.##..##..#.#. +..#.###.#.##...#..##.#..####.###..#####.##.####.#.##..####.###..##..#...#.##...#.###....####...####. +.###.....###.#....######.#####..#..#..#.#.#..#..#.###.#........##.###...#...##..#..#...#.....#.###.# +..###.##.#.#####.#..########..##..##.#..###.#.##.#....#.###........#....#...#.#...##.#.##..#..##.##. +###.#.#.#...#..##....#.##....##.#######.#.##.#.##....#....###.#.#.....#.##..###..##..#..##..#.#..##. +.#.##..#.##..##.##.##..#.###.#..##.###.#.###.##......##.#...##.##..##...##.#...##.#..#..#.##..#.##.. +####..####.###..#..#####...###.#....###.#...##........#.#...#..#.#.###..####.#.#.######...#..##.#.#. +#...#..#.##..#.#.#.#.#...##.#.##..#...#.###.###.#....##.#..##.#.###..##....#.###.#.##..#..##....#... +#.###.#.##.###.#..#...####.#....#..#.#####.#...#.###.##.##.###.###..#...#.#.####..###..........##.#. +##.##.#.###.#.##.####...###.#.###..###...####..#####.###...#.##...###.##..#.####.#.##...#....##.#.## +#....#..##.##.##......##...##.##..#####...#.##.###.##...##..##..###..#..#..#...###.##.#..#..#.#...## +###.####.....#.#....####..#.##.........#....##.....#....##.#..##.##..####..###.####.#...##....##.##. +#.......###.#..####.##..#..##...#....###...##.......##.....###.######.#..#..##..#....#.###.#..##.### +#.###.##..##..##.##...#.........####..####..#..##...##.#..#..#######.###...#......#.##.####.#..##... +#.####...##.#...#.#.###...##...#....#.##.##.####.#.#....###....#...#........##.##..#.#.####..#.#.#.. +.#..###.#..#.....##..#..#.###..###.#.##...#.#.....#...#....#.##.#..#.#...#..#.#..###..#.#...###..... +.####....####....#.#.....#..#.#.##........#..#.####.##.##...#.#.####.#..#.##..##..#...#.#.##...#.#.# +#####.#...####.#.####.#...#..#...#.#.##.#..#...##..#.#...##.###.##.#.###.###.#...#..#.###.##.##...#. +#.#....#.###.##..##.##..##.#...#.###....###....###..#.####.###..#.#.##...#..####....#.####...###.#.. +.#...#.###.#.####..#.#####...##...#..##........#....#..#.#.##..##.##.#######.#.#.#.##.#.#.#.##..#... +#....#....#.#.##.##.##..###..###.##..#.##.....###.###......#.#....#..#.##......#.###.#..#.#.#.#..### +#####.#####.##...#.#..#..##.####.#......######..####..##.##.##.#.......#...####..#..###.#..##.#.#.#. +#.##...##..##......###...#.#.##...#.#...#..##.###.#..#.##...#.#.#.##.###.##.#####....#...#.....##..# +..##....##..#..##..##...#..#.##.####.##........###..##.##.#.#.##..#..###...#..#...##.#.##.########.# +#...#.#####.###.#....#....#######.###..#..#.#..##..#.###.#.####.##.#..###..#....###.###....###.#..## +.......###.#.#.#..#.#..###...#.##..#..#...#..#....#..#...#.#####.#...##.#.###.###.#..#.##.#..##..... +....#.##...#.##.#.###..#####..#.######.###...###..##.#.#.##.###.##.####..#..#.....#.......#.######.# +##..####......##...##.#..#..#..#..##.#.#..##..####.#.######.#...##..#..#.##.##..###..#..#.#..#..#... +.##.#..#..##.#.##..#..#.#.#...##.##...##.#.########..##..#...#####.....#.#..###.#.##.##.###..#..#.## +..##...#.#..#.#.##.###..#....#..###...#..##....##.#..######..###.#.#####..#.###.##.###..#####...#### +#.#..###.##.#...#..###..#.##.##...####.####.#.....##....###..#..#...####.####.###...#..#.#.#.#.##..# +###..##...#.#..##..#...##..###.#.....#...##.###.#..###...###.####..###.#..#.#...##.....#............ +.#####..##...##....######...#..###.#.#......#...######.#..#...###.#...#..####.#......##..#..#.#...#. +.#..####.#.#..###..#.#.##.####..#.#....#.####..##...#..#.#.#..###.........##.#.#####...###...#.#..#. +.#.#....#..####..##..#########.#..#.##..###..#..#...###....##.....####...#..#.##....#######.####.##. +##.#.####..#...#..#.##.#..#....##.####..####..###.#.#...#######.#.###..###.###..#.###.##...##.##..#. +.#####.....##.#....##...##...#.#..####.##..#....##.###.#####.##.#.#.#...#...#.#.#.......##..##.##.#. +.##..#.#.###.#.#.#....##.#...#....#...#...#..#######....##.#.#.#####.#.###..#..#...#......#..#.##..# +...##.....#..#.####.###...#####.#.#....##.#.#.#.#...####.####.#..##.#.##.##.###..##...##.....#...### +####.###..###.####..###.##..#.#####.#...##.#..#.#.##.####.#..####..#..##....####.#....#...#.####.#.# +##....##.#.#.##.###..#####.##..##..#..##..##..#.#..###.##.#####...#..#.##.#.####.####..#...##..#..## +#.#..###..##..#..#..####..#..#.#..#.##...###.#.#.#.#...####.#.#...####.##..#.#.#..#.##..##..##.#.... +##.#.####....##..##..####.#######..##....######.##.#....#..#...#.#..#.##.#...#.#.#.#.#..###....#.#.# +.##.###..#.###..##...####.###.#.##.###.#...#..#......######.##.##.##.####.##.##....#.#......####.#.# +#..###.####.#...#.###.###.#..##.###..#.#.#####..#.##.##.#.##.##..###.####...####..#..###...#.##.#### +#...............#.##.###...#..#..#.##.##.#.##.#.#...#.#....#..#.######..#..#..##....#.##..#..#..#.## +###.###...#...#..#....##.......#.#..#...##...#....#..######..#.....##.####..#....#...##...######..## +..##..#..##.#.##..###.#...............####...##..##......#...#.....#..#....#.#...#.....##..#####..## +#.....##.#.##.###......###.#.##..###....###..#...#..###.#..#..##...#..#.##...#.#...#..#.....##...#.# +..##....#..#.#.#.####..#.#.#....#.#.#.#.##.#..#.#..#..#.#.##.####......##..#...##..#.#.##..#.....#.. +.#..##....###.###..##....#####.#....####....#.#.##..#...#.###.##..#.....##........###.###.####..#.#. +.###.##..#..#...#.#.#######.##.#.#.#.#.###.#.#.#.#......#####.###.#.#.#......#.#..#.#.##..#.##.#.#.# diff --git a/src/adventofcode2021/data/day_20/day20_test.txt b/src/adventofcode2021/data/day_20/day20_test.txt new file mode 100644 index 00000000..8fa4bd47 --- /dev/null +++ b/src/adventofcode2021/data/day_20/day20_test.txt @@ -0,0 +1,7 @@ +..#.#..#####.#.#.#.###.##.....###.##.#..###.####..#####..#....#..#..##..###..######.###...####..#..#####..##..#.#####...##.#.#..#.##..#.#......#.###.######.###.####...#.##.##..#..#..#####.....#.#....###..#.##......#.....#..#..#..##..#...##.######.####.####.#.#...#.......#..#.#.#...####.##.#......#..#...##.#.##..#...##.#.##..###.#......#.#.......#.#.#.####.###.##...#.....####.#..#..#.##.#....##..#.####....##...##..#...#......#.#.......#.......##..####..#...#.#.#...##..#.#..###..#####........#..####......#..# + +#..#. +#.... +##..# +..#.. +..### diff --git a/src/adventofcode2021/data/day_21/day21.txt b/src/adventofcode2021/data/day_21/day21.txt new file mode 100644 index 00000000..9a247e09 --- /dev/null +++ b/src/adventofcode2021/data/day_21/day21.txt @@ -0,0 +1,2 @@ +Player 1 starting position: 2 +Player 2 starting position: 8 diff --git a/src/adventofcode2021/data/day_22/day22.txt b/src/adventofcode2021/data/day_22/day22.txt new file mode 100644 index 00000000..6dbb841a --- /dev/null +++ b/src/adventofcode2021/data/day_22/day22.txt @@ -0,0 +1,420 @@ +on x=-36..10,y=-44..1,z=-18..28 +on x=-7..46,y=-3..48,z=-32..13 +on x=-11..41,y=-24..30,z=-20..31 +on x=-20..30,y=-47..-2,z=-27..21 +on x=-11..36,y=-22..32,z=-9..44 +on x=-48..5,y=-40..9,z=-49..3 +on x=-23..21,y=-15..33,z=-27..24 +on x=-44..7,y=-18..28,z=-28..20 +on x=-4..48,y=-30..15,z=-5..40 +on x=-25..28,y=-6..45,z=-12..37 +off x=-1..15,y=-20..-7,z=40..49 +on x=-9..35,y=-49..3,z=-14..39 +off x=-42..-30,y=-3..13,z=-31..-21 +on x=-10..35,y=-35..17,z=-16..31 +off x=13..32,y=21..34,z=31..41 +on x=-45..8,y=-14..35,z=-38..8 +off x=-7..12,y=-38..-21,z=3..22 +on x=2..48,y=-35..13,z=-26..18 +off x=-2..13,y=-45..-34,z=21..31 +on x=-10..38,y=-25..29,z=-7..39 +on x=-28883..-15508,y=-45719..-19250,z=56543..85023 +on x=-12548..-2670,y=30162..59686,z=48743..65546 +on x=-78921..-48935,y=-58375..-40461,z=-10520..6680 +on x=60459..69694,y=-39118..-9610,z=23410..40752 +on x=-58993..-46464,y=34788..49715,z=24225..58919 +on x=-65933..-59172,y=-59855..-28101,z=15518..30376 +on x=71139..80625,y=2500..13619,z=2217..25098 +on x=4121..18569,y=-18050..2029,z=60597..88243 +on x=-62229..-28636,y=-71733..-45733,z=27808..50457 +on x=51593..76990,y=38902..45907,z=-369..26292 +on x=68985..96599,y=-17288..2120,z=-22861..271 +on x=33104..64386,y=29057..55665,z=40253..58523 +on x=-81466..-54567,y=8733..27282,z=-41215..-36144 +on x=-34804..-15638,y=58589..76038,z=-7633..20193 +on x=63492..75206,y=-46967..-27894,z=-31857..-14808 +on x=15351..28152,y=13194..20955,z=70126..86947 +on x=15635..22669,y=5152..32704,z=73208..87128 +on x=68794..83406,y=-35783..-25729,z=-34499..611 +on x=-56069..-53663,y=-54346..-28657,z=-34834..-22216 +on x=43156..76066,y=27637..45059,z=-47820..-23733 +on x=-7711..3045,y=-15369..-10641,z=-79312..-63232 +on x=43441..54152,y=-50110..-43904,z=37321..47410 +on x=37294..75033,y=38364..67854,z=-20476..1157 +on x=33388..53211,y=-67459..-48539,z=-10662..13639 +on x=-79542..-57726,y=22115..25011,z=-45772..-23453 +on x=58873..78039,y=-50697..-37524,z=-12235..18506 +on x=-48962..-34784,y=11652..37386,z=45532..84431 +on x=-76170..-57572,y=46417..54598,z=15783..30309 +on x=-15755..6100,y=-61498..-53921,z=50597..61974 +on x=-6806..20000,y=-23020..12532,z=70539..85001 +on x=-5720..16234,y=-55004..-34338,z=-72531..-66790 +on x=52008..79539,y=-29253..-1374,z=20347..53617 +on x=-17897..-9708,y=-37245..-4510,z=-87664..-60248 +on x=-61794..-42398,y=38848..66317,z=-44362..-16971 +on x=-24978..-4568,y=52963..66034,z=43492..60015 +on x=7791..33094,y=56170..69087,z=33048..42256 +on x=-28232..-9944,y=-58134..-55076,z=39582..72486 +on x=13368..20524,y=-15360..9002,z=-91847..-66065 +on x=21517..29129,y=8445..19558,z=-86160..-74234 +on x=7605..17401,y=-27480..-3051,z=66012..93068 +on x=48250..69867,y=-31582..-11779,z=-56446..-41985 +on x=30111..42304,y=-78761..-42351,z=37002..41561 +on x=-36891..-9404,y=-86518..-61745,z=26166..39934 +on x=-63590..-34919,y=15132..31704,z=-63932..-48407 +on x=-77664..-60473,y=-30186..-15049,z=-49261..-26017 +on x=-10394..7444,y=9391..11534,z=61309..96960 +on x=-61302..-46820,y=-61513..-47545,z=6430..32125 +on x=-53453..-50770,y=24345..56020,z=-57501..-25958 +on x=35507..53900,y=-45542..-16679,z=47346..57922 +on x=49907..69107,y=16930..38051,z=-55262..-38287 +on x=-42743..-9759,y=60466..91647,z=-15118..2553 +on x=-38266..-19863,y=55550..63311,z=-53318..-27055 +on x=16905..41490,y=-69890..-56924,z=-44140..-8205 +on x=-7784..7941,y=75866..85826,z=9452..37078 +on x=-74561..-58611,y=-46579..-25328,z=-30557..3529 +on x=-1196..34343,y=-70013..-55588,z=-53911..-45594 +on x=-84676..-65369,y=41869..61576,z=-9248..2231 +on x=-72551..-47185,y=-9381..6167,z=37047..52656 +on x=-11907..5784,y=4948..19640,z=73120..80649 +on x=60584..84455,y=-24861..-3368,z=-48749..-21563 +on x=29668..44628,y=57549..74598,z=-32991..-15066 +on x=-8097..12767,y=-95426..-64216,z=-31088..-18926 +on x=-90928..-65347,y=4057..22029,z=8907..23501 +on x=67918..80236,y=5507..41836,z=15812..32291 +on x=-54150..-29579,y=-5372..22568,z=47613..65289 +on x=17728..44669,y=-74646..-42398,z=-65777..-28928 +on x=2093..29295,y=2422..21121,z=-80503..-62049 +on x=-65522..-55148,y=46700..59432,z=-9362..25101 +on x=-7488..12850,y=-63622..-27400,z=-76767..-56877 +on x=60992..81192,y=-11975..19873,z=-3571..8236 +on x=44146..78572,y=-9134..16963,z=-66784..-33238 +on x=-67138..-46342,y=14132..43100,z=30402..56588 +on x=-70324..-52042,y=-31051..-13658,z=-47636..-26736 +on x=21928..31761,y=-73324..-55278,z=28922..52429 +on x=-4143..594,y=-42034..-14668,z=-84348..-68488 +on x=-77510..-53349,y=-32972..-14462,z=-35462..-12815 +on x=-70793..-40538,y=39761..54365,z=11991..30477 +on x=-71944..-51391,y=37600..68072,z=-32488..-15952 +on x=-48143..-30165,y=59536..78681,z=-32203..-16092 +on x=-22818..-7935,y=24969..33664,z=60669..81438 +on x=40670..63322,y=-72933..-51831,z=-30393..-10006 +on x=-70534..-53025,y=-16537..2105,z=32890..66787 +on x=47454..79394,y=-35253..-20693,z=18988..57611 +on x=73161..82246,y=-8780..22720,z=-8294..13514 +on x=-14026..7081,y=18421..45722,z=65918..73183 +on x=71629..83673,y=-10335..8808,z=29998..38745 +on x=-18224..-5442,y=69881..95741,z=6388..30178 +on x=-19490..4842,y=20201..45030,z=56709..85888 +on x=-21272..1593,y=49547..63167,z=38145..67363 +on x=-24949..-15012,y=-55330..-20572,z=-82713..-59674 +on x=-46843..-24448,y=50679..73327,z=10520..44286 +on x=-70925..-39700,y=24871..27793,z=44234..49938 +on x=-69305..-53956,y=-59578..-31239,z=-25502..-7568 +on x=7557..28629,y=-88776..-75206,z=-7437..10667 +on x=29471..53359,y=68936..73945,z=-4133..20290 +on x=-52402..-36243,y=19080..37365,z=50135..59326 +on x=3810..25116,y=69407..81609,z=9528..20530 +on x=18211..49212,y=44337..71877,z=49052..60986 +on x=28678..50797,y=-32839..-20421,z=48041..67561 +on x=-58157..-42217,y=-31760..-17143,z=-62357..-53538 +on x=38952..50290,y=-6367..203,z=50379..82544 +on x=-64714..-50678,y=-61423..-47693,z=8332..35457 +on x=-28002..-6142,y=-56131..-47383,z=-63420..-52948 +on x=-63668..-38918,y=-65020..-36544,z=11622..50689 +on x=2203..24329,y=-61091..-52282,z=-76789..-51275 +on x=56581..84220,y=29670..43186,z=-37910..-9928 +on x=-3024..19466,y=54892..76361,z=-46362..-26851 +on x=-76700..-44506,y=-13884..9365,z=-64510..-49973 +on x=-98589..-75961,y=-6842..5373,z=11405..14256 +on x=65044..94963,y=3807..18057,z=-27060..-1035 +on x=61066..70500,y=-44968..-27340,z=-21797..5949 +on x=52464..65749,y=-40619..-28476,z=-37598..-15955 +on x=-49101..-23335,y=51397..82890,z=-45440..-19364 +on x=-20109..-2856,y=-30361..-20065,z=62578..78115 +on x=-74043..-52114,y=-39430..-25290,z=16802..43618 +on x=66008..75716,y=-23679..8708,z=-50980..-18608 +on x=-86101..-58392,y=-18786..15377,z=17168..41798 +on x=-55661..-31358,y=-71798..-47063,z=18694..36502 +on x=62286..80814,y=-48258..-23908,z=-30461..-15403 +on x=33889..57622,y=13502..43857,z=-77450..-62147 +on x=13184..26706,y=64762..81475,z=19767..24962 +on x=17019..43275,y=-16424..-4301,z=70607..85745 +on x=-53965..-36029,y=-68815..-48815,z=-7800..9952 +on x=18884..42169,y=60155..75959,z=12031..18073 +on x=-588..28626,y=16567..43074,z=-79903..-63075 +on x=-76497..-54641,y=-46269..-25830,z=-17322..15993 +on x=-6746..10944,y=62505..90487,z=-15775..16197 +on x=28300..46689,y=68064..75699,z=-7771..9898 +on x=-64368..-42702,y=-27174..-17167,z=-65200..-54350 +on x=56910..75581,y=-25585..-10411,z=36135..70404 +on x=27504..56469,y=26502..50082,z=52431..67864 +on x=-47454..-37493,y=-67803..-57848,z=-29137..878 +on x=40122..63672,y=10395..35054,z=52859..66240 +on x=-24265..-4217,y=67213..89517,z=9977..26874 +on x=50270..58887,y=-41794..-23584,z=40880..59729 +on x=68731..78696,y=-29443..-10975,z=-30363..-12403 +on x=-615..6005,y=-84686..-66275,z=-50736..-37214 +on x=8778..42467,y=-13464..-446,z=69383..77050 +on x=33082..59847,y=-40174..-16924,z=-63761..-39798 +on x=-53945..-40416,y=37398..54780,z=28513..47277 +on x=29636..49940,y=-34924..-2346,z=49599..74490 +on x=-20966..1270,y=53988..61813,z=32916..53496 +on x=-78940..-45838,y=-26622..2631,z=38955..63550 +on x=17146..39670,y=-85003..-58477,z=2984..42382 +on x=-47551..-28981,y=-69198..-57064,z=-44298..-22310 +on x=-89258..-74497,y=-16850..5067,z=-12367..-5955 +on x=35772..53724,y=27657..48119,z=31033..63316 +on x=-62854..-41757,y=35022..54608,z=-35013..-12195 +on x=-30556..1226,y=-73571..-54097,z=-57803..-47669 +on x=13295..34276,y=-39163..-28171,z=-76250..-46210 +on x=-24292..6457,y=-91190..-66574,z=-31565..-5150 +on x=-16536..6036,y=-96225..-64362,z=-2492..9962 +on x=-57058..-30220,y=-18364..-2584,z=53719..63761 +on x=-43431..-16673,y=-38683..-22112,z=55769..74887 +on x=51701..67855,y=27295..46226,z=10849..38820 +on x=-35845..-7342,y=69450..89187,z=11752..29177 +on x=12543..45244,y=12075..38035,z=-87164..-50531 +on x=42339..73473,y=18241..51391,z=23838..43287 +on x=-438..24585,y=-66283..-35680,z=-64361..-46114 +on x=2725..22019,y=-82057..-72900,z=-1614..14652 +on x=14414..28316,y=-89722..-59311,z=9219..41520 +on x=-30825..-5463,y=-69878..-54745,z=-57852..-36139 +on x=-42896..-18813,y=-26684..7083,z=69312..90303 +on x=-27862..8215,y=27378..63022,z=-78357..-58765 +on x=52982..82324,y=-39425..-17991,z=19533..52779 +on x=55425..68878,y=-13141..10398,z=46593..62864 +on x=-76576..-55809,y=-40969..-19894,z=3576..33104 +on x=-45307..-29762,y=35548..70551,z=-52791..-40213 +on x=-84553..-64887,y=31408..56688,z=-11919..-300 +on x=57673..92102,y=20171..35124,z=-9934..27320 +on x=19319..44889,y=59566..70621,z=-52354..-34667 +on x=-58420..-23963,y=33856..56920,z=-66732..-50674 +on x=28594..47830,y=15367..45508,z=58553..69000 +on x=28763..35947,y=27403..56374,z=56409..73208 +on x=-74680..-63533,y=-38056..-6996,z=-33003..-18382 +on x=-38982..-10495,y=51354..78493,z=14740..42196 +on x=-46516..-10037,y=58846..77938,z=-33954..-19867 +on x=-54547..-39672,y=56254..74136,z=23189..29880 +on x=-61220..-53773,y=-12236..3866,z=56997..61730 +on x=-50154..-29903,y=-76428..-48553,z=31157..51784 +on x=-3181..17338,y=-80949..-72492,z=772..12702 +on x=-52042..-18254,y=49025..64175,z=21945..52993 +on x=-78058..-63586,y=-2293..19310,z=-36720..-25831 +on x=15904..36582,y=-91457..-60504,z=7939..32474 +on x=60022..93528,y=8546..20580,z=-27953..-11390 +on x=27563..49707,y=-69314..-63488,z=7268..35058 +on x=10646..21929,y=-94609..-61003,z=-22912..-276 +on x=-7047..-5297,y=68888..78769,z=-39475..-17434 +on x=-51536..-39822,y=43126..53870,z=-56736..-20372 +on x=-63164..-52556,y=-54428..-38069,z=24521..42713 +on x=-9022..12417,y=-80149..-46957,z=37357..45570 +on x=-22997..-2789,y=-95315..-56998,z=12379..39404 +on x=4898..15841,y=-81249..-73910,z=-32251..-9796 +on x=45502..60898,y=-37324..-31476,z=-54682..-27792 +on x=-37888..-21927,y=50938..67533,z=28289..58560 +on x=48655..63250,y=-26438..8352,z=56367..77784 +on x=-70807..-50021,y=-53252..-46314,z=-24297..4509 +on x=-80873..-68066,y=-11712..4769,z=-38161..-7193 +on x=-61783..-29833,y=-9380..1417,z=-77655..-50187 +on x=3605..15598,y=40600..75869,z=49206..60071 +on x=-65903..-61409,y=-47405..-24492,z=21618..49883 +off x=-23920..-8406,y=-17972..2067,z=-81283..-75868 +on x=-51193..-26274,y=-60490..-42301,z=38488..65879 +on x=50827..65635,y=-57757..-39886,z=-30611..-26720 +off x=10778..32144,y=52231..74635,z=-59687..-31847 +on x=68985..85992,y=28873..51019,z=-15998..-6295 +on x=55740..70763,y=35214..53322,z=-31223..-11358 +off x=-46538..-9788,y=58032..67324,z=40222..49034 +on x=18545..29590,y=14108..34635,z=-74700..-62707 +off x=-73624..-41200,y=-52536..-46813,z=14770..34179 +on x=-85523..-67379,y=-36300..-19906,z=-11338..6871 +on x=5293..28679,y=-85681..-52644,z=28833..41645 +off x=-51969..-35153,y=1198..17984,z=51124..72722 +off x=-17375..11682,y=18325..41509,z=-87033..-61425 +off x=-22666..7568,y=73727..92674,z=-28360..-7249 +off x=2661..24254,y=57090..84315,z=-42803..-25128 +on x=67178..86929,y=-41603..-21134,z=-346..8549 +on x=35402..59738,y=27059..52875,z=40124..50352 +on x=-77706..-63549,y=-759..30679,z=-256..20062 +off x=-80738..-61445,y=-13769..19667,z=19760..24546 +on x=-69653..-38658,y=22405..42680,z=-49778..-26262 +off x=-51542..-25536,y=-71500..-51185,z=4129..28507 +on x=30425..45199,y=-30596..-9292,z=-81014..-57309 +off x=22726..47883,y=-41245..-17684,z=-71414..-46137 +on x=66872..87978,y=-22706..13112,z=-43536..-20972 +off x=72640..92993,y=7096..22204,z=-21297..-19581 +off x=21559..34912,y=-13473..3913,z=-90125..-71617 +on x=744..7099,y=37714..55130,z=-78023..-47590 +off x=34748..53357,y=35764..63887,z=19808..38379 +on x=25985..47421,y=38665..52801,z=36388..65665 +on x=55491..76208,y=38300..48792,z=4819..32069 +off x=-85210..-68567,y=27276..41154,z=-8241..7567 +on x=63368..77016,y=14285..35196,z=17323..34006 +off x=-60020..-46013,y=-73070..-54235,z=22512..40151 +on x=-64581..-46760,y=-65678..-38839,z=-11746..21206 +off x=65614..85707,y=-40016..-9936,z=9078..15465 +on x=-9441..19579,y=-3745..15148,z=63724..88861 +on x=26670..47587,y=44470..53665,z=-63802..-36681 +off x=52461..72456,y=-41431..-31911,z=-53314..-36616 +on x=-60681..-44210,y=-60182..-40629,z=-24793..-16265 +on x=-31104..2318,y=-86070..-52791,z=28552..42162 +off x=56152..74985,y=-56214..-43026,z=-27304..2627 +off x=-58202..-26230,y=-45050..-25862,z=55000..65772 +off x=-59248..-38705,y=-33544..-18000,z=-57812..-36852 +off x=-40613..-22939,y=39403..42071,z=-74302..-53828 +on x=58073..86025,y=19542..52637,z=19540..25772 +on x=-42291..-19252,y=-80500..-52486,z=720..19957 +off x=10093..18140,y=62563..85515,z=28642..49390 +off x=-64723..-55102,y=15882..40874,z=27744..48116 +on x=-76209..-64298,y=-23310..-3022,z=-44907..-32933 +off x=-4161..22460,y=-26759..-12671,z=59101..80357 +on x=-69122..-56614,y=-57446..-26219,z=30581..49966 +off x=-61329..-48995,y=45179..68334,z=-44523..-16756 +off x=-24020..7983,y=-36028..-14601,z=-80855..-74658 +off x=61787..80253,y=-29352..-27483,z=-15894..3760 +on x=-1854..34165,y=15342..20798,z=-92676..-69474 +off x=58756..72759,y=-62605..-44134,z=-21424..-1787 +on x=-47927..-19270,y=-27779..-11020,z=-71061..-55792 +off x=-64633..-41666,y=-15311..4190,z=52613..67692 +off x=-52623..-22282,y=-67672..-60890,z=-41105..-5342 +on x=-67475..-41123,y=-29899..-11967,z=54507..64513 +off x=76435..88917,y=8907..20588,z=-13737..11171 +off x=51043..69285,y=46979..54200,z=-37046..-15549 +off x=-4759..21371,y=-30523..-17915,z=-85776..-63473 +on x=-3021..6979,y=-81245..-51685,z=31497..53887 +on x=-42289..-13283,y=-92861..-62635,z=-18257..-6390 +on x=-51969..-28706,y=44357..69139,z=-39332..-9477 +off x=-33356..-13804,y=36523..58443,z=50012..60983 +on x=-77633..-57968,y=-19312..-3510,z=6439..28195 +on x=-18502..12035,y=81..13762,z=-84168..-60344 +on x=-74341..-54080,y=35210..49882,z=28945..49835 +on x=-38013..-25461,y=-18541..7865,z=-77418..-60933 +on x=59594..82825,y=-28804..-8293,z=-10951..20475 +off x=-52646..-29322,y=-40881..-10533,z=-78124..-55227 +off x=-15749..8718,y=4472..14637,z=-91734..-64978 +off x=-85443..-73836,y=12784..39748,z=-16386..772 +on x=45947..61764,y=-35058..-17779,z=-64178..-45494 +off x=67007..86564,y=-48178..-21841,z=-7916..21903 +off x=-70444..-42983,y=29771..42787,z=-46211..-27338 +off x=-8655..2415,y=-91243..-75694,z=-10069..21248 +on x=-28009..-6226,y=-23740..-9157,z=-91944..-63046 +on x=-53152..-30990,y=-44975..-30727,z=52775..71982 +on x=-49716..-41146,y=-73921..-57473,z=11332..24465 +off x=-2468..25267,y=14929..32548,z=67505..84462 +on x=-68710..-62616,y=28813..52525,z=-10067..25405 +on x=-83946..-68639,y=-19770..10504,z=-33827..-25268 +off x=28131..44635,y=-50172..-27160,z=-62100..-58549 +off x=-5052..-648,y=-56625..-47094,z=-74342..-45910 +on x=-33892..-13031,y=18611..36918,z=-92168..-71425 +on x=12323..33021,y=-80108..-64718,z=-10537..4349 +on x=-65196..-43458,y=49295..56256,z=24974..37959 +off x=2343..28904,y=-66431..-45886,z=40141..44839 +off x=-43465..-41019,y=17236..49935,z=-74235..-53337 +off x=-18022..-9342,y=61778..91679,z=-11289..2632 +off x=27708..51714,y=32957..50756,z=-58390..-57621 +on x=2882..33961,y=57329..91039,z=-28800..8934 +on x=-28292..-11351,y=-12966..17150,z=59094..83553 +on x=-31558..-13040,y=-59193..-40820,z=48349..64602 +off x=-70755..-50969,y=-29136..-18641,z=-49761..-40422 +on x=19772..43254,y=-70111..-52042,z=29212..49446 +on x=20916..52515,y=-18713..-9635,z=-86771..-70085 +off x=-66621..-56476,y=33941..67405,z=-29611..-13697 +on x=-16965..3932,y=4803..22490,z=-82564..-77111 +on x=68709..71323,y=7232..38254,z=-30840..-18351 +off x=5053..18207,y=-90431..-74952,z=18441..31217 +off x=-74398..-51344,y=-2219..21971,z=-61004..-37925 +off x=74068..94286,y=-42547..-9453,z=-26993..4323 +off x=41826..54877,y=-63131..-48823,z=-42712..-13977 +off x=13230..36879,y=32795..49062,z=45626..77570 +off x=23178..54380,y=41412..62986,z=-66089..-51283 +off x=-52700..-47103,y=46951..63017,z=-23336..-3928 +on x=55437..83769,y=14588..38653,z=-53752..-37763 +on x=52203..65253,y=-47076..-16647,z=-44344..-39083 +on x=-24677..-13564,y=-93290..-68207,z=-5248..30373 +on x=58276..75450,y=15533..26129,z=36700..50632 +on x=33595..45488,y=-46844..-26635,z=46199..78178 +off x=55930..57540,y=-5693..10566,z=48756..60854 +off x=-43978..-26866,y=27173..53069,z=52366..76519 +off x=12681..30594,y=-86555..-56687,z=-1032..21854 +off x=6723..32769,y=-11041..11447,z=-81198..-62638 +on x=9134..15625,y=2017..27628,z=60348..76873 +off x=-67518..-40657,y=51003..78100,z=-26418..-11016 +off x=21010..26746,y=7821..43523,z=-88644..-58412 +off x=-19309..1323,y=63051..88447,z=-37925..-14723 +off x=-48511..-16244,y=56142..80658,z=-41680..-13036 +off x=13205..26460,y=-1684..20312,z=74227..85935 +on x=-49930..-24221,y=-54440..-30185,z=51665..80505 +on x=33932..55567,y=63494..66224,z=-10823..17738 +off x=-72574..-60303,y=-40445..-32434,z=14706..50012 +off x=-62145..-40946,y=-20722..-11341,z=-69258..-49860 +on x=-6554..15879,y=-66512..-52368,z=-71414..-48612 +on x=-60210..-31346,y=-68773..-53452,z=-45457..-19495 +off x=-22760..15679,y=64480..84538,z=4557..24345 +off x=40880..60578,y=-77805..-51810,z=-11706..22124 +off x=54298..63931,y=-50276..-24575,z=-36735..-19199 +off x=-2702..16842,y=-68238..-54782,z=51640..59991 +off x=-17862..105,y=-70163..-52096,z=-48967..-37649 +on x=-23272..-8212,y=10790..16944,z=75341..78080 +off x=48941..60207,y=-58116..-34953,z=-181..16162 +off x=5924..29813,y=-83457..-61519,z=23528..43432 +off x=-32079..-4914,y=42932..60356,z=-60990..-43336 +on x=-4510..5766,y=-7403..18802,z=64415..93546 +off x=26759..39620,y=48484..70752,z=-40115..-22503 +on x=-31250..-18094,y=-66695..-60649,z=36011..46860 +off x=-6978..17301,y=-82714..-67715,z=-35229..-13936 +on x=47265..63370,y=30543..57312,z=-46051..-16607 +on x=-14629..-7679,y=7650..29132,z=65592..94972 +on x=-66456..-38183,y=-52095..-46968,z=23915..46975 +off x=17676..42736,y=20462..26192,z=-81379..-67528 +off x=-67513..-46555,y=-24343..-99,z=-60193..-24652 +off x=-54467..-29572,y=-21268..-454,z=-66862..-49810 +off x=-19627..11711,y=-4455..22317,z=-83580..-68034 +on x=-38582..-13323,y=-58703..-34875,z=40913..79387 +on x=19178..32973,y=-59328..-56472,z=-68131..-40152 +off x=-45576..-23539,y=26133..50542,z=53177..62216 +off x=-77778..-52243,y=-48364..-42612,z=11905..32815 +on x=-79500..-68229,y=30167..46383,z=-6940..2452 +on x=31596..49128,y=598..18219,z=-81334..-54801 +off x=-81143..-68496,y=-16944..5539,z=-24074..-1450 +on x=-65649..-54882,y=-38296..-2979,z=29377..53941 +on x=6682..17340,y=-7921..-151,z=59077..85403 +off x=57914..76253,y=-4380..31345,z=-46399..-38698 +on x=32232..45129,y=-63185..-26040,z=36983..65363 +off x=-73881..-60419,y=-1795..21,z=37655..53767 +off x=15120..32138,y=63066..68156,z=16751..50217 +off x=23124..35098,y=36183..54646,z=47845..65258 +on x=51869..75912,y=6923..45250,z=-32268..-21057 +off x=49292..70804,y=-36314..-9052,z=-43544..-23519 +on x=21711..48338,y=2359..36023,z=60816..80004 +on x=-53507..-26657,y=-25557..-8931,z=-69305..-62052 +off x=60112..97989,y=-944..17784,z=-13750..15620 +on x=-28375..-10818,y=-52043..-34064,z=-65489..-55145 +on x=-58165..-43070,y=-12854..8136,z=-72321..-48657 +off x=51577..74648,y=-47469..-30666,z=8713..27929 +off x=-44464..-19855,y=-1741..22412,z=-79221..-59565 +off x=-89466..-59198,y=26732..49125,z=-11133..14327 +on x=53250..69420,y=44980..62695,z=4186..26328 +off x=26415..41630,y=-39332..-16373,z=-67936..-61161 +off x=-48619..-43433,y=-67120..-39586,z=28870..57974 +on x=17598..33705,y=30681..37573,z=43332..75560 +on x=-25540..-21306,y=-17465..4532,z=-91226..-71533 +off x=47293..62013,y=-25617..-8386,z=35935..50569 +off x=-49057..-28405,y=41861..63380,z=-51878..-39569 +off x=-5394..11201,y=39779..75186,z=-67429..-37636 +on x=-51758..-18083,y=-43700..-16277,z=44231..68503 +on x=-18052..11201,y=77165..95962,z=-18606..1615 +on x=-9094..15499,y=15118..29503,z=-88833..-67237 +on x=66146..81534,y=20925..38637,z=-16229..3378 +on x=-2669..13134,y=-80079..-65621,z=19565..43795 +on x=-71806..-67382,y=21162..50405,z=-6138..23589 +off x=19123..48071,y=-56188..-37077,z=48894..63329 +off x=-47660..-36230,y=40998..63389,z=-55710..-23610 +on x=-38780..-32773,y=62994..69808,z=32158..51582 +off x=63417..87982,y=-12566..21930,z=-30645..-20624 +on x=16242..53065,y=45895..74140,z=-57938..-26423 +on x=31963..45067,y=-36330..-22881,z=45365..68062 +on x=11053..33024,y=51385..80679,z=-47716..-39036 +off x=-30370..4676,y=22695..32755,z=67839..82155 +on x=1929..17141,y=-85885..-64577,z=-41851..-20316 +off x=46391..68161,y=47902..58287,z=-42465..-24023 diff --git a/src/adventofcode2021/day01.py b/src/adventofcode2021/day01.py new file mode 100644 index 00000000..c7fb9be6 --- /dev/null +++ b/src/adventofcode2021/day01.py @@ -0,0 +1,32 @@ +from adventofcode.utils.abstract import FileReaderSolution + + +class Day01: + pass + + +class Day01PartA(Day01, FileReaderSolution): + def solve(self, input_data: str) -> int: + num_changes = 0 + depths = [int(n) for n in input_data.split("\n") if n] + last_number = depths[0] + for depth in depths: + if depth > last_number: + num_changes += 1 + last_number = depth + return num_changes + + +class Day01PartB(Day01, FileReaderSolution): + def solve(self, input_data: str) -> int: + depths = [int(n) for n in input_data.split("\n") if n] + + total_difference = 0 + + for idx in range(len(depths)): + a = depths[idx : idx + 3] + b = depths[idx + 1 : idx + 4] + if sum(a) < sum(b): + total_difference += 1 + + return total_difference diff --git a/src/adventofcode2021/day02.py b/src/adventofcode2021/day02.py new file mode 100644 index 00000000..c24988f3 --- /dev/null +++ b/src/adventofcode2021/day02.py @@ -0,0 +1,44 @@ +from adventofcode.utils.abstract import FileReaderSolution + + +class Day02: + pass + + +class Day02PartA(Day02, FileReaderSolution): + def solve(self, input_data: str) -> int: + depth = position = 0 + for line in [line for line in input_data.split("\n") if line]: + direction, movement = line.split(" ")[0], int(line.split(" ")[1]) + + match direction: + case "up": + depth -= movement + case "down": + depth += movement + case "forward": + position += movement + case _: + raise ValueError(f"Invalid direction value: {repr(direction)}") + + return depth * position + + +class Day02PartB(Day02, FileReaderSolution): + def solve(self, input_data: str) -> int: + depth = position = aim = 0 + + for line in [line for line in input_data.split("\n") if line]: + direction, movement = line.split(" ")[0], int(line.split(" ")[1]) + match direction: + case "down": + aim += movement + case "up": + aim -= movement + case "forward": + position += movement + depth += movement * aim + case _: + raise ValueError(f"Invalid direction value: {repr(direction)}") + + return depth * position diff --git a/src/adventofcode2021/day03.py b/src/adventofcode2021/day03.py new file mode 100644 index 00000000..dc6130a3 --- /dev/null +++ b/src/adventofcode2021/day03.py @@ -0,0 +1,76 @@ +from collections import Counter + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day03: + pass + + +class Day03PartA(Day03, FileReaderSolution): + def solve(self, input_data: str) -> int: + lines = [line for line in input_data.split("\n") if line] + + new_line = "" + for bit in range(len(lines[0])): + bone = bzero = 0 + for line in lines: + val = line[bit] + if val == "0": + bzero += 1 + else: + bone += 1 + if bone > bzero: + new_line += "1" + else: + new_line += "0" + + bin_value = int(new_line, 2) + reversed_value = new_line.replace("0", "t").replace("1", "0").replace("t", "1") + inverted = int(reversed_value, 2) + return bin_value * inverted + + +class Day03PartB(Day03, FileReaderSolution): + @staticmethod + def find_most_common(input_lines: list[str], n: int) -> Counter: + """Find the most common value in the list of inputs, on bit `n`""" + cnt: Counter = Counter() + for line in input_lines: + cnt[line[n]] += 1 + return cnt + + def find_value(self, bitlines, bit, hi_low: bool) -> int: + """ + Find the value, and use bit as a tie breaker when the count is the same + """ + # First copy the bitlines, make sure we don't modify the original value + bitlines = bitlines.copy() + for i in range(len(bitlines[0])): + cnt = self.find_most_common(bitlines, i) + if cnt["0"] == cnt["1"]: + to_keep = bit + else: + if hi_low: + # Keep the most common bit. + to_keep = cnt.most_common(1)[0][0] + else: + # Keep the most common bit. + to_keep = cnt.most_common(2)[1][0] + + new_bitlines = [] + for line in bitlines: + if line[i] == to_keep: + new_bitlines.append(line) + bitlines = new_bitlines + if len(bitlines) == 1: + return int(bitlines[0], 2) + return False + + def solve(self, input_data: str) -> int: + lines = [line for line in input_data.split("\n") if line] + + oxygen = self.find_value(lines, "1", True) + co2 = self.find_value(lines, "0", False) + + return oxygen * co2 diff --git a/src/adventofcode2021/day04.py b/src/adventofcode2021/day04.py new file mode 100644 index 00000000..0532f974 --- /dev/null +++ b/src/adventofcode2021/day04.py @@ -0,0 +1,137 @@ +from collections import defaultdict +from typing import Literal + +from adventofcode.utils.abstract import FileReaderSolution + + +class Number: + number: int + picked: bool + + def __init__(self, number: int): + self.number = number + self.picked = False + + def __repr__(self): + if self.picked: + return f"*{self.number:2}*" + else: + return f" {self.number:2}" + + +class Board: + board: dict[int, dict[int, Number]] + + def __init__(self, string: list[str]): + """Create a bingo board""" + self.board = defaultdict(dict) + for row, line in enumerate(string): + for col, value in enumerate(int(s) for s in line.split() if s.isdigit()): + self.board[row][col] = Number(value) + + def draw(self, number): + for x in self.board.values(): + for y in x.values(): + if y.number == number: + y.picked = True + + def is_winner(self) -> bool: + # Check horizontal win + for x in self.board.values(): + val = all(n.picked for n in x.values()) + if val: + return True + # Check vertital win: + for y in range(5): + if all([x[y].picked for x in self.board.values()]): + return True + return False + + def unmarked_numbers(self) -> int: + total = 0 + for x in self.board.values(): + for y in x.values(): + if not y.picked: + total += y.number + return total + + +class Day04: + boards: list[Board] + random_numbers: list[int] + + def read_input(self, input_data): + lines = input_data.splitlines() + self.boards = [] + self.random_numbers = [int(num) for num in lines[0].split(",")] + + for board_start in range(2, len(lines) - 2, 6): + board_text = lines[board_start : board_start + 5] + board = Board(board_text) + self.boards.append(board) + + def is_winner(self) -> Literal[False] | Board: + """Do we have any wining boards?""" + for board in self.boards: + if board.is_winner(): + return board + return False + + def all_won(self): + return all(board.is_winner() for board in self.boards) + + def draw(self, number): + for board in self.boards: + board.draw(number) + + +class Day04PartA(Day04, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.read_input(input_data) + + number = -1 + won_board: Literal[False] | Board = False + + for number in self.random_numbers: + self.draw(number) + if won_board := self.is_winner(): + break + + # Winner winner, chicken dinner! + # Find the sum of all unmarked numbers + if won_board: + unmarked = won_board.unmarked_numbers() + return unmarked * number + else: + return -1 + + +class Day04PartB(Day04, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.read_input(input_data) + + last_won: Literal[False] | Board = False + number = -1 + already_won = set() + for number in self.random_numbers: + self.draw(number) + for board in self.boards: + if board.is_winner() and board not in already_won: + last_won = board + + if self.all_won(): + break + + # We're not done yet, to let's add all the boards that have won on this + # round to the set + for board in self.boards: + if board not in already_won and board.is_winner(): + already_won.add(board) + + # Winner winner, chicken dinner! + # Find the sum of all unmarked numbers + if last_won: + unmarked = last_won.unmarked_numbers() + return unmarked * number + else: + return -1 diff --git a/src/adventofcode2021/day05.py b/src/adventofcode2021/day05.py new file mode 100644 index 00000000..2283da15 --- /dev/null +++ b/src/adventofcode2021/day05.py @@ -0,0 +1,104 @@ +import logging +import re +import typing +from collections import Counter +from dataclasses import dataclass + +from adventofcode.utils.abstract import FileReaderSolution + +logger = logging.getLogger(__name__) + + +@dataclass +class Point: + x: int + y: int + + +class Day05: + def parse_lines(self, line) -> tuple[Point, Point]: + """ " + Parse 2,2 -> 2,1 or 419,207 -> 419,109 + As x1,y1 -> x2,y2 + """ + regex = r"^(?P\d*),(?P\d*) -> (?P\d*),(?P\d*)$" + matches = re.search(regex, line) + if not matches: + raise ValueError(f"Match not found in {line}") + + p1 = Point(x=int(matches["x1"]), y=int(matches["y1"])) + p2 = Point(x=int(matches["x2"]), y=int(matches["y2"])) + return p1, p2 + + def find_overlap(self, points: list[tuple[Point, Point]]) -> list[Point]: + """Find the overlapping locations in the list of points""" + locations: typing.Counter = Counter() + + for line in points: + # Make sure that the start is lower than the end. range(5, 0) does not work + + if line[0].x == line[1].x or line[0].y == line[1].y: + x_start = min(line[0].x, line[1].x) + x_stop = max(line[0].x, line[1].x) + y_start = min(line[0].y, line[1].y) + y_stop = max(line[0].y, line[1].y) + + # Horizontal or vertical line + for x in range(x_start, x_stop + 1): + for y in range(y_start, y_stop + 1): + locations[(x, y)] += 1 + else: + # Vertical line. Find out the length of the vector: + # Always 45 degree lines + x1 = line[0].x + x2 = line[1].x + y1 = line[0].y + y2 = line[1].y + + if x1 < x2: + length = x2 - x1 + x_direction = 1 + else: + length = x1 - x2 + x_direction = -1 + if y1 < y2: + y_direction = 1 + else: + y_direction = -1 + + for i in range(length + 1): + debug_txt = ( + f"For line ({line[0].x}, {line[0].y}) -> " + f"({line[1].x}, {line[1].y}) adding point: " + f"({(x1 + (i * x_direction))}, {(y1 + (i * y_direction))}) : " + f"{i} of {length}" + ) + logger.debug(debug_txt) + + locations[(x1 + (i * x_direction)), (y1 + (i * y_direction))] += 1 + + # Filter out locations with at least 2 hits + return [location[0] for location in locations.items() if location[1] > 1] + + +class Day05PartA(Day05, FileReaderSolution): + def solve(self, input_data: str) -> int: + points = [] + for line in input_data.splitlines(): + p1, p2 = self.parse_lines(line) + if p1.x == p2.x or p1.y == p2.y: + points.append((p1, p2)) + + res = self.find_overlap(points) + return len(res) + + +class Day05PartB(Day05, FileReaderSolution): + def solve(self, input_data: str) -> int: + points = [] + for line in input_data.splitlines(): + p1, p2 = self.parse_lines(line) + points.append((p1, p2)) + + res = self.find_overlap(points) + return len(res) diff --git a/src/adventofcode2021/day06.py b/src/adventofcode2021/day06.py new file mode 100644 index 00000000..9335a8a8 --- /dev/null +++ b/src/adventofcode2021/day06.py @@ -0,0 +1,39 @@ +from collections import Counter + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day06: + fish: Counter + + def tick(self): + """ + Spawn a new generation of fish! + """ + number_spawning = self.fish[0] + + # Decrease the age of the current population + for i in range(1, 9): + self.fish[i - 1] = self.fish[i] + + # And add the new fish + self.fish[8] = number_spawning + + # Reset the old fish to 6, and add them to the current total + self.fish[6] += number_spawning + + def run(self, input_data: str, num_days: int) -> int: + self.fish = Counter(int(age) for age in input_data.split(",")) + for _ in range(num_days): + self.tick() + return sum(self.fish.values()) + + +class Day06PartA(Day06, FileReaderSolution): + def solve(self, input_data: str) -> int: + return self.run(input_data, 80) + + +class Day06PartB(Day06, FileReaderSolution): + def solve(self, input_data: str) -> int: + return self.run(input_data, 256) diff --git a/src/adventofcode2021/day07.py b/src/adventofcode2021/day07.py new file mode 100644 index 00000000..0d472eca --- /dev/null +++ b/src/adventofcode2021/day07.py @@ -0,0 +1,44 @@ +import logging + +from adventofcode.utils.abstract import FileReaderSolution + +logger = logging.getLogger(__name__) + + +class Day07: + ... + + +class Day07PartA(Day07, FileReaderSolution): + def solve(self, input_data: str) -> int: + positions = sorted([int(x) for x in input_data.split(",")]) + # We need to converge on the middle position, so, that's our target + target = positions[len(positions) // 2] + lowest_cost = self.find_fuel_cost(positions, target) + return lowest_cost + + @staticmethod + def find_fuel_cost(positions: list[int], target: int) -> int: + total_cost = 0 + for pos in positions: + total_cost += abs(pos - target) + return total_cost + + +class Day07PartB(Day07, FileReaderSolution): + def solve(self, input_data: str) -> int: + positions = [int(x) for x in input_data.split(",")] + min_pos = min(positions) + max_pos = max(positions) + lowest_cost = min( + self.find_fuel_cost(positions, n) for n in range(min_pos, max_pos) + ) + return lowest_cost + + @staticmethod + def find_fuel_cost(positions: list[int], target: int) -> int: + total_cost = 0.0 + for pos in positions: + delta = abs(pos - target) + total_cost += delta * (delta + 1) / 2 + return int(total_cost) diff --git a/src/adventofcode2021/day08.py b/src/adventofcode2021/day08.py new file mode 100644 index 00000000..457e9968 --- /dev/null +++ b/src/adventofcode2021/day08.py @@ -0,0 +1,134 @@ +from adventofcode.utils.abstract import FileReaderSolution + + +class Day08: + @staticmethod + def parse(input_string: str) -> tuple[list[str], list[str]]: + """ + Parse the input string into two components: + - The 10 patterns we see + - Four digit of output Value + """ + patterns, output_value = input_string.split(" | ") + return patterns.split(), output_value.split() + + +class Day08PartA(Day08, FileReaderSolution): + def solve(self, input_data: str) -> int: + # Map a signal to the number of lines. Eg, number 7 uses 3 segments + patterns = [self.parse(line) for line in input_data.splitlines() if line] + + accepted_values = (2, 4, 3, 7) + + result = [ + len(value) in accepted_values + for pattern in patterns + for value in pattern[1] + ] + return sum(result) + + +class Day08PartB(Day08, FileReaderSolution): + def compute_sum(self, input_line) -> int: + return int("".join([str(x) for x in self.compute_digits(input_line)])) + + def compute_digits(self, input_line) -> list[int]: + patterns, values = self.parse(input_line) + mapping = self.map(patterns) + + total = [] + for value in values: + value = "".join(sorted(value)) + total.append(mapping[value]) + return total + + def map(self, patterns) -> dict[str, int]: + """ + Try to reverse engineer the mapping on this line, and return the sum + of the digits + """ + # Store every unique pattern we see, and remove them after we matched + pattern_set = {"".join(sorted(v)) for v in patterns} + + # Store the total mapping, this will contain letters -> Digit, eg: + # {"bcdf": 4, acdfg": 3} + mapping = {} + + # First pick the easy values + # Map the length of the pattern to the digit, eg map "ba", length 2 to 1. + easy_map = { + 2: 1, + 4: 4, + 3: 7, + 7: 8, + } + for pattern in pattern_set.copy(): + if digit := easy_map.get(len(pattern)): + mapping[pattern] = digit + pattern_set.discard(pattern) + + # I know that 6 is everything EXCEPT one of 1's numbers. + # That can only be one: + # Mapping for 1 is: + mapping_one = self.find_mapping_for_digit(mapping, 1) + mapping_four = self.find_mapping_for_digit(mapping, 4) + for pattern in pattern_set.copy(): + if len(pattern) == 6: + left_over = (set("abcdefg") - set(pattern)).pop() + if left_over in mapping_one: + mapping[pattern] = 6 + pattern_set.discard(pattern) + + # Mapping for 9 is length(6) with pattern with 4: + if all([letter in list(pattern) for letter in list(mapping_four)]): + mapping[pattern] = 9 + pattern_set.discard(pattern) + + # After this, the only item left with 6 characters is 0 + for pattern in pattern_set.copy(): + if len(pattern) == 6: + mapping[pattern] = 0 + pattern_set.discard(pattern) + + # Mapping for 3 is length(5) with pattern for one enabled + for pattern in pattern_set.copy(): + if len(pattern) == 5: + # if mapping_one in pattern: + if all([letter in list(pattern) for letter in list(mapping_one)]): + mapping[pattern] = 3 + pattern_set.discard(pattern) + break + + # Only 5 and 2 left. + # The digit that is OFF in the 6, must be ON in the 2. + mapping_six = self.find_mapping_for_digit(mapping, 6) + six_off = (set("abcdefg") - set(mapping_six)).pop() + + for pattern in pattern_set.copy(): + if six_off in pattern: + mapping[pattern] = 2 + pattern_set.discard(pattern) + break + + # Only 5 left + mapping[pattern_set.pop()] = 5 + if len(pattern_set) != 0: + raise ValueError(f"Unmapped patterns left: {pattern_set}") + + return mapping + + @staticmethod + def find_mapping_for_digit(mapping: dict, needle: int) -> str: + """In the dict `mapping`, find the key for `needle`""" + + for key, value in mapping.items(): + if needle == value: + return key + else: + raise ValueError(f"Key {needle} not found") + + def solve(self, input_data: str) -> int: + """Where we really have to map, and stop counting :)""" + + totals = [self.compute_sum(line) for line in input_data.splitlines() if line] + return sum(totals) diff --git a/src/adventofcode2021/day09.py b/src/adventofcode2021/day09.py new file mode 100644 index 00000000..98081567 --- /dev/null +++ b/src/adventofcode2021/day09.py @@ -0,0 +1,133 @@ +from __future__ import annotations + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day09: + grid: list[list[int]] + + @staticmethod + def create_grid(lines) -> list[list[int]]: + """Create an of ints from a list of strings""" + grid = [[int(val) for val in line] for line in lines] + + return grid + + def get_location(self, i: int, j: int) -> int | bool: + """Return the value of a location, or False""" + if i < 0 or j < 0: + # We can't index negative, with a list is will loop around + return False + try: + return self.grid[i][j] + except IndexError: + return False + + def is_spot(self, i: int, j: int) -> bool: + value = self.grid[i][j] + if value == 9: + # Will never be higher, we can exit early + return False + # Possible options: + options = [ + (i + 1, j), + (i - 1, j), + (i, j + 1), + (i, j - 1), + ] + for direction in options: + try: + if self.grid[direction[0]][direction[1]] < value: + return False + except IndexError: + # We must be at an edge, ignore + pass + # Nothing false, must be alright + return True + + def print_grid(self, highlights=None): # pragma: no cover + """Print the grid, and optionally put locations in highlights in bold""" + if highlights is None: + highlights = [] + print() + for i in range(len(self.grid)): + for j in range(len(self.grid[0])): + if (i, j) in highlights: + print(f"*{self.get_location(i, j)}* ({i}, {j})", end=";") + else: + print(f"{self.get_location(i, j)} ({i}, {j})", end=";") + print() + return 0 + + +class Day09PartA(Day09, FileReaderSolution): + def solve(self, input_data: str) -> int: + lines = input_data.splitlines() + self.grid = self.create_grid(lines) + + total_risk_level = sum( + self.grid[i][j] + 1 + for i in range(len(self.grid)) + for j in range(len(self.grid[0])) + if self.is_spot(i, j) + ) + + return total_risk_level + + +class Day09PartB(Day09, FileReaderSolution): + def find_basins(self) -> list[set[tuple[int, int]]]: + """Find a list of basins. + + Returns a list of basins. A basin consists of a list of (i, j) locations. + """ + # Let's start with the low-points: + low_points = [ + (i, j) + for i in range(len(self.grid)) + for j in range(len(self.grid[0])) + if self.is_spot(i, j) + ] + + basins = [] + for point in low_points: + locations = self.find_basin_locations(point[0], point[1]) + basins.append(locations) + + # Sort based on length: + basins.sort(key=lambda x: len(x), reverse=True) + return basins + + def find_basin_locations(self, i, j) -> set[tuple[int, int]]: + """For a location (i, j), return the points in the basin""" + if self.grid[i][j] == 9: + # Base case + return set() + + points = {(i, j)} + current_value = self.grid[i][j] + + options = [ + (i + 1, j), + (i - 1, j), + (i, j + 1), + (i, j - 1), + ] + for direction in options: + if neighbor_value := self.get_location(direction[0], direction[1]): + # Cells with value 9 do not count. And the next value needs to be higher + if 8 >= neighbor_value > current_value: + # Valid next step, add the points + points.add((direction[0], direction[1])) + # Now to see, if we can get from here: + extra_points = self.find_basin_locations(direction[0], direction[1]) + if extra_points: + points.update(extra_points) + return points + + def solve(self, input_data: str) -> int: + lines = input_data.splitlines() + self.grid = self.create_grid(lines) + + basins = self.find_basins() + return len(basins[0]) * len(basins[1]) * len(basins[2]) diff --git a/src/adventofcode2021/day10.py b/src/adventofcode2021/day10.py new file mode 100644 index 00000000..783dbcf9 --- /dev/null +++ b/src/adventofcode2021/day10.py @@ -0,0 +1,105 @@ +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.stack import Stack + + +class Day10: + CHARATERS = { + ")": 3, + "]": 57, + "}": 1197, + ">": 25137, + } + COMPLETE_CHARACTERS = { + ")": 1, + "]": 2, + "}": 3, + ">": 4, + } + + @staticmethod + def parse_chunk(chunk) -> bool | str: + """Parse a chunk and return the first invalid character. If the chunk is valid, + return True""" + stack: Stack[str] = Stack() + # Start adding and popping from the stack + for char in chunk: + if char in ("(", "[", "{", "<"): + stack.push(char) + else: + popped = stack.pop() + if char == "]" and popped == "[": + continue + elif char == ")" and popped == "(": + continue + elif char == "}" and popped == "{": + continue + elif char == ">" and popped == "<": + continue + else: + return char + return True + + @staticmethod + def complete_chunk(chunk) -> str: + """Complete a chunk. Chunk must be valid, just missing data""" + stack: Stack[str] = Stack() + # Start adding and popping from the stack + for char in chunk: + if char in ("(", "[", "{", "<"): + stack.push(char) + else: + stack.pop() + # Resulting characters in the stack must be completed + missing = [] + while not stack.empty: + char = stack.pop() + match char: + case "<": + missing.append(">") + case "(": + missing.append(")") + case "[": + missing.append("]") + case "{": + missing.append("}") + return "".join(missing) + + def compute_score(self, char) -> int: + return self.CHARATERS[char] + + +class Day10PartA(Day10, FileReaderSolution): + def solve(self, input_data: str) -> int: + chunks = input_data.splitlines() + invalid_characters = [self.parse_chunk(chunk) for chunk in chunks] + score = sum( + self.compute_score(char) for char in invalid_characters if char is not True + ) + return score + + +class Day10PartB(Day10, FileReaderSolution): + def compute_complete_score(self, input_string) -> int: + score = 0 + for char in input_string: + score *= 5 + score += self.COMPLETE_CHARACTERS[char] + + return score + + def solve(self, input_data: str) -> int: + # First compute all the valid strings + valid = [ + chunk + for chunk in input_data.splitlines() + if self.parse_chunk(chunk) is True + ] + + scores = [ + self.compute_complete_score(self.complete_chunk(chunk)) for chunk in valid + ] + sorted_scores = sorted(scores) + + # Compute middle and return the score + middle = len(sorted_scores) // 2 + return sorted_scores[middle] diff --git a/src/adventofcode2021/day11.py b/src/adventofcode2021/day11.py new file mode 100644 index 00000000..d73b23c6 --- /dev/null +++ b/src/adventofcode2021/day11.py @@ -0,0 +1,105 @@ +from __future__ import annotations + +from collections.abc import Iterator + +from adventofcode.utils.abstract import FileReaderSolution + + +class Octopus: + def __init__(self, value: int): + self.value = value + + def update(self) -> bool: + """Update the value. If the value resets to 0, return true""" + self.value = (self.value + 1) % 10 + return self.value == 0 + + def __repr__(self): + return f"{self.value}" + + def __str__(self): + return f"{self.value}" + + +class Day11: + grid: dict[tuple[int, int], Octopus] + max_i: int + max_j: int + total_flashes: int + total_steps: int + + def create_grid(self, lines: list[str]): + self.grid = {} + for i, line in enumerate(lines): + for j, value in enumerate(line): + self.grid[i, j] = Octopus(int(value)) + self.max_i = i + self.max_j = j + + self.total_flashes = 0 + self.total_steps = 0 + + def print_grid(self) -> str: + """Return the grid is a single line""" + res = [] + previous_line = 0 + for locatation, item in self.grid.items(): + if locatation[0] != previous_line: + res.append("\n") + previous_line = locatation[0] + + res.append(str(item)) + return "".join(res) + + def _get_neighbours(self, i, j) -> Iterator[tuple[int, int]]: + """Get a list of neighbours for this location.""" + for di in (-1, 0, 1): + for dj in (-1, 0, 1): + if di == 0 and dj == 0: + continue + new_i = di + i + new_j = dj + j + if new_i < 0 or new_i > self.max_i: + continue + if new_j < 0 or new_j > self.max_j: + continue + yield new_i, new_j + + def step(self) -> int: + """Perform a step, and return the number of Octopusses that flashed""" + # An octopus van only flash once per step. + # If an octopus is in flashed, we cannot update it anymore, it stays 0 + flashed_octopuses = set() + + queue = list(self.grid.keys()) + for location in queue: + octopus = self.grid[location] + if location not in flashed_octopuses: + flashed = octopus.update() + if flashed: + flashed_octopuses.add(location) + # Find the neighbours for this location + for i, j in self._get_neighbours(*location): + queue.append((i, j)) + self.total_flashes += len(flashed_octopuses) + self.total_steps += 1 + return len(flashed_octopuses) + + +class Day11PartA(Day11, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.create_grid(input_data.splitlines()) + for _ in range(100): + self.step() + return self.total_flashes + + +class Day11PartB(Day11, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.create_grid(input_data.splitlines()) + total_octopuses = len(self.grid) + for i in range(1, 100000): + flashed = self.step() + if flashed == total_octopuses: + return i + return -1 diff --git a/src/adventofcode2021/day12.py b/src/adventofcode2021/day12.py new file mode 100644 index 00000000..e8735be7 --- /dev/null +++ b/src/adventofcode2021/day12.py @@ -0,0 +1,68 @@ +from __future__ import annotations + +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.graph import Graph +from adventofcode.utils.node import Node +from adventofcode.utils.stack import Stack + + +class Day12: + g: Graph + + def create_graph(self, input_data: list[str]): + self.g = Graph() + for line in input_data: + start, end = line.split("-") + self.g.add_edge(start, end) + + def find_paths(self, initial: str, max_visits: int = 1) -> list[Node]: + """Find all the paths possible""" + frontier: Stack = Stack() + frontier.push(Node(initial, None)) + + # Explored is where we have been + paths = [] + + while not frontier.empty: + current_node = frontier.pop() + if current_node.state == "end": + paths.append(current_node) + continue + + for child in self.g.nodes_from_node(current_node.state): + if child == "start": + # We can visit start only once + continue + elif child.isupper(): + # Uppercase, we can visit this node mode + pass + else: + # We can visit a lowercase node only once + visited_list = Node.node_to_path(current_node) + if max_visits == 2: + lower_cases = [node for node in visited_list if node.islower()] + unique_lower = set(lower_cases) + if len(lower_cases) == len(unique_lower) + 2: + continue + else: + if visited_list.count(child) >= max_visits: + continue + + frontier.push(Node(child, current_node)) + return paths + + +class Day12PartA(Day12, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.create_graph(input_data.splitlines()) + # Find path + paths = self.find_paths("start", 1) + return len(paths) + + +class Day12PartB(Day12, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.create_graph(input_data.splitlines()) + # Find path + paths = self.find_paths("start", 2) + return len(paths) diff --git a/src/adventofcode2021/day13.py b/src/adventofcode2021/day13.py new file mode 100644 index 00000000..c6fa4e8e --- /dev/null +++ b/src/adventofcode2021/day13.py @@ -0,0 +1,105 @@ +import re +from collections import defaultdict + +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.queue import Queue + + +class Day13: + grid: defaultdict[tuple[int, int], bool] + folds: Queue[tuple[str, int]] + size: int + + def create_grid(self, lines: list[str]): + self.grid = defaultdict(bool) + for line in lines: + j, i = line.split(",") + self.grid[int(i), int(j)] = True + self._set_size() + + def _set_size(self): + self.size = max(max(i, j) for i, j in list(self.grid.keys())) + + def create_folds(self, lines: list[str]): + p = re.compile(r"^fold along (?P[x|y])=(?P\d*)$") + self.folds = Queue() + for line in lines: + if match := p.search(line): + mdict = match.groupdict() + self.folds.push((mdict["direction"], int(mdict["fold_line"]))) + + def repr_grid(self): # pragma: nocover + lines = [] + for i in range(0, self.size + 1): + line = "".join( + "#" if self.grid[i, j] else "." for j in range(0, self.size + 1) + ) + lines.append(line) + return "\n".join(lines) + + def _fold(self): + direction, fold_line = self.folds.pop() + if direction == "y": + for i in range(fold_line + 1, self.size + 1): + for j in range(0, self.size + 1): + if self.grid[i, j]: + new_i = self._mirrored_location(i, fold_line) + self.grid[new_i, j] = True + elif direction == "x": + for j in range(fold_line + 1, self.size + 1): + for i in range(0, self.size + 1): + if self.grid[i, j]: + new_j = self._mirrored_location(j, fold_line) + self.grid[i, new_j] = True + + # And then, delete everything under or left to the fold line + for i, j in list(self.grid.keys()): + if direction == "y": + if i > fold_line: + del self.grid[i, j] + else: + if j > fold_line: + del self.grid[i, j] + # Update the size, since we deleted stuff + self._set_size() + + @staticmethod + def _mirrored_location(i: int, fold: int) -> int: + """Get the location oposide to this location, based on the fold""" + return i - ((i - fold) * 2) + + def start_folding(self, loops=None): + """Start the folding process. + + If loops is not specified or None, loop until we run out of folds + """ + if not loops: + loops = len(self.folds) + + for n in range(loops): + self._fold() + return True + + def count_dots(self) -> int: + all_true = [i for i in self.grid.values() if i is True] + return sum(all_true) + + +class Day13PartA(Day13, FileReaderSolution): + def solve(self, input_data: str) -> int: + locations, folds = input_data.split("\n\n") + + self.create_grid(locations.splitlines()) + self.create_folds(folds.splitlines()) + self.start_folding(loops=1) + return self.count_dots() + + +class Day13PartB(Day13, FileReaderSolution): + def solve(self, input_data: str) -> str: + locations, folds = input_data.split("\n\n") + + self.create_grid(locations.splitlines()) + self.create_folds(folds.splitlines()) + self.start_folding() + return self.repr_grid() diff --git a/src/adventofcode2021/day14.py b/src/adventofcode2021/day14.py new file mode 100644 index 00000000..82bcedec --- /dev/null +++ b/src/adventofcode2021/day14.py @@ -0,0 +1,142 @@ +from __future__ import annotations + +from abc import ABC, abstractmethod +from collections import Counter +from typing import Generic, TypeVar + +from adventofcode.utils.abstract import FileReaderSolution + +T = TypeVar("T") + + +class Polymer(Generic[T]): + child: Polymer | None = None + + def __init__(self, polymer: T, parent: Polymer | None = None): + """ + Create a new Polymer with type T. + + If parent is given, this Polymer adds itself to this parent as child + """ + self._content = polymer + if parent: + parent.add_child(self) + + def add_child(self, child: Polymer): + if self.child is None: + self.child = child + else: + raise ValueError( + f"Polymer {self._content} already has a child {self.child}" + ) + + @property + def content(self) -> T: + return self._content + + def __repr__(self): + return repr(self._content) + + +class Day14(ABC): + def initialize(self, input_data: str): + lines = input_data.splitlines() + self.parse_template(lines[0]) + self.parse_rules(lines[2:]) + + @abstractmethod + def parse_template(self, template: str): + raise NotImplementedError + + def parse_rules(self, rules: list[str]): + self.rules: dict[str, str] = {} + + for rule in rules: + pair = rule.split(" -> ") + self.rules[pair[0]] = pair[1] + + +class Day14PartA(Day14, FileReaderSolution, Generic[T]): + root_node: Polymer + + def polimers_to_list(self) -> list[str]: + path: list[str] = [self.root_node.content] + node = self.root_node + + while node.child is not None: + node = node.child + path.append(node.content) + + return path + + def parse_template(self, template: str): + self.root_node = Polymer(template[0]) + current = self.root_node + for element in template[1:]: + current = Polymer(element, current) + + def step(self): + """Apply the rules to the polymers""" + current_node = self.root_node + while current_node.child: + next_node = current_node.child + pair = f"{current_node.content}{next_node.content}" + element_to_add = self.rules[pair] + + # Add a new polymer and add it between current_node and it's child + new_polymer = Polymer(element_to_add) + current_node.child = new_polymer + new_polymer.child = next_node + # And go to the next node in the chain + current_node = next_node + + def count(self) -> int: + chain = self.polimers_to_list() + cnt = Counter(chain) + common = cnt.most_common() + return common[0][1] - common[-1][1] + + def solve(self, input_data: str) -> int: + self.initialize(input_data) + for _ in range(10): + self.step() + return self.count() + + +class Day14PartB(Day14, FileReaderSolution): + cnt: Counter[str] + word_counter: Counter[str] + + def parse_template(self, template: str): + self.cnt = Counter() + for step in range(0, len(template) - 1): + self.cnt[template[step : step + 2]] += 1 + + def step(self): + new_counter: Counter[str] = Counter() + self.word_counter = Counter() + for item, count in self.cnt.items(): + new_polymer = self.rules[item] + left = f"{item[0]}{new_polymer}" + right = f"{new_polymer}{item[1]}" + new_counter[left] += count + new_counter[right] += count + + self.word_counter[item[0]] += count + self.word_counter[new_polymer] += count + + self.cnt = new_counter + + def count(self, char_to_fix: str) -> int: + # Fix off by one error for the last character in the recipe + self.word_counter[char_to_fix] += 1 + common = self.word_counter.most_common() + return common[0][1] - common[-1][1] + + def solve(self, input_data: str) -> int: + self.initialize(input_data) + self.word_counter = Counter() + for _ in range(40): + self.step() + char_to_fix = input_data.splitlines()[0][-1] + return self.count(char_to_fix) diff --git a/src/adventofcode2021/day15.py b/src/adventofcode2021/day15.py new file mode 100644 index 00000000..c3467b1e --- /dev/null +++ b/src/adventofcode2021/day15.py @@ -0,0 +1,160 @@ +from __future__ import annotations + +from abc import ABC, abstractmethod +from collections.abc import Iterator +from functools import cache + +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.node import Node +from adventofcode.utils.priority_queue import PriorityQueue + +Point = tuple[int, int] + + +class Day15(ABC): + cave: dict[Point, int] + + def fill_cave(self, input_data: list[str]): + self.cave = {} + for x, row in enumerate(input_data): + for y, value in enumerate(row): + self.cave[x, y] = int(value) + + def repr_cave(self) -> str: + lines = [] + for x in range(0, self.max_x + 1): + lines.append( + "".join(str(self.cave[x, y]) for y in range(0, self.max_y + 1)) + ) + return "\n".join(lines) + + @property + @abstractmethod + def max_x(self) -> int: + raise NotImplementedError + + @property + @abstractmethod + def max_y(self) -> int: + raise NotImplementedError + + @abstractmethod + def get_value(self, x: int, y: int) -> int: + """Return the value at a location.""" + raise NotImplementedError + + def find_astar(self): + initial: Point = (0, 0) + goal: Point = (self.max_y, self.max_y) + path = self.astar( + initial=initial, + goal=goal, + ) + return path + + def astar( + self, + initial: Point, + goal: Point, + ) -> Node[Point] | None: + # frontier is where we've yet to go + frontier: PriorityQueue[Node[Point]] = PriorityQueue() + # Create the first node. Setting the cost to 0, since we will not count + # this node in the path. + frontier.push(Node(initial, None, cost=0.0)) + + # explored is where we've been + explored: dict[Point, float] = {initial: 0.0} + + # keep going while there is more to explore + while not frontier.empty: + current_node: Node[Point] = frontier.pop() + current_state: Point = current_node.state + # if we found the goal, we're done + if current_state == goal: + return current_node + + # check where we can go next and haven't explored + for child in self._get_neighbours(*current_state): + child_value = self.get_value(*child) + + new_cost: float = current_node.cost + child_value + + if child not in explored or explored[child] > new_cost: + explored[child] = new_cost + frontier.push(Node(child, current_node, new_cost)) + return None + + def _get_neighbours(self, x, y) -> Iterator[tuple[int, int]]: + """Get a list of neighbours for this location.""" + locations = [ + (x + 1, y), + (x - 1, y), + (x, y + 1), + (x, y - 1), + ] + for new_x, new_y in locations: + if new_x < 0 or new_x > self.max_x: + continue + if new_y < 0 or new_y > self.max_y: + continue + yield new_x, new_y + + def solve(self, input_data: str) -> int: + self.fill_cave(input_data.splitlines()) + # The path should have the total cost from start to end + path = self.find_astar() + return int(path.cost) + + +class Day15PartA(Day15, FileReaderSolution): + def get_value(self, x: int, y: int) -> int: + return self.cave[x, y] + + @property + @cache # type: ignore + def max_y(self) -> int: + return max(y for _, y in self.cave) + + @property + @cache # type: ignore + def max_x(self) -> int: + return max(x for x, _ in self.cave) + + +class Day15PartB(Day15, FileReaderSolution): + def get_value(self, x: int, y: int) -> int: + multiplier = self.real_max_x + 1 + mod_x = x % multiplier + mod_y = y % multiplier + + delta_x = x // multiplier + delta_y = y // multiplier + + old_value = self.cave[mod_x, mod_y] + quadrant = delta_x + delta_y + new_value = quadrant + old_value + # Wrap around when 10 or higher + if new_value >= 10: + new_value -= 9 + return new_value + + @property + @cache # type: ignore + def real_max_x(self) -> int: + return max(x for x, _ in self.cave) + + @property + @cache # type: ignore + def real_max_y(self) -> int: + return max(y for _, y in self.cave) + + @property + @cache # type: ignore + def max_x(self) -> int: + return (max(x for x, _ in self.cave) + 1) * 5 - 1 + + @property + @cache # type: ignore + def max_y(self) -> int: + return (max(y for _, y in self.cave) + 1) * 5 - 1 diff --git a/src/adventofcode2021/day16.py b/src/adventofcode2021/day16.py new file mode 100644 index 00000000..2d26ce67 --- /dev/null +++ b/src/adventofcode2021/day16.py @@ -0,0 +1,169 @@ +from __future__ import annotations + +import math +from collections import deque +from enum import IntEnum + +from adventofcode.utils.abstract import FileReaderSolution + + +class TypeID(IntEnum): + """Define the different type of packages""" + + SUM = 0 + PRODUCT = 1 + MINIMUM = 2 + MAXIMUM = 3 + LITERAL_VALUE = 4 + GREATHER_THAN = 5 + LESS_THAN = 6 + EQUAL_TO = 7 + + +class Packet: + version: int + type_id: int + + # Literal value packets + value: int + + # Operator packets + length_type_id: int | None + sub: list[Packet] + + packet_deq: deque[str] + + def __init__(self): + self.sub = [] + + def from_hex(self, packet_data: str) -> Packet: + # Add one, then convert to bin and remove the one again. + # This will make sure we have the leading zeros in the bit string + bin_value = bin(int("1" + packet_data, 16))[3:] + deque_data = deque(bin_value) + + return self.from_deque(deque_data) + + def from_deque(self, packet_data: deque) -> Packet: + self.packet_deq = packet_data + self._parse_data() + return self + + def _take_bits(self, num_bits: int) -> int: + """Take n bits from the packet_deq, return the value as int. + Consumes the packet data + """ + # Pop num_bits from the string on the left + res = [self.packet_deq.popleft() for _ in range(num_bits)] + # Convert to integer, from binary base 2 + return int("".join(res), 2) + + def _take_bits_as_deque(self, num_bits: int) -> deque: + """Take n bits from the packet_deq, return the value as int. + Consumes the packet data + """ + # Pop num_bits from the string on the left + res = [self.packet_deq.popleft() for _ in range(num_bits)] + # Convert to integer, from binary base 2 + return deque(res) + + def _peek_bits(self, num_bits: int) -> int: + """Look at the first num_bits bits""" + value = [self.packet_deq[n] for n in range(num_bits)] + return int("".join(value), 2) + + def _parse_data(self): + self.version = self._take_bits(3) + self.type_id = self._take_bits(3) + + # Parse the different types + if self.type_id == TypeID.LITERAL_VALUE.value: + self._parse_literal_value() + else: + self._parse_operator() + + def _parse_literal_value(self): + """Parse literal value""" + next_bit: int = 1 + value: int = 0 + while next_bit == 1: + next_bit = self._take_bits(1) + group_bits = self._take_bits(4) + value = (value << 4) | group_bits + + self.value = value + return + + def _parse_operator(self): + self.length_type_id = self._take_bits(1) + + if self.length_type_id == 0: + # the next 15 bits are a number that represents the total length in bits + # of the sub-packets contained by this packet. + length_subpacket = self._take_bits(15) + subpackets = self._take_bits_as_deque(length_subpacket) + + while subpackets: + new_packet = Packet().from_deque(subpackets) + self.sub.append(new_packet) + # If there is any data left, process it now + subpackets = new_packet.packet_deq + + elif self.length_type_id == 1: + # The next 11 bits are a number that represents the number of + # sub-packets immediately contained by this packet. + num_subpackets = self._take_bits(11) + for n in range(num_subpackets): + new_packet = Packet().from_deque(self.packet_deq) + self.sub.append(new_packet) + + +class Day16: + pass + + +class Day16PartA(Day16, FileReaderSolution): + def sum_version(self, packet: Packet) -> int: + """Recurse into subpackages and sum the total versions""" + total = packet.version + for subpack in packet.sub: + total += self.sum_version(subpack) + + return total + + def solve(self, input_data: str) -> int: + root_packet = Packet().from_hex(input_data) + # Deep dive into the packets + res = self.sum_version(root_packet) + return res + + +class Day16PartB(Day16, FileReaderSolution): + def eval(self, packet: Packet) -> int: + """Evaluate the packet, and its subpackets""" + # Evaluate the sub-packets. By using evaluate, we get the literal value + # or the package is parsed with the subpackages + # Now appy the function to the literal values + if packet.type_id == TypeID.SUM.value: + return sum([self.eval(sub) for sub in packet.sub]) + elif packet.type_id == TypeID.PRODUCT.value: + return math.prod([self.eval(sub) for sub in packet.sub]) + elif packet.type_id == TypeID.MAXIMUM.value: + return max([self.eval(sub) for sub in packet.sub]) + elif packet.type_id == TypeID.MINIMUM.value: + return min([self.eval(sub) for sub in packet.sub]) + elif packet.type_id == TypeID.GREATHER_THAN.value: + return 1 if self.eval(packet.sub[0]) > self.eval(packet.sub[1]) else 0 + elif packet.type_id == TypeID.LESS_THAN.value: + return 1 if self.eval(packet.sub[0]) < self.eval(packet.sub[1]) else 0 + elif packet.type_id == TypeID.EQUAL_TO.value: + return 1 if self.eval(packet.sub[0]) == self.eval(packet.sub[1]) else 0 + elif packet.type_id == TypeID.LITERAL_VALUE.value: + return packet.value + else: + raise ValueError("Unknown operator %s", packet.type_id) + + def solve(self, input_data: str) -> int: + root_packet = Packet().from_hex(input_data) + result = self.eval(root_packet) + return result diff --git a/src/adventofcode2021/day17.py b/src/adventofcode2021/day17.py new file mode 100644 index 00000000..4735387d --- /dev/null +++ b/src/adventofcode2021/day17.py @@ -0,0 +1,102 @@ +import re +from dataclasses import dataclass +from typing import NamedTuple + +from adventofcode.utils.abstract import FileReaderSolution + + +class Point(NamedTuple): + x: int + y: int + + +@dataclass +class TargetArea: + min_x: int + max_x: int + min_y: int + max_y: int + + def __repr__(self): + return f"target area: x={self.min_x}..{self.max_x}, {self.min_y}..{self.max_y}" + + def is_in_target(self, location: Point) -> bool: + """Return if we are withing the target spot""" + return ( + self.min_x <= location.x <= self.max_x + and self.min_y <= location.y <= self.max_y + ) + + def overshot(self, location: Point) -> bool: + """Returns True if the location is further away then the location""" + return location.x > self.max_x or location.y < self.min_y + + +class Day17: + def parse_str(self, line: str) -> TargetArea: + p = re.compile( + r"target area: x=(?P-?\d+)..(?P-?\d+), " + r"y=(?P-?\d+)..(?P-?\d+)" + ) + + if match := p.search(line): + mdict = match.groupdict() + # Convert all the strings into integers + for key, value in mdict.items(): + mdict[key] = int(value) + return TargetArea(**mdict) # type: ignore + else: + raise ValueError("Line could not be matched: ", line) + + @staticmethod + def compute_trajectory( + launch_speed: tuple[int, int], target: TargetArea + ) -> int | bool: + """Compute the trajectory and return the max height (y) from the course. + Returns an integer with the highest path, or false if we overshot + """ + max_y = float("-inf") + location = Point(0, 0) + dx, dy = launch_speed + while not target.overshot(location): + # Looping + location = Point(location.x + dx, location.y + dy) + if dx > 0: + dx -= 1 + # Due to gravity, the probe's y velocity decreases by 1. + dy -= 1 + max_y = max(max_y, location.y) + if target.is_in_target(location): + # We hit the target! + return int(max_y) + # We overshot, not target reachable from here + return False + + @staticmethod + def yield_values(destination): + """Yield the dx, dy values that can be valid starting points""" + for dx in range(1, destination.max_x + 1): + for dy in range(destination.min_y, abs(destination.min_y)): + yield dx, dy + + +class Day17PartA(Day17, FileReaderSolution): + def solve(self, input_data: str) -> int: + destination = self.parse_str(input_data) + + return max( + self.compute_trajectory((dx, dy), destination) + for dx, dy in self.yield_values(destination) + ) + + +class Day17PartB(Day17, FileReaderSolution): + def solve(self, input_data: str) -> int: + destination = self.parse_str(input_data) + found = [] + for dx, dy in self.yield_values(destination): + res = self.compute_trajectory((dx, dy), destination) + if res is not False: + found.append(res) + + return len(found) diff --git a/src/adventofcode2021/day18.py b/src/adventofcode2021/day18.py new file mode 100644 index 00000000..395ddf3e --- /dev/null +++ b/src/adventofcode2021/day18.py @@ -0,0 +1,263 @@ +from __future__ import annotations + +import functools +import math +from collections import deque + +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.priority_queue import PriorityQueue + + +class Snail: + value: int + left: Snail + right: Snail + parent: Snail + + def __init__(self, value: int | None = None, left=None, right=None, parent=None): + self.value = value # type: ignore + self.left = left + self.right = right + self.parent = parent + + @property + def has_value(self): + return self.left is None and self.right is None + + def __repr__(self): + if self.has_value: + return str(self.value) + left = repr(self.left) if self.left else None + right = repr(self.right) if self.right else None + if left and right: + return f"[{left},{right}]" + else: + return f"[{left or right}]" + + def __add__(self, other) -> Snail: + new = Snail(left=self, right=other) + self.parent = new + other.parent = new + return new + + def __lt__(self, other: Snail): + if self.has_value and other.has_value: + return self.value < other.value # type: ignore + else: + return False + + def find_deepest_snail(self, n: int = 0) -> tuple[Snail | None, int]: + """Find the first snail at level nested inside 4 pairs""" + if n >= 5: + if self.has_value: + return self.parent, n + else: + return self, n + + if self.left: + left_snail, left_value = self.left.find_deepest_snail(n + 1) + else: + left_snail, left_value = None, 0 + if self.right: + right_snail, right_value = self.right.find_deepest_snail(n + 1) + else: + right_snail, right_value = None, 0 + + if right_value > left_value: + return right_snail, right_value + else: + return left_snail, left_value + + def find_splittable(self) -> Snail | None: + if self.has_value and self.value >= 10: # type: ignore + return self + + if self.left: + left_snail = self.left.find_splittable() + else: + left_snail = None + if self.right: + right_snail = self.right.find_splittable() + else: + right_snail = None + + if left_snail: + return left_snail + else: + return right_snail + + +class Day18: + def create_tree(self, line) -> Snail: + queue = deque(line) + root_node = self.parse(queue) + return root_node + + def parse(self, queue: deque[str]) -> Snail: + """Create a nested structure of snails from a dequeue of lists""" + + if queue[0] == "[": + # Remove [ + queue.popleft() + left = self.parse(queue) + # Remove , + queue.popleft() + right = self.parse(queue) + # Remove ] + queue.popleft() + new_snail = Snail(left=left, right=right) + left.parent = new_snail + right.parent = new_snail + return new_snail + else: + # Next digit is a number. We assume that we only have single digits number + # in the input. + digits = [] + while queue[0].isdigit(): + digits.append(queue.popleft()) + return Snail(value=int("".join(map(str, digits)))) + + def explode(self, root_node: Snail) -> Snail: + """Explode a snail""" + # The root snail will explode: + deepest, depth = Snail.find_deepest_snail(root_node) + if not deepest: + # Nothing to explode anymore + raise StopIteration + right_value = deepest.right.value + left_value = deepest.left.value + # Copying C# :) + # https://github.com/VSZM/Advent_Of_Code/blob/master/2021/AOC2021/Day18.cs + q: PriorityQueue[tuple[int, Snail]] = PriorityQueue() + visited: set[Snail] = set() + + q.push((3, deepest.parent)) # type: ignore + visited.add(deepest) + path_to_root = [] + + current = deepest + while current: + path_to_root.append(current) + current = current.parent + + while not q.empty: + _, node = q.pop() + if node in visited: + continue + visited.add(node) + + if node.has_value: + node.value += left_value + break + + if node.right and node not in path_to_root and node.right not in visited: + q.push((1, node.right)) + if node.left and node.left not in visited: + q.push((2, node.left)) + if node.parent is not None and node.parent not in visited: + q.push((3, node.parent)) + + # Explode to the right + q = PriorityQueue() + visited = set() + + q.push((3, deepest.parent)) # type: ignore + visited.add(deepest) + + while not q.empty: + _, node = q.pop() + if node in visited: + continue + visited.add(node) + + if node.has_value: + node.value += right_value + break + + if node.left and node not in path_to_root and node.left not in visited: + q.push((1, node.left)) + if node.right and node.right not in visited: + q.push((2, node.right)) + if node.parent is not None and node.parent not in visited: + q.push((3, node.parent)) + + # And remove the exploded node + deepest.value = 0 + deepest.right = None # type: ignore + deepest.left = None # type: ignore + return root_node + + def split(self, node: Snail) -> Snail: + """Split the snails. + If any regular number is 10 or greater, the leftmost such regular number splits. + """ + splittable = node.find_splittable() + if not splittable: + raise StopIteration + + value = splittable.value + left = math.floor(value / 2) + right = math.ceil(value / 2) + left_snail = Snail(value=left, parent=splittable) + right_snail = Snail(value=right, parent=splittable) + + splittable.value = None # type: ignore + splittable.left = left_snail + splittable.right = right_snail + + return node + + def reduce(self, snail1: Snail, snail2: Snail) -> Snail: + """Add and then reduce the snails""" + super_snail = snail1 + snail2 + + did_explode = True + did_split = True + while did_explode or did_split: + try: + self.explode(super_snail) + did_explode = True + continue + except StopIteration: + did_explode = False + try: + self.split(super_snail) + did_split = True + continue + except StopIteration: + did_split = False + return super_snail + + def magnitude(self, snail: Snail) -> int: + if snail.has_value: + return snail.value + + left = self.magnitude(snail.left) * 3 + right = self.magnitude(snail.right) * 2 + + return left + right + + +class Day18PartA(Day18, FileReaderSolution): + def solve(self, input_data: str) -> int: + snails = [self.create_tree(line) for line in input_data.splitlines()] + result = functools.reduce(self.reduce, snails) + magnitude = self.magnitude(result) + return magnitude + + +class Day18PartB(Day18, FileReaderSolution): + def solve(self, input_data: str) -> int: + lines = input_data.splitlines() + combinations = ((x, y) for x in lines for y in lines) + max_value = 0 + for snail1_str, snail2_str in combinations: + snail1 = self.create_tree(snail1_str) + snail2 = self.create_tree(snail2_str) + + result = self.reduce(snail1, snail2) + magnitude = self.magnitude(result) + if magnitude > max_value: + max_value = magnitude + + return max_value diff --git a/src/adventofcode2021/day19.py b/src/adventofcode2021/day19.py new file mode 100644 index 00000000..e0a021cb --- /dev/null +++ b/src/adventofcode2021/day19.py @@ -0,0 +1,152 @@ +import collections +import itertools +from typing import NamedTuple + +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.point import XYZPoint as Point + + +class Scanner(NamedTuple): + sequence: int + beacons: list[Point] + + +class AxisInfo(NamedTuple): + axis: int + sign: int + diff: int + + +class Day19: + scanner_positions: dict[int, Point] + + @staticmethod + def parse_input(input_data) -> list[Scanner]: + block = input_data.split("\n\n") + scanners: list[Scanner] = [] + + for line in block: + lines = line.splitlines() + # Split on spaces, scanner # will be on the 3rd split + sequence = int(lines[0].split()[2]) + + beacons = [] + for beacon_str in lines[1:]: + beacons.append(Point(*[int(b) for b in beacon_str.split(",")])) + + scanners.append(Scanner(sequence=sequence, beacons=beacons)) + return scanners + + @staticmethod + def x_edges_from( + src: Scanner, + scanners_by_id: dict[int, Scanner], + ) -> dict[int, AxisInfo]: + x_edges = {} + for other in scanners_by_id.values(): + for axis in ("x", "y", "z"): + for sign in (-1, 1): + d_x: collections.Counter[int] = collections.Counter() + for point in src.beacons: + for other_pt in other.beacons: + d_x[point.x - other_pt[axis] * sign] += 1 + + ((x_diff, n),) = d_x.most_common(1) + if n >= 12: + x_edges[other.sequence] = AxisInfo( + axis=axis, + sign=sign, + diff=x_diff, + ) + return x_edges + + @staticmethod + def yz_edges_from( + src: Scanner, + x_edges: dict[int, AxisInfo], + scanners_by_id: dict[int, Scanner], + ) -> tuple[dict[int, AxisInfo], dict[int, AxisInfo]]: + y_edges = {} + z_edges = {} + + for dst_id in x_edges: + other = scanners_by_id[dst_id] + for axis in ("x", "y", "z"): + for sign in (-1, 1): + d_y: collections.Counter[int] = collections.Counter() + d_z: collections.Counter[int] = collections.Counter() + for point in src.beacons: + for other_pt in other.beacons: + d_y[point.y - other_pt[axis] * sign] += 1 + d_z[point.z - other_pt[axis] * sign] += 1 + + ((y_diff, y_n),) = d_y.most_common(1) + if y_n >= 12: + y_edges[dst_id] = AxisInfo( + axis=axis, + sign=sign, + diff=y_diff, + ) + + ((z_diff, z_n),) = d_z.most_common(1) + if z_n >= 12: + z_edges[dst_id] = AxisInfo( + axis=axis, + sign=sign, + diff=z_diff, + ) + + return y_edges, z_edges + + def compute(self, input_data: str): + scanners: list[Scanner] = self.parse_input(input_data) + scanners_by_id: dict[int, Scanner] = { + scanner.sequence: scanner for scanner in scanners + } + + self.scanner_positions = {0: Point(0, 0, 0)} + all_points = set(scanners_by_id[0].beacons) + todo = [scanners_by_id.pop(0)] + while todo: + src = todo.pop() + + x_edges = self.x_edges_from(src, scanners_by_id) + y_edges, z_edges = self.yz_edges_from(src, x_edges, scanners_by_id) + + for k in x_edges: + dst_x = x_edges[k].diff + dst_y = y_edges[k].diff + dst_z = z_edges[k].diff + + self.scanner_positions[k] = Point(dst_x, dst_y, dst_z) + + next_scanner = scanners_by_id.pop(k) + next_scanner.beacons[:] = [ + Point( + dst_x + x_edges[k].sign * pt[x_edges[k].axis], + dst_y + y_edges[k].sign * pt[y_edges[k].axis], + dst_z + z_edges[k].sign * pt[z_edges[k].axis], + ) + for pt in next_scanner.beacons + ] + all_points.update(next_scanner.beacons) + + todo.append(next_scanner) + + return all_points + + +class Day19PartA(Day19, FileReaderSolution): + def solve(self, input_data: str) -> int: + return len(self.compute(input_data)) + + +class Day19PartB(Day19, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.compute(input_data) + + distance = 0 + for a, b in itertools.permutations(self.scanner_positions.values(), 2): + distance = max(distance, a.distance(b)) + + return distance diff --git a/src/adventofcode2021/day20.py b/src/adventofcode2021/day20.py new file mode 100644 index 00000000..abd2e5c3 --- /dev/null +++ b/src/adventofcode2021/day20.py @@ -0,0 +1,115 @@ +from collections import defaultdict + +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.point import XYPoint as Point + + +class Day20: + enhancement: str + image: defaultdict[Point, bool] + special_case: bool + + def parse(self, input_data: str): + """Return the enhancement as a string with # or . + Return the image as a + """ + self.enhancement, image = input_data.split("\n\n") + # If we are in the special case, the first and last values will be # and . + # This causes all the unset pixels to flip everytime. + self.special_case = self.enhancement[0] == "#" and self.enhancement[-1] == "." + + self.image = defaultdict(bool) + for x, line in enumerate(image.splitlines()): + for y, point in enumerate(line): + self.image[Point(x, y)] = True if point == "#" else False + + @staticmethod + def get_pixels(point: Point) -> list[Point]: + """For a pixel, get the list of pixels we need to consider""" + direction = (-1, 0, 1) + points = [Point(point.x + x, point.y + y) for x in direction for y in direction] + return points + + def points_to_index(self, points: list[Point]) -> int: + """Convert a list of points to index of the enhancement""" + bin_str = "".join(["1" if self.image[pnt] else "0" for pnt in points]) + idx = int(bin_str, 2) + return idx + + def points_to_pixel(self, points: list[Point]) -> bool: + idx = self.points_to_index(points) + return self.enhancement[idx] == "#" + + def get_new_value(self, point) -> bool: + """Get a new value for a certain point""" + points = self.get_pixels(point) + value = self.points_to_pixel(points) + return value + + def loop(self, loops: int): + """Loop `loops` times over the image""" + for n in range(loops): + self.compute(n) + + @staticmethod + def min_max_values(image: defaultdict[Point, bool]) -> tuple[int, int, int, int]: + """Return max_x, min_x, max_y, min_y for image""" + true_values = [pnt for pnt, value in image.items() if value] + max_x = max(pnt.x for pnt in true_values) + min_x = min(pnt.x for pnt in true_values) + max_y = max(pnt.y for pnt in true_values) + min_y = min(pnt.y for pnt in true_values) + return max_x, min_x, max_y, min_y + + def __str__(self): # pragma: nocover + return self.print_image(self.image) + + def print_image(self, image): # pragma: nocover + max_x, min_x, max_y, min_y = self.min_max_values(image) + lines = [] + for x in range(min_x, max_x + 1): + line = [] + for y in range(min_y, max_y + 1): + line.append("#" if image[Point(x, y)] else ".") + lines.append("".join(line)) + return "\n".join(lines) + + def compute(self, n): + max_x, min_x, max_y, min_y = self.min_max_values(self.image) + + # If we're in the special case, with the test answer, flip the default + # True/False, on or off. This will make sure that we compute the points as + # if they are on. + if self.special_case and n % 2 == 0: + default_value = True + else: + default_value = False + + new_image: defaultdict[Point, bool] = defaultdict(lambda: default_value) + + for x in range(min_x - 10, max_x + 10): + for y in range(min_y - 10, max_y + 10): + pnt = Point(x, y) + new_value = self.get_new_value(pnt) + new_image[pnt] = new_value + + self.image = new_image + + def count_pixels(self) -> int: + return sum(self.image.values()) + + +class Day20PartA(Day20, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.parse(input_data) + self.loop(2) + pixels = self.count_pixels() + return pixels + + +class Day20PartB(Day20, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.parse(input_data) + self.loop(50) + pixels = self.count_pixels() + return pixels diff --git a/src/adventofcode2021/day21.py b/src/adventofcode2021/day21.py new file mode 100644 index 00000000..d39868dd --- /dev/null +++ b/src/adventofcode2021/day21.py @@ -0,0 +1,84 @@ +import itertools +from collections import Counter +from collections.abc import Iterator +from functools import cache + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day21: + @staticmethod + def modulo(n: int) -> int: + return ((n - 1) % 10) + 1 + + @staticmethod + def dice() -> Iterator[int]: + for n in itertools.count(start=1): + yield ((n - 1) % 100) + 1 + + def run_loops(self, location_1: int, location_2: int) -> int: + score_1, score_2 = 0, 0 + dice = self.dice() + player_1 = True + for n in itertools.count(start=1): + throw = sum([next(dice) for _ in range(3)]) + if player_1: + location_1 = self.modulo(location_1 + throw) + score_1 += location_1 + else: + location_2 = self.modulo(location_2 + throw) + score_2 += location_2 + + # And switch players + player_1 = not player_1 + + # Have we won yet? + if score_1 >= 1000: + return score_2 * (n * 3) + elif score_2 >= 1000: + return score_1 * (n * 3) + + raise ValueError("Infinity ended and no score was found.") + + +class Day21PartA(Day21, FileReaderSolution): + def solve(self, input_data: str) -> int: + lines = input_data.splitlines() + start_1 = int(lines[0][-1]) + start_2 = int(lines[1][-1]) + return self.run_loops(start_1, start_2) + + +class Day21PartB(Day21, FileReaderSolution): + cnt: Counter[int] + + @cache + def find_wins( + self, location_1: int, score_1: int, location_2: int, score_2: int + ) -> tuple[int, int]: + wins_1 = wins_2 = 0 + for throw, multiplier in self.cnt.items(): + new_1 = self.modulo(location_1 + throw) + new_1_score = score_1 + new_1 + if new_1_score >= 21: + wins_1 += multiplier + else: + tmp_2_wins, tmp_1_wins = self.find_wins( + location_2, score_2, new_1, new_1_score + ) + wins_1 += tmp_1_wins * multiplier + wins_2 += tmp_2_wins * multiplier + return wins_1, wins_2 + + def solve(self, input_data: str) -> int: + lines = input_data.splitlines() + start_1 = int(lines[0][-1]) + start_2 = int(lines[1][-1]) + + # Pre-compute the throws and the number of times it can happen + options = (1, 2, 3) + self.cnt = Counter( + sum(pt) for pt in itertools.product(options, options, options) + ) + p1, p2 = self.find_wins(start_1, 0, start_2, 0) + return max(p1, p2) diff --git a/src/adventofcode2021/day22.py b/src/adventofcode2021/day22.py new file mode 100644 index 00000000..794ab013 --- /dev/null +++ b/src/adventofcode2021/day22.py @@ -0,0 +1,176 @@ +from __future__ import annotations + +import re +from collections import defaultdict +from itertools import filterfalse +from typing import NamedTuple + +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.point import XYZPoint as Point + + +class Step(NamedTuple): + # Action: True is Turn On. + action: bool + + x_start: int + x_stop: int + y_start: int + y_stop: int + z_start: int + z_stop: int + + @staticmethod + def from_str(input_data: str) -> Step: + """Split on x=11..13,y=11..13,z=11..13 into a new Step object""" + p = re.compile( + r"(?Pon|off) " + r"x=(?P-?\d+)..(?P-?\d+)," + r"y=(?P-?\d+)..(?P-?\d+)," + r"z=(?P-?\d+)..(?P-?\d+)" + ) + groups = p.search(input_data) + if not groups: + raise ValueError("Bad input: ", input_data) + mdict = groups.groupdict() + mdict["action"] = mdict["action"] == "on" + for key, value in mdict.items(): + if key == "action": + continue + mdict[key] = int(value) + return Step(**mdict) # type: ignore + + +class Reboot(NamedTuple): + on: bool + cube: Cube + + @staticmethod + def from_str(input_data: str) -> Reboot: + action, points = input_data.split() + return Reboot(action == "on", Cube.from_str(points)) + + +class Cube(NamedTuple): + x0: int + x1: int + y0: int + y1: int + z0: int + z1: int + + @property + def size(self) -> int: + return (self.x1 - self.x0) * (self.y1 - self.y0) * (self.z1 - self.z0) + + def intersects(self, other: Cube) -> bool: + return ( + self.x0 < other.x1 + and self.x1 - 1 >= other.x0 + and self.y0 < other.y1 + and self.y1 - 1 >= other.y0 + and self.z0 < other.z1 + and self.z1 - 1 >= other.z0 + ) + + def contains(self, other: Cube) -> bool: + return ( + self.x0 <= other.x0 + and self.x1 >= other.x1 + and self.y0 <= other.y0 + and self.y1 >= other.y1 + and self.z0 <= other.z0 + and self.z1 >= other.z1 + ) + + def subtract(self, other: Cube) -> list[Cube]: + """If `other` cube is inside this cube, split the cube into new cubes""" + if not self.intersects(other): + return [self] + elif other.contains(self): + return [] + + xs = sorted((self.x0, self.x1, other.x0, other.x1)) + ys = sorted((self.y0, self.y1, other.y0, other.y1)) + zs = sorted((self.z0, self.z1, other.z0, other.z1)) + + ret = [] + for x0, x1 in zip(xs, xs[1:]): + for y0, y1 in zip(ys, ys[1:]): + for z0, z1 in zip(zs, zs[1:]): + cube = Cube(x0, x1, y0, y1, z0, z1) + if self.contains(cube) and not cube.intersects(other): + ret.append(cube) + return ret + + @staticmethod + def from_str(input_data: str) -> Cube: + """Split x=11..13,y=11..13,z=11..13 into a new Step object""" + p = re.compile( + r"x=(?P-?\d+)..(?P-?\d+)," + r"y=(?P-?\d+)..(?P-?\d+)," + r"z=(?P-?\d+)..(?P-?\d+)" + ) + groups = p.search(input_data) + if not groups: + raise ValueError("Bad input: ", input_data) + mdict = groups.groupdict() + return Cube( + x0=int(mdict["x_start"]), + x1=int(mdict["x_stop"]) + 1, + y0=int(mdict["y_start"]), + y1=int(mdict["y_stop"]) + 1, + z0=int(mdict["z_start"]), + z1=int(mdict["z_stop"]) + 1, + ) + + +class Day22: + ... + + +class Day22PartA(Day22, FileReaderSolution): + grid: defaultdict[Point, bool] + + def parse(self, input_data: str) -> list[Step]: + return [Step.from_str(line) for line in input_data.splitlines()] + + def apply_steps(self, steps: list[Step]): + """Apply all the steps.""" + for step in steps: + for x in range(step.x_start, step.x_stop + 1): + for y in range(step.y_start, step.y_stop + 1): + for z in range(step.z_start, step.z_stop + 1): + pnt = Point(x, y, z) + self.grid[pnt] = step.action + + def count_on(self) -> int: + return sum(pnt for pnt in self.grid.values() if pnt) + + @staticmethod + def apply_limit(steps: list[Step]) -> list[Step]: + def filter_condition(step): + return min(step[1:]) < -50 or max(step[1:]) > 50 + + return list(filterfalse(filter_condition, steps)) + + def solve(self, input_data: str) -> int: + self.grid = defaultdict(bool) + steps = self.parse(input_data) + # Apply the limit + steps = self.apply_limit(steps) + self.apply_steps(steps) + return self.count_on() + + +class Day22PartB(Day22, FileReaderSolution): + def solve(self, input_data: str) -> int: + reboots = [Reboot.from_str(line) for line in input_data.splitlines()] + + cubes: list[Cube] = [] + for step in reboots: + cubes = [part for cube in cubes for part in cube.subtract(step.cube)] + if step.on: + cubes.append(step.cube) + + return sum(cube.size for cube in cubes) diff --git a/template/{{cookiecutter.advendofcode2019}}/src/solutions/data/{{cookiecutter.directory_name}}/{{cookiecutter.file_name}}.txt b/src/adventofcode2022/__init__.py similarity index 100% rename from template/{{cookiecutter.advendofcode2019}}/src/solutions/data/{{cookiecutter.directory_name}}/{{cookiecutter.file_name}}.txt rename to src/adventofcode2022/__init__.py diff --git a/src/adventofcode2022/data/day_01/day01.txt b/src/adventofcode2022/data/day_01/day01.txt new file mode 100644 index 00000000..cd4e52e3 --- /dev/null +++ b/src/adventofcode2022/data/day_01/day01.txt @@ -0,0 +1,2236 @@ +4323 +4004 +4070 +1780 +5899 +1912 +2796 +5743 +3008 +1703 +4870 +5048 +2485 +1204 + +30180 + +33734 +19662 + +2402 +4395 +2703 +1562 +2407 +3393 +4311 +1314 +2729 +2225 +4420 +4136 +2867 +1032 +2095 + +7366 +3496 +6177 +1426 +4750 +2655 +3194 +4240 +4024 +3510 +2606 +2335 + +1524 +17720 +23749 + +2549 +1945 +3392 +4965 +5601 +4725 +1462 +1470 +2988 +5339 +1620 +6098 +4447 +5115 +4102 + +2729 +4836 +10723 +6705 +2278 +3290 +2735 +1813 + +10285 +2302 +6970 +10710 +8791 +5575 +9765 +2167 + +1081 +6290 +3701 +2457 +9551 +9625 +3870 +8433 +5653 + +5647 +2342 +5549 +2861 +4081 +3166 +1902 +3217 +3255 +4353 +1752 +2491 +3271 +4239 +5744 + +14082 + +24855 +23123 +18215 + +9650 +5995 +11848 +1258 +10354 +5948 +9052 + +5347 +7820 +4620 +4217 +2686 +7163 +4911 +8538 +6851 +8342 + +6323 +3157 +6939 +3400 +5297 +6815 +1476 +2440 +5816 +6400 +4198 +2356 + +6537 +2596 +5678 +7605 +1882 +4329 +7488 +6548 +3687 +2827 +1461 + +4933 +4880 +1169 +4190 +5993 +5452 +5131 +3310 +5996 +2670 +1972 +4666 +3296 +3978 +4119 + +1372 +2160 +1268 +3378 +5672 +2384 +2772 +2513 +3534 +1372 +4691 +4311 +3016 +5941 +5035 + +3644 +2169 +5597 +1874 +1841 +1794 +2331 +4907 +1607 +3104 +1893 +2026 +4297 +4078 + +7561 +8745 +10249 +2438 +4872 +5647 +7849 +6634 + +21402 +34212 + +2268 +2107 +3715 +6236 +3881 +6741 +6475 +2999 +4231 +3936 +4840 + +2318 +5735 +19378 +7775 + +1848 +12168 + +3324 +5284 +6502 +5135 +2887 +5849 +4107 +1065 +1236 +1572 +5308 +2337 +5741 +1705 + +4445 +3494 +4890 +3522 +3456 +3218 +7020 +3640 +4653 +4794 +6003 +4552 + +13971 +2866 +14359 +1749 +2761 + +8963 +2088 +6758 +16065 +4613 + +8406 +3200 +4467 +5892 +6549 +6360 +7789 +1592 +5334 +5007 + +9335 +9406 +12089 +10628 +8080 +1841 +6973 + +7553 +10626 +8661 +1747 +4561 +10772 + +3487 +2524 +2696 +4140 +4367 +2367 +6005 +2465 +2360 +3447 +1242 +6378 +4295 + +23471 +14744 +19137 + +15284 +10987 +1491 +17669 + +2182 +5750 +7466 +1965 +1274 +5648 +7230 +6127 +7768 +5246 +2758 + +7451 +6614 +6538 +6789 + +7381 +6243 +3806 +4838 +5163 +2962 +6748 +1982 +1049 +5178 +6590 +3739 + +1598 +4645 +5128 +3838 +4383 +2742 +1654 +2272 +5518 +1599 +2948 + +6939 +6508 +4072 +2196 +3589 +1905 +2221 +6003 +6090 +3612 +1791 +5525 +4015 + +27936 + +1695 +5271 +5888 +3809 +4023 +4690 + +4147 +14521 +18575 +11452 + +2886 +3542 +4260 +5414 +4207 +6920 +3285 +4103 +2480 +5378 +5062 +2587 +1473 + +6375 +5824 +2640 +1315 +8095 +1743 +3695 +7109 + +5281 +2346 +4972 +4967 +6804 +1448 +9301 +1234 + +52340 + +5369 +5911 +3839 +6600 +4474 +1724 +3595 +3585 +3513 +7336 +2277 +4851 + +7017 +12732 +9304 +12136 +6256 +12880 + +3559 +2147 +4293 +1481 +4349 +5624 +3611 +5194 +4575 +1662 +6141 +5599 +1199 +5901 + +29966 +20696 + +3317 +4398 +1493 +1730 +2417 +1597 +5310 +5163 +4484 +5160 +1890 +5695 +4027 +4393 + +13693 +6774 +7495 +9515 +9103 +12116 + +10203 +26377 + +6056 +5189 +3946 +3696 +4086 +6017 +7008 +5212 +2740 +7433 +3303 +6170 + +6140 +3588 +5969 +3308 +3063 +4591 +6575 + +1803 +8431 +1340 +5409 +12106 +5774 + +6812 +6740 +1025 +7512 +9778 +7297 +9872 +4269 + +7012 +1225 +6654 +4828 +4791 +1514 +4144 +5631 +6230 +2530 +6276 +2142 + +5884 +5873 +5068 +5132 +3739 +4874 +2798 +2461 +6577 +4926 +4343 +1450 + +68707 + +4992 +3372 +5660 +7139 +5052 +6115 +1749 +2810 +7021 +5529 +5782 +4395 + +1953 +4377 +6438 +1987 +5046 +3732 +4600 +5665 +5882 +1974 +6009 +3727 +1134 + +6339 +5628 +7716 +2740 +8091 +3185 +3877 +2099 +2812 + +1352 +1928 +2815 +7509 +1311 +6981 +4396 +4094 +3827 +2278 +2727 + +2249 +4138 +3251 +3581 +4657 +2234 +2070 +1525 +2206 +3512 +5139 +3792 +6039 +5885 + +5939 +1603 +6497 +4450 +4937 +1762 +1301 +4543 +6872 +4967 +1365 +5738 +2504 + +22837 +10301 +13380 + +3714 +1854 + +2320 +6723 +2994 +3402 +4840 +4613 +3460 +4068 +6575 +4539 +2139 +1206 +3238 + +1974 +11341 +4645 +12073 +2637 + +3876 +2380 +7305 +1130 +6134 +7401 +3911 +7322 +6264 +3299 +5164 +1688 + +5399 +3485 +6861 +4543 +10367 +10255 + +4451 +2902 +6043 +4384 +4023 +3587 +2836 +5649 +4765 +2051 +1471 +2365 +1038 +2452 + +11226 +13152 +4749 +9547 + +5099 +2983 +12118 +9251 +12847 +9391 + +23810 +22967 +13264 + +8898 +11599 +3103 +6687 +5592 +3559 + +14152 +2647 +9210 + +4675 +5105 +3400 +2991 +1688 +5839 +4746 +6007 +5103 +4212 +3419 +4335 +1974 +2035 +2263 + +3266 +1208 +4104 +5092 +1816 +4339 +4732 +1746 +2569 +5600 +2329 +1035 +4238 +6095 +5008 + +17154 +20316 +25661 + +1199 + +1285 +6497 +3073 +1862 +6437 +2001 +3807 +3519 +2338 +6727 +1258 +3402 +4825 + +6970 +8106 +9383 +12577 + +10963 +5485 +10936 +12139 +8948 +10772 +11053 + +24569 +16515 +12189 + +4741 +3247 +4106 +1423 +2540 +2549 +10404 +6570 + +10768 +23116 +9838 + +3655 +3142 +3835 +3542 +7419 +5830 +3956 +7272 +1539 +7260 +3636 +4308 + +1949 +5477 +3960 +1215 +2389 +5869 +5677 +2235 +4273 +6776 +5490 +5299 +4913 + +3272 +2331 +4138 +2958 +4780 +5427 +5949 +2894 +3669 +4201 +3000 +3387 +1227 +5110 +1990 + +7239 +18190 +17161 +16971 + +3742 +2960 +3810 +2564 +1972 +5363 +1675 +2370 +4486 +5243 +4833 +6036 +1590 +6058 + +4374 +3018 +4827 +4061 +2097 +4819 +2646 +6851 +3864 +1289 +3366 +3328 +2929 + +16680 +6361 +9020 +14141 + +12541 +12672 +12624 + +5794 +7699 +10020 +9455 +1716 +2567 +8294 +1179 + +8733 +6078 +10818 +2697 +10768 +5266 +5211 + +9435 +7619 +3382 +14870 +2752 + +5089 +1720 +1836 +6485 +6459 +4323 +5068 +5987 +2588 +6906 +6899 +4500 + +6132 +4466 +5913 +1613 +5151 +3915 +4656 +3483 +2387 +1811 +6147 +5757 +6699 + +4541 +1357 +5762 +1877 +2240 +4025 +5053 +1079 +6121 +8030 +5597 + +2463 +2185 +2126 +4766 +2069 +4302 +2072 +5028 +1581 +2359 +1914 +4554 +3730 +4141 +1625 + +5440 +7109 +6947 +4241 +7812 +7923 +9238 +6317 +4657 + +8064 +5655 +8309 +5404 +4639 +8986 +2719 +3403 +2541 + +6183 +5137 +7918 +7159 +3194 +3628 +5371 +1554 +3641 +5394 +6931 + +11367 +16399 +9440 +3911 + +7952 +5780 +9026 +1500 +3848 +8218 +9643 +6783 + +1841 +5956 +1547 +5079 +6979 +7912 +2992 +6197 +8715 + +31416 +13515 + +5752 +6402 +5541 +2444 +2944 +3826 +6410 +6654 +6195 +3130 +1380 +6102 +5668 + +3732 +5016 +1813 +5901 +2438 +1416 +8290 +5437 +2402 +7254 + +31293 +6165 + +24947 + +10582 +24078 +25144 + +11476 +12288 +4678 +4895 +16179 + +2580 +6573 +13083 +5326 +5067 + +30550 + +14659 +2596 +9144 +17320 + +3546 +14239 +16336 +15317 +5453 + +3977 +4131 +1046 +6956 +5174 +10004 +8796 +7734 + +3761 +4088 +2898 +6563 +1891 +3269 +1152 +4755 +3098 +5713 +4203 +2498 +2648 + +21485 +22269 + +1620 +1960 +2738 +2963 +1404 +1649 +7600 +1930 +3740 +5450 +7719 + +3500 +7419 +4550 +3240 +4553 +2453 +1545 +7036 +6217 +1822 +7939 + +17049 +12540 +17626 + +3626 +10619 +10814 +4500 +3733 +9168 +5404 + +3069 +6699 +2440 +5847 +2373 +4696 +6403 +3330 +6840 +5094 +7211 + +1378 +7603 +2366 +7951 +9178 +4302 +3611 +4883 + +6816 +4009 +6047 +1044 +1252 +2401 +6354 +4211 +5248 +2811 +1746 +2959 + +2576 +5322 +4474 +5253 +3873 +6448 +1624 +1986 +1986 +2540 +2250 +5397 +4203 +5733 + +1853 +5903 +5337 +1648 +7813 +8378 +5571 +5351 +6403 + +6127 +5397 +2123 +1893 +4920 +6195 +5524 +6428 +4728 +3850 +4327 +2792 +2969 +2220 + +1591 +4847 +2415 +1107 +1986 +3466 +6095 +7735 +4027 +2370 +7637 + +3856 +11292 +2699 +14112 +3518 + +5427 +2633 +6628 +2393 +3645 +2730 +6007 +3798 +1715 +2521 +5221 +5755 +6318 + +5191 +4058 +3958 +1219 +1664 +2551 +3534 +6406 +5722 +4383 +2105 +6376 +1774 +6175 + +14330 +9855 +17946 + +3386 +4396 +3669 +1958 +3971 +1358 +5917 +6026 +4452 +1188 +3052 +2668 +1651 +5408 +4088 + +5749 +2369 +2628 +4214 +1375 +3109 +2788 +6028 +4984 +3822 +4667 +6093 +3474 + +1556 +6494 +3916 +5611 +4326 +6483 +2510 +6131 +3110 +2554 +1847 +5859 +2238 + +1047 +11827 +3359 +8841 +11232 +5803 +9220 + +5555 +6553 +3903 +3149 +5458 +10593 +8455 +10770 + +10630 +7727 +6683 +4610 +7987 +7038 +9909 +4599 + +4637 +1682 +4114 +4940 +2386 +3909 +3110 +1393 + +6153 +4700 +5461 +7641 +2153 +5363 + +63414 + +4467 +1956 +5073 +1822 +9426 +3549 +6866 +4901 +9317 + +19947 +11533 +16836 +18062 + +7143 +5185 +13258 +3803 + +5299 +2684 +2610 +3416 +1783 +5055 +2894 +1164 +4200 +4558 +4380 +3465 +3395 + +4672 +2427 +6915 +2155 +3306 +4559 +2674 +2230 +6649 +7296 +3433 + +2191 +4437 +4644 +6313 +1187 +1602 +6811 +1299 +1541 +4973 +2073 +2231 +4216 + +4893 +8788 +5585 +10703 +9517 +6913 +1333 + +11440 +25326 +18092 + +10121 +6807 +4589 +6972 +5842 +8278 +6672 +4871 + +13690 +7766 +7778 +12899 +3329 +4407 + +7659 +15344 +17263 +13394 + +6028 +9037 +2459 +8859 +6934 +5789 +5622 +5893 +8267 + +10362 + +5313 +5005 +6354 +3387 +2019 +4933 +4843 +1508 +4066 +1121 +5027 +2157 +2712 +5325 + +35049 + +2068 +2489 +2968 +3176 +2835 +1518 +5949 +1106 +1685 +1485 +3896 +4946 + +5681 +7841 +5218 +5573 +2042 +5725 +6117 +3882 +5360 +1299 +3584 + +6516 +2684 +6887 +1375 +4296 +7171 +7693 +4603 +8239 + +7661 +8996 +3419 +4736 +5552 +7873 +8297 +4376 + +5516 +3278 +2425 +3308 +7722 +5739 +5177 +6738 +9194 + +13795 +12863 +8108 +9938 +2374 +12314 + +4931 +6334 +6636 +6256 +1945 +8716 +7054 +2035 +6715 +2180 + +21075 +7049 +23573 + +6985 +9970 +9153 +10475 +4568 +6395 +5514 +2117 + +4115 +2844 +1399 +3535 +4606 +1103 +1443 +5323 +4760 +3992 +5580 +1494 +3193 +5242 +4359 + +5161 +4143 +7753 +3973 +4318 +5862 + +1093 +1436 +1444 +4439 +1387 +2114 +4263 +5738 +4607 +5261 +4509 +1389 +4886 +4671 +1154 + +13316 +14156 +1452 +11726 +4234 + +8647 +7076 +1481 +1740 +6584 +4276 +1502 +1675 +4012 +7089 + +8636 +8325 +8445 +4384 +4778 +8110 +10100 +3155 + +19339 +8585 +5973 +9399 + +1783 +15809 +1729 + +3964 +1092 +5948 +8653 +2149 +3494 +7388 +7876 +9334 + +1211 +4258 +1428 +1096 +3758 +1416 +5969 +5451 +4933 +1057 +1399 +5513 +3655 +3350 +1564 + +4917 +3980 +5441 +1532 +5716 +2371 +1617 +3153 +1022 +1540 +3450 +2297 +1505 +5188 +2649 + +2683 +2317 +5457 +9576 +8251 +8707 +1755 +7220 + +4412 +10875 +10547 +6061 +6221 +2062 +9465 + +3382 +5259 +3723 +3240 +5556 +4985 +4318 +5831 +2944 +1993 +2127 +4208 +3354 + +6909 +7400 +4076 +3987 +1663 +7575 +7573 +8001 +1510 +3691 + +7569 +9266 +1750 +4823 +6919 +5647 +2972 +8801 +8260 + +3683 +5566 +8718 +4320 +7857 +2501 +1559 +8947 + +2798 +4808 +3952 +5628 +2242 +1378 +4920 +10266 + +1457 +7199 +1838 +5849 +6482 +4068 +7236 +1668 +2691 + +15285 +10046 +11923 + +1030 +2698 +3211 +7630 +4617 +3383 +1296 +7816 +6360 +7323 +3514 + +17686 +34956 + +7398 +2970 +5451 +1272 +1456 +6877 +2549 +4228 +5946 +6077 +6451 +6957 + +4599 +2727 +2828 +3147 +1487 +2387 +5140 +5558 +6931 + +4933 +6113 +2104 +6548 +5215 +5627 +6464 +3672 +6387 +3110 +1809 +2780 +1446 + +5186 +1672 +2253 +3198 +2294 +2995 +5943 +3154 +3667 +5065 +2833 +4049 +2298 +5234 +2856 + +3558 +2069 +2723 +3908 +6045 +2393 +4610 +1637 +4515 +3961 +1013 +1420 +3111 +1729 + +17556 +18719 +8542 +7803 + +1261 +4761 +5767 +4098 +3474 +6178 +6008 +8514 +1956 + +7007 +4158 +2967 +7673 +5076 +7086 +1105 +7095 +5155 +5637 +2208 + +4953 +5303 +5460 +5146 +2388 +2298 +1295 +6414 +6323 +4793 +5755 +3878 +1985 +2872 + +7697 +4701 +1005 +6777 +1763 +5264 +6781 +6600 +1924 +1746 +6696 + +3932 +3387 +4831 +5621 +5502 +1486 +6377 +6891 +5189 +6879 +2991 +2986 +3450 + +2929 +2641 +2704 +2693 +6820 +3719 +1908 +2612 +6381 +3258 +1002 +5008 + +7366 +34310 + +2798 +5125 +8729 +4928 +1009 +6350 +7994 +2082 +6524 +6253 + +1723 +1469 +2474 +4565 +1985 +3861 +5804 +3481 +4338 +3580 +2814 +2346 +1635 +4627 + +13779 +15932 +16875 +2148 + +8405 +11181 +7324 +10246 +11640 +9061 +2999 + +2635 +1534 +1223 +1013 +4713 +5928 +5200 +4605 +4520 +1525 +6818 +4778 +3059 + +3802 +2391 +8430 +10838 +5125 +3233 +11733 + +47671 + +11952 +2923 +3109 +4817 +4190 +3666 +11952 + +8561 +7214 +4010 +7247 +7555 +7647 +3618 +8425 + +2971 +3620 +5747 +7010 +5404 +2331 +2841 +8718 +2043 +5788 + +2245 +4763 +6360 +5985 +2177 +6117 +7552 +1784 +4680 +2854 + +6924 +1946 +5473 +3555 +1298 +1934 +10754 +8047 + +9028 +1819 +2994 +5197 +8253 +9841 + +6533 +1279 +4728 +3839 +1054 +2440 +2416 +2840 +4875 + +5537 +5579 +6856 +4320 +3616 +2177 +6398 +3270 +2763 +1654 +3765 +3727 +3373 + +6348 +1050 +4641 +4267 +5765 +7125 +2146 +2032 +5863 +3712 +6506 +5430 + +5288 +7292 +9531 +7158 +11662 + +8798 +8981 +9789 +16908 + +5016 +13660 +8515 +5994 + +4023 +6670 +6553 +4764 +1253 +3340 +5925 +1400 +2684 +5796 +1678 +3324 + +5489 +1836 +19472 +11219 + +1799 +4055 +7191 +3511 +9603 +3607 +4621 +8520 +8535 + +2786 +4514 +3546 +6248 +1984 +3742 +2448 +2319 +3698 +1658 +3949 +6408 +3281 +3804 + +7413 +3530 +8579 +19575 + +13921 +5842 +12657 +1413 +9693 +2867 + +1456 +4298 +1496 +6437 +4283 +2442 +3605 +5482 +6000 +3628 +2020 +2812 +2219 +3000 + +7965 +3790 +9640 +10772 +9856 +7923 +10390 + +6009 +2604 +8201 +11341 +7748 +6987 + +60028 + +7101 +5285 +9589 +11810 +11534 +4085 +1902 + +2519 +9496 +2703 + +3854 +5685 +3541 +3317 +2262 +5910 +3642 +3461 +5759 +3899 +1461 +2692 +6095 +4992 +3739 + +9302 +4237 +7146 +11412 +9320 +9865 +11517 diff --git a/src/adventofcode2022/data/day_02/day02.txt b/src/adventofcode2022/data/day_02/day02.txt new file mode 100644 index 00000000..5525ccf3 --- /dev/null +++ b/src/adventofcode2022/data/day_02/day02.txt @@ -0,0 +1,2500 @@ +B Y +A Z +C Z +A Y +A Y +B Y +C Y +A Y +B Y +B Y +A Y +B Z +B Y +A Y +C Y +B X +B Y +B Y +B Y +C Y +B Y +A Y +B Y +A Y +B Y +C Y +A Y +B X +B Y +B Y +B X +B Y +C Y +B Y +C Z +A X +B Y +B Y +A Z +B X +C Y +C Z +B Y +B Y +A Y +B X +B Y +B Y +B X +B Y +C Y +A Y +B Y +C Y +C X +B X +B X +A Z +C Y +B Y +C Z +B X +B Y +B Y +B X +B Y +B Z +B Y +B Y +B X +B Y +B X +C X +B Y +B X +A Y +B Y +B X +B Y +A Y +B X +B X +B Y +A Y +B Y +B Y +B Y +C Z +B X +B Y +B X +B X +B Y +B X +C Z +B Y +B Y +B Y +B Y +B Y +B X +A Y +B Y +C Y +C Z +A Y +B Y +A Y +C Z +B Y +B X +B Y +C X +A Y +B X +B Y +B X +B X +B X +A Y +C Z +B Y +A Y +B X +A Y +B Y +A Y +B X +B Y +B Y +B Y +B X +B X +C Z +B Z +B Y +B X +C Y +C Y +C Z +C X +C Y +B Y +B X +A Y +A Y +B X +C Z +B X +C X +B X +B Y +B Y +A Z +B Z +C Y +C Y +B Y +B Y +C Y +C Y +C Z +B Y +B X +B Y +B Y +C Y +B Y +B Y +B Y +B Y +B Y +C Y +A Z +B X +B Y +C Z +B Y +C Y +B Y +B X +C Y +B Y +B X +C Y +B Y +B Y +B Y +A Y +B X +B X +B Y +B Y +B X +C Z +B Y +A Y +A Y +B X +C X +A Y +B X +B X +B Y +B Y +A Y +C Y +C Z +C Y +B Y +B Y +A Y +A Y +A Y +B Y +B Y +A X +B Y +B Y +B X +B X +C Z +B X +B X +A Y +A Y +A Y +B Y +B Y +C Y +B X +A Y +B Y +C Z +B X +A Y +C Z +A Y +B X +C Y +B Y +B Y +C Y +B X +B X +B Y +B Y +B Y +B Y +A Y +B X +B X +B Y +A Y +B Z +A Y +B Y +C Y +B Y +B Y +B X +C Z +B Y +B Y +B X +B X +C Z +B Y +A Y +B Y +B X +C Y +A Z +C Z +B Y +B Y +B X +C Y +C X +B X +C Y +C Z +B X +B Y +B Y +C Z +B X +C X +A Z +A Y +B X +C X +B Y +A Z +A Z +A Y +B X +A Y +B Y +B Y +C Z +B X +A Z +B Y +B X +A Y +B Y +C Y +B Y +B X +B X +A Z +B Y +B Y +C Z +B X +B X +B Y +C Z +B X +B X +C Z +B X +A Y +B X +C Z +A Y +C X +B Y +B X +B Y +B Y +C Y +B X +A Z +A Y +B X +A Z +B X +B Y +B Y +A Z +C X +B Y +B Y +B Y +A Z +B Y +B X +C Y +C Z +B X +B Y +B Y +B Y +C Y +A Z +B Y +C Z +C X +B Y +C Y +B Y +B X +B Y +B Y +A Y +B Y +B Y +C Z +A Z +B X +C Y +B Y +B Y +B Y +A Y +A Y +B Y +A Y +B Y +A Y +B X +C Y +B Y +C X +A X +B X +A Y +C Y +B Y +A X +B X +A Z +B X +B Y +B Y +B X +B Y +B Y +B X +A Y +A Z +C Z +B Y +B Y +B X +C Z +C Z +B Y +A Y +B X +C Z +A Y +B X +B Z +B Y +B Y +B Y +B X +B Y +B X +B X +B Y +C Y +B Y +B Y +B Y +B Y +B Y +C Z +B X +B Y +B Y +B Y +B X +B X +C Y +B X +B X +C Z +B Y +B Y +B Y +B Y +B Y +C Y +B Y +B Y +B Y +B X +B Y +B X +B Y +B Y +C X +B Y +C X +B X +C Z +C X +B Y +A Y +A Z +A Y +C Y +B X +B Y +B Y +C Z +A Z +B Y +B Y +B Y +B Y +B Y +B Y +B Y +C Y +B Y +C Y +C X +B X +B X +C Z +A X +B X +B Y +A Y +B X +B Y +A Z +B Y +C Y +B X +B Y +B Y +C Y +C Y +B Y +B X +B X +B Y +B Y +B Y +B Y +C Z +B X +B Y +B Y +B X +B Y +B X +B X +B Y +B X +B Y +B Y +C Y +B X +B Y +B Y +B Y +A Y +B Y +A Z +B Y +C Y +C Y +B Y +B X +A X +B Y +A Y +B X +B Y +B Y +B X +C Y +C Z +B X +B Y +A Y +C Y +A Z +C Y +B Y +B Y +B Y +B X +C Y +B Y +B Y +A Y +A X +B Y +B X +B Y +B Y +A Y +B X +C X +B Y +A Y +C Y +B Y +B Y +A Y +C Y +A Y +C Y +B Y +B X +C Y +C Y +B Y +B Y +A Y +B Y +B Y +B Y +C Z +B X +B Y +B X +B X +A X +A Y +B Y +B X +A Z +B X +A Y +B Y +C Y +C Y +C Y +B Y +A Y +A Y +B Y +B Y +B Z +B Y +B X +A Y +B X +A Z +B Y +B Y +B X +B Y +C Y +A Z +B Y +C X +C Y +B Y +B Y +C X +B Y +A Y +A Y +C Z +B X +B X +B X +B X +B Y +C Z +B X +C Y +A Y +B Y +A Y +B Y +A Y +B Y +B Y +C Y +B Y +B Y +B X +B Y +B X +B Y +B X +B Y +A Z +C X +B X +C X +B X +A Y +C Y +B X +C Y +B X +B X +C Z +C Y +B X +B X +B X +B Y +C Y +B X +B X +A Z +B Y +B Y +C Y +B X +C Z +C Y +A Y +B X +C Y +C X +B Y +B Y +A X +B Y +B X +B Y +B X +C Y +B X +A Y +B Y +B X +B Y +B Y +B Y +C Y +C Y +C Y +C Y +B X +B Y +A Z +B X +B X +B Y +B Y +C Z +B Y +B X +B Y +B X +C Y +B Y +C Z +A X +B X +B Y +C Y +C X +B X +B X +B Y +B Y +B Y +B X +B Y +B Y +B X +C Z +B Y +B Y +B X +B X +B Y +B X +C Z +A Z +C X +C X +B Y +B X +A Y +B Y +B X +C Z +A X +B X +B Y +B X +B X +B Y +B Y +A Z +B X +A Y +A Y +B Y +B X +B Y +C Y +A Y +A Y +B X +B Z +C Y +C Y +B Y +C X +B X +C Z +C Z +B Y +C X +A Y +B Y +B X +A Y +B Y +C X +B Y +B X +B Y +C Z +A X +A Z +B Y +B Y +B X +B X +A Y +B Y +B X +B Y +C Y +B Y +B X +C Z +C X +C Y +A Y +B Y +A Y +B Y +B Y +B X +B X +A Y +A Y +B Y +B Y +B Y +A Y +B Y +B Y +B Y +C Z +A Z +C Y +B Y +B X +C Y +A Z +B X +B Y +A Z +C Y +B Y +B X +B Y +B Y +A Y +B X +B Z +B X +B X +B X +B X +B Y +B Y +B X +B Y +C Y +C X +C Z +B Y +B Y +C Y +A Y +B X +B X +B Y +B X +B Y +B Y +A Y +B Y +B Y +B Y +B Y +A Y +B X +C Z +B Y +B Y +B Y +B X +B Y +C Y +B X +B X +A Y +A X +A Y +C X +C Y +B Y +B Y +C Y +B X +B Y +B Y +C Y +B X +C X +B X +C Y +B Y +B X +B X +B Y +C X +B X +B Y +B X +B X +B Y +B X +B Y +B Y +B Y +C Y +B Y +B Y +C Z +B Y +B X +C Y +B Y +B Y +B X +B Y +A Y +B Y +A Y +B Y +B Y +A Z +B X +B Y +B Y +C Z +B X +B X +B Y +B Y +B Y +B X +C Y +C Y +B X +B Z +A X +B Z +C Y +B X +B X +A X +B Y +B X +C Z +C Y +B X +B Y +B Y +B Y +C Z +B Y +C Y +C Y +A Y +B X +B Y +B Y +B Y +A X +B Y +B Y +B X +B X +A Y +B X +B Y +A Z +B Y +C Z +B X +B Y +B Y +A Y +A Y +B Y +B Y +B Y +B Y +C Y +C Z +B X +B X +B Y +B Y +B X +B X +A X +A Y +B Y +B Y +B X +B Y +A Y +B Z +B X +C Z +B Y +B X +B X +B Y +B Y +B Y +C Y +C X +B X +C Z +B Z +B X +B X +C Z +C Y +B X +A Z +C Y +A Y +B X +B Y +C Z +B Y +B Y +B X +B Y +C Z +B Y +A Y +B X +B X +B X +C Y +B X +B Y +B X +B Y +B Y +A X +C Y +A Y +C Y +B X +B Y +B X +B X +B Y +B Y +B Y +B Y +B Y +B Z +B Y +A X +C Z +B X +A Y +C Z +B Y +C X +A Y +C Y +C X +B Y +B X +B X +C Z +C Y +A Z +C Y +A Y +B Z +A Y +B X +C X +A Z +C X +B Y +C X +B Y +A Y +A X +B X +B Y +B X +B X +B X +A Y +B Y +B X +B Y +A X +B Y +C X +B Y +B X +B Y +A Y +B X +B Y +B X +B Y +B X +B Y +B Y +A Z +A X +B Y +C Z +B Y +B Y +B Y +B Y +C Y +B Y +A Y +A Y +C Z +C Y +B Y +A Y +B Y +B X +A Y +C Y +B Y +B Y +A Y +B Y +A X +C X +B Y +B Y +C X +B Y +B X +A X +B Y +B Y +B Y +B X +B X +A Z +B Y +A X +B X +A Z +B X +C Z +B Y +B Y +B Y +B X +B Y +B Y +C Y +B Y +B X +A Y +C Z +B Y +B X +A Y +C Y +B X +B Y +B Y +C Z +A Y +B X +B Y +B X +B X +C X +B Z +C Y +B Y +B Y +B X +B Y +C Y +C Y +C Y +B Y +A Y +C Z +B Y +C X +C Y +B Y +B Y +A Z +B X +A Y +A Y +A Z +B X +A Y +C Z +B Y +B Y +A X +B X +B Y +C Z +B Y +B Y +B X +B Y +B X +B X +A X +C Y +C Y +C Y +B Y +B Y +C Z +B Y +B X +C X +B Y +C Z +B X +B Y +B Y +B Y +B X +B Y +B X +B X +B Y +B Y +B Y +B Y +B X +B Y +B Y +C Z +B X +B Y +C Y +B X +B Z +B Y +C Z +C Y +B Y +A Z +A Y +B X +B Y +C Y +A X +A Y +B X +B Y +C Z +B Y +C X +A Y +C Y +B Y +B X +B Y +B Y +B Y +B X +B Y +C X +A Z +B X +C Y +A Y +B X +B Y +B X +B Y +C X +A Y +A Y +C Z +B Y +C Y +B Y +B Y +B Y +B Y +B Y +C Y +A Y +B Y +B X +C Y +B Y +B Y +A Z +B Y +B Y +B X +B Y +B Y +B X +A Y +A Z +B X +B X +C Y +B Y +B X +C Y +B Y +A X +B X +B Y +A Z +B Y +B Y +B Y +B Y +B X +A X +B X +C Y +B Y +B Y +B X +C Y +B Y +B X +B Y +B X +A X +B Y +A Y +B X +C X +B Y +C Z +B Y +B Y +C Y +B Y +C X +B Y +B X +A Z +B Y +B X +B Y +A Y +B Y +B X +B X +B X +B Y +B Y +B Y +A Y +C X +B X +B X +C Z +B Y +A Y +A Z +A Y +B Y +B Y +B X +C X +C Y +C Z +B Y +B Y +B Y +B Y +B Y +B X +C Y +B Y +B Y +B X +B X +B Y +B Y +A Y +A Y +A Y +B X +B X +C Y +B Y +A Z +B X +C Y +B Y +B X +B Y +B Y +A Y +A Y +B Y +B Y +B X +B X +A Y +A X +A Z +C X +A Z +B X +B Y +C Y +A X +B X +C Z +B Y +C Y +A Y +C X +B Y +C X +A Y +B Y +B X +B Y +A X +B X +B X +B Y +B Y +B Y +B X +B Y +B X +B Y +A X +B Y +B X +B Y +B Y +B Y +B X +B X +A Y +B Y +A Z +B Y +B X +C Z +B X +B Y +B Y +B Y +B X +C Y +B Y +B Y +A Y +B X +B X +B Y +B Y +A Y +B Y +B X +B Y +B X +B Y +C X +C Y +B X +B X +B X +C Z +B Y +B Y +B X +B X +B Y +A Y +B Y +C X +A Y +B Y +B Y +C X +B X +A Y +C X +B Y +B X +C Z +B X +B Y +A Y +B Y +B X +C Y +A Y +B Y +A X +B Y +C Y +C X +B Y +B X +A Z +B Y +B Y +B X +B Y +B Y +B X +B Y +C Y +B X +B Y +B X +B X +C Y +B X +B X +A Y +B X +B Y +B Y +B Y +B Y +B Y +B Y +B Y +C X +B X +B X +A Y +B Y +A Y +B X +B Y +A Y +B Y +A Z +B X +A Y +C Z +A Y +A Z +B X +B Y +A Y +B X +B X +B Y +B Y +A Z +A Y +B X +C Y +B Y +B Z +C X +C X +B X +A Y +B X +B Y +B Y +A X +B Y +A X +B Y +A Y +B X +B X +A Z +A Y +A Y +C Z +B Y +B Y +C Z +B Y +B X +C Y +B Y +B X +A Y +B Y +B X +C X +C X +B Y +A Y +B Y +B Y +B Y +B X +A Y +B Y +B Y +A Y +B Y +B X +B X +C Y +C X +B Y +C X +B Y +C Y +B X +B Y +B X +B Y +B Y +B X +B Y +B Y +C Y +B X +B Y +B X +B Y +A Y +B X +A Y +B X +B Y +B X +C X +C Y +B Y +B X +B Y +B Y +B X +B Y +B Y +A Y +B Y +B X +B Y +B X +C Y +A Y +B Y +B X +B Z +B Y +B X +C Y +B Y +C Y +C Y +B X +C Z +B X +C Y +B Y +A Y +B Y +A X +B Y +B Y +B Y +B Y +A Z +B Y +B Y +A Y +C Y +B Y +B X +B Y +B X +B Y +B Z +B X +B X +B Y +B Y +B Y +B X +B Y +B X +B Y +B Y +A Y +C Z +B Y +B Y +B X +B X +B X +B Y +A Y +A Y +B X +B Y +B X +A X +B Y +B Y +C Y +A Y +C Z +A Z +A Y +B Y +B Y +B Y +B Y +B Y +C X +B Y +A Y +C X +C Y +B X +A Z +C Z +A Z +C Y +B X +B Y +B Y +B X +B Y +A Z +C Z +C X +B X +B Z +A Y +C Y +C Y +C Y +A Y +C X +B X +C Y +C Y +B Y +B Y +A Y +B Y +A Y +A Y +B X +B X +C Y +B Y +C Y +B Y +B Z +B Y +A Y +B X +B Y +A X +B X +B Y +B Y +C Y +B Y +C Z +B Z +A Y +A Y +A Y +B Y +B X +B Y +A Y +C X +B X +B Y +B X +C X +B Y +B X +B Y +B Y +B X +A Y +A Y +B Y +B Y +B Y +A Z +B Y +B Y +B Y +B Y +B Y +B X +B Y +B Y +B Y +B Y +B Y +B X +B X +B X +A X +C Y +C X +C Z +C Y +B X +B Y +A Z +B Y +C Y +B Y +B X +B Y +A Y +B X +B X +B X +C Y +B Y +B Y +B Y +B X +B Y +B Y +B Y +B Y +B Y +B Y +C X +B Y +A X +B X +C Z +B X +B Y +B X +B Y +C Y +B Y +B Y +B X +A Z +B Y +A X +B Y +C Z +C Y +B Y +B Y +B Y +C X +B Y +B Y +B X +A Y +C Z +B Y +B X +B Y +B Y +B Y +B X +B Y +B Y +B Y +C X +B X +B X +C Z +B Y +B Y +B X +A Z +B Y +B Y +C Y +C Y +A Y +C Y +A Y +B Y +B X +B Y +B X +C Y +B Y +B Y +B Y +B Y +B Y +C X +B X +B X +B Y +C X +C Z +B X +A Y +C Z +B X +B X +C Y +C Y +A Y +B Y +B X +B Y +B Y +A Z +A Z +B Y +B Y +B Y +B Y +B Y +B Y +B Y +B X +B Y +C Y +B Y +B X +A X +B Y +A Y +A Y +B Y +B Y +B X +B Y +B Y +C Y +A Y +B X +B X +B X +B Y +B Y +B Y +B Y +B X +B X +A Y +B X +B X +B X +B X +B Y +B X +A X +C Y +B Y +B Y +A Y +B Y +B X +C X +C Y +A Y +B Y +A Z +C Y +B Y +B Y +B Y +B X +B X +B Y +C X +B X +B Y +C X +B X +A Y +B Y +B X +B Y +B Y +B X +B Y +B Y +C Y +B X +B X +B X +A Y +B Y +B X +C Y +C Y +B X +A Y +B Y +C Y +B X +B Y +B X +B X +B Y +C Y +A Y +C Y +B X +C X +B Y +B X +A Y +C Y +B Y +B Y +B Y +C Z +C Y +A Z +A Y +B Y +B Y +B Y +B Y +A Y +B X +B Y +B Y +C Y +C X +B Y +B Y +B Y +B Y +B X +B X +B X +C Z +B Y +B Y +C Y +B X +B Y +B Y +A Z +B Y +C Z +B X +A Y +B X +B Y +A Y +A Z +A Z +B Z +B Y +B Y +A Y +C Z +B Y +C Z +B X +B Y +B Y +B Y +B Y +C Y +B X +B X +B X +B X +B X +B Y +A Z +A Y +B Y +B Y +B Y +C X +B Y +A Y +B Y +B Y +B X +B Y +C Y +A Z +A Y +C Y +C Z +B X +A Z +B X +B X +B Z +B Y +C Y +A Y +B Y +B Y +B X +C Z +B Y +B Y +A Z +A X +B Y +B X +B Y +B X +B X +B X +B X +A Y +B Y +A X +B X +B X +B Y +B X +B Y +B Y +A Y +B Y +C Y +A Z +A Y +B X +B Y +A Y +C X +B Y +C Y +B X +B Y +A Y +B Y +A Z +B Y +B Y +A Y +B X +C Y +B Y +B Y +C Z +B X +B Z +B Y +A Y +B Y +C X +B Y +B Y +B Y +B Y +B Y +C Z +C Z +B Y +C Y +C Z +A X +B Y +A Y +B X +B X +B Z +B X +A Y +B Y +B Y +B Y +A Z +C Y +B Y +B Y +C Y +C Z +C X +B Y +A X +B Y +A Y +C X +B Y +B Y +B Y +B Z +B X +B X +C Y +B X +B X +C Z +B Y +B X +B X +B Y +B Y +B X +C X +B Y +B Y +B X +A Y +B Y +C Y +B Y +A X +B Y +A Y +A Y +B Y +B X +B X +C X +B Y +B X +A Y +C X +A Y +B X +B Y +B Y +C Z +B X +B Y +B X +B Y +B Y +A Z +B Z +B Y +B Y +C Y +C X +C Y +C Y +B Y +B Y +B Y +C Y +A Z +A Z +B Y +B X +A Y +B X +B Y +A Y +B X +B Y +B X +C X +B Y +B Y +B X +B X +A Z +A Y +B Y +A Y +B Y +B X +B X +A Y +B X +B Y +B Y +B X +C X +C X +B Y +B Y +A Y +B X +B Y +B Y +B Y +B Y +C Y +B Y +C Z +B Y +B Y +C X +B X +B Y +B Y +B X +B X +B Y +B Y +B Y +B X +A Z +B Y +B X +C Z +B X +B Y +A Z +C Z +A Z +B X +B Y +B Y +B Y +B X +B Y +C Y +C X +C Y +A X +B Y +B Z +B Y +B Y +B Y +A Y +B X +B Y +C Y +B Y +B X +B X +B Y +B Y +B Y +C Z +B Y +B X +B Z +B X +B Y +B Y +B X +B X +A Y +B X +B X +B X +A Y +B X +B X +B Y +B X +A X +B Y +B Y +C Y +B X +B Y +B X +B X +C Y +B Y +B Y +B X +A X +C Y +C X +A Y +B X +B Y +B Y +B Y +B Y +B X +B Y +B Y +B Y +B Y +C Y +C Z +B Y +C X +B X +B Y +A Z +C X +B X +B Y +B Y +B X +B Y +B Y +B Y +B Y +B Y +B Y +B Y +C Y +B Y +C Y +B X +A Z +B Y +B X +A Y +B Y +B X +A Y +B X +B X +B X +B Y +B Y +B X +B Y +A Z +B Y +B Y +B Y +B Y +B Y +B Y +B Y +B Y +B X +B Y +B Y +A Y +B Y +B X +B X +C Y +C X +B Y +A Y +C Z +B X +B X +B Y +C Y +A Y +B Y +B Y +B X +B Y +B X +C Y +C Y +B Y +B X +B X +B Y +C Y +B Y +C Y +B Y +B Y +C Y +A Y +B Y +A Z +C X +B Y +B Y +B X +B X +C Z +B Y +B Y +B Y +B X +B X +A X +B X +B Z +B Y +B X +B X +B Y +B X +B X +B Y +B Y +B Y +B Y +A Y +B Y +B X +B Z +B Y +A X +A X +A Y +B Y +B Y +C Y +A Y +C Y +B Y +B X +B Y +B Y +B X +B Y +A Y +B Y +B Y +B X +B Y +A Y +B X +B Y diff --git a/src/adventofcode2022/data/day_03/day03.txt b/src/adventofcode2022/data/day_03/day03.txt new file mode 100644 index 00000000..0b6d449c --- /dev/null +++ b/src/adventofcode2022/data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rNrlnbnPTgFFpln +jvvQMMcLcjJmQwHdJvjQJnnbTbRFRphnnpsWgmFRPR +vTLHHCQLHBBjJCSZrVCZtSfSfrft +gHfHffHLjwHrRjLrLRZVMnTdTBsNTBwTVBsBnN +DWPhqhhDhvSGvWPzSzMBQBQVMMBBmvssvQvQ +CDGbqCDbChSbWGrHcHRgbcVcfrLJ +frlTLmtllbbbdpJS +qFjhzjThjHTFGHTjqhhjMzBhVpVpdbBnSJQRpBnVVdbRRQJd +vjWPWjWPPPWgwmfCrNvTvZ diff --git a/src/adventofcode2022/data/day_04/day04.txt b/src/adventofcode2022/data/day_04/day04.txt new file mode 100644 index 00000000..20a83ca7 --- /dev/null +++ b/src/adventofcode2022/data/day_04/day04.txt @@ -0,0 +1,1000 @@ +30-31,2-31 +6-92,4-5 +35-39,42-44 +35-95,35-95 +12-98,99-99 +10-15,16-94 +37-85,84-84 +2-23,31-56 +52-68,51-69 +47-62,25-52 +9-62,61-61 +78-99,77-99 +92-94,11-93 +77-83,62-76 +3-7,29-59 +12-96,96-97 +48-48,12-47 +72-86,71-86 +6-90,90-95 +5-92,2-4 +11-63,1-64 +72-72,72-82 +65-68,68-69 +3-99,5-99 +5-80,5-5 +40-93,41-93 +27-31,25-58 +6-93,93-93 +25-75,75-76 +31-78,79-79 +16-60,33-86 +38-65,39-97 +46-52,45-88 +13-64,12-80 +53-53,35-52 +32-38,12-30 +43-49,42-96 +4-23,24-77 +32-63,27-64 +46-72,23-73 +78-89,56-88 +42-78,79-79 +2-87,2-88 +51-57,57-58 +56-63,55-63 +2-12,21-62 +5-7,6-41 +57-86,87-92 +17-18,17-42 +11-84,7-10 +13-75,4-75 +15-76,14-14 +96-96,2-97 +68-94,43-95 +57-66,67-85 +5-52,20-88 +25-62,25-62 +3-82,81-83 +88-89,85-88 +31-49,30-68 +58-60,59-61 +16-33,15-16 +13-97,13-66 +4-87,10-86 +6-6,7-99 +33-35,34-98 +48-88,82-89 +31-73,30-74 +1-95,2-95 +11-87,10-86 +60-61,21-60 +51-91,51-52 +15-37,16-38 +5-10,10-32 +23-25,24-34 +21-40,21-40 +12-52,13-31 +10-10,10-94 +41-82,4-82 +5-48,6-34 +73-81,42-72 +62-77,76-82 +41-82,56-83 +19-52,18-39 +19-92,54-93 +2-39,2-40 +95-96,3-95 +7-70,6-92 +7-89,6-58 +67-88,68-80 +14-74,73-86 +41-41,33-40 +2-91,8-90 +69-81,11-80 +8-90,9-98 +62-87,86-86 +7-70,39-69 +4-9,3-12 +4-96,11-95 +1-21,3-22 +18-24,92-99 +34-87,7-90 +96-99,82-88 +6-50,6-34 +13-53,12-54 +2-98,3-95 +8-11,17-91 +26-92,3-56 +36-61,46-84 +86-86,22-85 +20-76,76-76 +21-80,21-30 +34-78,55-90 +12-96,11-95 +43-43,15-44 +54-88,53-89 +37-37,50-66 +23-95,7-11 +7-58,21-59 +3-5,4-68 +5-75,8-76 +42-68,42-67 +36-36,36-47 +9-69,9-92 +30-56,36-80 +12-85,13-84 +11-64,65-87 +41-60,60-61 +2-30,31-41 +23-60,9-35 +87-89,15-88 +4-97,96-98 +9-92,9-91 +40-66,66-66 +39-95,69-96 +48-87,23-47 +5-96,6-95 +18-66,19-65 +5-38,39-61 +12-92,93-93 +9-97,10-97 +16-51,50-67 +3-14,14-28 +7-7,8-88 +6-45,5-36 +58-58,40-58 +8-56,7-56 +5-15,6-14 +97-97,7-96 +26-70,27-94 +20-21,20-91 +3-16,3-13 +9-10,9-92 +16-81,67-94 +72-88,6-73 +4-88,3-68 +25-53,24-54 +63-75,63-74 +31-31,31-56 +1-84,1-83 +41-89,40-67 +4-53,5-54 +13-83,13-14 +11-87,11-86 +4-63,4-63 +9-96,8-97 +2-74,1-88 +40-83,39-83 +46-71,45-75 +4-74,74-75 +99-99,72-98 +33-51,52-82 +22-69,22-23 +35-36,36-91 +8-97,97-98 +18-20,19-94 +6-16,7-17 +35-36,36-97 +4-78,79-79 +14-69,4-14 +50-64,19-51 +10-31,15-17 +52-74,74-74 +42-91,90-91 +35-69,10-70 +1-3,4-4 +37-66,67-67 +6-92,73-74 +21-96,21-97 +6-37,6-68 +25-78,79-92 +78-88,65-75 +14-99,8-8 +39-66,54-67 +33-80,79-91 +15-83,84-84 +51-51,10-50 +72-80,72-81 +4-92,2-24 +33-93,92-94 +4-10,4-68 +8-94,7-96 +1-39,38-69 +6-36,36-37 +86-86,31-85 +77-94,76-96 +8-75,17-76 +7-93,7-45 +8-61,40-70 +17-29,32-94 +26-26,12-25 +14-94,10-12 +29-42,32-39 +2-91,2-3 +12-85,28-86 +57-70,71-90 +9-16,17-87 +17-55,18-55 +18-98,19-19 +88-88,22-87 +5-93,4-92 +75-76,76-84 +5-6,6-41 +42-94,36-41 +52-66,1-62 +5-82,4-4 +1-87,3-88 +47-58,56-61 +7-57,7-97 +39-93,33-93 +31-48,20-32 +18-81,19-82 +16-77,17-78 +2-2,4-43 +22-23,23-93 +10-11,15-68 +89-95,15-88 +19-69,18-18 +85-98,34-84 +47-73,29-52 +56-56,23-55 +2-97,2-94 +34-64,17-63 +46-46,47-75 +15-90,91-91 +63-63,35-62 +46-56,52-89 +82-90,82-90 +17-23,5-7 +7-79,8-79 +40-76,39-71 +81-82,11-99 +31-41,37-44 +97-98,1-98 +13-92,11-16 +63-63,3-62 +10-23,27-46 +18-99,19-80 +43-65,55-56 +14-14,14-20 +14-75,15-74 +24-75,12-45 +32-32,33-83 +4-92,2-3 +35-50,34-72 +11-90,91-91 +62-84,78-97 +64-64,24-65 +13-93,12-94 +70-89,58-88 +35-44,36-43 +57-90,91-91 +19-20,20-96 +33-96,26-87 +9-61,10-62 +2-81,1-3 +69-98,69-98 +60-66,64-97 +8-8,4-7 +33-76,32-77 +35-96,34-86 +87-92,66-86 +5-39,8-67 +27-78,79-80 +5-98,1-1 +6-79,5-95 +65-87,88-88 +50-98,49-49 +55-58,54-60 +13-97,12-96 +74-74,1-73 +12-61,64-74 +10-98,10-11 +68-70,17-69 +41-58,13-65 +7-77,6-77 +50-95,41-49 +4-68,2-4 +14-54,14-40 +59-93,60-82 +21-95,26-95 +41-81,41-62 +41-89,40-88 +21-39,22-40 +30-94,29-88 +1-93,1-93 +5-78,4-79 +15-86,85-87 +89-90,17-89 +47-85,48-85 +84-84,83-85 +6-98,6-6 +3-92,3-93 +9-9,8-60 +36-90,6-35 +57-61,56-58 +4-92,3-93 +7-69,8-69 +78-78,4-79 +52-93,53-93 +30-90,30-91 +58-78,77-79 +21-41,42-53 +16-37,6-38 +2-77,3-77 +6-55,17-69 +36-73,37-71 +93-94,26-93 +22-79,22-79 +11-92,91-93 +1-62,3-65 +9-65,8-64 +11-32,7-33 +5-94,2-5 +80-82,80-81 +46-77,45-76 +2-98,1-99 +2-4,6-68 +56-83,55-82 +12-14,13-98 +78-90,5-80 +3-69,2-2 +83-83,76-82 +3-99,1-1 +28-72,28-50 +57-67,32-54 +4-99,7-98 +18-18,19-48 +79-85,84-84 +83-89,81-87 +31-89,30-87 +49-72,49-71 +28-29,28-51 +48-97,1-47 +13-45,8-12 +24-75,25-75 +63-89,76-86 +16-23,15-16 +25-49,26-48 +17-94,16-88 +6-95,7-96 +87-90,86-89 +11-93,3-95 +6-66,5-65 +97-99,39-98 +23-66,24-65 +54-56,55-70 +92-97,26-90 +7-86,7-87 +60-78,77-79 +90-95,71-94 +32-87,33-87 +13-13,14-72 +12-86,6-87 +24-44,45-75 +5-96,5-97 +2-83,7-79 +95-97,1-90 +72-80,73-75 +11-85,12-86 +7-50,8-8 +35-99,55-79 +56-98,57-99 +6-87,7-87 +28-72,27-71 +20-77,78-83 +8-67,68-83 +10-68,9-9 +35-63,35-64 +90-90,90-90 +5-97,1-99 +10-93,9-19 +6-90,4-77 +46-75,80-97 +9-77,10-82 +73-88,74-81 +43-65,43-44 +66-82,66-81 +62-63,63-77 +35-76,11-77 +22-93,89-90 +3-96,2-3 +11-29,2-33 +75-82,62-81 +46-47,46-53 +9-99,8-98 +32-93,33-87 +47-51,52-60 +18-83,84-84 +31-70,31-69 +26-93,19-92 +93-93,4-92 +2-14,4-35 +1-98,36-99 +7-83,82-96 +95-95,32-95 +34-39,9-38 +2-63,62-93 +24-98,99-99 +26-50,89-93 +82-97,35-81 +22-33,16-33 +1-5,11-66 +9-63,9-63 +36-36,36-77 +5-98,6-99 +22-93,50-92 +89-92,89-93 +48-90,91-91 +6-88,7-89 +27-38,38-84 +9-87,11-40 +24-83,23-82 +1-69,1-68 +16-67,62-65 +13-15,1-85 +41-65,40-42 +19-77,20-77 +44-93,45-93 +27-94,94-97 +12-97,12-96 +9-38,8-48 +22-49,6-49 +12-18,13-52 +14-52,13-14 +12-51,13-52 +10-36,37-37 +14-72,13-15 +2-99,72-81 +21-34,22-22 +86-86,60-85 +20-36,20-20 +10-96,11-96 +14-24,15-23 +8-96,8-95 +16-22,22-23 +32-90,33-97 +7-31,32-67 +35-68,22-77 +3-69,5-69 +13-62,12-61 +26-32,27-32 +68-77,67-76 +5-99,6-98 +2-56,8-65 +96-99,11-67 +3-25,15-24 +25-91,84-90 +9-39,10-38 +24-94,23-24 +78-80,29-79 +4-47,5-85 +39-81,81-82 +33-33,13-32 +31-69,32-83 +19-95,17-21 +75-75,74-74 +14-89,15-98 +4-99,6-98 +60-90,59-66 +50-72,46-73 +26-84,25-49 +9-77,8-77 +48-99,49-94 +91-95,10-90 +7-63,24-64 +79-85,11-80 +98-99,20-82 +2-98,1-97 +56-68,54-67 +30-30,31-87 +89-96,58-88 +6-56,3-5 +12-49,15-62 +26-33,26-66 +18-18,19-98 +13-27,14-26 +12-15,3-19 +5-98,46-98 +4-89,3-90 +5-15,5-19 +85-88,45-87 +94-97,97-98 +24-34,34-77 +55-56,2-55 +6-86,7-87 +42-50,43-50 +16-57,17-58 +3-22,2-3 +56-57,56-96 +5-91,82-92 +30-53,53-54 +12-25,13-47 +72-90,90-91 +15-49,49-89 +5-81,6-37 +57-58,58-82 +11-65,2-10 +41-97,42-96 +55-71,54-70 +4-81,1-98 +2-65,1-49 +7-45,6-45 +98-98,8-98 +8-93,41-92 +1-90,2-98 +14-93,43-92 +66-97,98-98 +36-87,87-88 +2-62,4-61 +22-76,23-76 +49-54,50-55 +50-53,52-94 +45-95,75-96 +22-77,78-78 +71-73,72-86 +9-83,10-82 +1-56,53-54 +71-71,63-70 +7-73,7-8 +6-9,6-66 +10-98,97-98 +4-50,50-50 +7-95,7-91 +6-7,7-96 +73-73,1-73 +43-68,44-77 +26-30,25-31 +92-92,9-92 +88-89,1-88 +12-97,96-98 +91-91,59-90 +4-9,3-16 +16-97,96-96 +50-89,49-90 +94-96,84-95 +55-71,70-72 +16-90,5-16 +1-96,3-95 +5-35,7-34 +16-72,16-54 +3-99,1-2 +8-87,10-88 +10-98,10-98 +8-67,4-69 +23-79,72-72 +17-74,17-75 +57-77,77-78 +74-84,85-98 +22-64,30-65 +3-73,1-72 +1-78,31-91 +4-93,4-94 +51-88,51-79 +5-19,19-99 +68-68,31-67 +2-98,3-3 +48-63,47-64 +67-71,72-73 +9-42,9-54 +2-50,2-39 +53-53,3-54 +36-37,36-69 +63-74,64-73 +14-65,13-65 +41-94,98-98 +1-60,6-99 +95-98,80-94 +71-74,32-78 +31-31,31-31 +6-7,6-33 +5-95,96-98 +5-93,6-94 +52-88,51-89 +55-76,55-77 +4-98,3-96 +59-89,58-94 +10-88,9-86 +13-97,13-96 +18-97,10-16 +7-98,4-97 +84-85,14-84 +26-88,76-87 +52-72,71-81 +38-52,39-52 +22-88,1-89 +7-97,2-7 +4-25,3-25 +43-73,42-74 +26-26,25-47 +34-84,40-84 +8-69,7-68 +2-52,1-85 +52-60,52-61 +38-71,37-70 +28-86,27-85 +99-99,7-98 +45-67,8-81 +7-93,7-58 +37-56,28-56 +29-99,66-98 +78-98,7-97 +4-72,3-77 +1-3,2-73 +1-14,2-35 +12-13,12-95 +40-84,84-84 +12-56,28-47 +3-96,1-39 +58-74,74-74 +24-32,24-32 +11-91,5-10 +41-69,36-97 +9-92,8-59 +40-51,39-52 +97-99,16-96 +34-96,33-69 +68-86,30-87 +45-96,44-98 +12-89,6-12 +5-81,32-89 +5-8,6-9 +4-42,1-2 +32-42,79-96 +5-96,4-95 +54-62,12-62 +30-86,86-86 +50-58,58-58 +41-61,40-62 +1-99,2-99 +21-52,20-20 +17-69,1-17 +3-97,2-96 +35-37,36-57 +8-32,9-11 +3-4,4-99 +92-96,72-92 +2-3,2-90 +34-40,41-69 +81-98,65-80 +12-57,58-58 +39-40,14-39 +47-77,78-93 +5-5,6-91 +24-87,86-93 +31-80,30-80 +32-82,33-55 +61-75,62-74 +16-98,16-99 +19-21,22-86 +54-54,16-53 +40-74,21-28 +20-28,28-76 +94-96,47-71 +25-74,74-75 +39-81,3-67 +5-97,2-52 +21-63,62-62 +7-53,6-84 +60-88,59-60 +23-61,24-61 +76-93,77-94 +17-30,30-86 +10-23,9-77 +6-90,5-96 +38-69,37-39 +1-3,4-94 +73-74,3-74 +70-83,41-84 +72-79,78-83 +56-76,15-67 +92-92,6-93 +2-90,89-89 +19-19,20-90 +18-79,17-80 +11-11,2-16 +95-95,57-95 +51-93,52-86 +47-52,53-96 +1-5,13-43 +44-63,62-64 +43-97,42-42 +46-54,45-53 +7-61,8-21 +18-79,41-80 +54-56,28-55 +7-54,11-54 +12-61,62-62 +80-81,80-94 +38-39,38-76 +8-94,26-83 +3-66,2-4 +6-27,7-26 +2-96,71-86 +67-99,66-98 +28-73,27-90 +2-93,1-93 +80-95,72-94 +88-90,24-89 +93-93,22-93 +36-86,51-92 +25-63,24-63 +90-91,12-84 +9-46,10-46 +31-31,17-31 +51-52,49-51 +14-18,2-12 +72-73,64-73 +6-82,10-81 +58-84,15-15 +51-78,52-68 +54-56,60-68 +78-79,6-78 +96-96,95-96 +28-81,43-82 +5-95,5-5 +2-17,1-99 +10-94,9-61 +85-87,3-91 +2-73,14-72 +95-95,21-94 +17-57,37-81 +95-95,4-95 +28-84,12-93 +4-98,1-1 +96-97,7-97 +60-99,61-99 +97-97,7-98 +73-74,5-74 +59-94,60-60 +83-85,84-91 +2-5,5-40 +29-79,28-78 +37-67,26-54 +28-39,10-41 +84-84,85-85 +19-69,12-68 +29-31,30-32 +58-77,57-59 +17-25,24-26 +37-80,36-81 +16-84,16-97 +3-97,1-96 +7-63,7-64 +7-54,6-54 +14-47,13-46 +13-64,55-67 +19-36,35-35 +67-80,67-79 +8-66,5-35 +56-93,44-55 +6-74,15-90 +64-85,21-71 +22-22,23-27 +16-87,87-88 +80-82,81-84 +3-89,2-89 +43-95,16-96 +67-69,3-88 +8-82,4-95 +28-93,28-93 +23-62,22-24 +73-98,73-73 +84-92,91-91 +55-81,54-55 +52-60,40-59 +19-20,20-95 +30-90,29-90 +57-72,23-71 +71-74,74-75 +9-88,38-92 +44-89,43-90 +17-80,79-85 +60-67,59-67 +44-51,31-84 +79-80,15-79 +79-84,68-85 +97-98,30-96 +22-94,23-95 +95-95,1-95 +11-98,11-99 +49-92,82-91 +43-52,44-51 +76-86,51-81 +23-68,32-69 +22-40,22-23 +65-94,81-94 +36-89,88-90 +7-96,4-97 +6-6,9-19 +82-85,33-85 +65-67,66-93 +94-95,67-89 +85-85,77-84 +60-89,83-90 +6-21,2-75 +20-91,16-19 +95-97,51-94 +21-82,8-8 +16-19,20-83 +96-97,8-81 +34-90,5-94 +94-95,70-94 +27-80,27-81 +12-83,13-13 +91-94,8-92 +6-80,5-79 +12-21,12-20 +29-64,28-63 +32-72,23-71 +54-56,54-57 +68-69,11-68 +5-99,4-95 +34-55,35-56 +42-71,42-72 +21-94,93-96 +8-8,8-96 +26-99,25-97 +30-75,2-29 +27-58,28-52 +29-75,28-76 +3-77,3-78 +11-35,11-36 +26-43,38-41 +51-56,33-57 +19-21,20-98 +48-93,47-48 +2-81,31-75 +17-75,16-16 +57-82,48-48 +24-74,25-65 +20-20,21-21 +78-96,77-79 +4-97,4-98 +4-30,19-31 +11-97,10-89 +21-64,1-64 +31-99,16-98 +38-47,40-40 +27-95,12-17 +51-93,51-92 +90-91,6-91 +26-27,16-26 +3-78,1-1 +51-51,52-92 +38-42,32-36 +36-46,10-67 +7-70,6-71 +52-81,51-81 +74-74,75-84 +28-64,29-29 +15-47,15-16 +4-94,95-95 +15-65,15-97 +98-98,1-99 +41-97,42-98 +84-94,90-95 +15-82,83-83 +3-10,10-73 +90-97,5-96 +29-81,29-45 +64-93,5-99 +26-95,25-26 +37-49,38-50 +32-96,10-33 +28-30,28-31 +18-75,19-75 +49-51,17-50 +16-46,15-17 +3-4,3-95 +7-30,30-31 +9-96,9-95 +22-38,18-39 +29-32,50-89 +98-99,1-99 +81-97,9-83 +32-38,64-69 +35-52,51-53 +17-96,17-98 +14-97,98-98 +10-66,11-65 +4-91,4-91 +52-76,73-74 +17-17,16-17 +6-73,7-74 +9-90,9-89 +42-74,42-84 +68-77,69-77 +42-79,40-51 +15-89,15-90 +4-86,3-3 +43-46,40-46 +3-97,2-98 +13-26,12-97 +91-93,15-92 +4-89,4-99 +41-66,14-40 +30-71,31-71 +57-61,38-60 +36-99,35-98 +36-91,20-36 +80-81,16-80 +1-99,4-96 +24-80,25-80 +1-98,2-99 +17-43,17-44 +4-99,2-2 +11-46,11-45 +70-92,69-86 +15-15,3-14 +5-80,7-81 +33-91,52-60 +62-68,4-62 +23-33,22-33 +21-71,7-72 +41-63,40-62 +19-20,20-26 +9-87,8-86 +90-90,91-96 +31-32,50-68 +21-35,31-85 +14-98,15-15 +95-96,46-95 +9-64,10-21 +92-98,30-66 +66-86,79-95 +1-71,34-71 +31-92,91-93 +21-25,8-17 +17-49,1-69 +3-88,2-98 +54-86,53-55 +29-79,95-96 +4-25,3-25 +2-44,3-61 +34-85,33-35 +8-10,8-11 +95-97,45-98 +63-92,62-93 +61-79,60-80 +36-85,20-36 +45-71,10-53 +56-85,52-84 +40-86,41-86 +6-83,4-78 +18-53,19-54 +69-73,69-72 +3-76,75-75 +28-88,19-60 +3-85,10-85 +36-69,35-69 +58-82,57-82 +16-98,15-99 +71-84,84-85 +7-68,42-67 +3-69,70-70 +2-10,7-11 +59-91,27-91 +4-99,5-94 +71-84,30-70 +28-28,12-27 +52-88,14-26 +91-91,42-90 +6-56,5-42 +15-37,17-53 +10-86,86-87 +11-91,4-92 +46-46,19-45 +37-92,37-96 +58-60,35-59 +6-33,5-33 +34-34,13-34 +3-62,1-1 +33-64,49-61 +37-45,36-52 +13-96,8-82 +3-99,2-3 +41-66,27-67 +85-87,20-86 +9-26,8-25 diff --git a/src/adventofcode2022/data/day_05/day05.txt b/src/adventofcode2022/data/day_05/day05.txt new file mode 100644 index 00000000..7dfa16c4 --- /dev/null +++ b/src/adventofcode2022/data/day_05/day05.txt @@ -0,0 +1,511 @@ +[Q] [J] [H] +[G] [S] [Q] [Z] [P] +[P] [F] [M] [F] [F] [S] +[R] [R] [P] [F] [V] [D] [L] +[L] [W] [W] [D] [W] [S] [V] [G] +[C] [H] [H] [T] [D] [L] [M] [B] [B] +[T] [Q] [B] [S] [L] [C] [B] [J] [N] +[F] [N] [F] [V] [Q] [Z] [Z] [T] [Q] + 1 2 3 4 5 6 7 8 9 + +move 1 from 8 to 1 +move 1 from 6 to 1 +move 3 from 7 to 4 +move 3 from 2 to 9 +move 11 from 9 to 3 +move 1 from 6 to 9 +move 15 from 3 to 9 +move 5 from 2 to 3 +move 3 from 7 to 5 +move 6 from 9 to 3 +move 6 from 1 to 6 +move 2 from 3 to 7 +move 5 from 4 to 5 +move 7 from 9 to 4 +move 2 from 9 to 5 +move 10 from 4 to 2 +move 6 from 5 to 4 +move 2 from 7 to 6 +move 10 from 2 to 3 +move 21 from 3 to 5 +move 1 from 3 to 6 +move 3 from 6 to 9 +move 1 from 8 to 9 +move 5 from 4 to 5 +move 4 from 9 to 3 +move 17 from 5 to 1 +move 1 from 6 to 2 +move 16 from 5 to 1 +move 3 from 3 to 6 +move 6 from 6 to 4 +move 1 from 2 to 4 +move 4 from 1 to 2 +move 2 from 6 to 2 +move 28 from 1 to 3 +move 1 from 9 to 7 +move 1 from 8 to 7 +move 1 from 5 to 4 +move 1 from 2 to 6 +move 1 from 3 to 1 +move 3 from 2 to 5 +move 1 from 6 to 3 +move 4 from 4 to 7 +move 5 from 5 to 2 +move 1 from 5 to 6 +move 6 from 1 to 3 +move 1 from 6 to 2 +move 26 from 3 to 6 +move 2 from 7 to 9 +move 4 from 7 to 3 +move 19 from 6 to 3 +move 6 from 2 to 4 +move 5 from 3 to 2 +move 1 from 9 to 7 +move 26 from 3 to 8 +move 6 from 4 to 3 +move 1 from 3 to 8 +move 1 from 6 to 7 +move 6 from 3 to 6 +move 6 from 6 to 4 +move 1 from 9 to 2 +move 2 from 4 to 9 +move 22 from 8 to 2 +move 2 from 6 to 5 +move 1 from 9 to 1 +move 1 from 6 to 5 +move 1 from 7 to 5 +move 3 from 6 to 7 +move 2 from 6 to 1 +move 1 from 1 to 5 +move 3 from 5 to 9 +move 4 from 8 to 4 +move 2 from 1 to 4 +move 18 from 2 to 1 +move 2 from 7 to 8 +move 3 from 9 to 5 +move 8 from 1 to 9 +move 5 from 9 to 3 +move 1 from 9 to 8 +move 2 from 9 to 4 +move 2 from 7 to 8 +move 5 from 5 to 7 +move 1 from 9 to 3 +move 4 from 8 to 4 +move 1 from 7 to 8 +move 4 from 4 to 3 +move 2 from 8 to 3 +move 1 from 8 to 9 +move 2 from 1 to 8 +move 3 from 4 to 5 +move 1 from 8 to 4 +move 1 from 9 to 3 +move 1 from 8 to 5 +move 8 from 1 to 8 +move 11 from 2 to 9 +move 12 from 3 to 5 +move 1 from 3 to 9 +move 1 from 8 to 5 +move 11 from 9 to 3 +move 4 from 5 to 9 +move 3 from 8 to 7 +move 3 from 7 to 8 +move 1 from 5 to 8 +move 7 from 4 to 3 +move 1 from 4 to 5 +move 1 from 2 to 8 +move 3 from 7 to 6 +move 3 from 4 to 8 +move 1 from 7 to 9 +move 2 from 4 to 7 +move 5 from 8 to 1 +move 3 from 6 to 5 +move 2 from 4 to 2 +move 1 from 9 to 4 +move 1 from 8 to 6 +move 1 from 2 to 9 +move 1 from 8 to 5 +move 3 from 8 to 4 +move 3 from 4 to 2 +move 4 from 3 to 9 +move 17 from 5 to 9 +move 9 from 9 to 6 +move 1 from 9 to 3 +move 5 from 6 to 3 +move 3 from 6 to 3 +move 8 from 9 to 5 +move 2 from 8 to 5 +move 1 from 4 to 8 +move 1 from 5 to 3 +move 1 from 8 to 5 +move 3 from 2 to 6 +move 3 from 1 to 4 +move 7 from 5 to 1 +move 1 from 2 to 6 +move 13 from 3 to 6 +move 2 from 7 to 8 +move 13 from 6 to 5 +move 3 from 5 to 7 +move 6 from 5 to 6 +move 1 from 7 to 6 +move 2 from 7 to 3 +move 1 from 6 to 8 +move 13 from 3 to 5 +move 9 from 5 to 9 +move 7 from 5 to 7 +move 17 from 9 to 2 +move 3 from 4 to 7 +move 9 from 2 to 9 +move 10 from 9 to 3 +move 8 from 7 to 8 +move 2 from 5 to 3 +move 4 from 2 to 6 +move 11 from 3 to 9 +move 9 from 6 to 5 +move 5 from 9 to 8 +move 1 from 3 to 1 +move 3 from 9 to 1 +move 2 from 5 to 2 +move 1 from 7 to 9 +move 2 from 9 to 4 +move 2 from 9 to 8 +move 13 from 1 to 8 +move 3 from 8 to 5 +move 27 from 8 to 1 +move 10 from 5 to 9 +move 1 from 7 to 2 +move 2 from 4 to 3 +move 10 from 9 to 6 +move 1 from 8 to 7 +move 15 from 1 to 9 +move 13 from 9 to 5 +move 15 from 5 to 7 +move 5 from 1 to 3 +move 8 from 7 to 1 +move 7 from 7 to 1 +move 16 from 1 to 8 +move 4 from 3 to 9 +move 4 from 1 to 7 +move 4 from 9 to 6 +move 5 from 2 to 7 +move 15 from 8 to 6 +move 1 from 9 to 1 +move 3 from 3 to 4 +move 1 from 9 to 7 +move 1 from 2 to 7 +move 1 from 2 to 7 +move 1 from 8 to 1 +move 3 from 4 to 8 +move 3 from 8 to 1 +move 8 from 6 to 8 +move 7 from 1 to 4 +move 11 from 6 to 8 +move 14 from 6 to 5 +move 13 from 8 to 7 +move 4 from 7 to 5 +move 15 from 7 to 4 +move 6 from 5 to 4 +move 2 from 5 to 9 +move 1 from 5 to 2 +move 3 from 8 to 5 +move 19 from 4 to 7 +move 10 from 5 to 8 +move 2 from 6 to 8 +move 1 from 4 to 8 +move 2 from 7 to 9 +move 9 from 7 to 4 +move 6 from 4 to 6 +move 11 from 4 to 8 +move 2 from 5 to 4 +move 5 from 6 to 4 +move 1 from 6 to 7 +move 3 from 9 to 5 +move 3 from 8 to 5 +move 3 from 7 to 6 +move 11 from 8 to 7 +move 1 from 9 to 5 +move 1 from 6 to 8 +move 1 from 2 to 1 +move 5 from 4 to 9 +move 2 from 4 to 1 +move 2 from 1 to 4 +move 1 from 1 to 9 +move 4 from 5 to 1 +move 1 from 4 to 6 +move 17 from 7 to 5 +move 9 from 8 to 7 +move 6 from 9 to 7 +move 3 from 1 to 9 +move 12 from 7 to 9 +move 12 from 9 to 5 +move 5 from 7 to 9 +move 17 from 5 to 3 +move 7 from 3 to 1 +move 5 from 1 to 5 +move 5 from 9 to 2 +move 4 from 3 to 5 +move 1 from 4 to 8 +move 5 from 2 to 1 +move 22 from 5 to 9 +move 3 from 7 to 6 +move 6 from 6 to 9 +move 2 from 5 to 4 +move 1 from 6 to 3 +move 2 from 4 to 1 +move 3 from 8 to 2 +move 1 from 3 to 4 +move 24 from 9 to 1 +move 4 from 3 to 9 +move 2 from 2 to 9 +move 2 from 3 to 1 +move 1 from 8 to 6 +move 1 from 6 to 9 +move 1 from 8 to 9 +move 2 from 7 to 4 +move 1 from 8 to 3 +move 1 from 4 to 7 +move 3 from 9 to 8 +move 1 from 2 to 1 +move 9 from 9 to 3 +move 1 from 8 to 7 +move 1 from 4 to 3 +move 2 from 9 to 7 +move 1 from 9 to 3 +move 2 from 8 to 4 +move 12 from 3 to 8 +move 2 from 1 to 7 +move 1 from 4 to 3 +move 30 from 1 to 5 +move 6 from 5 to 7 +move 12 from 7 to 2 +move 1 from 3 to 4 +move 2 from 1 to 3 +move 1 from 4 to 9 +move 10 from 5 to 7 +move 10 from 2 to 6 +move 8 from 8 to 3 +move 3 from 1 to 3 +move 5 from 6 to 3 +move 2 from 8 to 5 +move 1 from 9 to 2 +move 2 from 8 to 6 +move 4 from 7 to 2 +move 3 from 2 to 7 +move 2 from 7 to 5 +move 1 from 4 to 9 +move 11 from 3 to 1 +move 7 from 6 to 9 +move 3 from 2 to 3 +move 10 from 1 to 7 +move 14 from 7 to 5 +move 3 from 7 to 6 +move 5 from 9 to 7 +move 29 from 5 to 7 +move 6 from 3 to 9 +move 2 from 9 to 7 +move 15 from 7 to 5 +move 11 from 5 to 6 +move 5 from 9 to 5 +move 10 from 5 to 8 +move 1 from 2 to 4 +move 1 from 8 to 2 +move 2 from 4 to 3 +move 2 from 5 to 9 +move 8 from 8 to 9 +move 11 from 9 to 3 +move 1 from 1 to 8 +move 18 from 7 to 3 +move 1 from 9 to 3 +move 28 from 3 to 5 +move 12 from 6 to 7 +move 1 from 2 to 9 +move 15 from 7 to 2 +move 1 from 8 to 1 +move 10 from 2 to 9 +move 10 from 5 to 3 +move 2 from 2 to 3 +move 18 from 3 to 4 +move 6 from 9 to 4 +move 1 from 1 to 7 +move 1 from 6 to 4 +move 1 from 8 to 2 +move 1 from 9 to 4 +move 2 from 9 to 4 +move 19 from 4 to 3 +move 1 from 7 to 9 +move 1 from 9 to 7 +move 1 from 6 to 8 +move 3 from 2 to 8 +move 2 from 9 to 5 +move 15 from 3 to 1 +move 7 from 5 to 1 +move 3 from 4 to 9 +move 1 from 7 to 2 +move 3 from 3 to 1 +move 6 from 5 to 2 +move 3 from 3 to 9 +move 4 from 9 to 2 +move 5 from 5 to 3 +move 1 from 3 to 5 +move 3 from 5 to 7 +move 3 from 8 to 5 +move 1 from 7 to 5 +move 4 from 5 to 1 +move 4 from 4 to 2 +move 2 from 7 to 8 +move 12 from 1 to 6 +move 1 from 8 to 6 +move 6 from 2 to 3 +move 9 from 3 to 8 +move 1 from 3 to 4 +move 3 from 6 to 1 +move 2 from 9 to 2 +move 1 from 4 to 5 +move 2 from 8 to 3 +move 10 from 2 to 1 +move 2 from 4 to 7 +move 12 from 1 to 4 +move 1 from 5 to 1 +move 7 from 4 to 9 +move 2 from 3 to 2 +move 6 from 9 to 2 +move 1 from 9 to 1 +move 1 from 7 to 8 +move 5 from 6 to 7 +move 3 from 6 to 1 +move 6 from 2 to 3 +move 2 from 4 to 3 +move 1 from 6 to 8 +move 1 from 6 to 7 +move 8 from 3 to 9 +move 2 from 4 to 5 +move 3 from 2 to 4 +move 10 from 8 to 2 +move 22 from 1 to 9 +move 9 from 2 to 4 +move 1 from 1 to 3 +move 1 from 3 to 2 +move 3 from 2 to 4 +move 2 from 7 to 1 +move 14 from 4 to 2 +move 2 from 1 to 8 +move 2 from 4 to 5 +move 4 from 7 to 8 +move 24 from 9 to 6 +move 3 from 5 to 9 +move 1 from 9 to 8 +move 1 from 5 to 2 +move 1 from 6 to 7 +move 6 from 9 to 1 +move 1 from 7 to 3 +move 5 from 8 to 6 +move 9 from 6 to 3 +move 4 from 1 to 4 +move 2 from 1 to 2 +move 11 from 6 to 3 +move 13 from 3 to 2 +move 2 from 9 to 8 +move 8 from 3 to 8 +move 2 from 8 to 5 +move 1 from 7 to 5 +move 3 from 6 to 3 +move 11 from 8 to 5 +move 13 from 2 to 4 +move 10 from 5 to 2 +move 2 from 3 to 4 +move 2 from 5 to 7 +move 15 from 4 to 9 +move 2 from 7 to 4 +move 2 from 4 to 2 +move 2 from 4 to 9 +move 2 from 4 to 2 +move 1 from 3 to 8 +move 1 from 8 to 1 +move 1 from 1 to 2 +move 1 from 6 to 3 +move 7 from 2 to 4 +move 1 from 5 to 3 +move 7 from 9 to 1 +move 7 from 1 to 2 +move 4 from 6 to 9 +move 12 from 9 to 7 +move 6 from 7 to 5 +move 1 from 3 to 5 +move 7 from 4 to 7 +move 3 from 7 to 8 +move 3 from 8 to 6 +move 18 from 2 to 9 +move 7 from 2 to 3 +move 15 from 9 to 4 +move 3 from 3 to 9 +move 1 from 3 to 1 +move 3 from 5 to 4 +move 1 from 1 to 2 +move 1 from 9 to 2 +move 2 from 6 to 2 +move 5 from 7 to 6 +move 5 from 2 to 7 +move 3 from 3 to 4 +move 5 from 5 to 3 +move 6 from 7 to 4 +move 9 from 4 to 2 +move 18 from 4 to 9 +move 6 from 2 to 1 +move 1 from 1 to 9 +move 4 from 7 to 4 +move 7 from 2 to 4 +move 1 from 2 to 8 +move 1 from 4 to 2 +move 4 from 3 to 4 +move 16 from 9 to 5 +move 9 from 9 to 8 +move 1 from 9 to 7 +move 4 from 1 to 2 +move 2 from 5 to 4 +move 10 from 5 to 4 +move 4 from 2 to 1 +move 5 from 1 to 2 +move 1 from 8 to 5 +move 1 from 6 to 5 +move 4 from 8 to 5 +move 2 from 6 to 9 +move 3 from 6 to 2 +move 2 from 9 to 1 +move 1 from 7 to 6 +move 1 from 3 to 8 +move 9 from 5 to 9 +move 4 from 8 to 1 +move 2 from 8 to 2 +move 1 from 5 to 7 +move 9 from 9 to 8 +move 1 from 7 to 5 +move 9 from 8 to 2 +move 6 from 1 to 6 +move 6 from 2 to 6 +move 10 from 2 to 5 +move 5 from 2 to 1 +move 1 from 3 to 5 +move 8 from 5 to 4 +move 5 from 1 to 3 +move 10 from 6 to 8 +move 3 from 6 to 9 +move 4 from 3 to 1 +move 5 from 8 to 2 +move 4 from 5 to 9 +move 1 from 3 to 7 +move 1 from 7 to 3 +move 1 from 8 to 6 +move 1 from 6 to 1 +move 15 from 4 to 8 +move 5 from 9 to 2 +move 1 from 9 to 1 +move 1 from 1 to 3 +move 6 from 4 to 8 +move 12 from 8 to 7 +move 1 from 3 to 5 +move 3 from 1 to 9 +move 13 from 4 to 9 +move 5 from 7 to 2 +move 1 from 5 to 4 +move 8 from 9 to 5 +move 6 from 2 to 5 +move 2 from 5 to 6 diff --git a/src/adventofcode2022/data/day_06/day06.txt b/src/adventofcode2022/data/day_06/day06.txt new file mode 100644 index 00000000..4e1db04b --- /dev/null +++ b/src/adventofcode2022/data/day_06/day06.txt @@ -0,0 +1 @@ +zdnnfgfsgffgllwrwprwrgwwpssznzrnznllstszsttpdptdpdmdsdzsdscsmcmttdllbsbwwtwnwswcchshlhjhfhwfftcchnnfwwbqwqwrqqgmgzmmwzwfzwfzzzsmzzrczcmmhphzhbbbgdbgddmggwwbbttvmtvttfsfttjlttdfdsdqqczqzffbrfbbfbrrmdrrlslshllwzwrzrzzlqldqdjdjwjvjzjrjjcsszjjqfqnfqqsrqrccbhhwphwhbwwlzwwjwfjwfwzfwzffssvjsjddcsdslslrsrfsrffsggdffrcrcdcpprrzbrzbbtstvvqttbqqgfgsggtvtrvtvbbrqrsqrsqsvsbbzmbmgmvgmmrqrzzbbnjjlwjjfssdrdbrbffwrrrjjgcgtgvvjbjjjsqjsqqncntnndcdrcrhhsgstslldwdbwdbdtbdbggpnndhdvhhvrrlzzfjjffzszvvzgzhhqzqttdhdrrwdwzdwdbwwfsfwsfwfqqzwzbzmzwmmvgggvssvwswfwswhwzzqtqrtthhbbjggjppnpfnfmnnghgrhhtvtqtsttbpprzzwqqfhqfflttzffrprwpwspplzpztptgtltjlttwwsrsrprwrsswnwttcscqsqlsqqhshbhlblnnpznnzlnndrnrcncvcqcjqqvhvppjzjddzbzsztzqqlmlnlnblnlwnllswszwzrzddqhdqhqffhfhjjpbbhvbvmmfhmhcccjlclhcllbrlblddnpplggcmmvddmmqzzmqmppnjpjjjzllqjqccrwwhzhnnlmlhhbbtztvtltvtnvtvltlrtrllbttbzzfwfrrjzjbbmgghjhqhlljnjhhhjzjcjvcvwwzczwcwgcclflnnsvvcncbncnqqpjqjnjwjrrgqrrmqmfmmmjgjfgjfftggqdgqddgcdcdwdrdsswqqphpjhhdjjwswfwfnfqnqccvhvzvmzvzzplzljzjpzzhmzmqzqjjprpvrrhqqnbngnnpvpfvpvqvwwrhhdndqdppmcppzddbzzjcjdjfjnfnngqnnchcqqpllpwppgllcblcblbddzhhqsqbssjqqgmgbgzzvhvnhvnhvvpmpvvlddgppzrprmpmbpbjpbpfptpspddcgddqhdhhthrhjrhrvrlrffvbfbvfvbblssftfnfwwrwnnzdznnbwnbwnwlwttszzmmlzlhhpjhhjvvlvwwdnddzwdwgdgdssflfvfzvznzbzrbzzdssphhgttllcjcvcjjdrdqdhdnndlndldcllcnllslvlnvllmglgnnplpmpzzjwjtwtnntrtjtvjtjffhcfclltppftfwwprrwsrwwzdwzdztzccbmccfcfzczbcbsbqsstjtrrpnnfqqfmmchmmwmrwrwzwztzddgzdgzzfwzzrppcscrrgvgvgvtgtsslrsrvsrrdcdscscwcwqqsccwjcjgjvgvpvnvhhchrrgprpvrvsvsttgghdghhmphmmbvbcbsccdbcbnccbnnsjnjhnnzbnnpjbwdpczcvgjpgwfqrmnvwncflvnttwhfgmfqvngpdhbhvlglfhtdqmqtqcgjcqghzvbdghdgvjcsjrlpqvgcdnbpqrcrcvqqdlcpscqbfpsnhzcdbbcssslrjlzsqpprsbmtqhzblvwbswprhztmpcgfqfsgshchrhjmwwhpzsjzrmrvgdgwjrlwpgqhbzrmnmnnsnvzsrlhthgvlpljsjrpbhbzctdqgvdjcmrgtvqjqbcwsprnfmntzpbjcdtlchhjgwpmldmsstbtztfdbgbstgnlwbzrrzmvbrhnrlcwfgwwbfnntbjspqwngbjrvhdcnblqssgjlbcwbbgphhnmfcmdhqdhsnmvdjnwwwjlffswhsmwqrsprftjwtbtcvmpctgvfqvvcjpnwzqldglfbwfzpnqmdlrdpjmjptvwsctlmhmzzgvplglfgsvrfbqbmrhplczbvqpdjjhhvfqswhzhqfgzstwwpbtbsnnlgpshwqgppzbpsfpfvcntbbbzwdnfcgcwzbqwmhjrhpdfvpbzpmfnmllrcqlqhcbzfltzcgccwwqmtsmwchhvbqtdrnsbrchqqcmtfqpddcjplbvdhhtndrrmfdtmbpdvwthvgdccnrcqmpznlvzqzfjqmpvgjtfbtfjnrmlzhwhljrrqnbqzpfhcvncblfggrtbdfjqnlgpbrzmwcvrvjtjscfmcnfjgqzqsphldvhdbpvmghrvsdmvpmvvdmdhwdghtjltmlcmfhvrsvcvpblwhhfcfdqnrsjbcldgbwhtnjntmgvprhbjrcvsmhgtfphcwncpjtngqhvwrmgprstbtdstmttpzcntmzvncwslqlldpnjbtpmsfnwbpwpnlfgdvcqplvlqqjvfftnnvpcmwjrvwqhlrshftrbhcwnczzsnvtnjnrbzzgzfsqhnfwlcgzvvhqcgvqtmcpnhlvdlmwgsvtwbqgrdsrrddszvscbgtlpwpzjrbvwhjnrpprhtzmthbpfzvplzwfdtnwqwtctgjslmcczjvwplsqwgfnfbgdjbsdpwbgflttvvqlhzgmmpjsnwbqqtcdszfqbhgnmbbmrbrgnrzdmzwnjjzjqcwqcqfchjrzlspgbrchcbgwbhvggsqbvdpzbpnwdtqvcjwcwnbjdhsdfmbtwfbfhzwwtnqzhmtvtbfwrsqjzgssvlwszvlmvbslpncnhmsdhcqqfpftztpzbbhsgbnscddbjlgwgjjndgwbrhwmsfdmmsnlwgwdsdltwjfvwnczjrbgcvsfczppltdptlgcdfzgmqpjngstldqgmwhdmfrwwfqwdgswvfdrtsgtvttpcbnhzbscnchpvfjvbcszbwchnbmfrvsswslbzlhgwlvfchdbfthbpdbwwqtmlgwjqtjhzrjzzmrpdwnvfgrnqdcqmwtttmwjvgcmjsddvtlswldzhtppwvhmlghwlgblfttctnglwhtfvqgjmdjcnflsrjvpjwcjfftbdmmcbqvfwnnnzsltllncbstgnhtmpsltgztqzjbbrtqpcvdlnhpnhvmmztpfpplbqjlpqvfsdvhwvstdmqbtnpzrcbdhvdtghqwcppcfzjfjsfwvqrtfgcdzwgzjvrqqsjtnhlbjcmtjcnmtpffwcwhqqphwjsrhpqvnnhhrcnvztfdjzbjggwlgjprbpssgnmtcrvprwbsrfvvphrsgzgbrfnpgtqbbprhfphqntsglrmhzfnwqptlslnhtrhfprjpdcglcffsblnjwczmgwhmmtgsgwljmqlvdglqmzwmtqcvgcrmqjldlsnbssdvrrtltngvrsqbctqlsngqvcphjvhmwsssgwmvgzdctjcmjtpcjhvfcrfhbffdqfjjvpqwgvnlzhgfnfmlrrfvjrdvhzdcvdvmpncvtjbbnczpzmglfqnpbsrsjwgvszsnqvrnvlhmqjjnmsfngbdlpwbqllcptjtlbhrfdvhlrpdlznpvndjzjdtjflqqjdgjjpmnpmjgcglllgcqbfpvdtpbjdnvrclmnlfdrpbmwzgvdhgbzvbhwqfslhshbfcbwrnsjndgjgccllfbzgmcjqcmdnfftnccphqtwmgqgfqlvlwsrprctchqrscwvgpdrwgcfgzjwmzmmsmwzgtzsjtqfggcczcmghlqgnqqjvsrsfrrmwmnrnhbsszmwsqlrggsbdwzzfnhwcggjszfrlffplvcblvphqmzjnzwzdshhdprfrdbcrmbtztcfvgpzpmmgflswphvnvtwhbbhjwffsvqfjlfvzqmhmsmddwdwsqfnnplbqnptbvgjqgmflsbfdtpvdgbfnqmcqznhpqbpwtbfpqllvqwvcftdjjtlsvzbssbtcdzqqqvzlqhfpdthscqmvhpndmnztthvvzccqswswspnqcbncvszrgjshjhdsclrjdnjdczqmcjldbspclgrmwqdvcvpcsvjggfdqlrwlnzptfvcwjsgblpjzgcrrmjqptvdnwr diff --git a/src/adventofcode2022/data/day_07/day07.txt b/src/adventofcode2022/data/day_07/day07.txt new file mode 100644 index 00000000..659f8b07 --- /dev/null +++ b/src/adventofcode2022/data/day_07/day07.txt @@ -0,0 +1,986 @@ +$ cd / +$ ls +dir bnl +dir dmpsnhdh +272080 dncdssn.hdr +dir fcnqg +6067 hjpmqrq +dir jvwtm +dir ldztz +dir lmmw +dir wthvqw +dir zpdnprb +$ cd bnl +$ ls +dir dhw +dir dmpsnhdh +dir lmw +dir vgbqbrst +$ cd dhw +$ ls +237421 vccwmhl +$ cd .. +$ cd dmpsnhdh +$ ls +dir chf +dir mjpbhjm +dir zwhpwp +$ cd chf +$ ls +4679 lmw.wmp +217367 wwnfv.qqr +dir zfgznbz +$ cd zfgznbz +$ ls +179409 cnj.gdn +171574 vglqg +$ cd .. +$ cd .. +$ cd mjpbhjm +$ ls +dir crf +dir hqnj +dir lmw +18783 lmw.rwr +302608 twpq +166891 vqczlg +$ cd crf +$ ls +32183 dltmqht +240428 frqqdsr.hbf +224910 sgtnrvrt +$ cd .. +$ cd hqnj +$ ls +261723 cgstb +77979 dmpsnhdh.cmd +$ cd .. +$ cd lmw +$ ls +50307 fcqrwd +$ cd .. +$ cd .. +$ cd zwhpwp +$ ls +141133 gdngm.mps +$ cd .. +$ cd .. +$ cd lmw +$ ls +dir dvv +267473 jmqgrh.dlz +295139 rrqjwpm +$ cd dvv +$ ls +114536 gmlmbrrw.wdm +102061 lmw +$ cd .. +$ cd .. +$ cd vgbqbrst +$ ls +105102 dmpsnhdh.bgl +269054 gmwgjf.fzz +dir jbdtpnw +245266 jzsjvgl +216220 lmw.gtb +dir rflp +dir twpq +$ cd jbdtpnw +$ ls +27543 cjvvmzp +$ cd .. +$ cd rflp +$ ls +137601 frqqdsr.hbf +83444 rrqjwpm +$ cd .. +$ cd twpq +$ ls +dir rlbsdj +36846 tnrqzjdd +$ cd rlbsdj +$ ls +56078 bvndq +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd dmpsnhdh +$ ls +dir fnpwwhtj +dir lmw +9090 mgjpsvl.jlh +186374 pbb.zln +$ cd fnpwwhtj +$ ls +dir cgp +$ cd cgp +$ ls +81938 hjpmqrq +281971 jvszf +151057 wmr.bnf +$ cd .. +$ cd .. +$ cd lmw +$ ls +dir bfbv +56929 pbb.zln +dir rrqjwpm +dir sngm +$ cd bfbv +$ ls +92667 qrrttb.jgp +$ cd .. +$ cd rrqjwpm +$ ls +25739 cqljn.zqw +91325 dncdssn.hdr +$ cd .. +$ cd sngm +$ ls +282163 jgrj +dir lmw +237524 lmw.dff +153497 lmw.ntg +dir lqd +dir szn +143535 tvpvc.qpr +98326 vbfgh +$ cd lmw +$ ls +32484 dncdssn.hdr +dir glwr +$ cd glwr +$ ls +144719 frqqdsr.hbf +$ cd .. +$ cd .. +$ cd lqd +$ ls +231401 dncdssn.hdr +dir jnjqmvg +dir lmw +199704 rrqjwpm +$ cd jnjqmvg +$ ls +104947 trpsrfjz.brg +$ cd .. +$ cd lmw +$ ls +230298 rrqjwpm.nnv +158947 wfv.qrb +$ cd .. +$ cd .. +$ cd szn +$ ls +197974 frqqdsr.hbf +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd fcnqg +$ ls +251609 dncdssn.hdr +289497 jdjmftqs +228459 qbmthcq +$ cd .. +$ cd jvwtm +$ ls +dir dmpsnhdh +47959 pbb.zln +dir tlr +dir twpq +dir wbgcsw +dir zjmldjdh +$ cd dmpsnhdh +$ ls +247567 bnl +102471 bnl.wdm +80054 fhqvp.hfm +dir llhp +dir mnsbh +dir mpplsfjp +20844 mtvl.lmp +$ cd llhp +$ ls +180255 dmpsnhdh +$ cd .. +$ cd mnsbh +$ ls +267627 dmpsnhdh +$ cd .. +$ cd mpplsfjp +$ ls +dir bnl +233742 tcnpvqc.tdr +$ cd bnl +$ ls +243223 fcqrwd +$ cd .. +$ cd .. +$ cd .. +$ cd tlr +$ ls +dir vcsngm +dir wndmt +$ cd vcsngm +$ ls +36434 czs.dnv +$ cd .. +$ cd wndmt +$ ls +dir fvmtfcqd +dir nvdb +dir nwqqgl +dir sbspgnpm +$ cd fvmtfcqd +$ ls +237025 nzttjt.rzh +$ cd .. +$ cd nvdb +$ ls +235328 dnrqwqtp.vfc +51984 rhblt.mfz +51332 rjhvhw +$ cd .. +$ cd nwqqgl +$ ls +203534 cjghw +dir cljbrh +$ cd cljbrh +$ ls +133820 lmw.dnd +$ cd .. +$ cd .. +$ cd sbspgnpm +$ ls +270010 hjpmqrq +$ cd .. +$ cd .. +$ cd .. +$ cd twpq +$ ls +dir dmpsnhdh +dir hbchdjjp +247649 hjpmqrq +29891 rrqjwpm +72407 twpq.crb +$ cd dmpsnhdh +$ ls +251490 dncdssn.hdr +222231 hjpmqrq +102058 pbb.zln +$ cd .. +$ cd hbchdjjp +$ ls +70058 dprrmd.qcd +230958 tsdbl.bnq +$ cd .. +$ cd .. +$ cd wbgcsw +$ ls +292028 bhtfcf +dir bnl +dir bqq +dir ctnlpgt +247888 hblhfvwj +dir hbqm +277949 pbb.zln +106225 rrqjwpm +125927 ssqpmlfb.gwm +dir zqmjwsgz +dir zwwphs +$ cd bnl +$ ls +dir fbbr +240500 frqqdsr.hbf +dir mzfrdl +25137 srqlww.mcj +dir tqgrdz +dir ztrnq +$ cd fbbr +$ ls +84414 mjbw.dhs +$ cd .. +$ cd mzfrdl +$ ls +135647 bccwgn +dir cjdptqgh +dir hwdnrqns +dir prq +$ cd cjdptqgh +$ ls +147946 mdgl.drz +11972 pbb.zln +$ cd .. +$ cd hwdnrqns +$ ls +dir dmpsnhdh +$ cd dmpsnhdh +$ ls +254432 phthmn +$ cd .. +$ cd .. +$ cd prq +$ ls +75827 dmpsnhdh.rtl +$ cd .. +$ cd .. +$ cd tqgrdz +$ ls +251475 bjwnll.rlw +$ cd .. +$ cd ztrnq +$ ls +208497 bnl.dtr +179376 gqnbswcj.hht +$ cd .. +$ cd .. +$ cd bqq +$ ls +202201 bnl.lbm +$ cd .. +$ cd ctnlpgt +$ ls +269484 vsfvzrpr +$ cd .. +$ cd hbqm +$ ls +74455 bvnfz +42748 pbb.zln +$ cd .. +$ cd zqmjwsgz +$ ls +146194 pbb.zln +$ cd .. +$ cd zwwphs +$ ls +209587 mtbzd.nwb +$ cd .. +$ cd .. +$ cd zjmldjdh +$ ls +dir cdq +dir mdclfbs +dir tfc +132043 wrm +$ cd cdq +$ ls +289173 twpq.mrn +$ cd .. +$ cd mdclfbs +$ ls +64639 bnl.jwf +dir hpdgt +72868 hznfj.nmj +159467 lmw.bfz +$ cd hpdgt +$ ls +52760 fcqrwd +54661 tzgt.hvh +$ cd .. +$ cd .. +$ cd tfc +$ ls +185481 bwntlh +18925 fcqrwd +$ cd .. +$ cd .. +$ cd .. +$ cd ldztz +$ ls +128430 bwz.fcz +dir dmpsnhdh +dir lbqgz +dir znrnj +$ cd dmpsnhdh +$ ls +238193 dncdssn.hdr +285939 hwfngq.dpw +$ cd .. +$ cd lbqgz +$ ls +171931 vgrp +$ cd .. +$ cd znrnj +$ ls +153738 vmwwbjqd +$ cd .. +$ cd .. +$ cd lmmw +$ ls +dir bqqnsfdj +163303 fcqrwd +43453 frqqdsr.hbf +33319 hjpmqrq +dir rlpcqtzg +$ cd bqqnsfdj +$ ls +dir bnl +2251 hjpmqrq +14707 rrqjwpm +dir tlnbvhdl +$ cd bnl +$ ls +33357 bnl.fqp +151237 bnl.vbs +40294 dmpsnhdh.hwz +76455 dncdssn.hdr +290341 hjpmqrq +dir lmw +dir nqw +$ cd lmw +$ ls +dir sfj +$ cd sfj +$ ls +156532 fcqrwd +$ cd .. +$ cd .. +$ cd nqw +$ ls +59928 dncdssn.hdr +$ cd .. +$ cd .. +$ cd tlnbvhdl +$ ls +183301 hjpmqrq +$ cd .. +$ cd .. +$ cd rlpcqtzg +$ ls +258638 dqt.mlc +$ cd .. +$ cd .. +$ cd wthvqw +$ ls +224501 pbb.zln +$ cd .. +$ cd zpdnprb +$ ls +dir bnl +dir ffg +dir jljlwpsv +212081 lrzc.lhj +dir rrqjwpm +dir twpq +dir vlgsrtm +$ cd bnl +$ ls +124009 hjgjf +74860 hjpmqrq +84996 lrdl.swf +dir pnzmp +$ cd pnzmp +$ ls +dir btbtlrs +128636 nfzf +$ cd btbtlrs +$ ls +107651 hhzbwd.wzj +$ cd .. +$ cd .. +$ cd .. +$ cd ffg +$ ls +57918 jwzbs.tnt +$ cd .. +$ cd jljlwpsv +$ ls +188175 dmpsnhdh.nnb +46693 fcqrwd +111557 pbb.zln +$ cd .. +$ cd rrqjwpm +$ ls +dir bftw +dir ccsfws +87225 mccw +290654 pbb.zln +147394 twzqc.pbz +52983 wsvgf +dir wwfgbzqh +$ cd bftw +$ ls +dir brl +167154 crs +dir lmw +dir rrqjwpm +dir twpq +174963 twpq.wjl +dir vnfhb +dir wcldzp +$ cd brl +$ ls +297937 wspcnp +$ cd .. +$ cd lmw +$ ls +166695 mcjql.jrv +$ cd .. +$ cd rrqjwpm +$ ls +198762 mwn +$ cd .. +$ cd twpq +$ ls +141835 jlwf.hcd +$ cd .. +$ cd vnfhb +$ ls +128626 tvmwhq.wfn +$ cd .. +$ cd wcldzp +$ ls +dir ncq +dir twpq +$ cd ncq +$ ls +dir wrtw +$ cd wrtw +$ ls +133331 fcqrwd +$ cd .. +$ cd .. +$ cd twpq +$ ls +151811 fcqrwd +$ cd .. +$ cd .. +$ cd .. +$ cd ccsfws +$ ls +100548 twpq.ppm +$ cd .. +$ cd wwfgbzqh +$ ls +dir lmw +dir mfms +dir pjbjgbcl +204154 qtflzwm +226500 vdmjj.htj +dir wzqbwr +$ cd lmw +$ ls +dir bgl +95150 dncdssn.hdr +119653 frqqdsr.hbf +97941 hjpmqrq +dir jqthwzj +$ cd bgl +$ ls +dir lmw +dir rrqjwpm +$ cd lmw +$ ls +233655 wmdldvbz +$ cd .. +$ cd rrqjwpm +$ ls +242918 frqqdsr.hbf +227581 hjpmqrq +dir hsvnmlp +dir nsch +25524 pbb.zln +dir qlgg +dir twpq +67453 twpq.fms +$ cd hsvnmlp +$ ls +264517 pbb.zln +$ cd .. +$ cd nsch +$ ls +7898 cmsdzh +233270 dmpsnhdh.bsq +101256 frl +133902 jzvh.vdv +dir lmw +dir sgjsg +130245 wcftvft +$ cd lmw +$ ls +69572 bnjnc.csp +$ cd .. +$ cd sgjsg +$ ls +38856 tnzpz.tbq +$ cd .. +$ cd .. +$ cd qlgg +$ ls +276013 frbstg.pzb +$ cd .. +$ cd twpq +$ ls +136454 fhwz.bqb +94099 rglp +114026 tsrt.cbd +26252 zhclpzm.rqf +$ cd .. +$ cd .. +$ cd .. +$ cd jqthwzj +$ ls +128200 lmw.btl +$ cd .. +$ cd .. +$ cd mfms +$ ls +274935 dmpsnhdh +76547 lchwq.dsd +215701 pbb.zln +dir rmwtvjt +$ cd rmwtvjt +$ ls +74490 hjpmqrq +$ cd .. +$ cd .. +$ cd pjbjgbcl +$ ls +231757 cjcpwwc.wbf +dir cswvftzs +dir jtvtg +dir lmw +dir tnctbjr +dir tqsrfhdr +$ cd cswvftzs +$ ls +dir dchqnbns +dir smf +$ cd dchqnbns +$ ls +94111 szl.hqs +$ cd .. +$ cd smf +$ ls +dir dlnsgvl +dir zglt +$ cd dlnsgvl +$ ls +dir dsz +$ cd dsz +$ ls +156473 hjpmqrq +$ cd .. +$ cd .. +$ cd zglt +$ ls +295383 frgg.sdp +$ cd .. +$ cd .. +$ cd .. +$ cd jtvtg +$ ls +202254 bftv.rqb +58419 lmw +$ cd .. +$ cd lmw +$ ls +8097 fcqrwd +$ cd .. +$ cd tnctbjr +$ ls +250830 frqqdsr.hbf +dir gzrcqr +$ cd gzrcqr +$ ls +dir fnzgsnv +$ cd fnzgsnv +$ ls +117215 hjpmqrq +$ cd .. +$ cd .. +$ cd .. +$ cd tqsrfhdr +$ ls +96381 lmw +$ cd .. +$ cd .. +$ cd wzqbwr +$ ls +149066 dmpsnhdh.vnd +dir dpbcgfdr +dir swp +14495 twpq.gsb +dir zhj +$ cd dpbcgfdr +$ ls +12909 dmpsnhdh +dir jvn +173491 mnhpr.lpr +222018 rfqfjmd.jqq +205077 wbbdrpr.hzj +dir wzpbbbhm +$ cd jvn +$ ls +117656 vqddrqlq.nfd +233109 vqqvh.swz +$ cd .. +$ cd wzpbbbhm +$ ls +143534 pbb.zln +$ cd .. +$ cd .. +$ cd swp +$ ls +131295 pbb.zln +$ cd .. +$ cd zhj +$ ls +166268 pbb.zln +33734 rrqjwpm.blg +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd twpq +$ ls +dir bppvlwqs +dir bvh +dir rmcdr +dir tdn +2230 whb.lfb +dir wwtwnvh +$ cd bppvlwqs +$ ls +195026 hvlhgsw +279259 rrqjwpm +$ cd .. +$ cd bvh +$ ls +dir lmw +$ cd lmw +$ ls +66958 pdqnd +$ cd .. +$ cd .. +$ cd rmcdr +$ ls +dir dmpsnhdh +182930 grj +dir pmrdhrth +119725 qpcqclqh +77890 sjgfjz +142855 twpq +dir zbmcrvbh +$ cd dmpsnhdh +$ ls +dir rrqjwpm +188474 zgjzpbl.vgv +$ cd rrqjwpm +$ ls +dir bnl +dir lmw +7598 vsntvs.pdv +$ cd bnl +$ ls +245600 lmw.mgf +$ cd .. +$ cd lmw +$ ls +73396 hjpmqrq +$ cd .. +$ cd .. +$ cd .. +$ cd pmrdhrth +$ ls +173155 rrqjwpm.pjw +178530 smgpzs.qtj +$ cd .. +$ cd zbmcrvbh +$ ls +124201 fcqrwd +135578 hjpmqrq +54356 hnztplsp.qlh +dir lmw +58350 pbb.zln +dir qfrvdm +dir rcg +15267 rwbzjpt.djn +$ cd lmw +$ ls +dir bbbll +28362 bfgfwlf.wvg +229637 dmpndms.fln +146121 dncdssn.hdr +131039 frqqdsr.hbf +152805 hjpmqrq +dir mlz +$ cd bbbll +$ ls +169940 dncdssn.hdr +216888 pbb.zln +248369 tjpmlr.vmf +$ cd .. +$ cd mlz +$ ls +115167 bhfv.fts +$ cd .. +$ cd .. +$ cd qfrvdm +$ ls +284564 pbb.zln +$ cd .. +$ cd rcg +$ ls +dir sqzjz +$ cd sqzjz +$ ls +116435 jrstpcpl.zsq +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd tdn +$ ls +143971 cmg +133317 fcqrwd +dir pstpclp +133161 tddv +$ cd pstpclp +$ ls +267351 hjpmqrq +86930 rrqjwpm.dvl +$ cd .. +$ cd .. +$ cd wwtwnvh +$ ls +256584 frqqdsr.hbf +114564 twpq.wrd +$ cd .. +$ cd .. +$ cd vlgsrtm +$ ls +148089 bnl.jzj +119796 cjfphsfw.hnd +197668 cpw +dir dmpsnhdh +dir fjsglr +dir lmw +dir lqgrft +9231 pltdltrs +dir rmdp +109777 rncfff.fll +dir vgjzqjpq +dir ztnqnfnq +$ cd dmpsnhdh +$ ls +dir lltnrdtv +dir scthsg +$ cd lltnrdtv +$ ls +179511 pcvmpz +90913 tbr +$ cd .. +$ cd scthsg +$ ls +dir rrqjwpm +$ cd rrqjwpm +$ ls +188629 fcqrwd +$ cd .. +$ cd .. +$ cd .. +$ cd fjsglr +$ ls +139754 fcqrwd +dir pnsjwfzc +$ cd pnsjwfzc +$ ls +113848 lmw +$ cd .. +$ cd .. +$ cd lmw +$ ls +54999 dmpsnhdh +dir ffhcf +251476 frqqdsr.hbf +dir jpgqspqw +198972 nhfclq.pbh +180380 nqmjnvc.fvr +dir pfsjwmbc +213768 rcvccgcd +$ cd ffhcf +$ ls +40478 svmwstq.sjj +$ cd .. +$ cd jpgqspqw +$ ls +22181 hjpmqrq +$ cd .. +$ cd pfsjwmbc +$ ls +dir bcvchw +$ cd bcvchw +$ ls +225892 bnl.nwc +$ cd .. +$ cd .. +$ cd .. +$ cd lqgrft +$ ls +dir rrqjwpm +dir twpq +$ cd rrqjwpm +$ ls +54786 fcqrwd +3053 tthhqjm.ntd +$ cd .. +$ cd twpq +$ ls +109355 bnl +dir lmw +dir mhgqt +301291 rrqjwpm.lrm +271233 twpq.srp +$ cd lmw +$ ls +dir lmw +dir lngbszqm +$ cd lmw +$ ls +139640 pbb.zln +$ cd .. +$ cd lngbszqm +$ ls +98279 mqvq.gsj +283599 rvjd.dvt +$ cd .. +$ cd .. +$ cd mhgqt +$ ls +208165 fcqrwd +$ cd .. +$ cd .. +$ cd .. +$ cd rmdp +$ ls +dir bqn +170956 fcqrwd +90954 snnttp.gld +$ cd bqn +$ ls +75628 hdrgbrpc +$ cd .. +$ cd .. +$ cd vgjzqjpq +$ ls +dir bnl +dir wpfw +$ cd bnl +$ ls +25911 pbb.zln +$ cd .. +$ cd wpfw +$ ls +247784 bzll.ltc +$ cd .. +$ cd .. +$ cd ztnqnfnq +$ ls +dir dtpzsrfc +214055 srgzhp.nlr +$ cd dtpzsrfc +$ ls +142652 bhgwj diff --git a/src/adventofcode2022/data/day_08/day08.txt b/src/adventofcode2022/data/day_08/day08.txt new file mode 100644 index 00000000..4a5b0fef --- /dev/null +++ b/src/adventofcode2022/data/day_08/day08.txt @@ -0,0 +1,99 @@ +000110211310120301121312200301013204213433321324454125534120411314221421432204213123312010120220212 +020012220322312203320423330100141123432232555552131513413333243201041414120414404222300212031212210 +012220223030033030244430211234220045555352514254335343332514243345202201013120303123003031322301122 +122212123203002004034001203313232515112543525251445353434224414533524014020242242322320223010131111 +221102333103333221411324203034235135343455415425134251221521352512445343444242410343133031022213111 +012230110220232130043321130142424543415542352534155145434324432553532253510101043422110311302133322 +121211332110331222432012225134422432341112144421535153351545122134242232152130110334114400332212301 +021003020222222304114022552315552411255554221162455263643351112333322235214353424140101110301013303 +211101331332303134320025235254523341134225246335554356533426415514344521433235223100024100322012213 +333121033001133202211331144545334545442426462335662255342342626524313432432255113203322322002312200 +010322322141333044304115552115413253563353625666244464226452656243424545525555553333333441121311231 +032330304041422420432124324244236264255242536445626642464646454324353143112245143242140134012131113 +113222323414023431235314252222246225364232452564335525523344525664226653522112244131121334130320322 +121002342323322351314412423235433523643565644552335525522462425253643354453342113152132444223043001 +303334322134140123154241513636446642663346536533667552624355222224332425555525121255313000110224301 +220002230431013514545542433426226364623335746773567356566543235364324426533313525143244100121033121 +000021230222223532342154546526322562455734556753354636566447345465225625536633243334425112234211423 +100240131421551532143146364665353436655665676767645757767765365733656436442643144352144332403323231 +231322213332442222125662224633422364634335777574764763343776757435645252662432644231412254011230044 +120320134105242421434423353553635756666465645446464476746533434474737333355643266531333324433212400 +040301032133333254244335264252755376435754666436667554445363634375377335452223443455551432333010144 +122213043542434415443363356663454534757746355453573654756377543673443533255466446625122132310014334 +404243133333412213345434336533364653576735676667576876848337555643553537554265552455111211141430132 +443341301142235415336322424546477554637688787745866488887577434344636437734332223546335121555322312 +010101032453544354452355447644336446437444776676584487868688446743777537543333245666541212524431033 +130342114125121245655353346445355733446776587588784546588474685553536367574445523434254125522412333 +201242125553223436463223777745535566487874456667845657466784588644655657455355352552555444112241410 +234243354255336642454256767534444878687668756444875858587854778474484437455656353656253411335452400 +314411514514125254223353563444477554768588585448654748855456656667558676453446723446433551542333323 +320425133145356325256655577477467888556845884576957768675647786647464447677575756555366251552252023 +402024545131232242524557435777674845786545558766585956759687647846545584454443736545244555225513404 +221122211244626363325464534767668748756767978988996968588875755867566656577763547532353323245443324 +241532435425235552535674564444576465866975867987658575886697775645646467874734565535246546512244511 +003324252512442566553463345787864877859757886699855979689556865965885747456343365533654353244413223 +212315155352232566544737454548674574998798699555866589956966599795788486474536636336336342425134412 +415441242523246256336374766665674457785867567956675565789686897696764587674446666642422423644424325 +003554554162525244354667375865755578679858897996697678587867758755877644755534673566366364215111142 +125233324364265264545556378688676958976975966767698999896779575577774547466453456456443363332524521 +133515233335323373765654467667486986756665797876767877886899897979969475847765767637544446523515551 +423321431443554355375376748446757899656688998798978687676986796699688855776746674753723255464344423 +135533214666522656775554775567665797957679899988997898976779768787598768878445373375735633533152423 +424233114545442654745646856857767575855668667669968786879669768579688844877458655735443652256255431 +122311356255465443775736754747756597959866677969777897778796669799996864878444747533472262262432453 +444412515423634374457557568574698568569796689667999968899788697787968667768664344766546653236143151 +152311513646633365333568844555559779697686687699777998989779788768756594585758837374575424224211225 +432411444656462746443756865787956975798986999787977978996987778795768586656655473453364365634145515 +512553242524235344467755668868885977997876879978998878787888776866887566586456466377353633526612112 +115351124324666765477575484768566785899876668997898988879879687896986577677786744336653645225533134 +521325356522544377445774755666867759866698988779997998778687879779588576866784766376455535443334445 +433451166554445354353554886675567598968878879979777887878988976979689787756548837435743345242455141 +251112342434644676347767747746557587886869778877788877789787767787779598548856756754774536542212331 +255533535452264557543768667886686886969966689777797988888776799775755889645756557644656535253352415 +324425154344254736457678866646677886667896679787789878898879666995998757877665757356457366362624453 +133124434355236446553476678549686757888986787979777777777688968798699766877778645555763233323653111 +222452162524456534544666745659767986569977869888798889797967869896588579678645466757742223536551125 +424113153224246464437444666655586769888767899997999998888899787785789988565667547344466324245444121 +342222535222265477673374467445978889589796696777887788896778866766575958886864746654456432465143345 +343222443646553344666565758455597897568767997897989877768698886656896987444854633767335332566315312 +031554353342263455343465844688566996587977697767668887776787776985778754456646747553435562222553224 +433344426223464443364358688754655656655796979887796696799797776855755885854676557736723432655514323 +013424132332422364434378758577758958968878668787687777668989797955778846555856344635566224523432451 +425553255655633236466566556555858699675969687978968799698978595977567446657483654746364253324544543 +432514124535636275635556647685849565689989686678799779666769657669586678877883365364425535653142315 +234213331454244233774547658465845955685598696976697898886596997865578648447647767565654326321345225 +033142335256632253667547655784646566787758855877679696866998778855965474867574633636266434253231343 +433312355254243222736457466486484557878576698897857857878667659897748755645557367664665624322214245 +414352553244643424464634565857556876595979575859559697897855757678648446474443347476454343621315123 +142445323134524455344767565745845466776955777775867689676669795765547875554364474423523255433452550 +420122443552465225677645453567777645666955697588578797786675779777688864467444476525625534353143351 +013443533555256553426677376778475746848576769888786588999657647784787744733675443533555552342334414 +041143134325455654456573473653567744748677959966765568889765584875786654736746477425243323345412331 +432143141143446546334633656476476747668864878778688989957788768655568457357565474424624643255141123 +433102225554544652566677347757675544755546776854548575485655786465456345347635444252452425412221021 +323443424115135364655624436464533765445864646766688454775574785855547635756475456566323553413444404 +040133323452356462366536677466667655766665575477656846545868855587636377637445452653223313533353431 +112321424255322325434562636744647576545484488884676746485886457756657434733352222326531315442212112 +414000041225332224365336457576353475444476854684468466666787764643346356664452563552325454125532334 +333211225554233356326636546733667664766764488678465547455847554453346674333644366565122142144303010 +201332104431213354534342624674574463634343535468776645455555777363557644444632234452452514524001241 +221121011452151314652546563557737463367364573534653347663557476557753774362253653622553112413343020 +301020124355152323443536262535766773343757377576554465333456475773466764562232455333212154220142002 +322244112312155113454636553224336764436375336773533577673334677767346562553664626122341142230310021 +023103242244551224134442622342463557736536665447475654776476664656746264566536561531213151202033312 +000241244142514451335326646524645362354365656733573556434643567466354436652444155224421243124420312 +211134103233321112311333366243566524426453645455335474755773645624422266326533321441535122300041202 +010100412012005141235135226623364644564632374554665337675444336522352336344211133431343203034321031 +120100431404011341421515543345452262445624345326474644544443332326425454424431513314250240023131303 +302230432233042151414231553363365325522333634334265345542443426352642445554145124343411121104121203 +303233311431323211311335332253563563355242335445366433543356662343656654554132224132234403131422203 +113031120441440344151555331254253525425556245652343434526624622453624343111341315343030233140303323 +113030023221043232305142142324135442534246224522233522334666345254334253143442354430224400423233033 +031102021123340100023323433221314345163424223524353422623255522232122453215412122243144210131021220 +123100111112040244104314311535251111141234335442354234236235354514311422435123332031213231120131013 +221222103112033302010413133424335241315253243263446652241133155434215112225523013040443233102021312 +000012122130221202130324443534215451343511144224113442315342555214421524454224402343214132100123030 +112012230223002044203111222225321532514541153222214115443212344354545231533442344002011210202230120 +221200232013222231032340233141433354514311213113224441111332422254143133440204220101431230200002121 +211212213121303211020441232042142451254444244521121152121224435112515234204202321124222332312210022 +202120032200122003044340422223002041534554215334252122413441432141223402244034330212233311001312221 diff --git a/src/adventofcode2022/data/day_09/day09.txt b/src/adventofcode2022/data/day_09/day09.txt new file mode 100644 index 00000000..1e4437a0 --- /dev/null +++ b/src/adventofcode2022/data/day_09/day09.txt @@ -0,0 +1,2000 @@ +R 1 +U 1 +D 2 +L 2 +D 1 +U 1 +R 2 +D 2 +R 2 +U 1 +L 1 +U 2 +R 1 +L 1 +R 1 +L 1 +R 1 +U 1 +L 1 +U 1 +R 2 +U 2 +L 1 +R 1 +L 1 +U 2 +R 2 +D 1 +R 2 +U 2 +L 1 +U 2 +D 2 +L 1 +U 2 +R 2 +L 2 +U 1 +D 1 +L 1 +R 1 +L 1 +U 1 +L 1 +U 1 +R 2 +L 1 +R 1 +D 2 +L 2 +R 2 +U 2 +D 1 +L 1 +U 2 +R 2 +D 1 +U 1 +D 2 +U 1 +L 1 +D 2 +U 1 +R 1 +L 1 +U 2 +R 2 +U 1 +D 2 +R 1 +L 2 +D 2 +L 1 +D 2 +L 1 +R 1 +U 1 +R 2 +L 2 +U 2 +L 2 +R 1 +L 1 +D 1 +L 1 +R 1 +L 1 +R 1 +U 2 +D 1 +L 1 +R 1 +L 2 +U 2 +D 1 +U 1 +R 1 +U 1 +L 2 +U 2 +R 2 +U 2 +L 1 +U 1 +R 1 +U 2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L 17 +U 17 +D 1 +U 3 +L 9 +D 11 +U 14 +L 2 +D 14 +U 9 +R 2 +D 15 +R 16 +D 17 +L 16 +U 8 +D 1 +R 2 +L 6 +U 14 +R 7 +L 15 +D 14 +L 3 +R 5 +U 5 +R 15 +D 15 +U 7 +D 11 +U 13 +R 16 +L 17 +U 11 +R 13 +U 10 +L 7 +U 8 +L 3 +D 3 +L 1 +D 2 +L 2 +D 4 +L 15 +R 14 +U 13 +R 15 +U 15 +L 2 +R 10 +U 4 +D 11 +U 12 +L 1 +R 7 +L 4 +R 12 +D 1 +L 10 +R 8 +L 4 +R 13 +U 6 +R 10 +D 17 +R 14 +D 4 +R 11 +D 13 +L 16 +U 8 +D 1 +R 16 +U 11 +D 15 +U 1 +D 14 +L 9 +D 5 +R 1 +U 2 +L 9 +D 15 +R 18 +D 6 +R 11 +U 7 +R 5 +U 1 +L 13 +D 7 +U 15 +D 9 +R 11 +D 18 +U 11 +D 13 +L 7 +R 18 +U 13 +L 3 +U 18 +R 15 +U 9 +D 6 +U 7 +R 3 +L 6 +D 1 +U 5 +L 16 +R 7 +L 14 +D 6 +L 4 +R 16 +U 3 +L 6 +U 8 +R 2 +U 13 +R 18 +L 10 +D 15 +U 3 +R 12 +U 13 +L 14 +U 15 +R 11 +L 17 +U 2 +R 18 +L 16 +R 6 +D 17 +L 11 +R 16 +D 4 +U 6 +R 18 +D 15 +U 18 +R 5 +D 8 +L 10 +D 7 +L 19 +R 19 +L 10 +D 1 +R 2 +U 5 +D 6 +U 2 +L 11 +R 14 +D 13 +L 15 +U 11 +R 7 +L 5 +U 15 +L 4 +R 3 +L 13 +U 17 +L 3 +U 15 +R 11 +L 17 +U 8 +R 8 +D 10 +L 9 +D 17 +L 14 +R 2 +L 19 +R 3 +D 3 +U 18 +D 15 +L 3 +R 18 +U 5 +D 17 +L 15 +R 7 +D 10 +U 11 +R 8 +U 14 +D 16 +R 10 +U 14 +R 11 +L 7 +R 1 +U 16 +L 6 +D 13 +L 9 +U 7 +R 19 +L 1 +D 11 +L 18 +D 19 +U 15 +R 18 +U 8 +R 4 +D 18 +R 12 +D 18 +R 8 +U 2 +L 2 +U 2 +L 12 +U 18 +R 12 +L 17 +R 2 +U 12 +D 19 +U 12 +L 8 +U 2 +L 12 +U 19 +R 11 +D 9 +R 10 +U 17 +L 19 +D 15 +L 3 +R 13 +U 2 +L 13 +R 6 +D 4 +U 18 +R 11 +U 7 +D 2 +R 4 +L 13 +U 11 +D 10 +U 17 +D 3 +U 10 diff --git a/src/adventofcode2022/data/day_10/day10.txt b/src/adventofcode2022/data/day_10/day10.txt new file mode 100644 index 00000000..ab8f5105 --- /dev/null +++ b/src/adventofcode2022/data/day_10/day10.txt @@ -0,0 +1,139 @@ +noop +noop +addx 5 +addx 31 +addx -30 +addx 2 +addx 7 +noop +noop +addx -4 +addx 5 +addx 6 +noop +addx -1 +addx 5 +addx -1 +addx 5 +addx 1 +noop +addx 5 +noop +addx -1 +addx -35 +addx 3 +noop +addx 2 +addx 3 +addx -2 +addx 2 +noop +addx 8 +addx -3 +addx 5 +addx -17 +addx 22 +addx -2 +addx 2 +addx 5 +addx -2 +addx -26 +addx 31 +addx 2 +addx 5 +addx -40 +addx 30 +addx -27 +addx 4 +addx 2 +addx 3 +addx -3 +addx 8 +noop +noop +addx 2 +addx 21 +addx -15 +addx -2 +addx 2 +noop +addx 15 +addx -16 +addx 8 +noop +addx 3 +addx 5 +addx -38 +noop +noop +noop +addx 5 +addx -5 +addx 6 +addx 2 +addx 7 +noop +noop +addx 4 +addx -3 +noop +noop +addx 7 +addx 2 +addx 2 +addx -1 +noop +addx 3 +addx 6 +noop +addx 1 +noop +noop +addx -38 +noop +noop +addx 7 +addx 3 +noop +addx 2 +addx -2 +addx 7 +addx -2 +addx 5 +addx 2 +addx 5 +addx -4 +addx 2 +addx 5 +addx 2 +addx -21 +addx 9 +addx 15 +noop +addx 3 +addx -38 +addx 7 +noop +noop +addx 18 +addx -17 +addx 4 +noop +addx 1 +addx 2 +addx 5 +addx 3 +noop +noop +addx 14 +addx -9 +noop +noop +addx 4 +addx 1 +noop +addx 4 +addx 3 +noop +addx -8 +noop diff --git a/src/adventofcode2022/data/day_10/day10_test.txt b/src/adventofcode2022/data/day_10/day10_test.txt new file mode 100644 index 00000000..37ee8ee1 --- /dev/null +++ b/src/adventofcode2022/data/day_10/day10_test.txt @@ -0,0 +1,146 @@ +addx 15 +addx -11 +addx 6 +addx -3 +addx 5 +addx -1 +addx -8 +addx 13 +addx 4 +noop +addx -1 +addx 5 +addx -1 +addx 5 +addx -1 +addx 5 +addx -1 +addx 5 +addx -1 +addx -35 +addx 1 +addx 24 +addx -19 +addx 1 +addx 16 +addx -11 +noop +noop +addx 21 +addx -15 +noop +noop +addx -3 +addx 9 +addx 1 +addx -3 +addx 8 +addx 1 +addx 5 +noop +noop +noop +noop +noop +addx -36 +noop +addx 1 +addx 7 +noop +noop +noop +addx 2 +addx 6 +noop +noop +noop +noop +noop +addx 1 +noop +noop +addx 7 +addx 1 +noop +addx -13 +addx 13 +addx 7 +noop +addx 1 +addx -33 +noop +noop +noop +addx 2 +noop +noop +noop +addx 8 +noop +addx -1 +addx 2 +addx 1 +noop +addx 17 +addx -9 +addx 1 +addx 1 +addx -3 +addx 11 +noop +noop +addx 1 +noop +addx 1 +noop +noop +addx -13 +addx -19 +addx 1 +addx 3 +addx 26 +addx -30 +addx 12 +addx -1 +addx 3 +addx 1 +noop +noop +noop +addx -9 +addx 18 +addx 1 +addx 2 +noop +noop +addx 9 +noop +noop +noop +addx -1 +addx 2 +addx -37 +addx 1 +addx 3 +noop +addx 15 +addx -21 +addx 22 +addx -6 +addx 1 +noop +addx 2 +addx 1 +noop +addx -10 +noop +noop +addx 20 +addx 1 +addx 2 +addx 2 +addx -6 +addx -11 +noop +noop +noop diff --git a/src/adventofcode2022/data/day_11/day11.txt b/src/adventofcode2022/data/day_11/day11.txt new file mode 100644 index 00000000..419cb88b --- /dev/null +++ b/src/adventofcode2022/data/day_11/day11.txt @@ -0,0 +1,55 @@ +Monkey 0: + Starting items: 89, 74 + Operation: new = old * 5 + Test: divisible by 17 + If true: throw to monkey 4 + If false: throw to monkey 7 + +Monkey 1: + Starting items: 75, 69, 87, 57, 84, 90, 66, 50 + Operation: new = old + 3 + Test: divisible by 7 + If true: throw to monkey 3 + If false: throw to monkey 2 + +Monkey 2: + Starting items: 55 + Operation: new = old + 7 + Test: divisible by 13 + If true: throw to monkey 0 + If false: throw to monkey 7 + +Monkey 3: + Starting items: 69, 82, 69, 56, 68 + Operation: new = old + 5 + Test: divisible by 2 + If true: throw to monkey 0 + If false: throw to monkey 2 + +Monkey 4: + Starting items: 72, 97, 50 + Operation: new = old + 2 + Test: divisible by 19 + If true: throw to monkey 6 + If false: throw to monkey 5 + +Monkey 5: + Starting items: 90, 84, 56, 92, 91, 91 + Operation: new = old * 19 + Test: divisible by 3 + If true: throw to monkey 6 + If false: throw to monkey 1 + +Monkey 6: + Starting items: 63, 93, 55, 53 + Operation: new = old * old + Test: divisible by 5 + If true: throw to monkey 3 + If false: throw to monkey 1 + +Monkey 7: + Starting items: 50, 61, 52, 58, 86, 68, 97 + Operation: new = old + 4 + Test: divisible by 11 + If true: throw to monkey 5 + If false: throw to monkey 4 diff --git a/src/adventofcode2022/data/day_11/day11_test.txt b/src/adventofcode2022/data/day_11/day11_test.txt new file mode 100644 index 00000000..30e09e50 --- /dev/null +++ b/src/adventofcode2022/data/day_11/day11_test.txt @@ -0,0 +1,27 @@ +Monkey 0: + Starting items: 79, 98 + Operation: new = old * 19 + Test: divisible by 23 + If true: throw to monkey 2 + If false: throw to monkey 3 + +Monkey 1: + Starting items: 54, 65, 75, 74 + Operation: new = old + 6 + Test: divisible by 19 + If true: throw to monkey 2 + If false: throw to monkey 0 + +Monkey 2: + Starting items: 79, 60, 97 + Operation: new = old * old + Test: divisible by 13 + If true: throw to monkey 1 + If false: throw to monkey 3 + +Monkey 3: + Starting items: 74 + Operation: new = old + 3 + Test: divisible by 17 + If true: throw to monkey 0 + If false: throw to monkey 1 diff --git a/src/adventofcode2022/data/day_12/day12.txt b/src/adventofcode2022/data/day_12/day12.txt new file mode 100644 index 00000000..2e02b7cb --- /dev/null +++ b/src/adventofcode2022/data/day_12/day12.txt @@ -0,0 +1,41 @@ +abcccccaaaccccaacaaccaaaaaaaaaaaaaaaaaaaaccccccccccccccccccccccccccccccccccaaaaaa +abcccccaaaacccaaaaaccaaaaaaaaaaaaaaaaaaaaacccccccccccccccccccccccccccccccccccaaaa +abcccccaaaaccaaaaaccccaaaccaaaaaacccacaaaaccccccccccccccccaaaccccccccccccccccaaaa +abcccccaaacccaaaaaaccccccccaaaaaacccccaaccccccccccccccccccaaaccccccccccccccccaaaa +abcccccccccccccaaaacccccccaaaaaaaaccccccccccccccccccccccccaaacccccccccccccccaaaaa +abccccccaacccccaacccccccccaaaaaaaaccccccccccccccccccccccccaaaaccaaacccccccccccccc +abccccccaacccccccccccccccaaacccaaaacccaacaaccccccccccacaccaaacaajaacccccccccccccc +abcccaaaaaaaaccccacccccccaaaccccaaacccaaaaaccccccccccaaaaaaajjjjkkkccccccaacccccc +abcccaaaaaaaacaaaacccccccccccccccccccaaaaaccccccccciiiijjjjjjjjjkkkkcaaaaaacccccc +abcccccaaaacccaaaaaacccccccccccccccccaaaaaacccccciiiiiijjjjjjjrrrkkkkaaaaaaaacccc +abcccccaaaaacccaaaacccccccccaacccccccccaaaaccccciiiiiiiijjjjrrrrrsskkaaaaaaaacccc +abccccaaaaaaccaaaaacccccccccaaaacccccccaccccccciiiiqqqqrrrrrrrrrssskkkaaaaaaacccc +abaaccaaccaaccaacaacccccccaaaaaaccccccccccccccciiiqqqqqrrrrrrruussskkkaaaaacccccc +abaaaacccccccccccccccccccccaaaaccccccccaaaccccciiqqqqqttrrrruuuuussskkaaaaacccccc +abaaaacccccccccccccccccccccaaaaaccccccccaaaaccchiqqqtttttuuuuuuuussskkcccaacccccc +abaaacccccaaaccacccccccccccaacaaccccccaaaaaaccchhqqqtttttuuuuxxuussslllcccccccccc +abaaaaccccaaaaaacaaccccccaccccccccccccaaaaacccchhqqqttxxxxuuxxyyusssllllccccccccc +abacaaccccaaaaaacaaaaaaaaaaccccccccccccaaaaaccchhqqqttxxxxxxxxyuusssslllccccccccc +abcccccccaaaaaaacaaaaaaaaaccccaacccccccaaccaccchhhqqtttxxxxxxyyvvvsssslllcccccccc +abcccccccaaaaaaaaaaaaaaaaaccccaaaaccccccccccccchhhppqttxxxxxyyyvvvvsqqqlllccccccc +SbcccaaccaaaaaaaaaaaaaaaaaacaaaaaacccccccccccchhhhpptttxxxEzzyyyyvvvqqqqlllcccccc +abcccaaccccaaacaaaaaaaaaaaaacaaaaccccccccccccchhhppptttxxxyyyyyyyyvvvqqqlllcccccc +abaaaaaaaacaaacaaaaaaaaaaaaacaaaaacaaccccccccchhpppsssxxyyyyyyyyvvvvvqqqlllcccccc +abaaaaaaaaccccccccaaacaaaccccaacaaaaaccccccaagggpppsswwwwwwyyyvvvvvvqqqmmmmcccccc +abccaaaaccccaacaacaaacaaacccccccccaaacaaaccaagggppssswwwwwwyyywvvqqqqqqmmmccccccc +abcaaaaaccccaaaaacaaccaaccaaaccaaaaaaaaaaaaaagggppsssswwwswwyywvrqqqqmmmmcccccccc +abcaaaaaaccaaaaacccccccccaaaaccaaaaaaaaaacaaagggpppssssssswwwwwwrrqmmmmmccccccccc +abcaacaaaccaaaaaaccccccccaaaaccccaaaaaacccaaagggppppssssssrwwwwrrrmmmmmdccccccccc +abccccaaaccaaaaaaccccccccaaaaccccaaaaaacccaacggggpooooooosrrwwwrrnmmmddddcacccccc +abccccaaaaaaaacccccccccccccccccccaaaaaaaccccccggggoooooooorrrrrrrnnmdddddaaaacccc +abcccccaaaaaaccccccccccccccccccccaaacaaacccccccggggfffooooorrrrrrnnddddaaaaaacccc +abccaaaaaaaacccccccccccccccccccccaccccccccccccccggffffffooonrrrrnnndddaaaaaaacccc +abccaaaaaaaaaccccaacccccccccccccccccccccccccccccccfffffffoonnnnnnndddcaaaaacccccc +abccaaaaaaaaaacccaaccccccccccccccaccccccccccccccccccccffffnnnnnnnedddaaaaaacccccc +abcccccaaaaaaaaaaaacccccccaccccaaacccccccccccccccccccccfffeennnneeedcccccaacccccc +abcccccaaacccaaaaaaaaccccaaacccaaaccacccccccccccccccccccafeeeeeeeeecccccccccccccc +abcccccaaccccaaaaaaaaacccaaaaaaaaaaaaccccccaaaccccccccccaaeeeeeeeeeccccccccccccca +abaccccccccccaaaaaaaaacccaaaaaaaaaaacccccccaaaaacccccccaaaaceeeeecccccccccccaccca +abaccccccccccaaaaaaaaccaaaaaaaaaaaaaacccccaaaaaccccccccaaaccccaaacccccccccccaaaaa +abaccccccccccaaaaaaacccaaaaaaaaaaaaaacccccaaaaacccccccccccccccccccccccccccccaaaaa +abaccccccccccaccaaaacccaaaaaaaaaaaaaaccccccaaaaaccccccccccccccccccccccccccccaaaaa diff --git a/src/adventofcode2022/data/day_12/day12_test.txt b/src/adventofcode2022/data/day_12/day12_test.txt new file mode 100644 index 00000000..86e9cac3 --- /dev/null +++ b/src/adventofcode2022/data/day_12/day12_test.txt @@ -0,0 +1,5 @@ +Sabqponm +abcryxxl +accszExk +acctuvwj +abdefghi diff --git a/src/adventofcode2022/data/day_13/day13.txt b/src/adventofcode2022/data/day_13/day13.txt new file mode 100644 index 00000000..fe5c5ae1 --- /dev/null +++ b/src/adventofcode2022/data/day_13/day13.txt @@ -0,0 +1,449 @@ +[[[[4,7,7],0,4,[6,3,3,7,10],2],2,[[3]]],[]] +[[[[1,4,8],[3,3,1,4]]]] + +[[7,6],[],[[5],0,10,[7,9,[7],0]]] +[[[[6,9,0]],0]] + +[[7,7,[[5,1,4,9,4],8,[8],[1,1,6,2]],[[],3,6,[],[]]],[],[10,2,7],[0,[1,2,4,1,0],[1,[],0],5,[]],[4,[[],[],[]],[]]] +[[3,6],[[9,6,[]],8,[8,8,3,[8,2,3,10],[6,5]],[6,4,[8,5],8]]] + +[[[[4,8,1,3,4],[2,4,10,5,4],[7,7],7],[[9,8,4,7,0]],8,[3,1]],[[],[[9,3],5],[],7,[[],8,8,[6,0,3,10,2],[0,8,7,0]]],[9,[4],7,3]] +[[5],[[[],[],[7,10]],3,6],[[[],4,[8,6,3,1],0,[5,1,0,4]],[],[[9,5]],4]] + +[[6,10,9,[],[[2]]],[9,[10,[3,5,0],[6,5]]],[],[[8,[2,2,3]],6]] +[[],[[],9,[9,2,[6,8,10,3],2],9,3]] + +[[[[3],[]],5],[[],[7,[3,3,3],2,[1],[6,7,9]],[],8,1],[9,[0,0,[5,3,5,1],[2],2],3],[2,[0,4]]] +[[[]],[[[],10,[8,0,5,5],[5,4,8,10,1],[6,8,0,3,5]],2,[9,[5],[9,2],[]],[8,[]]]] + +[[3],[[8],6,5],[]] +[[],[0],[],[3,0],[]] + +[[0,[[9],[],[6,10,9,9,6],[1,1,10,6],[1,2,6]]],[]] +[[[3,[5,3,7,10,5],[9,2,1]],[[3,7,0,6]],[[]],[4,[1]],[8,8,[2,4,8,3]]],[[5,6],[]],[[],5],[]] + +[[3,4,[[1,6,10],[10],[1],[]],8,[[4,10,3]]],[9,8,0,0]] +[[0,[9],[],9,0],[6],[[0,7],0,[[10],[8,5],[3,3,6,2,7]]],[[[2,7],1,10,6],[]]] + +[[[],5,10,[7,0,[3,0,1,0]],6],[[[7,10,3,9],2,[5,6],3,[4,0]]],[[],[6,[3],[5,0,8,2],[0,9,10,5,5]]]] +[[9,1,0,4],[]] + +[[0,0,2,6,[[3],[3,4,7],[10,8,7,9],[4],4]],[[3,[]],8,[[10],8,3,[4,4,8],[0,2,9,7]]],[]] +[[[4,1],4,8]] + +[[[[1,9,4,3,8]],[[2,8,0,9,0],0,4,5,[2,9,5,1,8]],8,3],[[[4],1,8,[5,8],[4,0]]],[[0,7,[8,1,4,0,5],7],[[8],[],[0,8,5,7,5],6],0,[[4]]],[[],9,4,[6,[],[1,2,3,10],1],[[6,0],[8],5,6]]] +[[[5,[]],[],0],[[5,4]]] + +[[[6],[],1],[0,[7,1]]] +[[[6],5,4,10],[8],[[[6,0,1,4,4],7,[],6]],[10,4],[[[3],[0,0,1],3]]] + +[[[6,[9,10]],[[],3,[8,3],3,[3]]]] +[[[7,0,9,[8]],[[3,2,9,6,1],6,[4]]],[[[5,2,2],1,0,9],8,4,10]] + +[[2],[]] +[[5],[[[4,3,5],[5,9,10,6,7],[5],4,[9,7,6,2]],2,[]]] + +[[2,0,[[]]]] +[[[[8,2,8,8,6]]],[7,[[4,0,8,9,9],10,3,[],[5,7,6]],9,3,9],[7,[1,9],[6,[],3],10,1],[[]]] + +[[[2,10,7,[8]]]] +[[3,[[2,5,2]],[8],[],[[]]],[]] + +[[[5,7,4,0,[3,9,0,7,4]],[]],[7,4],[2],[[[5]]],[[[3,7]],[9],[5,[4,0],4,3,8]]] +[[9,[8,[],[2,3],[9,2,10]],[]],[1,1,[9,7,[0],[8,10,7,10,4]],8,[]],[7],[[7,[10,1,5,7,7],8,[3]]]] + +[[],[[[5,4,7,10,3]],0],[],[[4]],[[],[2,0],1,[[4,0,6,9,1],[5,5,0,8,9],[4],[]]]] +[[[],6,[7,8],1,0]] + +[[[4,[7,1,9,4,0],[10,8,8,3],[7,10,4,3,9]],2,[3]],[[[]],[9,[10],8,0,10],4],[],[[1,4,7,[]],3],[[[4,1],[4,0]],[[10,3],[10,7],1],3,[9,[3,6,10,4,3]],0]] +[[[0,[0,10]]],[[],[],[0,[],[1,0,5,3],1,7],[7,4],2],[[7],8],[[[7,8],[10,2,0,5,1],[8,6]]],[[6,[7],[1,5,1,5],9]]] + +[[[5,[7,8,0,6],0,4],[[6],1],[1,[0,0,6,9]],[10,[5,4,4],[8,9,7,8,1],[9,8,3]],[[6,7,5],10]],[[2]]] +[[[[4,4,1,0],[1,5,7,7]],[9,[6,7,6,7],7,[0]],2,[[3,1,4,4,5],[0,4],[3,5,7]]],[[3,5],4,5,3,6],[1,9,[[9,10,2,10],5,[9,9],[3,0,0],7],0],[5,5]] + +[[2,3]] +[[],[8,5],[[[7,4,4,10,8],[],[10,6,10]],8,4,1]] + +[[[[],8],[10,2,[],4,[5,9,4,3]],[[0,1]]],[1,10],[5,6,10,[10,[3,10],[]]],[9,[2,[0,7,1,8],5],[6],1]] +[[3,[8],3,[4,10,[5,10],3,10]]] + +[[0],[0,[[1,6,10],[5,3,10],1,[7,10]],1]] +[[],[5,0],[[4,[1,8,4],[8],[3,1]],6,[9,[3],10,8,[1,8,2,1,6]],3,[[8],0,4,6]],[[[10,1,1,9],0],[1,[],[1,6,8,9],[0,5,6,8,1],[2]],[9,[2],[9,0,4,6],[4,0,6,4]],[[9,9,5,9],1]],[2,[],[5,[2,1],7,[],10]]] + +[[10,1,9,6,[[8],5,1,[5,4],[5,0]]],[[[7,6,1],10,10,[2,8,5,3,1],5],7,[[2,5,6,7,1],5,[]]]] +[[6,[[10],[7,9,2,0],8],2,3,[]]] + +[[],[0,5,8,3,[]],[[5,5,[],[10,10,4]]],[8],[8]] +[[5],[7,2,5]] + +[[],[],[5],[]] +[[],[[2,[0],8],[[9,0,6,6,1],2,2,[0],[]],5,9],[[],3,7]] + +[[5,[[8],5,[5],[5,5],[10,5,9]],[[5,1],[1,10,6,8]],8,[[2,9]]],[[[0,8,5],10,[9,6,4],2,8],5,7,0]] +[[8,[8,[5,1,2,5],[5,10,6,5,3],0],6,10,1]] + +[[8,6,[[],[6,3],10,9],7]] +[[[4,[7,6,7,2,5]],[[10,4,8,10]],6,[[4,5,2,10,7]]],[[[1,9,10,6]],[9,[],[8,0,4,1]],10,6],[],[10,[[6,0],[1,9,9,10,5],[8,9],6,7],[1,9]],[0,[[6,3],8,[3],[],1],[[1,1],[],6,1,[10]]]] + +[[10,9,[4,[7,6,3],5,[]],[],[3,0,2,3,[10,6,10]]],[2,[[1,10],6,[9,5],[4],8]],[[[2],[2,8]],[2,1],6,[],4]] +[[5],[9]] + +[[[],[[0,4,6,4],2],0,5],[6,[[],5,2,2,[]],[0,[9,0,5]]]] +[[1,6,2,7],[2,5,0,2,[7,2]],[[9,9,2,[6,0,6,3,9]],[],[],0,8]] + +[[[4],5,[],3],[[[],5,5,[9,4,7,3]],[],3],[],[[2,4,[0,0],10,[]]]] +[[],[[[7,0,8],[6,9,0,0,2],[5,6,10,7]]],[4,8],[8,7],[[0,[0,10],[5],0,[1]],[5,0,[9,3,4,9]]]] + +[[[1],3],[],[]] +[[10,[[2,2],[6],[8],5]],[8,4]] + +[[9,[],8,[[9,4,10],5,3,[7,6,0,6]],2],[],[[3],4,[5],[8,[0,0,9,3],10,[],[]],[[7,6,7],9,[4,2,6],[0,7]]]] +[[],[3,2,[1,7,[3,1,10],[6,3,1,5,1],2]]] + +[[[3,[4,2,7,9],[8,7,2,10,8],[5,3,10],[9]],[[1,2,5],10,[5,4,7],[2,0,7,5],[1,4,3]],[2,[],3,[]]],[],[],[[5,10],6]] +[[[[5,10]],[[10],2,[9,6],[6,9]],1],[[[0,2,7,6,0],[3,4],[5,2],2,4],[],[2,[],[7,10,4],2],[[3]]],[[],[1,8,[7,0,1]],8,8],[[[8,1],[1,5,10]],[[2,0,8,4,2],2,4,7,[4,0]],9,[7,10,1],8],[5]] + +[[[4],[],[8],1],[[],4,0,4,[[2,5,7],0,[1,9,6,6],[6,2,0,0]]]] +[[1,[[3]],[2,3,6,[4,5,3,4]],8],[[],2],[5,0,[[8],[4,0,4,9]],[3],1],[10],[3,2,3,5,[10,9,[2,6,4]]]] + +[[1,[[5,8],[0,5,4],[1,8],9],9,[[5,4],[0,1,4,2,7],[7,1,8,5,8],[3,6,8],9]],[[[2,7,9,3],4,[6,2,1],7],4,10],[6,1,2]] +[[5,0,[[9],[10],[2,7,5],[7,6,6,5],2]],[4],[2,10,1,[[],4],[[],0,[0,4,8,7]]],[[[],8],5,[10],[4,[],7]],[]] + +[[[1,[4,6,6,5]],[[8,1,2,2,4],2,[1]],7,5,2],[8,2,3,2],[[],[5,10,4,[]]]] +[[3],[[]],[[10]],[[0,[3,9,10],9,6],10,6,6,1],[[4,8,2,2,[10]],[[]],[2,6],[0,[2],2,[8,0,1,2],3],5]] + +[[[[7,4,7,8,10]],[[10,7,8,5],[1,6,7,4,2],3,[5,7,2,4,2],4]],[4,10,6,1,[[8,0,5,8],1,[2,3,0,9,4],[6,10,1,9,10],[9,0,9]]],[1,9,5]] +[[[3,5,5],10,5,[],[[1,0,2],7,[1,1,2,9,2]]],[[],[[2,3,7,9],[],2,4,4],8,10],[],[5,[[2,1],3]]] + +[[7,9,9,[[7,6],8],5],[0,10,[3,5,1,[0,10,1,8]]],[[[10]],[8,[2,0,10,9,1],7,[8,1,7],[0,8,3]]],[[9,[0,0,9,3],[5,0,10,7,10]],[],[10,7],[],[[10,6,10],[10,3,4,8],1,[]]],[3,[],[[],[7,10],0],[]]] +[[[7]]] + +[[4,[4,[2,10,7,1,9]],5],[9,3,[[6,7,2,5],[4,7],[10,7,5],[5,9,5,9]]],[5,[],[10,[2,9],8,[]]],[[[6],8,3],8]] +[[9,[2,10,6,7],5],[7,[7,[6,10,2],[6,4,3,4]],8]] + +[[3,[3,[2,8,4,3],9,10,[]],[4]],[8],[[2,[8,0,0,9],9,5,0],9]] +[[[],8,[5,[0,0,10],8,0]],[[0,[5,4,8,5,10],10,[10,0],9]],[10,3,6,6,[]],[6],[9,7,[3,10,6,[3,2]],0,[3,[6,0,2]]]] + +[[7,[5,[3],2],1,2,[8,8,[1],3]]] +[[5,6,[[2],4,3],[9,2,3,9]]] + +[[],[6,8,2,7,3],[[[3,5,0,5,4],[0,0,3,8],[2,8,3,4],0],[],[[5,5]]],[9,[3,[],6,9,6],[5,[10,4,9,1,3],9]],[5,[],10]] +[[8],[1],[[],5,[[4,5],[],3],6,[[4,10,2,0],1,[4,7,8,10,10],[5,0,10]]],[2],[[5,[],[10],6,[2]],[[9,10]],[0,2,5],3,9]] + +[[6,3,6,2]] +[[],[[8,[7,3,4,3]],[[7,1],[2,0,9,3],3],9],[3,[[8,3,7,3],[2,4,3,0],5,[5,4,6,5]],2,0,7],[4,[5],[[],[],3],7,4]] + +[[[],6,[],[[9,8,2,3,8],4,[5],[1,0],[5,4,2,9,7]],[1]],[3,[]],[[[1,4],[4,8,7],[5,1,1]],[[9,9,0,5,4]],[9,[]]]] +[[[]],[[[3],9,4,[]],[[2,6,3,10],[5,8,9,5,8],[5,5,2,7,1],10,[2,8,0,4,10]]],[],[[[2,5,10,7],10,3],6,[[10]],[[5,3,0,7,1],6],4]] + +[[]] +[] + +[[8],[[[1,10],2,[5],5],[]],[[[8,5,2],[8,5],[5,10,4],[9,9,10],9]],[[[]],1],[4,[],[3,[],[10],3,[8,8]],[[9,4]]]] +[[[[8,8],[7,1,8,4],[8,2,1],[4,5,4],9],9,[],1],[[5,1],[[3],9,1],9,7],[[0,10,8,4,[0]],[[2,0,9,9,6]],0,3,10]] + +[[9,[[6,2,10],10,[6],[7,3]],4,8,[[1,1,9,2]]]] +[[[],[7,9],4,[[1,9,8,10],[5,1,5,4],[9],[0,0,10]]],[3,3,9,[[7],10]],[[[],5,0,5,9],[[10],1,[],1,[7,6]],9,1],[[[2,9,4,1]],4,4,[7,7,[7,3,9,8],[2,6,7,9,2]],[5,[],2,8,3]]] + +[[[[3,10,6,6,6],0,[1,2,3,3,9]],2]] +[[10,3,[]],[3,2,[]],[[10,[2]],5,8],[3,3],[[4,[],6,4,6],6,1,7,[3,4,3,[4,9,6,2]]]] + +[[5],[[6,8]],[7,0]] +[[[],[0,6,[],9],[[4,1,3,1],7,0],[6,[4,6],[]],[4,3]],[],[[8,[3,9],[],[5,10,4],[4,0,4]],[[7,4,10,4,2],[5,7,5],[5,1],0,[6]]],[4,[[2,3,0,0,6]],2]] + +[[8,6],[[5,[9,2,5,7,9]],[[5,9],[5,6,3,10],5],[[5,10,6,3,6],[3,1,4,1],[8,7]]],[[],[0,10,[1,3,5,6]]],[]] +[[8,[6,1,8,[],6],3,[7]]] + +[[1,8,3,[[2,2,0,4],3,[],8,5]],[5,[[6,3,1,9],6,9,[7,6]],5,9]] +[[[[2,8,2],9,[9],2],2,2,[],[6,6]],[[[],[4],[6,5,1,0,7],[9,5,5,1],[2,6,2]],[4,[0,3,3,5]],[]],[6]] + +[[[[3,7,10],1,[6,2,1,10],[2],6],5],[]] +[[3,3,3,[9,6,[],[10,8,9]],9],[10,[[8,9,8,6],[10,2],[2,7,2,0,1],3],[0,8,[]],10,7]] + +[[[9,7],[0,4,7,7,7],[[3,6,8,7,2],[],5,[2]],5]] +[[],[[[]],4,[[5],8,[],[],[10,1]],[],[3,2,[],9]]] + +[[],[5,1,9,1]] +[[5,[10,[10,4,10],[4,6],8,[5]],5,5],[[[]],1,1,[]],[3,5,3]] + +[[],[3,10,[3,[5],9,[]],[0]]] +[[[7,1],[[6,5],5]],[10,[5,7,[5,1],[]]],[[1],[4]],[6]] + +[[[[0,5,2],[6],[3,9]],[[10,3,2],3,[1,1,5]],9,[8,9,[9],10]],[[[1,9],0,9],1,[0,4,6],2],[[],4,[[],5]],[4,[6,[8],10],[],[[],[9],[1],[0,3,5,6],7]],[]] +[[3,[6,7,[],1,5],[8],[3]],[10],[1,6,10,6,[7,6]],[10,[[2]],7]] + +[[0],[],[2,4,2,[7,[7,2,0,1],5,1],0]] +[[[[1,7,3],6,3],9,9,[[0],4,5,[2,3,2,1],[6,4]]]] + +[[0,[3,[9,3,2],[7,9,10,4],[7,6,6,10]],[4,[5,7,0],5,1,6],10,[4,[9,2,9],0]],[5,[[10,9,4,0],1,[6],6],[2,9,[],[5,9],[]],[10,[],[],[1,4]]],[[7,9,[7,8]]]] +[[5,[10,2,[4,7],[]],[0,0,[7,4]]]] + +[[],[[8,[6,10,7],4],0],[],[4,0,[4,0],7,1],[4,10,[[9,7,3],[7,4,9,9,7],5,5]]] +[[[3]]] + +[[],[[1,5,[9,0,7,6,2],10,0],[]]] +[[[10,[10,8],[2,0]],6,4,10],[],[8],[]] + +[[3],[[6,[6,4,4,7,7],[5,4,6,4,7],[0]],[[9,4,10]]],[10,[10,[7,9,2,4],8,9,7],10]] +[[[[7],[7,2,4,8]],[3,[5],8,5],[[7,7,2,8,2],[1,10,8,2,10],[2]],6,[[9,6],10,[4]]],[5,[],[]]] + +[[5,[6,7,6,6],8,4],[[],1],[5,9],[[],5,6,7,[[6,8],10]]] +[[],[[],8],[4,6]] + +[[4],[]] +[[],[],[1],[[[7,7,1],[1]]],[[[1,9,5,0],4,5],1,[8,0,[7,4,8,1]],[[9,0,9],9,[4,5]],[0]]] + +[[[[],8,9,[6,5,7]]],[[[8,10],[0,9,8],5,4],[[10,8,8,3]],[[3,4,1,5],9,[],[4,10,10],3],8],[0,9],[[9,[8,1,10,1],[10,1,4],[3,1,10]],[7,9]]] +[[[1,[6],1],[[],4],3,9,5]] + +[[1,6,[],4,[7,10,1,[7,9,7,1],5]],[10,6],[0,6]] +[[[[3,7,9,5,7],7,4,10,4],4],[],[[[10,4,1,2,4],6,[1],7,[]],[[5,8,5]],8,[[5],[],[10,3,1],[6,7,6,5,10]],[8,[7,4,5],[2,8,10],[]]],[3,9,[[8],3,[0],2],7,[2,[0,3,7,5,4],4,8]]] + +[[[],[[6,7,3],[5,6],7,[7,1,8,3,10],[5,6,8,4]],8],[[[10],[5],[6,0,10],9]],[[[],[9,8,8,9,2],[2,5],[4,6,7,5]],10]] +[[[1,1,0,[9,6,3,10,7],2],2,10,[8,8,3,[10,10,5,4,7],[]]],[10],[5,[6,3],3,6,1],[[2,[6,10,10,9],[2,7],8,[2,0,7,10]],7,[],[5,[2],[],4,9],[1,[10,3],[]]]] + +[[[[0,1,7,7],9],8,4,[],[]]] +[[[7,[10,3]],[8,1]],[10,9,7,[[1],[6,9,2],8,1,[5,7,3,5,10]],[[]]],[[[9,3,9,10,9],0,[6]],1,[2,[5,8,4,5,5],9,[4,10],2],0,[4,[0,1],10,[6,9,9]]]] + +[[[3,7,[1,9,9,1,7],4],[],[[6,10,1,1],9,[9,9],8,0],4,[[],[7,8,0],9,[7,6,4,0,9]]],[[9,7,3],[[2,6,5,5],[]],[[9],[7,5,0,8],[9,9,1,1,0]],7,3],[5]] +[[[[10,2],10],7,6,[[10],[5,4],0,4,[8,5,4]],[[],1]],[4,8,[3,1,[0,8],[3],6],[[3,4,3],[6],[4,5,4]]]] + +[[[0,[9,6,6,8],0,[3,7]],[[3,2,0],[3],[4],[6]],4,3,[7]],[7,[[],[],8],6,3],[],[1],[5,9]] +[[[7,[6,4,7]],[[2,5],10,[6]],[[],[]],[1,[9],6,9,[0,7,4,3]],1],[1,[8,[7,8,1,9],[10,3,3,4]],[[4,7,3,0,3]],[[1,6,6],6,5]],[]] + +[[6,[5,6],5,8],[[[5,8,4,9],9,[1,8],3,[9,5]],[]]] +[[3],[1,[10,0,[2,7,3,8,2],[10,3,9,4,2]]],[[[10],[8,2,10],5,2],3,[3,[8,0],3,5,4],[],3],[],[[9,8,9]]] + +[[[5],7,[[5,8],[3,9,3]],[[4,5,3,3],[4,5,1,2],4,9]]] +[[7,[2,[3,3,0,5,3],10]],[6,5]] + +[[[3],[[9,1,2]],6,5],[8],[10,[[1,5,2,10,7],[],[10]],5,6]] +[[7,10],[[],5],[],[10,[6],[10],[[],10,9,[1,2],[0]],6],[6,0,[7,[3],[8,9,2],5,3]]] + +[[[[0,2,2,0,8],1],1]] +[[[],[[1,1,6,10,3],9,1],[[2,2],8,3,1],[[9,0,6,1,0],[3,3],7]],[],[[7,[1],[3,4,9,0,0],8],7,[9,[],[8,0,8],10],[[3,8],6,[8,0,10],[9,0,1,0,8],5]],[[[2,10,5,3,2],[2,5,7,9],[3,4,4,3]],0,2,[[]],3]] + +[[1,7,[[6,7,7],1,[4,3,10,1],3],0,3],[2,[]],[],[7,[[0,4],[5,8],7],[[7,10,3,9,5],[6,5,1,6,6],10],[2,0,[6]]],[]] +[[[[7],5,[]],8],[3,4,7],[[],[2,[6,7,7,0],[5,0,1],[7,5,1]]]] + +[[0,[],1],[[[10,0],[5,2],6],9,[[10,8,2,7,3],[4,8],[2,5,3,7,2],[9,4,3,9,9]],3,9],[]] +[[],[[[],[1,3,3,6]],[4,[2,6],4,[8,5]],[5],7],[[],[[],0]],[3,[[0,2],[1,4],0],6,3],[[],[[9,7],[],[7,3],[],7]]] + +[[[7,[2,3,3],5,8,9],[[1,8,6,7]],6,[8,[0,8,0,7,10],[8],[6,9,1],1],9]] +[[7,4],[[[8,7],3],[0,8,9],6],[8,[3,[],5,[10,0],2],[1,2,[9,4],0]],[[],[],10,[[3],4,2]],[10,[8,7],4,[[3,3,5,6],[],[9,8,4,1],[0],10],[]]] + +[[],[[[5],[3,7,7,0],[4,9,6,6]]]] +[[[[],[5,5,10,4]],8]] + +[[4,9,[],4]] +[[8,3,10],[[[1,1,1],[10,3],[9,1,10,3,4]],10,10,4],[[[]]]] + +[[1,[6,4,6],[],0,[[],[]]],[8,3,[2],7,8]] +[[8],[1,[],[2,[4,9,3],5,3,7]],[],[[[9,6,1,4],[9],0,8]]] + +[[[[9,7],[0,4,5,7,3],[10,8]],[[10,6,9,4],0,3,[9,2,5,8],[5]]],[[0],9]] +[[[[5,7,1,1,7],5,[],2],[3,[4],7,[9,0,9,1,0]],[[8],[10,3,10],[1,1],10,[5,3,7]],10],[[6],1],[[[],[4]],3,10],[]] + +[[[2,8,4,[8,7,6,5]],5],[10],[7,[]],[[9,7,10,0]],[5,9,[],[10,2,[2,2,7,0]],4]] +[[[[10,7,6,1],[]],[2,[],10,2,1],0,[[2,9,9,9,1],3,8,[9,7,6,3],2]],[4,[[3],9],8,[10,[6,9],[6,6,6,8,7],2,6]],[7,[[6,7,8],[5,2,8,7,9],[],8],0]] + +[[[4,10],8,10,8],[3,1,[2,7,[7,10]],2],[[2,0,3]]] +[[6,8],[10,[[1],7,7,10]]] + +[[[],[10,9,8,0,5],4,[],0],[[[1,8,6],8,[2,10,9,8],7],[7]],[2,[[9,8,5,4],8,[],[]],[[]],9,[2,4,[3,3,9,10]]],[]] +[[2],[[[6],[3,2,0],[3,8],[3,8,8,3,0]],6],[2,[10,[],9,[],[7,3,9,2,4]],3,2,1],[8,3]] + +[[4,[9],[[9,10,4,7,2],8,[1,9,0]],[3,6,9,9],[[3]]],[]] +[[[8],[7],[1,1,[7,10,7,5,2]],[[4,5],[9,10]]],[[],2]] + +[[[[7,9],[0,6,8],8,5,[1]],4,[6,1,[1,2,3,3,9]],10,7],[4,[[],3,5],7,[10],0],[4,1,5],[0,9,[[10,5],[0],9,[0,7,4,2,10]],5,9]] +[[[[9,9],1,10,[9,7]]],[1,[[1],[2,4,9,0]],[4,0],7],[[3,[1,3,4,7],5],2,[[]],[[5,4]]],[1,4,9,10]] + +[[[6],[[2,4,10,8,1],[0,5,1,10],2],[0,1],[[8]]],[[2,[4,0]],[[]],[3,2,0,[8,8],[0,5,10,6]],1],[2,9,4,6,[[8],[9],10,[5,5],[5,5,9,8]]]] +[[[[6],6,[4,9,4,9,4],[7],[1,0]],[]],[[[],3],[[0,3,3,2],6,[2,6,6,8]],[[6,10],8,4],6],[1,5],[[],10,[]],[[[6,7,5],[4],[]],2,0,[[],[10,3,2],1,2]]] + +[[10,[[1,3,1,1]],3],[7,[[4,9],[5,4],3],10]] +[[[[],1,[9,7,2,10,6],10,6]],[1,[0,[3,8,0],1,2,[8,6,4]],2,[[7,5]],[[],[3,8,7,1],[],2]],[[],4,1],[[[6,2],[7,0,2],1,[10],[3]],[],[0,[10],[2,2],0,2],[0,[7,8]],2],[[2,2,[5,10,10],[0],[]],0,0,[[],1,[8,10]],5]] + +[[7,[8],8,5,[8]],[],[1,[[3,7],10,6],[7,2],1,[[1,3,1,7],10,[7,3,10,2],5]],[],[]] +[[8,3,8,[5,10],4],[[[],[2,3,8,1,6],2,[0,10,2,3,7]],4,1,10]] + +[[[5,9,6,1],[10]],[[2,5,[6,4,4],[2,4,2],[8,5]],7,[4,5,[0],4]],[3]] +[[8,[],2,[[10,5,2,5,5]]],[[[],[1,9,0,8,2],5],1,[7,[8,7,3],[5,0,5],[6,2,3],2],[1,10,0]],[6]] + +[[2,6,[[9,3,4,7],[9,3,9,1,2],3,4,0],2],[[[],[9,10,7,0],[]],[[2,6],[7,9,9],2,[7,3,2,7,8],[9,5,5,6]]]] +[[8,[[2,0],7,[7,4,9,10],7],[5],[2,[4,5],5],4]] + +[[0,10,3,9],[[[3,5,3,0,4],[5,8,5,3],9,[0,3,4,3]],10,6],[3],[5,0,10,[[2,1],6]],[3,[2],[[4,1,1,7,9],[3],3]]] +[[9,[1,6,1,4],3,2,[[],3,[6,8],[3,4,8,0,8]]],[10,[9],8],[3,3,7,2,[]],[9,[[7,0,6,9,7],[0,1,9,2,9],[4,6],9,[9]],[]]] + +[[[[4,5],9],[[],6,2,5,[0,7,0,1,8]],[5],4],[[[3,7,10,9,3],[],[],3]],[0]] +[[[[],7,[3,9,5],9],0],[[3,[],8],[6],3,5],[1],[[[],[]]],[[5,10,[2,9],[1,8,9],[4,3,1,1]],1,[[],[2,10,9],9,6],[[3,7,9,3],[0],[5,0,5],[2,7,3,5],[0]],[3,[],[5,10,0],9,[7]]]] + +[[8,2,[],[5,7]],[4],[[[8],7,6]]] +[[5,[[0,10,5,9],4,[0,10]],0,5,10]] + +[8,4,9,3,2] +[8,4,9,3] + +[[[[5]]],[[1,0,8,6],7],[7,1],[4,6],[[9,2,[0]],[[4]],[7,1,0,[10,10],10]]] +[[0,[[10,0,5,5,2],1],9],[[[1,4,3,3,5],[6],0,[2,4,9,8],[4,8,4]],[10,[0,2,7],[9,8,5],[],9],[3,[],1]]] + +[[[1,7,[1,1,1,9]],[4,1,[8,4,2,1]],[],[]]] +[[[],[[],[7,9,7,2,6],9],[[6,6,3],[8],3,0,3],7,[3,[0,2,3,4,0],[5,7]]],[8,[1,6,5,7]],[[7,[],[4]],[8,[],[8,6,7,4],4,6],[],[9,[2,2,6,7,6],7],9],[[[],8],10,[[],[8,2,8],8,[5,1,8]],[],[3,5]],[2,1,[7,[0,6,5,6,6],[5,7,4],[5,0,4,5,10]]]] + +[[],[[[3,7],4]],[],[],[[[2,0]],[5,9]]] +[[[6,4,[10],8,5],5,[7,[4,4,0]],[6],5],[2,10,[[2,10,5,8,5],[10,5,7,2,8],4,[8,5,5]],8,[[3,3],[6]]],[3,[[0,8]],1]] + +[[0,5],[[],4,8],[],[],[[1,[]],5,1,[[]],0]] +[[[]]] + +[[],[],[8],[],[6,10]] +[[3,3,6,8]] + +[[[0],[9],9],[[10,10],[7,[6,3,1,10,7],[5,7],[6,2,5],2]],[5,[2,[7,3]],6,3]] +[[],[9,[[4,9,9,9,6],[],[10,5,6]]],[[[1,7,0],[5],4,[],0]]] + +[[2,[5,10,[2,8,5,1,5],[9,0,8,0],8],[[8,8,10]],8],[2,[8,10,[],[1,5]],5,[[7],[4,2,1,1,8],0,1,[10,8,2]],2],[10,[[8,8,4,7,5],[5,7],10,[8,0]],5,[[4,4,2],[2,4,3,0,1],[7,8]]],[6]] +[[9]] + +[[4,[4,[0,7,0],[1,5,10,5],[2,10,7]],[5],[[2,4,2],[3,8,7,6],6]]] +[[7,7,5,[[4,8,10,6]],5],[2,4,10,1],[[[10],[10,9,2]]],[],[[[3,1,3,1],[],[0,0,9]],9,[2,[2,5,10,1,5],9],5,[2,[5,1,4,2],10]]] + +[[3],[8],[8,[4,[2,10],9,[4,10]],[],[],8]] +[[[[],[10,10]],[3,[5,3,4,5],8],9,[2,5],8]] + +[[],[],[[[8,8,4],2,[],5,3],[],[[2,2,0,0,10],[1,2],[1,1],8],[[10,6,1,6]]]] +[[[[1,0,4,7,8],[2,5],[3,1]],9,9,[[10,9]],[[2]]],[[[],[3,3,10],[8,7,5,4,9],6,0],2,[8,10,4,[8,3,3,9,2]],[[7,10,10,0,0],[4,3,8,3]]],[[1,0],0,6]] + +[[[]],[2,[[9],1,[6]],6],[[[10,0,0,9,2],[1,8,4],9,[10,6,5,2],[3,0,0,8]]],[5,[[],1,[4],[]],0,10,[2]]] +[[9],[],[[0,3,9,[]],[2,[1,9,0,0,4],[9,10,1,9,4],[]],[10,3,2],9]] + +[[[2],[1,1,[6],[8,6,9,6,7],3]],[[],8,[[6,6],[5,8,10],[],[9],8],[]],[]] +[[1,9,2,[6],[0,0,3]],[]] + +[[10,5],[],[[[]],7],[10,8,8,9,[[],[1,3,9,2,8],[9,4,2,6,7],[8,6],7]]] +[[[5,[2,8,0,6],[0,7],0],[[],[]],2,[6]],[[],4,6,[[],[4,8,8,7,5],7,[],[]],7],[4]] + +[[10,[[4,10],[8,1,10],[4,9,8,1,5],3,[4,9,1,1,6]]],[],[[7]],[[[],0,4,[7,6,4]],2,[[4],10],2,0]] +[[[],5],[2,[],7],[9],[]] + +[[],[],[7],[10],[]] +[[2,[[3,0,4,8,10],1,5,[]],[4,[9,4,10,7,2]],3],[8],[[[6],4,[3,7,5,9]],8,6,[10],8]] + +[[],[6]] +[[[[9,9,3,10],[5],9,6,3],[8,7,4,0],[],[[5,9,9,0],[],[1],[2,4,8]]],[10,[[9,6,4,1],1],0],[[9,[],7,7,6],[9],6]] + +[[[10,[5,10,0,7,2],[2],8]],[[9,9,[],1,8],[[],[1]],[5,[3,3],1]]] +[[],[3,1,[10,[2,2,10,0],[4,3,3,6,7],8],8],[[[8],2,4],[[],[],10,2,[]],6,8,8],[[7,0,8,[]]]] + +[[[4],7,[10]],[[[3],1],2,[9]],[[4,7],[[3,8],[2,5,5,4],5,[9,6,2,2,9]],2,[[4,5,8,6]],[0,6,7,[4,2,1,7],2]],[6,5]] +[[[9,1,3],[[9],8,[5,1,7],[9,8,9]],5,[[1,1,10],3],2],[[5],7],[]] + +[[3,[0,5,[8],[],[]],8,7,9]] +[[8,[[2],3,[],7,7],3],[[[2],[7,9],[8]],[6]],[[[],[6,5,0,5,2],[6,4,4],[5,9]],[[0,2],[10,8],[6,2,1],[4,10,6,8],6],[[1,1,8],9,5,5,[3]],[],[0,[],[1],[2,5,10]]],[[],5],[[[8,0,7,1,4],3,[],4],9]] + +[[],[9],[5,[[2,0,0,10,6],3,7,3,[9,9,2]],7]] +[[[],9],[],[6,6,[9,2,[3,6]],[[3,2,6,2],[9,0],0],1],[[9],10,[9,7],[9,[10,6],0]],[[[8,0],8,[1,10,2,9]],8,5]] + +[10,8,0,10] +[10,8,0,10,6] + +[[[[7,10,2],7,[]],[[],[1,0],[],[],3],9,2],[[[],4,9],0],[3,3,[],2],[[3,[7,1,1],3],10,10,9],[[6,0,3,[],[3,6]],[[9,10],[9,1,7,3],10,9],10,1]] +[[],[6,9,[0,3,3,0,[7,9,8]]],[[3,[8]],[8,[6,3]],2]] + +[[[2,[7,10,4,7,3],[9],0,4],1,[2,9,8,2,6],9,0],[],[3,0,[[5,4,4,2]],2]] +[[[[3,0],[5,9,9],[2,5,0],2,3]],[2,[6,[5]],[[10,3],8,9,[9,5,10,8,2]],8],[]] + +[[0,[[10],7],2,2,1],[[[0,2,5],2,7],[10,[],[8],7],5,[[2],0]]] +[[],[3],[10,[4,[5,2,7,3],9,5],3,3,6],[[7,[]]],[[[10,7,6,6,4],[4,2],8,6,[3,5,0]]]] + +[[0,[0,[],[]],5,0,9],[[7,9,[],[1,6,0]],[[10,6],3,[3,1,10,5,8],[]],7,6],[4,6,[],0,2],[5]] +[[[5],[8,0,5],[7,[1,3,9],3]],[2,7,0],[],[4,[4,8,4,[5,9,0]],[]],[[[10,7,6,1],[4,5,8,7],9]]] + +[[[9],1],[[4,[5,6],[4],5],10,6,[7],6],[[[5,4],[8],[7,4],[6,2,9,8],[4,0]],1,[[]],3,[10,0,1,[3,2,3,5],4]]] +[[7],[4,[3,[4,3,1,9,6],1,[]],[1,[6],[0,3]],0,10]] + +[[[0,3],[3,[1],[],6,[]]],[8,[],6,[],4]] +[[[[4],5,[9,1,7,9,9]],[2,5]],[[[10,8,5,10,2],7,[0,6,10,3],10],3,[6,0,[3,5,0,5],[8,9,3,5]],3],[[[0,4],[10,6,7,5],7,[10]],[1],[[8,10],2],[[],10,9,0]]] + +[[6,[[1]],1,[[],2,[6,10],6,1]],[[7,3],3,6,[3,3,10,[0]]],[6,[[6,7],5,1,[4,2,0,1]],10],[9,[[9],[2,6,5,1],0],[7]],[[[5],[],7,9,[10]],[[7,0]],[[]]]] +[[4,1,4,[[5,4],[9],[],[3,8,5]]],[2,8,[[6,6,4,6]],[4,1],1],[[2,0,[7,7,2,1,4],[0,8,3,8],9],5,0]] + +[[[6,10,9,[1],8]],[4,0,[[8,1,9,7,0]],[[3,7,10],9,[10,9,2],[6,10],[5,9,5,10]]],[5,5,8,1,2],[]] +[[7,2],[2,7,2,5,[[1,4,7,10,10]]],[8,4,[[9,8,10],[0],2,[3]],1,7],[2,0,[0,4,0],5,[]],[[[6,8,9],[2,4,3,4,10],10],2,9]] + +[[5,8,[],[[8,6,3,10],[1,1,4,7,5],[1,8,0,5,2],6,5]],[],[]] +[[],[],[[[5,9,6],2,10,[9,1],4],4,3,[1,[9]],6]] + +[[2,[2,[7,8],[7,2,0]]]] +[[0],[[],7],[],[],[1,[7,[4,6,9]],4]] + +[[[[9,6,7,5],2]]] +[[[],8,[3,0,5],1,8],[[[3,5,7,7,7],[6,3,7,7],[1,1,2,1]],0,4,[0,5]],[],[2],[[7,[6,4,8,7],[8,8,10,5],1,10],10,8,[[8,1],[8,5,5],3,[8,0]],6]] + +[[10,4]] +[[],[0,[],[[],[8,1,0],[10],[0,6,6,9],8],2],[[[9],1,[]],[[2,0,8,10]],6,[[2,1,10,3],[],8]],[2,[[8,4,0,5],0,9,5,[1]],[]]] + +[[10,0,10,9]] +[[[2,[10,3,6],4],[[6,5,10,3],8,[0,0,9,7,2],[10,4,5,4,4],[1]],[1],[[3,7,4,10,1],[8,10,4]],9],[10],[[5,5,[1,7,10],9,4],[],3]] + +[[7,4,1,[6,8,4],10],[5,10,7,[9,10,6,7]],[4,3]] +[[[4,[9],[7,1,3],5,[]],2],[8,0],[[[9,0,5,4],[4,0,8,5],1],7,[8,3,[],9],0],[]] + +[[[1,3]],[[[1,3,4],0,[9],[0],[8,5,8]],[[7,4],0,[2],[2,1,0,0]]],[[],[[2,1,3,3],6],[3],[[1,6,8]]],[9,2,[[],[4,7,7],[7,2,10,6,3]]]] +[[10]] + +[[[],[]],[6,[5,6,[1],0]],[10],[[10],1,[8],7,8],[[[],8,4],3,3,[1,[2,7]],1]] +[[[7,8,[1],2],7,[[0,6,4],3,[6,8,7,6,5],[2,10,6,4,4],1],[[6,6,9,2,9],[6]]],[6,[]],[[1,[],[6,5,8]]]] + +[[[[8],4,[0,10],[],[5,5,8]],10],[],[7,[],[],[[2,10,1,4],[9,9,4],1,7,[8,5]]]] +[[7],[[],[[10,3,1,4,3],6,[5,9],[0]],1],[4,0,[[7]],0,3],[10,5],[[8]]] + +[[[],3]] +[[1,3,[[8,7,9,5],[],7,[],6],[9,[]],8],[[[1],[4,3,1],6,[9],[6,4,0,4]],[[8],1,[0,10,5],7,6],7,[2,[6,9,5,9,1]]]] + +[[[9,[0],[9,0],0,9],[],[[],[1,1],[5,7,7,5,7],[]],1],[[8,5,7],8]] +[[6,[],[0,2,1],[3],2],[7,7],[6,[],[],2]] + +[[5,4,[[7,8,3,0],[3,9,7,1,10],[10],6],1],[]] +[[8,6,[[2,2,6,8],[1,2,2,7],[],[],7],2,6]] + +[[[[],[5],[],9,3]],[],[7,[],0,[[8,8,10,8],10]]] +[[5,10,2,7,5],[6,5,3],[2,[[3,1,2],2,[]],1],[4]] + +[[],[],[]] +[[[[4,2],[7,1,1],6,9,[9,5,8,2]]],[[],[[7,10,9,1,0]]],[[[8,8,8],1,[7,10,3],10],2,1,[[5,4,5],[10,4,0],4,5]],[4,2,[]]] + +[[[[],3],[[10,6,10,6,4],2,[9,9,2,0]],[6,[],[10,8,2,6,10],[8,8]]]] +[[[[1,5,10],[7,0,4,2],7,[]],0],[2,[8],10,1,6],[7,[[5,5,4,7]],6],[[[8,7,7],8,[0,5,6,10,9],10],7,[2,6],[],6],[1]] + +[[[[4,0,6,6],[5,6,7],[10]]],[7,9]] +[[[7,8,[0,8,10,1],4,10],10,[[8,1],1,[],3,6]],[]] + +[[9],[[],5],[8,[4,0,[9,7,0,3,8]],[]],[5,6,9,[1,[1,10,3,1,6],10,2]],[[],[],5,[[7,5,4,7,7],5,6,[10,9,1,9,2],0],[]]] +[[[[9],10,[9,0,9],5],10,4,6],[0,[1,6],2,3,1],[3],[[],[[0,7,0],[7,1],4,3]],[3,9,[],8]] + +[[1,2,6,2]] +[[[[5,1,0]],10,[10,[],[9,0,5,4],1],[5,6],[[9,6,6],0,3,[0,4],6]]] + +[[[0,[7,8,3,10,1]],6,2],[8,[[1,5,3,1,10],[0,1,9]],5,[10,1],2],[[[7,8,1,0],0,[10,7,3,3],[4]],7]] +[[0,2,[[10,1,3],2,4,0]]] + +[[[6,[5,2,3,6,8]],[[9,7],[6,10,8],4,3,[3,1,9,4]]],[3,[[7,8]]],[7,0,[6],1]] +[[[],6,7,[4,1],[6,[],[4,7,0,0,6],[9,2,7,9],0]]] + +[[[4,[9,6,8,9,7],[10],[4,6],[2,10,7]],[],[[],4,6,2,0],6,[[6,5,3,10,2]]],[9,10,0]] +[[4,[6,[0,1,5],5]],[8],[4],[[],[0,[2,5,4],[]],[[0,5],[0,2]]],[[3,[10],[6]],4,[],3,[[2,1],9,1,8]]] + +[[[],4],[0,2],[[[7,2,3,5,7],[3,3,9,5,0],[1,8,3],2],[[10,10,5,7,10],[],[5,10,10,1,3],[4,9],[3,5]]],[],[9,3,[2,3,[1,7]]]] +[[9,2,8,3],[[[1,6,9],9,9,[],[6,7,9]],9,0],[1,8,[[]],5],[[[3,7,0,9],[2,3,4,6,2],3,[3,3,0]],3,[3,2,1,[8,4]],[4,[10],4],[[5,10]]],[]] + +[[[6,8],9,6,9,5],[9,2,[]]] +[[[7,6],[]],[0,[[2],5,4,[]]],[8,6,7],[[[],[4,2,3],[0,3,2,7,5],[0,2,4,1],0],3],[5,7,[[8],5]]] + +[[6],[[3,4,[1,1,4],6]],[[[]],[],[10]],[2,6,[10,9,1,8,[0,5]],6],[5,7,[[6,10,2,3]]]] +[[[[2,4,0],9],4,8,[[],[9,4]]],[]] + +[[[[9,6,3,8],10,4],[10,[0,4,10,0,2],[6,7,10,1]],[[],[6,9,6,9,8],[],5],3,[4,4]],[[[],[9],[],5,5]],[]] +[[6],[3,[9,0,6,[9,6]],[[2,5]],[]],[[[7,7,6],[0,1],0,[]],5,1,3],[8]] diff --git a/src/adventofcode2022/data/day_13/day13_test.txt b/src/adventofcode2022/data/day_13/day13_test.txt new file mode 100644 index 00000000..af73fbbb --- /dev/null +++ b/src/adventofcode2022/data/day_13/day13_test.txt @@ -0,0 +1,23 @@ +[1,1,3,1,1] +[1,1,5,1,1] + +[[1],[2,3,4]] +[[1],4] + +[9] +[[8,7,6]] + +[[4,4],4,4] +[[4,4],4,4,4] + +[7,7,7,7] +[7,7,7] + +[] +[3] + +[[[]]] +[[]] + +[1,[2,[3,[4,[5,6,7]]]],8,9] +[1,[2,[3,[4,[5,6,0]]]],8,9] diff --git a/src/adventofcode2022/data/day_14/day14.txt b/src/adventofcode2022/data/day_14/day14.txt new file mode 100644 index 00000000..20b8c10e --- /dev/null +++ b/src/adventofcode2022/data/day_14/day14.txt @@ -0,0 +1,163 @@ +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +491,32 -> 495,32 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 +515,103 -> 515,107 -> 512,107 -> 512,115 -> 523,115 -> 523,107 -> 520,107 -> 520,103 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +556,167 -> 556,168 -> 566,168 -> 566,167 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +483,23 -> 498,23 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +485,38 -> 489,38 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +557,171 -> 557,172 -> 573,172 -> 573,171 +480,47 -> 480,50 -> 472,50 -> 472,56 -> 489,56 -> 489,50 -> 483,50 -> 483,47 +500,74 -> 504,74 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +497,26 -> 501,26 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +497,76 -> 501,76 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +491,76 -> 495,76 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +515,103 -> 515,107 -> 512,107 -> 512,115 -> 523,115 -> 523,107 -> 520,107 -> 520,103 +556,167 -> 556,168 -> 566,168 -> 566,167 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 +494,35 -> 498,35 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +497,38 -> 501,38 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +488,35 -> 492,35 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 +522,122 -> 527,122 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +480,47 -> 480,50 -> 472,50 -> 472,56 -> 489,56 -> 489,50 -> 483,50 -> 483,47 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +503,76 -> 507,76 +511,92 -> 511,95 -> 507,95 -> 507,100 -> 517,100 -> 517,95 -> 514,95 -> 514,92 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 +515,103 -> 515,107 -> 512,107 -> 512,115 -> 523,115 -> 523,107 -> 520,107 -> 520,103 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +488,59 -> 488,61 -> 485,61 -> 485,69 -> 498,69 -> 498,61 -> 493,61 -> 493,59 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +519,124 -> 524,124 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 +494,74 -> 498,74 +525,120 -> 530,120 +480,47 -> 480,50 -> 472,50 -> 472,56 -> 489,56 -> 489,50 -> 483,50 -> 483,47 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +480,47 -> 480,50 -> 472,50 -> 472,56 -> 489,56 -> 489,50 -> 483,50 -> 483,47 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 +509,38 -> 513,38 +533,124 -> 538,124 +488,59 -> 488,61 -> 485,61 -> 485,69 -> 498,69 -> 498,61 -> 493,61 -> 493,59 +480,47 -> 480,50 -> 472,50 -> 472,56 -> 489,56 -> 489,50 -> 483,50 -> 483,47 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +488,59 -> 488,61 -> 485,61 -> 485,69 -> 498,69 -> 498,61 -> 493,61 -> 493,59 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +494,29 -> 498,29 +482,43 -> 482,44 -> 487,44 +515,103 -> 515,107 -> 512,107 -> 512,115 -> 523,115 -> 523,107 -> 520,107 -> 520,103 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +521,118 -> 526,118 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 +515,103 -> 515,107 -> 512,107 -> 512,115 -> 523,115 -> 523,107 -> 520,107 -> 520,103 +515,122 -> 520,122 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +557,171 -> 557,172 -> 573,172 -> 573,171 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +488,59 -> 488,61 -> 485,61 -> 485,69 -> 498,69 -> 498,61 -> 493,61 -> 493,59 +511,92 -> 511,95 -> 507,95 -> 507,100 -> 517,100 -> 517,95 -> 514,95 -> 514,92 +480,47 -> 480,50 -> 472,50 -> 472,56 -> 489,56 -> 489,50 -> 483,50 -> 483,47 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +518,120 -> 523,120 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +488,59 -> 488,61 -> 485,61 -> 485,69 -> 498,69 -> 498,61 -> 493,61 -> 493,59 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +498,19 -> 502,19 +501,16 -> 505,16 +511,92 -> 511,95 -> 507,95 -> 507,100 -> 517,100 -> 517,95 -> 514,95 -> 514,92 +488,59 -> 488,61 -> 485,61 -> 485,69 -> 498,69 -> 498,61 -> 493,61 -> 493,59 +515,103 -> 515,107 -> 512,107 -> 512,115 -> 523,115 -> 523,107 -> 520,107 -> 520,103 +482,43 -> 482,44 -> 487,44 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 +480,47 -> 480,50 -> 472,50 -> 472,56 -> 489,56 -> 489,50 -> 483,50 -> 483,47 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +503,38 -> 507,38 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +506,35 -> 510,35 +556,167 -> 556,168 -> 566,168 -> 566,167 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +504,19 -> 508,19 +492,19 -> 496,19 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +500,35 -> 504,35 +495,16 -> 499,16 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +500,29 -> 504,29 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +511,92 -> 511,95 -> 507,95 -> 507,100 -> 517,100 -> 517,95 -> 514,95 -> 514,92 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +511,92 -> 511,95 -> 507,95 -> 507,100 -> 517,100 -> 517,95 -> 514,95 -> 514,92 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +512,124 -> 517,124 +557,171 -> 557,172 -> 573,172 -> 573,171 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +511,92 -> 511,95 -> 507,95 -> 507,100 -> 517,100 -> 517,95 -> 514,95 -> 514,92 +529,122 -> 534,122 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +503,32 -> 507,32 +491,38 -> 495,38 +497,32 -> 501,32 +526,124 -> 531,124 +515,103 -> 515,107 -> 512,107 -> 512,115 -> 523,115 -> 523,107 -> 520,107 -> 520,103 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +511,92 -> 511,95 -> 507,95 -> 507,100 -> 517,100 -> 517,95 -> 514,95 -> 514,92 +544,163 -> 544,161 -> 544,163 -> 546,163 -> 546,153 -> 546,163 -> 548,163 -> 548,158 -> 548,163 -> 550,163 -> 550,159 -> 550,163 -> 552,163 -> 552,161 -> 552,163 -> 554,163 -> 554,159 -> 554,163 -> 556,163 -> 556,158 -> 556,163 -> 558,163 -> 558,156 -> 558,163 -> 560,163 -> 560,156 -> 560,163 +534,150 -> 534,145 -> 534,150 -> 536,150 -> 536,147 -> 536,150 -> 538,150 -> 538,146 -> 538,150 -> 540,150 -> 540,146 -> 540,150 -> 542,150 -> 542,146 -> 542,150 -> 544,150 -> 544,144 -> 544,150 -> 546,150 -> 546,141 -> 546,150 -> 548,150 -> 548,143 -> 548,150 -> 550,150 -> 550,143 -> 550,150 -> 552,150 -> 552,141 -> 552,150 +497,72 -> 501,72 +498,13 -> 502,13 +533,137 -> 533,135 -> 533,137 -> 535,137 -> 535,131 -> 535,137 -> 537,137 -> 537,128 -> 537,137 -> 539,137 -> 539,130 -> 539,137 -> 541,137 -> 541,135 -> 541,137 -> 543,137 -> 543,135 -> 543,137 +488,59 -> 488,61 -> 485,61 -> 485,69 -> 498,69 -> 498,61 -> 493,61 -> 493,59 +502,89 -> 502,79 -> 502,89 -> 504,89 -> 504,84 -> 504,89 -> 506,89 -> 506,85 -> 506,89 -> 508,89 -> 508,86 -> 508,89 -> 510,89 -> 510,88 -> 510,89 -> 512,89 -> 512,85 -> 512,89 diff --git a/src/adventofcode2022/data/day_14/day14_test.txt b/src/adventofcode2022/data/day_14/day14_test.txt new file mode 100644 index 00000000..4e87bb53 --- /dev/null +++ b/src/adventofcode2022/data/day_14/day14_test.txt @@ -0,0 +1,2 @@ +498,4 -> 498,6 -> 496,6 +503,4 -> 502,4 -> 502,9 -> 494,9 diff --git a/src/adventofcode2022/data/day_15/day15.txt b/src/adventofcode2022/data/day_15/day15.txt new file mode 100644 index 00000000..e6a6df58 --- /dev/null +++ b/src/adventofcode2022/data/day_15/day15.txt @@ -0,0 +1,33 @@ +Sensor at x=2302110, y=2237242: closest beacon is at x=2348729, y=1239977 +Sensor at x=47903, y=2473047: closest beacon is at x=-432198, y=2000000 +Sensor at x=2363579, y=1547888: closest beacon is at x=2348729, y=1239977 +Sensor at x=3619841, y=520506: closest beacon is at x=2348729, y=1239977 +Sensor at x=3941908, y=3526118: closest beacon is at x=3772294, y=3485243 +Sensor at x=3206, y=1564595: closest beacon is at x=-432198, y=2000000 +Sensor at x=3123411, y=3392077: closest beacon is at x=2977835, y=3592946 +Sensor at x=3279053, y=3984688: closest beacon is at x=2977835, y=3592946 +Sensor at x=2968162, y=3938490: closest beacon is at x=2977835, y=3592946 +Sensor at x=1772120, y=2862246: closest beacon is at x=2017966, y=3158243 +Sensor at x=3283241, y=2619168: closest beacon is at x=3172577, y=2521434 +Sensor at x=2471642, y=3890150: closest beacon is at x=2977835, y=3592946 +Sensor at x=3163348, y=3743489: closest beacon is at x=2977835, y=3592946 +Sensor at x=2933313, y=2919047: closest beacon is at x=3172577, y=2521434 +Sensor at x=2780640, y=3629927: closest beacon is at x=2977835, y=3592946 +Sensor at x=3986978, y=2079918: closest beacon is at x=3998497, y=2812428 +Sensor at x=315464, y=370694: closest beacon is at x=-550536, y=260566 +Sensor at x=3957316, y=3968366: closest beacon is at x=3772294, y=3485243 +Sensor at x=2118533, y=1074658: closest beacon is at x=2348729, y=1239977 +Sensor at x=3494855, y=3378533: closest beacon is at x=3772294, y=3485243 +Sensor at x=2575727, y=210553: closest beacon is at x=2348729, y=1239977 +Sensor at x=3999990, y=2813525: closest beacon is at x=3998497, y=2812428 +Sensor at x=3658837, y=3026912: closest beacon is at x=3998497, y=2812428 +Sensor at x=1551619, y=1701155: closest beacon is at x=2348729, y=1239977 +Sensor at x=2625855, y=3330422: closest beacon is at x=2977835, y=3592946 +Sensor at x=3476946, y=2445098: closest beacon is at x=3172577, y=2521434 +Sensor at x=2915568, y=1714113: closest beacon is at x=2348729, y=1239977 +Sensor at x=729668, y=3723377: closest beacon is at x=-997494, y=3617758 +Sensor at x=3631681, y=3801747: closest beacon is at x=3772294, y=3485243 +Sensor at x=2270816, y=3197807: closest beacon is at x=2017966, y=3158243 +Sensor at x=3999999, y=2810929: closest beacon is at x=3998497, y=2812428 +Sensor at x=3978805, y=3296024: closest beacon is at x=3772294, y=3485243 +Sensor at x=1054910, y=811769: closest beacon is at x=2348729, y=1239977 diff --git a/src/adventofcode2022/data/day_15/day15_test.txt b/src/adventofcode2022/data/day_15/day15_test.txt new file mode 100644 index 00000000..a6124240 --- /dev/null +++ b/src/adventofcode2022/data/day_15/day15_test.txt @@ -0,0 +1,14 @@ +Sensor at x=2, y=18: closest beacon is at x=-2, y=15 +Sensor at x=9, y=16: closest beacon is at x=10, y=16 +Sensor at x=13, y=2: closest beacon is at x=15, y=3 +Sensor at x=12, y=14: closest beacon is at x=10, y=16 +Sensor at x=10, y=20: closest beacon is at x=10, y=16 +Sensor at x=14, y=17: closest beacon is at x=10, y=16 +Sensor at x=8, y=7: closest beacon is at x=2, y=10 +Sensor at x=2, y=0: closest beacon is at x=2, y=10 +Sensor at x=0, y=11: closest beacon is at x=2, y=10 +Sensor at x=20, y=14: closest beacon is at x=25, y=17 +Sensor at x=17, y=20: closest beacon is at x=21, y=22 +Sensor at x=16, y=7: closest beacon is at x=15, y=3 +Sensor at x=14, y=3: closest beacon is at x=15, y=3 +Sensor at x=20, y=1: closest beacon is at x=15, y=3 diff --git a/src/adventofcode2022/data/day_16/day16.txt b/src/adventofcode2022/data/day_16/day16.txt new file mode 100644 index 00000000..f4f682a4 --- /dev/null +++ b/src/adventofcode2022/data/day_16/day16.txt @@ -0,0 +1,50 @@ +Valve EV has flow rate=0; tunnels lead to valves WG, IB +Valve IB has flow rate=0; tunnels lead to valves EW, EV +Valve KL has flow rate=0; tunnels lead to valves JH, OY +Valve QJ has flow rate=0; tunnels lead to valves TX, JH +Valve OA has flow rate=12; tunnels lead to valves SB, GI, ED +Valve BQ has flow rate=0; tunnels lead to valves NK, JJ +Valve PZ has flow rate=0; tunnels lead to valves JH, VA +Valve QO has flow rate=8; tunnels lead to valves LN, LU, CU, SQ, YZ +Valve MP has flow rate=0; tunnels lead to valves LN, GO +Valve YZ has flow rate=0; tunnels lead to valves AA, QO +Valve CU has flow rate=0; tunnels lead to valves RY, QO +Valve UE has flow rate=16; tunnel leads to valve VP +Valve HT has flow rate=0; tunnels lead to valves AA, JE +Valve EF has flow rate=0; tunnels lead to valves ES, JE +Valve JJ has flow rate=15; tunnel leads to valve BQ +Valve JX has flow rate=0; tunnels lead to valves AA, GO +Valve AA has flow rate=0; tunnels lead to valves JX, TX, HT, YZ +Valve MI has flow rate=21; tunnels lead to valves PQ, QT +Valve ES has flow rate=0; tunnels lead to valves EF, NK +Valve VC has flow rate=0; tunnels lead to valves MC, IW +Valve LN has flow rate=0; tunnels lead to valves MP, QO +Valve ED has flow rate=0; tunnels lead to valves OA, RY +Valve WG has flow rate=20; tunnels lead to valves EV, OY, KF +Valve GI has flow rate=0; tunnels lead to valves WE, OA +Valve UK has flow rate=0; tunnels lead to valves TO, JE +Valve GY has flow rate=23; tunnels lead to valves EO, QT +Valve TX has flow rate=0; tunnels lead to valves AA, QJ +Valve OE has flow rate=0; tunnels lead to valves GO, NK +Valve OQ has flow rate=9; tunnels lead to valves VP, SB +Valve NK has flow rate=25; tunnels lead to valves OE, ES, BQ +Valve LU has flow rate=0; tunnels lead to valves JH, QO +Valve RY has flow rate=18; tunnels lead to valves ED, IW, CU +Valve KF has flow rate=0; tunnels lead to valves JE, WG +Valve IW has flow rate=0; tunnels lead to valves VC, RY +Valve SQ has flow rate=0; tunnels lead to valves MC, QO +Valve PQ has flow rate=0; tunnels lead to valves MC, MI +Valve TO has flow rate=0; tunnels lead to valves UK, JH +Valve OY has flow rate=0; tunnels lead to valves KL, WG +Valve JE has flow rate=10; tunnels lead to valves EF, ND, HT, KF, UK +Valve JH has flow rate=3; tunnels lead to valves QJ, KL, PZ, TO, LU +Valve VP has flow rate=0; tunnels lead to valves OQ, UE +Valve EW has flow rate=22; tunnel leads to valve IB +Valve ND has flow rate=0; tunnels lead to valves JE, GO +Valve VA has flow rate=0; tunnels lead to valves GO, PZ +Valve QT has flow rate=0; tunnels lead to valves MI, GY +Valve EO has flow rate=0; tunnels lead to valves GY, MC +Valve MC has flow rate=11; tunnels lead to valves PQ, SQ, WE, EO, VC +Valve GO has flow rate=4; tunnels lead to valves JX, VA, OE, MP, ND +Valve SB has flow rate=0; tunnels lead to valves OQ, OA +Valve WE has flow rate=0; tunnels lead to valves MC, GI diff --git a/src/adventofcode2022/data/day_16/day16_test.txt b/src/adventofcode2022/data/day_16/day16_test.txt new file mode 100644 index 00000000..9f30acc1 --- /dev/null +++ b/src/adventofcode2022/data/day_16/day16_test.txt @@ -0,0 +1,10 @@ +Valve AA has flow rate=0; tunnels lead to valves DD, II, BB +Valve BB has flow rate=13; tunnels lead to valves CC, AA +Valve CC has flow rate=2; tunnels lead to valves DD, BB +Valve DD has flow rate=20; tunnels lead to valves CC, AA, EE +Valve EE has flow rate=3; tunnels lead to valves FF, DD +Valve FF has flow rate=0; tunnels lead to valves EE, GG +Valve GG has flow rate=0; tunnels lead to valves FF, HH +Valve HH has flow rate=22; tunnel leads to valve GG +Valve II has flow rate=0; tunnels lead to valves AA, JJ +Valve JJ has flow rate=21; tunnel leads to valve II diff --git a/src/adventofcode2022/data/day_22/day22.txt b/src/adventofcode2022/data/day_22/day22.txt new file mode 100644 index 00000000..2db80424 --- /dev/null +++ b/src/adventofcode2022/data/day_22/day22.txt @@ -0,0 +1,202 @@ + ..#......#.#..............................##.......#.................##.........#.#............#.... + ....#........................#......#.................#.#.......##......#........#..#.....#...#..#.. + ...#..............#..............#........#..#.........##......#..............#................#.... + .....#..#..............##..#..........#.........#...............................#................... + ............#...................#.....................#.......#..........#.#......#.........##.##... + ............................#..............................#..............#......#..#.#...........## + ..........#......#.........#..........#..................................................#.......... + .......#...#....................#.........##...#...........#...............###......##....#......... + ...#............#...............................###.....##.........................#................ + .#.................#...............#.........#......#.#.....................#......#................ + ........#...............................#.......#.....#.##...........#....................#......... + ...............#...#.#....##.....#...........#....#........#......#......#......#..#......#.....#... + ...##.#.#....#..................#..........#........................#.#............#......#...#..#.. + ...##....#.....#....#.#................#....#.....#...#............................................. + ...#....#............#..#.....#.............#..............#......#..............#.............#.... + .......#.....#..#....#.........................#..............##...#.#........#.#........##........# + .....#..#......#...................#....#.##....#.....##..........#.....#....#.........#............ + ...................#......#...##..#....................#..............#.#.......#.........#.#......# + #..#.............#.....#.........#.............#..........#.##.....#...............#.........#...... + ............................#............#...............#.......#.#..#............#................ + .............#.#...#.....#...##...#.........#...#....#............#..........#.#.#............#..... + ...................#.......#..........#.........#.............................#..........##......... + ...........#.......#............#......#.....#..#.................#...............#.........#....... + .#................................#..#.....##..#....#...........#....#...#.........#...........#.... + ........#...#............................#.#............###..#........#........#......##......#..... + ........#.......#..........#.........#.#......................#.......##.......#........##.......... + #.......#...........#...........................#.......#...............#.#.......#..#..........#... + ...............................................#.........................#.#.............###..#....# + ........................#...#.....#......#...............................##.....#.......#..#........ + ..#.......#..#.#...#......................#.........................#........#......#...........#.#. + ..#.........#.#....#........###.##..............#....#............#.......#...#...............#.##.. + .......#.....#................#....#...............#......##.........#...............#...#.#.#...... + ........#.......................#.....#..........#..........#..#..#................................# + ..................#.#..........#....#.......................#....................#...#......#......# + .....##......#.................#.............#...........#..#...#........#.......................... + ..................#.....#.......#.......#..........#...##......#...#.##.................#........#.. + .........#......#...#....................#..#.....................#...#...........#.........#..#.... + ....#...........#..................#..#....#................#................#....##................ + ...#.....#.........#......##...............##.##...#..##..........#.....#..................#........ + ..#..#.................#......#.......#.........................#.##..#..................#.......... + .#.......#......##.................#.#........#...#....................................##.........#. + .#......#...............#........#.................#..#....#.#...#..#.......#.........#............. + .#..#...................#.#..........#.........................#.#.............#..................#. + .......####.#.............#..#..................#...#.............##......#..............#.......... + ............#............#.....#..#..#..........#....................#.#....#.....#.#......##....... + .........#..........#.........#.#.....#...................#.....#..#...............#................ + ........##....................#..........#................................#...#......#.............. + .#.....#.#....##....#....#....#........#....#...#...............#..................#...........#.... + ...................#..#.....#.#........#.......#................................#..............#.... + ..#............#...........................................#.....#..#.........................#..... + .#........................#.#..................#.. + .....#........#.....#...........#................. + .........#........................................ + ..#.#.#.#.....#.............#..................... + .......#.#....#.#..............#.................. + .......................#...#.........#.#..#....#.. + ...#........#...............#....................# + ....................#............#......#......... + ........................#........................# + ........................................#...#..... + ..........#.......................#.........#..... + ...........#.......#............#..........#..#... + .#............#.................#.#.........#..... + ..............#.#.....................#.........#. + .............#...#...................#..#.##...... + ...................#...#..#....................... + ...#......#.#................#...................# + .............#..#................................. + ........#..............#...#.........#............ + ..##.....................#......##...#.....#...... + ...#.#.........#...................#.#..#......... + .#.....#...................#.....#..........#.#... + .............#.............#....#..#.#........#..# + .....#.................#..........#............... + ....#............#.....##..........#.........#.#.. + .........#..........#.....................#....... + ...#.............................................. + .............#.#........#...#....#.......#........ + ..#...#........#.......#.......................... + ..#.#.............#...#........#...#....#....#.... + ....##...................#............#........... + ..#.#....#.#.##.........##.....#..#.#............. + ..#...........#..............#.................... + ....#.....................#..........#............ + #..#.##..#.....................................##. + .................#...#.........##................. + ##.......................#................#.#....# + ...#...........#.....##.........................#. + ...............#......#...##...............#...... + ....................#................#............ + ......##......#......................#.....#...... + .......#..#.....#............#.#...............#.. + .....................#....##...........##......... + #...........#................#........#........... + .....#............#.#.....#....#.................. + ........................................###....... + ........#........................#................ + .......#.......#......#..........#.....#.#........ + ...#.....#.#....................##...............# + .......#......#....#........#...........#......... +.#.......#..................#......#..........#................#....#............#......#........... +#.....#....#...#..............#..#...............#........#......#.................................. +........#.....................#.......#....#..................................#.#......#............ +...#...#.....#..........#.....#...............#.##.........................#..................#..... +.......................#.##....#....#........#..........................#....#.##........#........#. +......#...#..............#.....#.......#...............##.......##.................................. +.........................#.#......#................#..#.........#..#......#.#..#..#....#............ +......#...#..#....#...........#.......#.......#...#...#.................#.#.....................#... +#.............#...#..#.#......#......#..##.#....#..#....#.....#......#..#.......#....#.#.....#...... +..#....#........#..........................#...#..#.#...............................#..........#.... +.#....#..........#...#.....................#.....#....................#..#..........#..........#.... +....#.........................................#.........#.#.#.........#............#..##............ +.....#...#...........#.............#......#....#.................................#.#.............#.. +.#.....#..#..#............#................#.#............................#....................#.... +..............#..........#........#....#...#..........#.#..................#.#........#.......#..... +.............#..........................#..#..#...#.................#..#...........#............#... +...................#.............#...#.....##..........#................#.#..#..........#........... +..##..........#................................#.........................................#.......... +#.............#........................##.#...#....#.............#......#........................... +.........#........#.......##...........................#...#.....#..................#........##..#.. +#......#..........#...................#......#..........#..................#........#..#............ +....#..................#...#...............#.......#.......#.......#....#..#....#...#............#.. +.....#.#..............#............................#..#......#.#.............#...................... +......#..#......#...........#........#..........##............#...........##........................ +.......#...#.....#.........#.............#..............#..#.......#....................#........##. +.....#......#...........#.....#.............................#...................#........#.......... +................#..........................#.............#........#.#...........#......#..........#. +.##.....#..................#.........#........#..#..................##..............#............... +......#..#...................#.#.#...#..............................#.#..........#.................. +......#.....#........#...................#..............#.#.......................#.....##.......... +.#..#................#......#.#.....#.........................................#.....#..#...........# +.#............................#.....#.....#...##....#..........#..#......#....#..............#...... +...#........#..#.......#.....................#..........#.....#..............#.......##......###.... +........#.#.#............#..............#..........#........#.....#........#......#.......##........ +........##...#.#.................#......#.........#.#........##..................................... +#.......#........#.................#...................................#...#........#......#....#... +.......#...#........#.............#........#.....................#................#..#.......#...... +................#....................................#.....#.....#............#......#....#.......#. +...#........#...................#..#...#.....#.............#...#.....#.#..........#..............#.. +.....#.............#........#.#.................................#.#..........#......#............... +.#......#..#..............#..................#..#.#....#.......#................#.........#.....#.#. +.#.........#..................................................#..................................... +..#.#..............##.............#...#.....................#..................#.##....#............ +....#.#..........#..................#.......................................#...#................... +.........#........#.....#......#..#........#..#.#.......#............#..........#................... +#...##..#.........................#..#......#..........#...........................................# +#....................................#...#.........................#...#....#......#.#.............. +...#.#...........#..#..#......#..#..............#...........#..............#........................ +.....#.................#..##.........#....#.......#.....##..#....#...................#......#....... +...........##...#.........................#...............###....................................... +...........#.#.....#..........#..#......#......#.. +................##...#........#....#.#...#........ +..............................#............#...#.. +.......................#.......................... +.....##......#..................##...........#.... +...................#..........................#... +.#...............#.........#...#................#. +..##.....#.#......#......#..............#......... +....................#........#.#.............#.... +.#......#........#......#.....................#... +..........................................#....... +..........#........#.................#............ +........#..........#..#...........#..#.#.......... +.##.............#....................#............ +..........................#.............#.......#. +#.#...#............#...#.....#.....#........#..... +#.##......................#..#.................... +.......#..#..#...........................#.......# +..........#.......#..#.........#.........#.....#.. +.......#.......##..##...................#..#...... +.......................##.........#............... +..#.....#.......#..................#.............. +........#...#............#....#...............#... +#.........#...#.......#...............#.#......... +....#.............#...........#.....#............. +...................#......#......#....#....#...... +.............#.....#........#.....##...#.......... +.....................##..............#...#....#... +................#.......#..###.................... +.............#....#..................#.#.....#.... +......#.......#...#.......#.#..................... +....................##...............#.#.......##. +.................#.....................#.......... +...........#......#...........#................... +.........##......#................................ +................................#.........#....... +..#..............#...#...........#.......#.#...##. +...............#.....#.....#......#.#.......##..#. +...........#...#.....##.......#....#.............. +#.............#.............#..................... +....#........#...............#.#......#.#......... +...............#....#.......#..............#...... +......................#.................#......... +......................#.............##..##.....#.. +....#..#......................#.....#............. +..........#.....#...##..#.........#..........#.... +....#................#........................#... +....................#...#.#....................... +....#......#........#.....#..#..#.............#... +..............##.......#........................## + +23R40R49L35R17R7L43R8R11L6R28R8L30L40L28R9R22L2R5L6L6R26R27L37L17L29L9R29L42R29L27R4R26R47R11R6R18R43R15R32L13L39L46L7R30L23R46R40R44L40L28L25L33R28R3R1R43R43R39L15L6L16R26R17L31L39L41L29L16R41R25R48R17R12R35L9R14R47L22L20R24R45R8R35L23L46L39R18R34R25R33L38R15L49R24R22L40L11R3R43L18R2L9R10R13R2R15R16L34L34R43R15R4R40R16R19R16R39L40L37R16L32L13R11R20R25L19L10R29L48L28L38L4L14L12R14R47R18R15L6R20R28L28R8L29L13L7L19L33L48R26R32L34R34R40R8R2L6R20R45R33L36R25R27R27R42L34L17L32L5R13L1R9R34R6L13L36R39L38R13L31R32L40L23L23L26R7R34R2R12L24R39L44L30R2L21L15R15R39R10R23R24R34L50L34L11R6R9R10R50L42L39L20L21R15R10L41R6L50L13L17R23L17R38R18L37L4L14R4R45R36L15R1R37L14L16L19L42R8L35L47R24R20R2L41R35R3R22R6R20R12R38L4R2R29R24R45R8R3L42L14L41R5L35L24L49R25R35L50R1R8R47L28R41R46R20L9L10R17R27L7L15R25L31L7L22R1R31L36R2R14R42R4L48R5L19L39L28L9L36R44L46R42L35L16L41L31R5R14L34R35R3L18R5R7L19L30L13R24L13L15R49R14R31R27L40L27R45L8L19L34R13L43R18R29R4L1L3L2L41R41L7L20R25R33L3L15R15R36R15L33R39R33R36L27R47R6L32R24R8R40R34R3R25L12L49L19L23L21L35L41L32L48R2R46L8L3L10L17L25L8R47R10L40L33L4L21L49R16L48R42L23R45R3R29L50L50R41L9L28L36L22L41L7L4L42L45L21R49R19R18R2L9L42R11R24R38L50R17R30L37L11L22R43R43R27R22R50L22R2L20R40R17L42L19L45R47R45R6R8R22R37L10R24L23R31R43R48L45R2R10R48R8R31L8L36R39L8L44R1L40L44R33L1L2L42L45R5L1L20L47L23L39L6R23L29R45R11L14R10R36R47R6R15R3R22R22L29L10R32L12L40L21L48R47L14R9L26R35R23R1L38L43L26R26L4L48R13L39L3L38R47L45R30L16R43L18R19R3R6L5R16L35L15L45R35L35R2L11R6R50R22L36R8L18R44L19R42R16R45R9R38R8R47R47L10R19L18R14R13R49L29R6R19L40R7L34L7R28L27R31L17R14R28L5R16L48R44L38R33R43R36R28L1L25R28R49R31L31R19R30R50L33L16L49L19R31R5R37R45R47R22R40R43L43R9L33R28R33R17L12R25R33R30L35L34R46R23L2L49L39L10R6L35R24L30L19L41L46R5L35L20L13R32L23R4R34L16R46R9L23L23R26L37R3R47R44L5L43R31R21R36R1L46R18L7L26L34L41L14R35R9L1R18R2R25R9L8L19R44R17L46R10R7R24L18R8L2R7R43L20L30L19R31L1L31R25R25R23L5R44R22L46L46R28R31R30R9R6R18R30L3R19L39L35R13R30L11L38R23R2L24R48R5L3R10R27L48R30R8R40R16L40L37L26L3L15L50R36R15L9L23R29L48R40L6R4L26R25R34L24L38L27R34L10L29L31R23L50R1L49R1R21R26R4R47R32L15L21L34R36R39R9R29R46R29L13L48L17R16R41L21R9R28L4R35L10R23R38R34R22L12L5R43L9L30R27L8L8L21R26L28R38R1R27R10R34R47L6R25L12R48R18R27L22R34L2R42R41L11L12L31R37R39R15L50L50L31L28R1R23R32L6R6L16L12R46R25R34R23L30R48L19R5L23L43R30R31R15L22L19R50L47L48R4R3R8R14L49L15L26R12R17R11R24R17R3L7L23L39L3L35R49R30L26R23L24R29R41R19L12R48L29L14L1L41R28L24L45L12L48L39L30L9R19R16L30R48R37L40L43L12L6L12R16R3L9L36L43L1R22L15R39L17L32R50L10R41L8L29R4R26R8L43R33L46R18R4R22L1R32R39R7R7R18L42L8R45L29R38L3R41L31R21R42L30R36R35L32L4L47L11L26L28L10R8R31L22L1R2L26R27R49R26L13R45L40L42R35L20L28L7L49R8R11L42R47R37R28R6R35R37L27L7R31R24R16R40L40R4R6L30L30L25R37R49L14L37R26R45L5R32L4L36L30L21L45R29L5L42L20R46L11R26L35L41L33R19R41R6L40R11L32L2L38R9R35R25L33R19R25R39R50L38L36L32R41R2L30R21R2R22L7R32R42L36L20R22R32R31R39L43R17L15R13R25R33R27R37R47R35R9L36R32R21R30R30R26L26R25L49R11R23R9L37R5L38R11R46R10L7R33R4R19R29L50R10L20L49R4L16R7L23L12R18L20L42R20L19R45R2L38L23L17L39R29L44L37L33L2L15L45R28R41L29L18R30L35L4R2L17L34R15L20R37L4R24L20R24L46L36L48L32L42R15L22R48R14L43R25R39R44L2L32R30L31L29R22R7L10R17R18R6R50L49L24L19L16R40L14R45L36R37R22R25L28L46L18R36R15L38R39L24L4L4L47R46R5L27L23L28R35R30R11R45L45L17R37L43R40R37R12R43R39L1R40L35L37R30L23L42R37R44R33L39R36L44L50R5L26L4R36L3R48R25R27L45R8L30L23L2R37R35R19R16L8R28R38R35R25L17L49L45R30L17L27L18L2R49L11R44L18R11L24L10L39L32R4L37R26L2R24R11R15R37R18R44R12L8L47L45L39L45R42R3L45R1L37L38R7R31L3R29R21L38L45L33L40R43L11R22R45L48L8L23R22R15R20R15R45L5R39R22L16R17R33R17R4L35R31R35L40L34L48L40R15R4L3L8L16L39L2R39R45R48R20R5R42R12L15R13R4L43L39R22R29R24L42R42R30L26L38L42L33L45L38R21R1R4L13R37R29R22L35L35L27L30L7R31L9R13R2L30L33R15L47R12L11R44L10L29L39R29R29R34R31L15R9R38L3L19L30R10L13R22L3L9R12R49L45L28R38L19L13L24L23R48R24L3L30R48R30R9L48L41R48R36R26L42R28L50L20L43L43L46R7L4R25L5L5L50L35L48L9L38R16R4R28R34R34R45R32R15R48R9L44L14R17L43R49L20R1R1L4L15L23L39R3R46R2R36R18L20R11L41R18R40L18R20R40L22R11R28L45L18R24R18R11L22R47R8R29L50R31R9R40L18L44R18R7L24L34R48R8R26L7L47L46R22L39L14L37L22L27L4R48R14R6L16L27R42R17R35R15L6R50L33R43R44L10R27L14L18R2R20L25L45R40R47L29L35R45L41L26R23R26R16L48R3L17L26R19L5L7R35L4R25R6L42L20R13L45R5R41R15L6L5R28L23R3L29R49R25R41R44L16R23L26R39R22L45R2R13R32L47R49R2R41L3R16L2L37R9L48R43R28R42R27L50R5R33L24L13L39R39R35R47R41L20R25R41R22R44L42R10R9L36L45L47L21L2L30R22R6R34L7L38L42R2L39R17L14R5L33R46L40R36R50L10R2L17R22R45L42R37R24R45R32L50R37L38L14R24R7L17R33R11L32R22L11L22R40R26L28R15L44R48R32R17R17R46L22R41R6L12L47L5R32R41L34L25R47L14R44R43L7R28L21L14L41R47L49L14L49R1R4R35L49L32L21R20L12R45R7R22L1R36R14R39R43R16R13R10L28R6R37L7L40L7R50R50R16R36L10R6R4R39R50R50L28R29L40R15L22R22R27R32R27R47L40R24L39L11L11L43R25L18R26R42R35R18R2R10L17L41R47R25L37L29R20R29L12R28R14R27R10L15R3L45R20R27R3L29L31L14R15L27R3R24L21R27R11R44R15L29L17R24R35L48R47R47L7L22L19L28R35R10L50R9R16L50R19L46L46L17R45R11R3R29L34L28L43R26L21L10L38R8L33R36L8L14R49L2L7R4R50R6L2R39L24L4R15L34L12L3R17R10L22R40L22L38R45L35L18R38L3R21R4R5L38R21L5R1L25L2R46L45L40R40L19L13L29R19L49R21R47L27L23R24L28R9R12R36L36L31L35R5L43R5R13R25L24L27L31R11R44L29R16R34R31L1L15R21L47L36R6L30R3L2L49L12R27R32R2L27R50L36R15L32L4L29R29L40R30R28L30R22R38R25R24L15L4L6R13L21R31R20L17R38R27R42R34L18R22R22R17R37L15L6R45R25R13R17L41L7R32L17L24L50L3L49R2L47L21L32R23R27R49L1R19L16R28L38L17L48L47R45L43L19R42R7R21L35R18R35R31L4R1L46R6R24R43R33L37L8L32L43R42L17L41R9R36L15L40L12R36R50L37R45L12R25R38R49R7L19R46L45L10R32L15L45L3L24L48L14L5R30R46L31L20L45L41R36R17R23R43L32R1R10L41R22R43R37L35L32R6R12R35R5L14R23R37L45L50R28L17R17R18L33R13L18 diff --git a/src/adventofcode2022/data/day_22/day22_test.txt b/src/adventofcode2022/data/day_22/day22_test.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/adventofcode2022/day01.py b/src/adventofcode2022/day01.py new file mode 100644 index 00000000..dd00599e --- /dev/null +++ b/src/adventofcode2022/day01.py @@ -0,0 +1,26 @@ +from adventofcode.utils.abstract import FileReaderSolution + + +class Day01: + pass + + +class Day01PartA(Day01, FileReaderSolution): + def solve(self, input_data: str) -> int: + elfs = input_data.split("\n\n") + max_calories = 0 + for elf in elfs: + total = sum([int(line) for line in elf.splitlines()]) + max_calories = max(max_calories, total) + return max_calories + + +class Day01PartB(Day01, FileReaderSolution): + def solve(self, input_data: str) -> int: + elfs = input_data.split("\n\n") + max_calories = [] + for elf in elfs: + total = sum([int(line) for line in elf.splitlines()]) + max_calories.append(total) + max_calories.sort() + return sum(max_calories[-3:]) diff --git a/src/adventofcode2022/day02.py b/src/adventofcode2022/day02.py new file mode 100644 index 00000000..1f0ddc4d --- /dev/null +++ b/src/adventofcode2022/day02.py @@ -0,0 +1,146 @@ +from __future__ import annotations + +from adventofcode.utils.abstract import FileReaderSolution + + +class RPC: + shape: str + score: int + wins_from: list[RPC] + + def __init__(self, shape: str, score: int): + self.shape = shape + self.score = score + self.wins_from = [] + + def __repr__(self): + return f"RPC({self.shape} {self.score})" + + def add_wins(self, rpc: RPC): + self.wins_from.append(rpc) + + def wins(self, other): + """Check if other wins from us, and return this as a boolean""" + return other in self.wins_from + + +class Day02: + games: dict[str, RPC] + + @staticmethod + def create_types() -> dict[str, RPC]: + """Create al the possible types, wins and scores for the types""" + rpc_types: dict[str, RPC] = { + "A": RPC("Rock", 1), + "B": RPC("Paper", 2), + "C": RPC("Scissors", 3), + "X": RPC("Rock", 1), + "Y": RPC("Paper", 2), + "Z": RPC("Scissors", 3), + } + + # Rock wins from Scissors + rpc_types["A"].add_wins(rpc_types["Z"]) + rpc_types["X"].add_wins(rpc_types["C"]) + + # Paper wins from Rock + rpc_types["B"].add_wins(rpc_types["X"]) + rpc_types["Y"].add_wins(rpc_types["A"]) + + # Sciccors wins from Paper + rpc_types["C"].add_wins(rpc_types["Y"]) + rpc_types["Z"].add_wins(rpc_types["B"]) + + return rpc_types + + @staticmethod + def play_game(games: list[tuple[RPC, RPC]]) -> tuple[int, int]: + score_p1, score_p2 = 0, 0 + for p1, p2 in games: + if p1.shape == p2.shape: + # It's a draw + score_p1 += 3 + p1.score + score_p2 += 3 + p2.score + elif p1.wins(p2): + score_p1 += 6 + p1.score + score_p2 += p2.score + elif p2.wins(p1): + score_p2 += 6 + p2.score + score_p1 += p1.score + else: + score_p1 += p1.score + score_p2 += p2.score + print(f"It's a draw between {p1} and {p2}") + return score_p1, score_p2 + + +class Day02PartA(Day02, FileReaderSolution): + def parse(self, input_data: str) -> list[tuple[RPC, RPC]]: + """Create a list of games played""" + games: list[tuple[RPC, RPC]] = [] + rpc_types = self.create_types() + for game in input_data.splitlines(): + p1, p2 = game.split() + games.append((rpc_types[p1], rpc_types[p2])) + + return games + + def solve(self, input_data: str) -> int: + games = self.parse(input_data) + _, score_p2 = self.play_game(games) + return score_p2 + + +class Day02PartB(Day02, FileReaderSolution): + @staticmethod + def find_loose(rpc_types, rpc: RPC) -> RPC: + if rpc.shape == "Rock": + return rpc_types["Z"] # Scissors + elif rpc.shape == "Paper": + return rpc_types["X"] # Rock + elif rpc.shape == "Scissors": + return rpc_types["Y"] # Paper + raise ValueError("Unknown type ", rpc.shape) + + @staticmethod + def find_win(rpc_types, rpc: RPC) -> RPC: + if rpc.shape == "Rock": + return rpc_types["Y"] + elif rpc.shape == "Paper": + return rpc_types["Z"] + elif rpc.shape == "Scissors": + return rpc_types["X"] + raise ValueError("Unknown type ", rpc.shape) + + @staticmethod + def find_draw(rpc_types, rpc: RPC) -> RPC: + if rpc.shape == "Rock": + return rpc_types["X"] + elif rpc.shape == "Paper": + return rpc_types["Y"] + elif rpc.shape == "Scissors": + return rpc_types["Z"] + raise ValueError("Unknown type ", rpc.shape) + + def parse(self, input_data: str) -> list[tuple[RPC, RPC]]: + """Create a list of games played""" + games: list[tuple[RPC, RPC]] = [] + rpc_types = self.create_types() + for game in input_data.splitlines(): + p1, p2 = game.split() + if p2 == "X": + # Loose + rpc_p2 = self.find_loose(rpc_types, rpc_types[p1]) + elif p2 == "Y": + # Draw + rpc_p2 = self.find_draw(rpc_types, rpc_types[p1]) + else: + # Win + rpc_p2 = self.find_win(rpc_types, rpc_types[p1]) + games.append((rpc_types[p1], rpc_p2)) + return games + + def solve(self, input_data: str) -> int: + games = self.parse(input_data) + _, score_p2 = self.play_game(games) + return score_p2 diff --git a/src/adventofcode2022/day03.py b/src/adventofcode2022/day03.py new file mode 100644 index 00000000..1e0670c5 --- /dev/null +++ b/src/adventofcode2022/day03.py @@ -0,0 +1,41 @@ +from adventofcode.utils.abstract import FileReaderSolution + + +class Day03: + @staticmethod + def char_to_value(char) -> int: + if char.isupper(): + value = ord(char) - ord("A") + 27 + else: + value = ord(char) - ord("a") + 1 + return value + + +class Day03PartA(Day03, FileReaderSolution): + def solve(self, input_data: str) -> int: + total_value = 0 + for line in input_data.splitlines(): + values = [self.char_to_value(char) for char in line] + + # Split in half + first = set(values[: len(values) // 2]) + second = set(values[len(values) // 2 :]) + difference = first.intersection(second) + total_value += difference.pop() + + return total_value + + +class Day03PartB(Day03, FileReaderSolution): + def solve(self, input_data: str) -> int: + lines = input_data.splitlines() + total_value = 0 + + for n in range(0, len(lines), 3): + first = {self.char_to_value(char) for char in lines[n]} + second = {self.char_to_value(char) for char in lines[n + 1]} + third = {self.char_to_value(char) for char in lines[n + 2]} + difference = first.intersection(second).intersection(third) + total_value += difference.pop() + + return total_value diff --git a/src/adventofcode2022/day04.py b/src/adventofcode2022/day04.py new file mode 100644 index 00000000..ea5f19f1 --- /dev/null +++ b/src/adventofcode2022/day04.py @@ -0,0 +1,38 @@ +from parse import parse + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day04(FileReaderSolution): + @staticmethod + def in_range(range1: range, range2: range) -> bool: + raise NotImplementedError + + def solve(self, input_data: str) -> int: + ranges = self.parse(input_data.splitlines()) + return sum( + self.in_range(range1, range2) or self.in_range(range2, range1) + for range1, range2 in ranges + ) + + @staticmethod + def parse(lines) -> list[tuple[range, range]]: + ranges = [] + for line in lines: + p = parse("{start1:d}-{stop1:d},{start2:d}-{stop2:d}", line) + ranges.append( + (range(p["start1"], p["stop1"] + 1), range(p["start2"], p["stop2"] + 1)) + ) + return ranges + + +class Day04PartA(Day04): + @staticmethod + def in_range(range1: range, range2: range) -> bool: + return all(i in range2 for i in range1) + + +class Day04PartB(Day04): + @staticmethod + def in_range(range1: range, range2: range) -> bool: + return any(i in range2 for i in range1) diff --git a/src/adventofcode2022/day05.py b/src/adventofcode2022/day05.py new file mode 100644 index 00000000..628d37a9 --- /dev/null +++ b/src/adventofcode2022/day05.py @@ -0,0 +1,82 @@ +from abc import abstractmethod +from typing import NamedTuple + +from parse import parse + +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.stack import Stack + + +class Instruction(NamedTuple): + moves: int + source: int + destination: int + + +class Day05(FileReaderSolution): + stacks: dict[int, Stack] + moves: list[Instruction] + + @staticmethod + def parse_start(start_lines: str) -> dict[int, Stack]: + lines = start_lines.splitlines() + # Get the range: + stack_range = int(max(lines[-1].split(" "))) + stacks = {} + for i in range(0, stack_range): + # Column i + column = 1 + (i * 4) + items = [] + for j in range(0, len(lines) - 1): + if lines[j][column].strip(): + items.append(lines[j][column]) + stack: Stack[str] = Stack() + for item in reversed(items): + stack.push(item) + stacks[i + 1] = stack + + return stacks + + @staticmethod + def parse_instructions(instructions: str) -> list[Instruction]: + instr = [] + for line in instructions.splitlines(): + res = parse("move {moves:d} from {source:d} to {destination:d}", line) + instr.append(Instruction(res["moves"], res["source"], res["destination"])) + return instr + + @staticmethod + def get_tops(stacks: dict[int, Stack]) -> str: + tops = [] + for stack in stacks.values(): + tops.append(stack.pop()) + return "".join(tops) + + @abstractmethod + def perform_moves(self): + raise NotImplementedError + + def solve(self, input_data: str) -> str: + start, instructions = input_data.split("\n\n") + self.stacks = self.parse_start(start) + self.moves = self.parse_instructions(instructions) + self.perform_moves() + return self.get_tops(self.stacks) + + +class Day05PartA(Day05): + def perform_moves(self): + for move in self.moves: + for _ in range(0, move.moves): + self.stacks[move.destination].push(self.stacks[move.source].pop()) + + +class Day05PartB(Day05, FileReaderSolution): + def perform_moves(self): + for move in self.moves: + moved = [] + for _ in range(0, move.moves): + moved.append(self.stacks[move.source].pop()) + + for item in reversed(moved): + self.stacks[move.destination].push(item) diff --git a/src/adventofcode2022/day06.py b/src/adventofcode2022/day06.py new file mode 100644 index 00000000..399cd3c0 --- /dev/null +++ b/src/adventofcode2022/day06.py @@ -0,0 +1,27 @@ +from more_itertools import sliding_window + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day06: + @staticmethod + def parse_packets(input_data: str, length: int) -> int: + input_data = input_data.strip() + for idx, packet in enumerate(sliding_window(input_data, length)): + if len(set(packet)) != length: + # Duplicated characters + continue + # We have something new, return starting position + 4 chars in this packet + return idx + length + + raise ValueError("No package found for length %s", length) + + +class Day06PartA(Day06, FileReaderSolution): + def solve(self, input_data: str) -> int: + return self.parse_packets(input_data, 4) + + +class Day06PartB(Day06, FileReaderSolution): + def solve(self, input_data: str) -> int: + return self.parse_packets(input_data, 14) diff --git a/src/adventofcode2022/day07.py b/src/adventofcode2022/day07.py new file mode 100644 index 00000000..eddf248e --- /dev/null +++ b/src/adventofcode2022/day07.py @@ -0,0 +1,147 @@ +from __future__ import annotations + +import logging +from collections import Counter +from enum import Enum + +from adventofcode.utils.abstract import FileReaderSolution + +logger = logging.getLogger(__name__) + + +class Type(str, Enum): + root = "root" + file = "file" + directory = "directory" + + +class Node: + name: str + node_type: Type + size: int + contains: list[Node] + parent: Node + + def __init__(self, name, node_type: Type, size=0, parent=None): + self.name = name + self.node_type = node_type + self.size = size + self.contains = [] + self.parent = parent + + def __repr__(self): + return ( + f"Node-{self.node_type}({self.name}, {self.size=}, " + f"Content: {';'.join(repr(child) for child in self.contains)})" + ) + + def add_subdirectory(self, name) -> Node: + """Create a new subdirectory, add it to the list of folders and return it""" + new_dir = Node(name=name, node_type=Type.directory, parent=self) + self.contains.append(new_dir) + + return new_dir + + def add_file(self, name: str, size: int) -> Node: + """Create a new file in this subdirectory""" + new_file = Node(name=name, node_type=Type.file, size=size, parent=self) + self.contains.append(new_file) + return new_file + + def find_subdirectory(self, name) -> Node: + """Find a subdirectory in this node""" + for node in self.contains: + if node.name == name and node.node_type == Type.directory: + return node + raise KeyError("%s not found!", name) + + def total_size(self) -> int: + if self.node_type == Type.file: + return self.size + else: + return sum(item.total_size() for item in self.contains) + + +class Day07: + def parse_input(self, input_data: str) -> Node: + """Parse the input data and return the root node""" + root_node = Node(name="/", node_type=Type.root) + current_folder = root_node + for line in input_data.splitlines(): + parts = line.split() + + if line == "$ cd /": + current_folder = root_node + elif parts[0] == "$" and parts[1] == "cd" and parts[2] != "..": + # Going into a directory + current_folder = current_folder.find_subdirectory(parts[2]) + elif parts[0] == "$" and parts[1] == "cd" and parts[2] == "..": + # Going up + current_folder = current_folder.parent + elif parts[0] == "$" and parts[1] == "ls": + continue + elif parts[0] == "dir": + current_folder.add_subdirectory(parts[1]) + else: + # This must be a file + current_folder.add_file(name=parts[1], size=int(parts[0])) + + return root_node + + +class Day07PartA(Day07, FileReaderSolution): + @staticmethod + def calculate_directory_size(root_node) -> int: + to_check: list[Node] = [root_node] + total = 0 + while to_check: + node = to_check.pop() + logger.info(f"Checking node {node.name}") + for child in node.contains: + if child.node_type == Type.directory: + to_check.append(child) + + if node.total_size() <= 100000: + total += node.total_size() + + return total + + def solve(self, input_data: str) -> int: + logger.info("Start parsing") + root_node = self.parse_input(input_data) + logger.info("Parsing done") + + return self.calculate_directory_size(root_node) + + +class Day07PartB(Day07, FileReaderSolution): + def calculate_directory_sizes(self, root_node: Node) -> Counter[str]: + to_check: list[Node] = [root_node] + dir_sizes: Counter[str] = Counter() + + while to_check: + node = to_check.pop() + logger.info(f"Checking node {node.name}") + for child in node.contains: + if child.node_type == Type.directory: + to_check.append(child) + dir_sizes[node.name] = node.total_size() + + return dir_sizes + + def solve(self, input_data: str) -> int: + logger.info("Start parsing") + root_node = self.parse_input(input_data) + logger.info("Parsing done") + + sizes = self.calculate_directory_sizes(root_node) + total_size = 70_000_000 + required_free_space = 30_000_000 + total_used = sizes["/"] + unused = total_size - total_used + # We have `unused` unused free space, we need required_free_space; + still_required = required_free_space - unused + for name, size in reversed(sizes.most_common()): + if size > still_required: + return size + return -1 diff --git a/src/adventofcode2022/day08.py b/src/adventofcode2022/day08.py new file mode 100644 index 00000000..25b1b238 --- /dev/null +++ b/src/adventofcode2022/day08.py @@ -0,0 +1,115 @@ +import math + +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.point import XYPoint as Point + + +class Day08: + grid: dict[Point, int] + max_x: int + min_x: int + max_y: int + min_y: int + + def parse(self, input_data: str): + self.grid = {} + for x, line in enumerate(input_data.splitlines()): + for y, char in enumerate(line): + self.grid[Point(x, y)] = int(char) + self.max_x, self.min_x, self.max_y, self.min_y = self.min_max_values() + + def min_max_values(self) -> tuple[int, int, int, int]: + """Return max_x, min_x, max_y, min_y for image""" + values = [pnt for pnt in self.grid.keys()] + max_x = max(pnt.x for pnt in values) + min_x = min(pnt.x for pnt in values) + max_y = max(pnt.y for pnt in values) + min_y = min(pnt.y for pnt in values) + return max_x, min_x, max_y, min_y + + +class Day08PartA(Day08, FileReaderSolution): + def is_visible_point(self, point: Point) -> bool: + for dx, dy in ((1, 0), (-1, 0), (0, 1), (0, -1)): + if self.is_visible_point_for_direction(point, dx, dy): + return True + return False + + def is_visible_point_for_direction(self, point: Point, dx: int, dy: int) -> bool: + """Is this point visible from this direction?""" + value = self.grid[point] + + test_x = point.x + dx + test_y = point.y + dy + while True: + test_value = self.grid.get(Point(test_x, test_y), -1) + if test_value == -1: + # On the edge, we did not find any higher points + return True + elif test_value >= value: + return False + test_x += dx + test_y += dy + + def count_visible(self) -> int: + """Count the visible trees""" + visible = 0 + + for x in range(self.min_x, self.max_x + 1): + for y in range(self.min_y, self.max_y + 1): + if x == 0 or x == self.max_x or y == 0 or y == self.max_y: + # Are we on an edge? Always count this. + visible += 1 + continue + # Check if there is a tree lower than `value` in all directions + if self.is_visible_point(Point(x, y)): + visible += 1 + return visible + + def solve(self, input_data: str) -> int: + self.parse(input_data) + return self.count_visible() + + +class Day08PartB(Day08, FileReaderSolution): + def visible_trees(self, point: Point) -> int: + """Count how many trees are visible from this position, + and multiply their numbers together.""" + return math.prod( + self.visible_points_for_direction(point, dx, dy) + for dx, dy in ((1, 0), (-1, 0), (0, 1), (0, -1)) + ) + + def visible_points_for_direction(self, point: Point, dx: int, dy: int) -> int: + """How many points are visible from this direction?""" + value = self.grid[point] + + test_x = point.x + dx + test_y = point.y + dy + visible = 0 + while True: + test_value = self.grid.get(Point(test_x, test_y), -1) + if test_value == -1: + # On the edge, we did not find any higher points + # There is nothing beyond the edge, to not count + return visible + elif test_value >= value: + # We are now looking at a higher tree. Also count this tree + return visible + 1 + test_x += dx + test_y += dy + visible += 1 + + def count_visible(self) -> int: + """Count the visible trees""" + max_visible = 0 + + for x in range(self.min_x, self.max_x + 1): + for y in range(self.min_y, self.max_y + 1): + # Check if there is a tree lower than `value` in all directions + max_visible = max(max_visible, self.visible_trees(Point(x, y))) + return max_visible + + def solve(self, input_data: str) -> int: + self.parse(input_data) + return self.count_visible() diff --git a/src/adventofcode2022/day09.py b/src/adventofcode2022/day09.py new file mode 100644 index 00000000..52c3a434 --- /dev/null +++ b/src/adventofcode2022/day09.py @@ -0,0 +1,86 @@ +import more_itertools + +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.point import XYPoint as Point + + +class Day09: + moves: list[tuple[str, int]] + tail_positions: set[tuple[int, int]] + head: Point + tails: list[Point] + + def parse(self, input_data: str): + self.moves = [] + for line in input_data.splitlines(): + p = line.split(" ") + self.moves.append((p[0], int(p[1]))) + + def simulate(self, no_heads: int) -> int: + self.tail_positions = set() + + self.head = Point(0, 0) + self.tails = [Point(0, 0) for _ in range(no_heads)] + self.tail_positions.add((self.tails[-1].x, self.tails[-1].y)) + for move, steps in self.moves: + for n in range(steps): + if move == "R": + self.head.x += 1 + elif move == "L": + self.head.x -= 1 + elif move == "D": + self.head.y += 1 + elif move == "U": + self.head.y -= 1 + + # Define steps for the tails to move: + self.move_tails() + self.tail_positions.add((self.tails[-1].x, self.tails[-1].y)) + + return len(self.tail_positions) + + def move_tails(self): + to_move = [self.head] + self.tails + for head, tail in more_itertools.sliding_window(to_move, 2): + self.move_tail(head, tail) + + @staticmethod + def move_tail(head, tail) -> Point: + horizontal_move = head.x == tail.x or head.y == tail.y + if horizontal_move and tail.distance(head) == 1: + return tail + if not horizontal_move and tail.distance(head) == 2: + return tail + elif horizontal_move and tail.x > head.x and tail.y == head.y: + tail.x -= 1 + elif horizontal_move and tail.x < head.x and tail.y == head.y: + tail.x += 1 + elif horizontal_move and tail.y > head.y and tail.x == head.x: + tail.y -= 1 + elif horizontal_move and tail.y < head.y and tail.x == head.x: + tail.y += 1 + elif not horizontal_move and tail.x > head.x and tail.y > head.y: + tail.x -= 1 + tail.y -= 1 + elif not horizontal_move and tail.x > head.x and tail.y < head.y: + tail.x -= 1 + tail.y += 1 + elif not horizontal_move and tail.x < head.x and tail.y > head.y: + tail.x += 1 + tail.y -= 1 + elif not horizontal_move and tail.x < head.x and tail.y < head.y: + tail.x += 1 + tail.y += 1 + return tail + + +class Day09PartA(Day09, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.parse(input_data) + return self.simulate(1) + + +class Day09PartB(Day09, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.parse(input_data) + return self.simulate(9) diff --git a/src/adventofcode2022/day10.py b/src/adventofcode2022/day10.py new file mode 100644 index 00000000..209dc7fc --- /dev/null +++ b/src/adventofcode2022/day10.py @@ -0,0 +1,106 @@ +from typing import NamedTuple + +from adventofcode.utils.abstract import FileReaderSolution + + +class Instruction(NamedTuple): + instruction: str + value: int | None + + +class ProgramEnded(Exception): # noqa: N818 + """Signal that the program has ended""" + + +class CPU: + x: int + instructions: list[Instruction] + program_counter: int + current_step: int + + def __init__(self, instructions: list[Instruction]): + self.instructions = instructions + + self.x = 1 + self.program_counter = 0 + self.current_step = 0 + + def cycle(self): + if self.program_counter >= len(self.instructions): + raise ProgramEnded + + current_instruction = self.instructions[self.program_counter] + # Single cycle instructions + if current_instruction.instruction == "noop": + self.program_counter += 1 + self.current_step = 0 + elif current_instruction.instruction == "addx" and self.current_step == 0: + self.current_step += 1 + elif current_instruction.instruction == "addx" and self.current_step == 1: + self.program_counter += 1 + self.current_step = 0 + if current_instruction.value: + self.x += current_instruction.value + + else: + raise ValueError("Invalid instruction %s", current_instruction) + + +class Day10: + @staticmethod + def parse(input_data: str) -> list[Instruction]: + instructions = [] + for line in input_data.splitlines(): + parts = line.split() + if len(parts) == 1: + instructions.append(Instruction(instruction=parts[0], value=None)) + else: + instructions.append( + Instruction(instruction=parts[0], value=int(parts[1])) + ) + + return instructions + + @staticmethod + def fill_buffer(instructions: list[Instruction]) -> list[int]: + cpu = CPU(instructions) + frame_buffer = [] + while True: + frame_buffer.append(cpu.x) + try: + cpu.cycle() + except ProgramEnded: + break + return frame_buffer + + +class Day10PartA(Day10, FileReaderSolution): + def solve(self, input_data: str) -> int: + instructions = self.parse(input_data=input_data) + frame_buffer = self.fill_buffer(instructions) + total = 0 + for cycle in (20, 60, 100, 140, 180, 220): + total += cycle * frame_buffer[cycle - 1] + + return total + + +ON = "#" +OFF = "." + + +class Day10PartB(Day10, FileReaderSolution): + def solve(self, input_data: str) -> str: + instructions = self.parse(input_data=input_data) + + frame_buffer = self.fill_buffer(instructions) + + screen = [[OFF] * 40 for _ in range(6)] + + for row in range(6): + for col in range(40): + counter = row * 40 + col + if abs(frame_buffer[counter] - col) <= 1: + screen[row][col] = ON + + return "\n".join("".join(line) for line in screen) diff --git a/src/adventofcode2022/day11.py b/src/adventofcode2022/day11.py new file mode 100644 index 00000000..4772a0d2 --- /dev/null +++ b/src/adventofcode2022/day11.py @@ -0,0 +1,143 @@ +from __future__ import annotations + +import math +from typing import NamedTuple + +import parse + +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.queue import Queue + + +class Throw(NamedTuple): + monkid: int + worry_level: int + + +class Monkey: + monkid: int + items: Queue[int] + operation: str + + perform_modulo: bool + modulo_factor: int + + test_division: int + true_to: int + false_to: int + + inspections: int + + def __init__(self, perform_modulo: bool = True): + self.items = Queue() + self.inspections = 0 + self.perform_modulo = perform_modulo + + def __repr__(self): + return ( + f"Monkey(id:{self.monkid}, inspections:{self.inspections}, " + f"items[{repr(self.items)}])" + ) + + @staticmethod + def from_string(data: str, perform_modulo: bool) -> Monkey: + lines = [line.strip() for line in data.splitlines()] + monkey = Monkey(perform_modulo=perform_modulo) + + monkey.monkid = parse.parse("Monkey {:d}:", lines[0])[0] + for item in parse.findall("{:d}", lines[1]): + monkey.items.push(item[0]) + + monkey.operation = lines[2].split("=")[1].strip() + monkey.test_division = parse.parse("Test: divisible by {:d}", lines[3])[0] + monkey.true_to = parse.parse("If true: throw to monkey {:d}", lines[4])[0] + monkey.false_to = parse.parse("If false: throw to monkey {:d}", lines[5])[0] + return monkey + + def inspect(self) -> list[Throw]: + """Inspect the items we have. Returns a list of Throw's""" + throws: list[Throw] = [] + while self.items: + self.inspections += 1 + item = self.items.pop() + # Inspect an item + # Apply operation + new = self._apply_operation(item) + + if self.perform_modulo: + new = new % self.modulo_factor + else: + # Divide by 3 + new //= 3 + + if new % self.test_division == 0: + throws.append(Throw(self.true_to, new)) + else: + throws.append(Throw(self.false_to, new)) + return throws + + def _apply_operation(self, item: int) -> int: + left, op, right = self.operation.split(" ") + if left == "old": + left_op = int(item) + else: + left_op = int(left) + + if right == "old": + right_op = int(item) + else: + right_op = int(right) + + if op == "*": + return left_op * right_op + elif op == "+": + return left_op + right_op + else: + raise ValueError("Invalid op %s", op) + + +class Day11: + monkeys: list[Monkey] + + @staticmethod + def parse(input_data: str, perform_modulo: bool) -> list[Monkey]: + monkeys = [ + Monkey.from_string(string, perform_modulo) + for string in input_data.split("\n\n") + ] + + if perform_modulo: + # Now that we have all the monkeys, we can our modulo factor. + # This means getting the product of all the test_division tests. + mod_factor = math.prod(m.test_division for m in monkeys) + for monkey in monkeys: + monkey.modulo_factor = mod_factor + return monkeys + + def play_rounds(self, rounds: int): + for i in range(rounds): + self.play() + + def play(self): + for monkey in self.monkeys: + throws = monkey.inspect() + # And now distribute the throws around + for throw in throws: + self.monkeys[throw.monkid].items.push(throw.worry_level) + + def compute_score(self): + return math.prod(sorted(list(m.inspections for m in self.monkeys))[-2:]) + + +class Day11PartA(Day11, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.monkeys = self.parse(input_data, perform_modulo=False) + self.play_rounds(20) + return self.compute_score() + + +class Day11PartB(Day11, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.monkeys = self.parse(input_data, perform_modulo=True) + self.play_rounds(10000) + return self.compute_score() diff --git a/src/adventofcode2022/day12.py b/src/adventofcode2022/day12.py new file mode 100644 index 00000000..c1463a48 --- /dev/null +++ b/src/adventofcode2022/day12.py @@ -0,0 +1,117 @@ +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.generic_search import BFS +from adventofcode.utils.node import Node +from adventofcode.utils.point import XYPoint as Point + + +class Day12: + grid: dict[Point, int] + max_x: int + max_y: int + start_position: Point + end_position: Point + + def parse(self, input_lines: str): + self.grid = {} + + for x, line in enumerate(input_lines.splitlines()): + for y, char in enumerate(line): + pnt = Point(x, y) + if char == "S": + self.start_position = pnt + int_value = 0 + elif char == "E": + self.end_position = pnt + int_value = 26 + else: + int_value = ord(char) - ord("a") + 1 + self.grid[pnt] = int_value + self.max_x = max(point.x for point in self.grid.keys()) + self.max_y = max(point.y for point in self.grid.keys()) + + def goal_test(self, pnt: Point) -> bool: + return pnt == self.end_position + + def heuristic(self, pnt: Point) -> float: + distance = self.end_position.distance(pnt) + return distance + + def neighbours(self, pnt: Point) -> list[Point]: + neighbours = [] + for dx, dy in ((-1, 0), (1, 0), (0, 1), (0, -1)): + new_point = Point(dx, dy) + pnt + if ( + new_point.x < 0 + or new_point.y < 0 + or new_point.x > self.max_x + or new_point.y > self.max_y + ): + continue + current_value = self.grid[pnt] + if ( + self.grid[new_point] <= current_value + or self.grid[new_point] == current_value + 1 + or self.grid[new_point] == self.end_position + ): + neighbours.append(new_point) + return neighbours + + +class Day12PartA(Day12, FileReaderSolution): + def find_sortest_path(self): + shortest_node = BFS().search( + initial=self.start_position, + goal_test=self.goal_test, + successors=self.neighbours, + ) + if shortest_node: + path = Node.node_to_path(shortest_node) + # Subtract the start and ending node + return len(path) - 1 + else: + raise ValueError("No Path found!") + + def print_path(self, path: list[Point]): + local_grid = {} + for pnt, value in self.grid.items(): + local_grid[pnt] = " " + chr(value + ord("a") - 1) + + for idx, pnt in enumerate(path): + local_grid[pnt] = f" {idx:03}" + + lines = [] + for x in range(self.max_x + 1): + line = [] + for y in range(self.max_y + 1): + line.append(local_grid[Point(x, y)]) + lines.append("".join(line)) + print() + print("\n".join(lines)) + + def solve(self, input_data: str) -> int: + self.parse(input_data) + return self.find_sortest_path() + + +class Day12PartB(Day12, FileReaderSolution): + def find_sortest_path(self): + # Find all the possible starting positions + start_points = [point for point, value in self.grid.items() if value == 1] + shortest = 9999 + + for point in start_points: + shortest_node = BFS().search( + initial=point, + goal_test=self.goal_test, + successors=self.neighbours, + ) + + if shortest_node: + path = Node.node_to_path(shortest_node) + # Subtract the start and ending node, and compute the minimum value + shortest = min(len(path) - 1, shortest) + return shortest + + def solve(self, input_data: str) -> int: + self.parse(input_data) + return self.find_sortest_path() diff --git a/src/adventofcode2022/day13.py b/src/adventofcode2022/day13.py new file mode 100644 index 00000000..98d7e223 --- /dev/null +++ b/src/adventofcode2022/day13.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from ast import literal_eval +from functools import cmp_to_key + +from adventofcode.utils.abstract import FileReaderSolution + +Packet = list[int | list] + + +class Pair: + left: Packet + right: Packet + index: int + + def __init__(self, left: Packet, right: Packet, index: int): + self.left = left + self.right = right + self.index = index + + def is_valid(self) -> bool: + """Validate if a packet is has valid pairs""" + return self.compare(self.left, self.right) < 0 + + @classmethod + def compare(cls, left: Packet | int, right: Packet | int) -> int: + # Convert to list if needed + if isinstance(right, int) and isinstance(left, int): + return left - right + if isinstance(left, int): + left = [left] + if isinstance(right, int): + right = [right] + + # Let's dive into this! left and right have now both been turned + # into lists + for idx, left_value in enumerate(left): + try: + right_value = right[idx] + except IndexError: + # Until now, all the values have been the same. + # Right side ran out of items, + # so inputs are not in the right order + return 1 + + res = cls.compare(left_value, right_value) + if res != 0: + return res + + return len(left) - len(right) + + +class Day13: + def parse(self, string_pair: str, index: int) -> Pair: + p1, p2 = string_pair.splitlines() + left: Packet = literal_eval(p1) + right: Packet = literal_eval(p2) + + return Pair(left=left, right=right, index=index) + + +class Day13PartA(Day13, FileReaderSolution): + def solve(self, input_data: str) -> int: + pairs: list[Pair] = [] + + for index, input_pair in enumerate(input_data.split("\n\n"), start=1): + pairs.append(self.parse(input_pair, index)) + + valid_pairs = sum(p.index for p in pairs if p.is_valid()) + + return valid_pairs + + +class Day13PartB(Day13, FileReaderSolution): + def solve(self, input_data: str) -> int: + pairs: list[Pair] = [] + + for index, input_pair in enumerate(input_data.split("\n\n"), start=1): + pairs.append(self.parse(input_pair, index)) + + # Add the divider packets: + divider_packets = "[[2]]\n[[6]]" + pairs.append(self.parse(divider_packets, 0)) + + # Now, extract all the packets into a list: + packets = [p.left for p in pairs] + [p.right for p in pairs] + + sorted_packets = sorted(packets, key=cmp_to_key(Pair.compare)) + i1 = sorted_packets.index([[2]]) + 1 + i2 = sorted_packets.index([[6]]) + 1 + return i1 * i2 diff --git a/src/adventofcode2022/day14.py b/src/adventofcode2022/day14.py new file mode 100644 index 00000000..4442e016 --- /dev/null +++ b/src/adventofcode2022/day14.py @@ -0,0 +1,143 @@ +from collections import defaultdict +from enum import StrEnum + +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.point import XYPoint as Point + + +class Pixel(StrEnum): + ROCK = "#" + AIR = "." + SAND = "o" + SOURCE = "+" + + +class Day14: + grid: defaultdict[Point, Pixel] + + def parse(self, input_lines: list[str]): + self.grid = defaultdict(lambda: Pixel.AIR) + + for line in input_lines: + points = [ + Point(*map(int, p.split(","))) + for p in [lp.strip() for lp in line.split("->")] + ] + start = points[0] + for end in points[1:]: + # Draw a line between start and end + start_x, end_x = min(start.x, end.x), max(start.x, end.x) + start_y, end_y = min(start.y, end.y), max(start.y, end.y) + for x in range(start_x, end_x + 1): + for y in range(start_y, end_y + 1): + self.grid[Point(x, y)] = Pixel.ROCK + start = end + + def min_max_values(self) -> tuple[int, int, int, int]: + """Return max_x, min_x, max_y, min_y for image""" + + values = [pnt for pnt in self.grid.keys()] + max_x = max(pnt.x for pnt in values) + min_x = min(pnt.x for pnt in values) + max_y = max(pnt.y for pnt in values) + min_y = min(pnt.y for pnt in values) + return max_x, min_x, max_y, min_y + + def repr_grid(self) -> str: + max_x, min_x, max_y, min_y = self.min_max_values() + min_y = min(0, min_y) + clear = chr(27) + "[2J" + lines = [clear] + for y in range(min_y, max_y + 1): + line = [f"{y:03} "] + for x in range(min_x, max_x + 1): + line.append(str(self.grid[Point(x, y)])) + lines.append("".join(line)) + return "\n".join(lines) + + def count_sand_left(self) -> int: + return len([p for p in self.grid.values() if p == Pixel.SAND]) + + def move_sand(self, sand: Point) -> Point | bool: + """Move a grain of salt, one step at a time. + Returns false if no moves are possible""" + # Check down + down_location = Point(0, 1) + sand + if self.grid[down_location] == Pixel.AIR: + return down_location + + # We cannot move down, check down, left + down_left = Point(-1, 1) + sand + if self.grid[down_left] == Pixel.AIR: + return down_left + + down_right = Point(1, 1) + sand + if self.grid[down_right] == Pixel.AIR: + return down_right + + # No valid moves left, + return False + + def print(self): + # print(self.repr_grid()) + print(f"Count currently is: {self.count_sand_left()}") + + +class Day14PartA(Day14, FileReaderSolution): + def loop(self, start): + """Let sand fall until a grain of salt falls off""" + self.grid[start] = Pixel.SOURCE + + # Define the bottom + _, _, max_y, _ = self.min_max_values() + bottom = max_y + 1 + while True: + sand = Point(start.x, start.y) + while True: + new_location = self.move_sand(sand) + if not new_location: + # We cannot move anymore + self.grid[sand] = Pixel.SAND + break + else: + sand = new_location # type: ignore + if sand.y > bottom: + return + + def solve(self, input_data: str) -> int: + self.parse(input_data.splitlines()) + self.loop(start=Point(500, 0)) + return self.count_sand_left() + + +class Day14PartB(Day14, FileReaderSolution): + def loop(self, start): + """Let sand fall until a grain of salt falls off""" + self.grid[start] = Pixel.SOURCE + + # Define the bottom + _, _, max_y, _ = self.min_max_values() + bottom = max_y + 2 + + while True: + sand = Point(start.x, start.y) + first = True + while True: + new_location = self.move_sand(sand) + # If the first iteration is false, we know that we have filled the whole + # thing. Let's add the grain of salt at the start, and return + if first and not new_location: + self.grid[start] = Pixel.SAND + return + first = False + if not new_location or new_location.y == bottom: # type: ignore + # We cannot move anymore + self.grid[sand] = Pixel.SAND + break + else: + sand = new_location # type: ignore + + def solve(self, input_data: str) -> int: + self.parse(input_data.splitlines()) + self.loop(start=Point(500, 0)) + return self.count_sand_left() diff --git a/src/adventofcode2022/day15.py b/src/adventofcode2022/day15.py new file mode 100644 index 00000000..3e1239c9 --- /dev/null +++ b/src/adventofcode2022/day15.py @@ -0,0 +1,102 @@ +from typing import NamedTuple + +from parse import parse + +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.point import XYPoint as Point + + +class Line(NamedTuple): + sensor: Point + beacon: Point + distance: int + + +class Day15: + lines: list[Line] + + def parse(self, input_lines: list[str]): + """Parse line: + Sensor at x=2, y=0: closest beacon is at x=2, y=10 + """ + self.lines = [] + for line in input_lines: + p = parse( + "Sensor at x={sx:d}, y={sy:d}: closest beacon is at x={bx:d}, y={by:d}", + line, + ) + sensor = Point(p["sx"], p["sy"]) + beacon = Point(p["bx"], p["by"]) + distance = abs(sensor.distance(beacon)) + self.lines.append(Line(sensor=sensor, beacon=beacon, distance=distance)) + + @staticmethod + def remaining_on_line(line, y): + """Calculate the distance between the sensor and the row we are measuring""" + return line.distance - abs(line.sensor.y - y) + + +class Day15PartA(Day15, FileReaderSolution): + def find_positions(self, row) -> int: + invalid_points = set() + # Exclude the beacons on this lines + beacons_on_row = set() + + for line in self.lines: + if line.beacon.y == row: + # We do not calculate the beacons. + beacons_on_row.add(line.beacon) + + # Calculate the distande between the sensor and the row we are measuring + remainder = self.remaining_on_line(line, row) + + # Skip sensors too far away + if remainder < 0: + continue + + for i in range(remainder + 1): + invalid_points.add(line.sensor.x + i) + invalid_points.add(line.sensor.x - i) + + return len(invalid_points) - len(beacons_on_row) + + def execute(self, input_data, row=2000000) -> int: + self.parse(input_data.splitlines()) + return self.find_positions(row) + + def solve(self, input_data: str) -> int: + return self.execute(input_data, row=2000000) + + +class Day15PartB(Day15, FileReaderSolution): + def find_frequency(self, factor: int) -> int: + """Find the tuning frequency""" + y = 0 + while y < factor: + x = 0 + while x <= factor: + new_x = x + for line in self.lines: + new_x = self.skip_over_line(line, x, y) + if x != new_x: + break + if new_x == x: + # Return here? + res = (x * 4000000) + y + return res + x = new_x + y += 1 + return -1 + + def skip_over_line(self, line, x, y): + remaining = self.remaining_on_line(line, y) + if line.sensor.x - remaining <= x <= line.sensor.x + remaining: + return line.sensor.x + 1 + remaining + return x + + def execute(self, input_data: str, factor: int) -> int: + self.parse(input_data.splitlines()) + return self.find_frequency(factor) + + def solve(self, input_data: str) -> int: + return self.execute(input_data, factor=4_000_000) diff --git a/src/adventofcode2022/day16.py b/src/adventofcode2022/day16.py new file mode 100644 index 00000000..da9b4490 --- /dev/null +++ b/src/adventofcode2022/day16.py @@ -0,0 +1,100 @@ +from __future__ import annotations + +import re +from functools import cache +from typing import NamedTuple + +from adventofcode.utils.abstract import FileReaderSolution + + +class Valve(NamedTuple): + name: str + connections: list[str] + flow_rate: int + + +class Day16: + valves: dict[str, Valve] + + def parse(self, input_lines: str): + """Parse lines + Expected input: + + Valve AA has flow rate=0; tunnels lead to valves DD, II, BB + + """ + self.valves = {} + + parser = re.compile( + r"Valve (?P\w*) has flow rate=(?P\d*); " + r"tunnel(s?) lead(s?) to valve(s?) (?P.*)" + ) + for line in input_lines.splitlines(): + if match := parser.search(line): + mdict = match.groupdict() + connections = tuple(c.strip() for c in mdict["connections"].split(",")) + + name = mdict["valve"] + valve = Valve( + name, flow_rate=int(mdict["flow_rate"]), connections=connections + ) + self.valves[name] = valve + + else: + raise ValueError("Invalid Line", line) + + @cache + def find_path( + self, + current_valve: str, + time: int, + open_valves: tuple[str] | None, + elephant=False, + ): + if time == 0: + # Outatime, Base state, nothing else to compute + if elephant: + # Now have the elephant traverse another route + return self.find_path("AA", 26, open_valves) + return 0 + # We have 2 options: + # - Walk to another valve + # - Open current valve + + # Walk to all the connected valved, this takes one minute. + max_walking_score = max( + self.find_path(valve, time - 1, open_valves, elephant) + for valve in self.valves[current_valve].connections + ) + + # Open the current valve, if there is a flowrate, and it's not yet open + if ( + self.valves[current_valve].flow_rate > 0 + and current_valve not in open_valves + ): + # Add current valve to the open valves + # Sort the vales + open_valves = tuple(sorted([*open_valves, current_valve])) + + # Calculate what our flow will be when it's opened + # e.g. 24 minute left * flow-rate + current_flow = (time - 1) * self.valves[current_valve].flow_rate + # Recurse and find a cheaper path + open_score = current_flow + self.find_path( + current_valve, time - 1, open_valves, elephant + ) + return max(open_score, max_walking_score) + else: + return max_walking_score + + +class Day16PartA(Day16, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.parse(input_data) + return self.find_path("AA", 30, (), False) + + +class Day16PartB(Day16, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.parse(input_data) + return self.find_path("AA", 26, (), True) diff --git a/src/adventofcode2022/day22.py b/src/adventofcode2022/day22.py new file mode 100644 index 00000000..eae6080e --- /dev/null +++ b/src/adventofcode2022/day22.py @@ -0,0 +1,17 @@ +from __future__ import annotations + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day22: + pass + + +class Day22PartA(Day22, FileReaderSolution): + def solve(self, input_data: str) -> int: + raise NotImplementedError + + +class Day22PartB(Day22, FileReaderSolution): + def solve(self, input_data: str) -> int: + raise NotImplementedError diff --git a/src/adventofcode2023/data/day_01/day01.txt b/src/adventofcode2023/data/day_01/day01.txt new file mode 100644 index 00000000..5f52ba37 --- /dev/null +++ b/src/adventofcode2023/data/day_01/day01.txt @@ -0,0 +1,1000 @@ +heightseven4two5 +npskfdstpk2knsm +djnrmpxjbsbpgzvtjkhq6pkkfshx +kgsddxsevensevenlcmkdlcgtfbqxmlnkhbnvhshkckppn2 +8blvspztqjnine854fivefour +ninesixthree8six8 +5tnzrrzmcsnfivefeightrjninexrhnnfbcb +dcjcj2 +4fhcmhdtfourlzdphfxvlmvm6 +eighth33twobfr +qnb2sdsfhgxmfqqzkkjmfbxzjeight +seven4zzsmcqtwo +fourthreeone1two +kkncfbsrfdsix9rvfpjrdxbgcssmkztwo +959eight3two +sixpmvlkkdjf3frr91 +five3xhpsdfkg94two3six +bgqqglhqqtwohhqpgqjvqj8 +23seven +kkddrrtskfive75pcmhhxcxzfourthree8 +smtfgqg7foureight +281 +eighttxqtfjrldgxdpgkblzt3three +zjznfive4 +5hpxksxc +dvrkfvgvtwosnlqqcfivesixstglhvgfhlrgczzgvkvfour3 +sixllkhdpdxfvhqcbgz24two +drc79twotwofive +2vccthreefive6sevenrzqprfflnlsjtb +3four3fjqm7lntttphvs +threerzshdfgs4seventwolpb +9threehmbt5 +9plgm +17bjhndv3one2 +jghtqonesix3 +1kzdfjeightonesixtwothree44 +jpzs23gvjvsztbcvthree +v5hmkncqvtqxvtwotwofiveeighttqmbk +oner9kmfrjdbxcffl +bmnpn9n +3dsrcnssfgn +psstwonesevenfvctwo9vnbxflpntcdllpzpkgtwo9one +rkmbh8 +two1twokmkr +sixfour9xsmpzzseightvqn +threemmbrfxlqjtjgx95r9six +seveneightpthree91nine +twoeightfive7rdqqs4 +5threesevenhdjnrseven6five +45nineeightnvoneeight71 +hrprrsg6eightrmthree7xnkmdcdqm +cgfrgmflvthree38grksbjnpfhqpnvctrmtshffivemkzqmlfn +227 +79onethreervsjtpkkr +229twoonedcvz +8ltnnqmtn7threetdfxd3 +3358pvbtbonekpbcvbcrrz +fourrpkmtvvqfgsmxktqhvhb1mnbjj +91xmzmzfbt +vseven9 +6four2 +32q2 +bneightwo6eightsevenxl3 +two8jhbchqncbmsvfhznbvqmpxr931lnt +cvlbktjmsevensix9eightfsixthree +fivethree8sevenone +prqr1krjgkllqrdmjbdjnvvc +six4hspnpbgfivefour9fourxlsf +zhxsncl77321 +dlslthree1sevenkrrlnbzggtwofourtwo +rqtjzv2lqt7dfxcvfshtwo +31oneqrnnzbbjfthreesix9nhnpqmnbnx +sfhlrqt5649eight +sevenjzlxthree6kndrfvtwo8zjzfspgtr +2f +4bmzvbpkfmtwo946 +eight8qkpxm33ljprdctmghfrt +three643sevensixfour82 +vkdcnhhlhltsn6 +2sixsix264oneightm +6rbx9threetwothree +hhvtjlxgjpqbzzdcfpnhvncbqf94 +nine98 +jknmeight9seventhreemhdxddhfive8 +qljrvrprxthree1fiveeightwoj +bjtntqlhk3mhjqmd5twolqrjtsixfour +fdqddhxvone1twogjpqclnpjqxjpk8 +4cffzxeightfmbzfourn5 +56947cthvktgff +ztbhdtmxtrbr1ssxmzbvhfiveeightwox +two1phrvdx +16vvrs1szzk9 +67rhvtzvzvseventx7 +2kjnmseven8 +tonenine9nine +threeeightseven93jttxgtdml2threeflclh +2hxsdksfmdshxcdmxlb +seven9threeqslknninelfgmrsfjjjpklbh +3twosevensevenfourcgsmbn7hr +threevjvldjvstn2sixonevcljlf +17cninepqgjp +rjrnlknfivelscqfhhfv75 +five7hzvvh +31two3seveneighteightfour +78seven +threesixmzsldcxpjnvrkptwothreenine5f +trrxdhp8cqmfivexx7 +tgppgp9 +7five7grcdhsz5seven +31eight +nptmpmghrhsktcjthtonek15 +xgghqkqqqsdxgjzz7 +vsix1sbthreeonesix4eightwox +gqcvhpdvl5onejmlrlljrf +pdgmnmcptwo4 +dnzfgpbjxkkshgrg9qk +fourcrnntcxrhvnlsixbfhvvdncfdeight6 +84krfhzg1onesixhzgpxgmfivedkjqxnf +threembvltrgmgpp795xdtzsixtwo +nlcn8 +76ptqpzkllmvrpthreefour7 +nrfourxjqxkgqj6126gjrplj +tx685 +1fivesixgtlnine29fourmjgjgg +5vzx +86five +qjhgkzmplgql1jppdxmhx2zsbvnxlj9rbxvzsxnj +7pkgpzmfqr +two58eight9 +fcjnpsxthreef1pzgkxqhbfgvjzsix +4s95czbmjsbgvcztqncdk +72zczgsix2twomxpgxfour6 +nine7kfq +nlqcsrdcbkxsrgktbxch5zdjjkkz4fvk +34rhkrpfdpcrqmvrpltrssix +seven6mgdjmk3htqjlqbpbbfftt +3drdclclnsh1srjkshrc8fiveqtssmbdqbvtcbqzxx +4mdzjqnrjdj +gctoneight7fourbqhb3 +sixtjkrxjnj7threethreesixlbvpmf8 +9fourone4qzjzzzlhhljjqtfourhdjkqnt +dpdpxgxndx7eightthree7eightfivexdllmmm +nine6cnvftrddnnineqc1 +8thtdllhzv +qjgoneightgcmltsqcxrninevqxtfgbrp6 +xbxcl3glqgj +one7fivefour4 +fourlsfmgm7jr76 +5vszbtzdzhxmgrgjtt1qrczseven +eight67 +1jk96three5 +54ftvrpgzz3 +four4gnine +fbljngxt8threeqbttzsnnineninethreexdzggvjd +rmsix29fsfbmjjptf32 +x49 +5eightsndntqhhgg +pnlv9svhnskn1npbjxmsixtwo +eightzdvrjf4six9 +1sevennnkcdzcrthree8mz +eightrtgrfrnqninehbhllsdpqthreefourqk6eight +onefxtkztwonineninecfnf4 +threegf3jx +sphgjnpv51twoone +four89rhng +eightsix1threebfprrbzv +9sixfourlmnvgmnmkeightwoc +qrhsnjgndl7 +twoqqglxqbsix1nine1sgstftqjcmzp +9fivemqbjznffxq +lngzjghbbqmrsix5x +89ksqrbdpxfive7 +slbhmrvsstwo1gqcxztgdktqqxzmkpqfqfffgnhzfc +two4sixvtwo6x +oneonefive4 +twofourtfcqzptworq2nine +7pl71three3nclhsjcds +nlptvmgqfourfive7 +nsnzlcktmpcddcpffour3 +dtoneight5gxqbzbbvxc6gpplfzgmkbvmdnlhmg +zdcxqcnfive6gsqqvqfnine58 +fiveblnlvzkgjhbhfgqp6nine5kh +5onegbcdv51fxggdgthreedbbrlkg3 +29twobjpnjddone +seven9nvdndhdfourzhvqzctznqfour +3ztwosixcmbbztbngnsix9ts +8sixpxjcxv7zvf +onedsxmrhflvlqkzjjls8pmtcpteightfoureightvx +8fourfour +dpkhhvkxmttlk33 +three7txlxkdgcxglcb +5xzgxfgkqninecrkbzcfive3 +81fhfhpvxtnine2tfptjkthree +two2twosixgjfour +ncjdrcnptrtwovhzfive9threebmtttcznr +3xgnklgnnhbqgt4fiveghgksglkhlxm1 +five335five +threeninefourlqrgkcdlzfive5 +fiveseven89four8 +seven86spzkbt6mvq +3sevenseven +jm66b +eightqbttxcfzx88cnqjjdrhvcjzvfbdnzmrmvqbvhrlcm +ckmzsdhxqdrdntfivenqt36 +2hjb +twoone5two22mfmf +5rmfznvcjhhtccnkpmtwoone4 +478dckhsmpkmktgznjqfd +5gdqbjvdxv1threefoureighttwo7 +one646sevenmdmzzks +ndc1bxxdnqrnqntbvfxtqm6one +3vcsrrcfknmrgone +onexkxhbjkjn7eightfourqxtsixnine +sevenfive2seven327bdspzbv +fiveseven4xgpbb7four +ztjzhgsrm2seven +1twovslqxxvjxlprtbdjccscdtlngm4bxxhdhj +8rcn +ninelcqrtfbjxlvfourmeight54 +99466bbctwotwo +4twosixhpbhckdsevensix +4qmqrjsznine6 +189jninecxcmtpcx9 +rfbmtwo5gctcrqgthree +mcmpthree3nvmfshmjbtkgqsnine +np2 +four1fourjsghqgmfmrnzfxbh5fourfour7 +kvskplbpgfninesixvzkrv1fqnrjnrhvnpkpkhph27twonemvx +lghhsz175583 +onefive15rvsms4 +22twothreeeight +fkhsfjtqppgrckfiverfsrbggteight48eight +onem1two +nine2fourfour7mfourfourcpnvgcx +1czphscxrfrhqnqgn8 +ghgphgjrfcthreevpjdsevenseven8 +2gzcsdr2four5 +5eight5 +rzgsfive9lgbsqhsbxr +eightone5g +7six5 +63nine +7fivetwo9eighttbvmdb4jskprq7 +6pmgtckvz7 +nine49seven9gzppzm5 +7xqgxgxvqptwo81tlzzrchqxfq +two393 +pznknine67 +onenine514threeeight +mxbkksjfkrsevenc2dtzzfsnqhc1ctjthree +ntgmnhtwofourtwovbgmdnthree2pxv +sixnineonetwoone7rrqfive +vbz95two5zdxgtvnvrtmklt +vhdv7pcn4seven5one +zjqrxmm1ninefiveeight3spghctcttwogcqtrln +1fourthree8ntvlhmxvbbtwozlgjt19 +mg7csnjptsnzsix +4eightthreenineqtwothree13 +782mjrfmdf22sfive +bxfx7six4 +7three2dmmkz691 +sjc8ckjn +dkdfrsgb87cpnkchtgjnkb5q6 +seven2fhtdone9xtpbq7 +four3jmlftfzcdmcrfhjfkcfninefivesix +kdxrl7eightpsmlrkllmjdpslnine +three7nzxl3k2nine6 +7five8two +sv8mj87 +vqjzjjps45hdkcjbsl3eight174 +gfljtv7one2z +dveightwo7zrhmxjvlxftbjrqjcxlfive9 +threefjsvftzqneightfourtbvxqhssgrntdzpx2eighteight +fknxqdhdktmkcdfive1five +gs6168 +8twotlg +fivetwo7one14 +64tjxkdfxbvkthnnc +2onefivenrsgzpdzgjztpzpmeighteightttdfkgtkvltl +nineeight65three +mkbjxsgnineninesevenng2four +3xckzkhh88threepkj4five5 +ndxjxnvxbcfgdfz9fnphqrpvcheightpmxseven +2twodckhmzjvdgthreesix +rttwonecdl4 +qfvsd7kcqjphrqzmlvjffdscbeightfgmdpbfsdpseven3 +five68five +24tpfour17sevenlpkngxps +meightwokqnine1twojmsxxvbbrlqkprmxxlng +skkxpheightseventwosevenbfbcmzrpl3 +jvxhdnldseven58twofiveflsdcrnslqmqfvx +15ninexgmsvtpfnr +five758ssrnh +onezpkfv4vnhhslhgk91pfbtdgqqcmcdqnqxmk +rjphmdlleight5six7 +863xthree +cfghvcv5 +bmbfourfjtnxqppkf882k +dqnrjlvhxdfivenine8xl786 +lqrqspsxtwo6 +oneone9dkvzhsvgtl +9sixf +2nj +hsvrgtmkxcpxtjncmthreethreeone7one +vphqfour4 +qbpxpfmcxbnineeight8eight +26 +bbmspkz22onejeight1 +rljffive89phxltnine +five3dhscqeight3six +nine8msgnltpxf +38jxrfhbnclzzqqkvkgfourcfnxt +9fzlghgp +vjxprkvhpg1sevensdeightshmrfmmrt +95threethreeztmjkvqmgx +sixsfgrkqsc6dsixnineq +fivetwo267lgpttkflb6hcglpldzv +6cnscfjnlhh8x8qjbslh4 +xcxbjg192 +29sixeight +8xkpzfvhdnonemq67 +zxhbcmkbqpqkx1t97phfgdqfour +sixfivefivesix6sixsixjjp +5sevenfour1fourninefourfxsqhcpggone +ldpmdf37six1hfsmjnngmbbsjtf4 +fourtwo3lfzphbl1 +seven8cndkoneznhmtqnpr +9ztwoonegzpfjmgdjhhtglnsmjmqqssn1nine +3jvptqkjhchg9 +qbtwoneeight1nine9txvdpdlhv111pfdnr +3eightmkclrtz51zchkqh +eightpkrvkqgplptwothree5 +88gmb4dffm +fourghmpbfc3 +hcpllninenkcvjx1ghptwo36 +fourone8xdqmfnsdzgninerfbxbfourjshsvdksix +hkljqv5nfkbvveight5 +c9bczrtpqzj2 +xgjskgzkfive3oneighttdt +9one5psix5jcjlhz99 +8gpvvvhpfqb6sevenhjldkhsjskthhmzzgqxsflseven +96xjbsjmkgxgbknqckcrq +cdgjhklphq3chkgtwofour2 +nine9mqfbxdspvn17zkbl +3flbbpjgfh +two9gfn7three1 +zjcksix1dpkdbsxbrseven58 +oner9eight9mtspfsix +1hhdz156qpfmmrb +oneeight9 +crznkknhn716djrhfivetwo7 +thkoneight54nsix +xkkprql688onesixtwonine +791rvbxbcjzfqnine +fiver34 +3onefivenine183four +pkvdxfive6six +6ninesixkstsggvvvsix3two +onetwo6ctkntf +76sixfivefourhspsntf +five6seventkdstwoxdb +9sixzgmrrzfzcfzhrsseight4cprlmkplfzflz6 +fourmmbnpneight516one6q +rpp86sjvzxssbjtfive +three2sblnqxxjntksxjnvonedlbmxrrpzpcjpnn +lqcbbl2rxjhh17zxgjgtkvq2five +svvjsxxlh8t +6bhneight7ljjhjfvsbnsndvrc9six +sevenstgxksfmzd1ktwothree1mfour +527nine7 +295hkjbvf31 +bpzlfour1ninetwo5 +bh5seven3chjvfv +7vggcnckrmgbkx +msqpgd87 +ninekmnjsix9dd1 +three1two +qnrlcck47sixnrdkqnrxmlz5 +1rxseven891 +24b +4fdfrgzjpmltcqg36tpqqcvbznine +ftbtsix3 +njvzhlbthreezml8 +j4nineseven +4dpgmtgrn +97rnhk8rlp +3fivefivefoursevenflxvnbzlxhffgd +ftlbqxslq2 +eightseven3 +6dhcthree171fivecdldskdsgj +54nine +87twovpmn +28mzz +seven7csqxqn +crzrgqk66five5ngdh +xzjlmmtqgrtqrpmchfdbjpdjkqppxhsvfnzrth7 +sixfourjqbgsix3 +5eightnine54 +26gnqghndfcpmcvngqvzmfjpr8 +eightninethreebjjjvsgnonetwogflphxkvmz9seven +6qjqkmpstzc +three97sevenvxone67four +35ninetmdxqngxr7 +2sbrlnqz1 +pnv91 +5four744seven13rp +8bsix +8bcr +3eightljdhfxlnsgxs49sfzhzlsgvbldskr +835m7threefour +x3t52two +onelrzhp1one1seven9lcclzfkn +7rjzxvzdfeightlhzrnqseveneighttwoseven6 +seven13 +zkkknsevenzqsthreenine9four4 +vsszkfqpqtpxhqzpx6rkngzksmeightonesevenvzkd +fourbtkgjrglhxvccbjlnxlbhvsevenfourzjhcgmrr5 +two95 +73four5eightfive1 +8ninembxfprm28 +ninethree2twofive6 +18two +xjtwone7lfdzdvpccjsixp7rvhmh +six872jbhpgznrl8lkdbvfsgv +pnsbvfqtmkjtxseven7hkjhhmncgx +qljf6 +four3five321sixone +xvt15qcqd22six +1ndxz +gxfeightwo1two +22eighthxvrcmx8cqmfsix +3vxxlvgdvd3five3 +6threenine1tscqllqbone8cpzsnrxc +twoseven4snjpkmhnrb +gl3sixgxtttsldsmzhl5jgtwonem +seventtmxdmsjgtonebstmmskzsnsgthree2 +ctgrq17khfmdfbrl12txtsmtfndxmvcshxj +7six9mkkl +five1qxfeighttwo +eightninehckmhftskt7sixgeight2 +fllbppftcshjmtdthree8hpxlf +2one15two +qrzzg8mhqjpcbbfk +nnbnhlmgg3twotwosevenf +9tqqddhpsbdhdnkrjlxnqmjf +dtgfxfivefivefive6 +one5jgbcncmz4fpltcfcdg7 +12czktx +344nine +7zqd6 +sxgftzrr1pkffhkjtcv5mclnzsvdqktvkrgbnctgcnine +slfztfq5nineqcbdpcn5tczz3eightwont +9eight48kblmfc95 +4xmrglzxtsix +qhrgkbnsq5three646qntnvxcvg +vb3fiveseven9n +vgcdgctthree1281onemsxqvgnsix +bcstq5dghsfrcmftwo4lflbbrpztwo +hpjtwoninetwo87four6 +m3kgqggsdjq +26ninejzhmbp1 +nqtpvvsm4kjnkkz9 +5sevenfrqgpvqx +twobqcr9threeone +ninenine2qnnine +fournine629sixfive9 +sevenlsmstsxbpfzmkxsdp6 +1946one3eight7hhlqqkb +tjqmxhkhcsix6nineqdknshfiveflpcbxr +8seven4seven +8zjmndrdpgqsevencghkthree5 +bsrkpbhhsbpggn26 +11threethree89hqpvkqxzq +vjlhmd182hzqmsbdpnz2 +eightsjzfonebdcmlkcp3xdssfckqffsrpjfbb +krvssix8fmpfivezpljfpeightfdkzkgmm +fournrdhfbstx5fivefoureightfive2 +fivedfivejbjdd4eight +sevenfivetdf4one86vv1 +7eight7 +2fivedfsdxfplllfq +qcknrkljqxone75nvg85eight +vvrhxxvpvtsixrvskznine9 +sevengtcdtpgmfivexffgffst1eightjjmskvptrone +86five21zflbtcnlm +pfthree3oneninegzqpgxq2eight +17onekfhpvhppj1hdthrmdggxkgzxhxzdvbf +3sixzkml8eightfive78xv +pseightwosixxqjkfj484three484 +7zdpcvdnllthreefqpcttxbrtqpkpklnxdfszkxsbxx +2threeskpqphjffxnnvk6 +3nine66threeone46k +seventhreezgtlg12gndthree +8sqnqccmseven5 +sevendssdthreeseven2smpgpvdeightwob +hzcrrlkm8three +xtwone56pgzt5two +one4ldxzbjxlmsevenstqlgz +fourcxhqqlxfourtwo5mdjbzn +4eightbrtvsbjgnc +ninemfjghlonenp494jsjjnrhvdkthree +8threekccsevenfive +4bfvscrpfivetwospsvkvhmcptmxqseven +jzcbsgvljn5vtcpgh +8foursixseven8fivenine7 +sljtbrnsrcfourfivesevenzcdsqrseven95 +five8ninethreefive +fivekgcxtkjdvjlr9 +two2onefourkvgnzbfhhqgpdrjxfrrxdmrx +sixvb14sixkfjxrqskbq +three71nzrdggvlsxxxcfzdsrvpvbqsjn +vlrlvrqpvm98qphgsdkkmhdzfh +cmnpnvnine2two +fivexzdqfr4two5ninekgpzqfdgqlz +eight92dd2cgbqone9five +4eightfivevjfffd +57nrnktqrqlv6 +mqlhcpeight9zmsmh485 +hthxcv9l5one +nineeightlptl8fivefourmblrxbtcvlvjftcr5 +7fhgbqs +2v +jnhldbh7dkskeight9 +37fourlcsevenone5 +5jzntdrmfourhxrrfcxthree +four722 +7onenine +8sevenzfzmhkxjnr8four +nine2z +378bcbkrfsnfivesix2 +bdxrq6zsjkdcnfglc +4nqsvxznine271five +2fourthreethree6 +7twovkt6eightkmgzbd +gdsqb12rpqlfourfive +1gczfive4four8five2qbrsddkj +rrkctrmffive99jsgrbg93 +onegxssfourthreeeight2fztpvcvvn +fivesjmzppdlj57 +sixone35fourpj +nkqbbztcc7 +551mhjcn6onesix +49thkftkcsl +jthcqlp7reighthgdjbjpkxeight2 +threecfcmvgmsq534hhmbchteight +kjvdbsrbmxdjpjh7 +fivetfkphxzpkzpvrhfvbd4hfour6zhprttq +ccjcvssevenninensnpxcklbxqlcdgmvddsseven3 +2119six3 +5fourlznsqtvdcz +pfxfknrreight6twonine +bqrscdjrldsix5 +zznkptknm7rqgctxdthreesrhqkrdmsx +hmfjsqk6plqcjxcxmtwoninenine37 +meightthree65 +threenqqz7dhjsgzznhvm44six +86rdjfptxhhv5eightqkfive +91lfzcqshrfxssninejseven5tcqpdx +2xqhs +five6twognddnhfivesixxqkk1 +two85jrxgxcxbr +xfrqjfhpztqfourthreefour3 +tlqzlcckj2xrvvnznrnx +mltpqxbbrprvvlsfone8jbpjkjdqxtzlbnhhhhvshfnl +two9smqghpzpc2 +cqpklmdvnldgsdnlpmdpcql3jmlfvgxbgeight67 +7hhlcbpffour68sevensevenonesix +sixkvtclqcmlpjqvbbrn7ninevjrgxdhqx47 +975two +xdjb57five65sgghqkltxjtwo +8pnjssxdgbdmpbkxbdmhbr +3tgnrsevenrggtxps8rlkck5sixcrdccvcqg +xvvglr4 +fourdqtzrszxdvknq9dvxks +3btdbfourthreexhnjqrtnnxttqcfsevenlvhqxrsbpgqxjfvp +9onefzskrcpmpthreextjnlteighteight4 +hgvch3two +7nrc +5mnhgg +4twonine +7six6six +vjeightwoseven83mjfdpzrnnp +gfrgsixqmcbdjrtwo4tsxghf +7mmvkgmq +8qckbxdkqzsclqfive +3four52eightdhmr66 +ftoneight3bdbqgtfmsrfive3seveneight +scrkzrfive66 +9nb42xdrmbzpz +threetnpkv276one4sshmxpdc +2455zjh1one8 +6nc4seventhree +zjf5rnpnrdffjsix751mqbpgfgfjn +2crtmctwoseven +45fourmxzqzmpsixr3 +91lxbnn1twoxrsjsppjtwoone4 +37four6 +rkqb4eightthreesix93kqkhfsvngljp +ghhhksix38eight1qplkftstdnone +6nlxxncvqv71fbv +9169nine6kvcklgmn +vlddrrvcbd87mctrcj5 +one6fxninesixshdrtvglzlfbzlkvpmtxsix +threemkrzrthree234cnngnflmfdvkt +onefdcdnss8xx1 +oneone8mh8eightzrstvstwo +fivekdmdgdqpcpnineqzmnpsjktzxpvbzrsp1eighttwo +fourxckchnmz2five2hcqrsxgj +38five +onefivethree4cone +fourjrzqcjjvgm6five +9lcjvlsixtfdktbkvv1gsncxfdhhttxlzb64 +7two4one9 +7nineznmdvrpl +threesixthreelkvmhzhtd6 +mxdglbdzqlthreevbjlzmvf9mkbdrtxpsxpgpkdtfh +rjkpvjtdbxsnhrrhseven2eight5six59 +five8sixhblpctxnvtwosevenfour +9rvhtjcb +3ninenjgftq439 +99oneseven61 +54sevenfive8 +foursevenfxsmzxccfnxxc94eight6seven +3p4hnbfcxbzfhrnnhtbmprdhxbfivekqkhzbnkc +fiveeightqpghr9kfdqdlqfour +7five18qkqkzhs75rp +fourtwo3fivetwo +eightsix28klprqxzjfiveone7 +twofourthreethreethree4 +75six648 +rmpndcb797seven1 +five347dcqzmlbdxprzlkkds5ps +mnkmhrlgs7 +tknjqmsfivesevenninefour1jrlrpkl4 +6three62 +eightjrrhxd7csevenvfive +sixh3dvfjlxxkjj +5251fourmtxrpxvvbp4fblrpgtnlgg +948 +76fournine +eightseven4six99threeseven7 +73nine7 +4pknine +6eightmdmmdjone +22nine9kbgfdvjqvnmfqglhpnfhfvzxd +five6srlgmmvs19four9 +4nineone9sixs +four9tgpzrhjzqlhlxgqfz7 +nine5onedxflzhgf9one96 +hpf55 +kreighttwo2 +eight2seven29three7 +three7two1 +dhtkvvtjgzvrrvcjnqlbjsseven6 +93twofourninekznthreeseven +rzvll61 +f47ninexfqsbdrseventwo7twonep +qxcnfoureight6fivetpxbmbtwooneightm +xqkvmbth6onerzgvx +ndmjbvgzkxbttwo5one399twonef +88ncg +twomfiveninetwoltcgqkdch9three +bjgnmpfzninesxbxnlplk45 +jv5tcfkksdmtthreecvsgz6hp1 +78fivehssmgbkzlb +ztchfjrmpgsevenzsjqzmsjj8ninehrsbgknine +tksztsix9kqfbstltqdpdfqjgr1 +413ptmm23two98 +4gkzvsevenfivefive +bxms6rcd +k8two918hrnine +threeone4crkrbm1dmdlqqd +foursix5nine +one4trvninevmqx6four +threethree8five911 +6l4fstcmprm +seventhree91 +onesptwoqknsbrhnine9 +9ninebkmzsixvqnb5 +seventhreepxtcrc3gkfdsfpsfgfzvlfndgb +pcvfrsgthreeftsjvclfournine1kbbkhgrrvblvbkzgbpc +bpjfive9kdlcxbgn9zmcch41 +hcbflhjtsfour7qdjvv5kzjrpl +dbzd6mmsn55fivegkl +5stcpjhscvlsix2qqcbtxnh48 +lxfztjckeight2jsvfs8fivethreetwonel +jf3dbxqmngr +tqzqffdgnstwonnleight4rseven +18threeznntcqpxtlq +fourrmzzjvz18 +9ppbgcnvhhq3ccmsndrc5nlp +3pqlfpfltzh +2qsx4npflpn6seven9 +one2fhhfdzn +fbztdmqfgj91zskxxdcvbeightmbspgqmbggtnpg +24nhzonefourfvjq +7lfvgnpvbvjtworpvcfqqjbthreeone2 +csrcthreeeightsevenx9ninesixsix +43bncszsgmljgndbgnqc6 +13onedrjnonenine7 +six1four +sixeightone2two6four +fds3sdhbonenjlllhqfc9threefour +mbslpskb82four719 +6seven5 +sevenfour9vsixrn3 +755rbnrkmd7sevensevengshmzhmzrpzqhq +eight7khxnvqpjd +clfour5jppbonevgfj9llhfggbz +zcskxrshvbhn4nineeightndhnxs +ltzzbeight4onepnine +fives8fivethree +s5476vcslone +lj9ninekbjzlgqfour +four8gjvhkcvlml +twoone9fivecgcqlqqn74rglfbqbf +vczbllnkxkssmmtrz3ddpzg +threenine9cdqjmsfgspfive +dxtclhmkjxqsgcs938sjr4 +nrqlljlsixjhbfttptcchveightfour4fivesbhgpcnzg +sixthreefourbrtstxbh32 +sixhgdsqj22 +phshjcs7 +fivesix9 +48cjfeight83 +617sevenonesevenqjprssznhmfzrtf +two6three95eightfour +99sixone25jfssmjsmxj +fblfkzkrzqjdbvpmvvf197 +kghllmbfiveplhptxt71vjtcmdrql5 +fivenine6 +six7drddptwo3fivefour7 +57four66jxxjv57 +3blj9twotwofourfive7 +eighteight64nine +nineb9four8 +27cztm +18cgkcnxfgrlsj1chrpxqnnrcone +47sixthreefivefour93xmfndrz +gmhxpninehvfbqdkbbb74drcknctrthcvvbrllvfouroneightbbx +8tccpt1seveneight5hsmxvvdffive +1ninefivecqkchg +seven6six4jjfive2 +twotwozvvkrml3nine4fouroneightxg +482tlvrmdkzfour +fivepeight2 +one3threerfdlnrq +seven3onefivefive3 +tjnxfjrs5dfthkrxklhrnsix +keightwohzzxgnvb2 +kseven7six3five2three +sixvxbccbjmvrbpqxcrzfnsevencdfptrdeightfive2 +24vqldhgtpzpqmsnvcn4onekfvbhzrbrkqvh +mdnl2 +9sevenlfkbtsixvspnnxbvkd +cvhhcvhlgc3eight3 +8sch3one +nine4xhfrppmffone2ninecnrdtrlzzmkrsqkkc6 +three81pfj +frnrxhkhfkncxeight557one +6gcvmmvmlss33 +3zkfmdrc9four23vqvpgd +three71gqdcpzpxkffhpbnbhfjgrhlzckmcrdtrvpnckkvmsp +2phtgvfsevenpcpcvkpqgvkddmzdtbzxjppppptr8 +tzp3ljzslxzldqqsgl99 +eight24five1 +ssfjsnxptwo192threelcdbeight +eightnzdnxpgvzqh7eight76tcj +8598fourhclmkrtzkjgkfr1four +83qfzhmfnsixfourqfpjclprrv64nlxbqdbbst +vdlsvfourcnnninetwokkctqtl2 +lfxoneight8grninesixtwo +82onevhzhthree6 +qzjxbls1 +fivethree1three +qgcqc6two3xcdgfsfournine +6sixdtpdpxrjsixoneightbfm +two4foursix +ts2xkoneightr +gtkhl73onesix1 +7xqmpssix +sixsevenninejjtrh64 +6q2six6 +sixndmphqqpft3one7ninerksljn +eight44c +ppvsjhv32jzctbzceight +ppgeightwoklgkdchccmxxsixbqtkheight56 +ninefourtwo5sixsrrv18 +fivegvhbvkggpcqvksn34fhcxrmhvvt +nineone6eight29jhv +3dvsfpt4two +8257kbvkjjlhmr3 +9ccone +pcmmcblfqfpgxpssnk2 +1twofqfour7two +six96twonvrmnzzeightwoc +kqgsdxjjksdnzjdcd1jqnkz +threenine8698 +seventhreethree1251 +fournnkdvms6fjggsxlljshhmh9sevenfour +2lzxtcvvchmhxhqlxrjspg3 +6jxlz1cqbcjbhfxb9321twoneqq +fivefourfour4 +foureightbjjd7grgvxlm2three +zcdgdslqkkzhmsbdtmvqbmgfqdg2twogd +82onemfffnm +48trdhznd1 +5sixeightsixsixcsjsrnmzbcdjn68 +lvtjmrpfouronethree84dcccm +3sixfsrfour +sixjsvlzzgxrxmnine1kzjrvxmghfour7 +nrqqgsmpkcone3one +lmnzcqrrhvkckzdg5 +29fivebnnh4zv +threefour9dz4mvhh2threesix +six7two +two5zx1threefourseveneight +frb1threefour +xgrrxdmpcc4lvnhpvgcdlone89 +five28qtnxqxshrmspdghsfvoneqzzpjlnvxnrctptlv +eighttwo6eight88seven4 +fmxdtnxfrfivethree2jqqx +cvxktgdvtbfqkvvds2 +vkhmjnlk99 +vvhphh2ttjrscppq +sixjfxxqxxhdhjcthp3three +3gvjntkzcmbninenj +sdlpseven9pdcvonefiveone1 +23pcvcljhtgbthree1eight5one +3kreight7k +mlxvzqjsthreesix98 +6h94sevensevenldthree +six86 +four1four15seven +rvqbkndfqjeightseven84 +one5two672 +two7three87fmqgdmqvcvn8 +qxkkgsixbdrqz7pqsfms +four2v1seven99five +7ndxpm +lrrqxnjtvzfdzplxppzonetwokrmv131 +fourgvjbhpxqcseven1four +thrthbgthree7four +jbnkcqqczzpkq357sixfrgsjhjmxt +rvrjsdnfldcqnplsqfnine6three5 +jgkzn598fhqqxmsqjgpzonefour +qkjl1vptpmsseven41oneone +fiveh94two9five +2lrxjflmvq9 +jtcdnjtcgffourkztkqfrfourtwojpqtq7qjdzkfour +eight3dlkndonethreetwo9one +2bqfprnkz +ninesevenfive63gxgmjvqf3 +tkvoneightsixsevenfour8nine9gzn +sevenninemlzdbttpp3qb31jmmtmbqnr +hdslnxgdz48 +four6prrfbtqrqvdlx81 +2hgqtnbxnqtpfive66dpn +jhkjstxzblfive6vvd +ljxqtqrgm6bgfppeightseven9 +gcmlbqtnm4jqhdhsfour2ninefour +threeeight1hrdqptwo6 +mlxvrhjqz4twolnkqd +npgnsgkmxmeightsix4brmcjjlbl6 +jrtwosixvrtrfvvpnine8hhqcsj2 +5ckctkfour433qd +9zczvzz +one46ninenhjzfhqcbtwo +26mvspqqkxntwomgsfvmfshvmndcbnfxzx +zhponeightbslzggxnpjgt97xjvxqrrsgj6zclqbmsdb +175 +fivetwofiveeight2five +three9sixtwo34 +7foursixhjvpndkjtqzshxdczg3three9 +8six3hqbcnjsdxr922vplmp +tmrbnzlrs822nineeightnine +two36nine6zhvmfss +qdkcfrmb7 +9dcbzzhhgnclcdchgcthree +tmxkqqstzqmp5pf97 +four86fivekbpjggeightnine +mmsvnnxeightjqpdsdmgjzssssjtwofive6none +5bchshczsjdh +39five8cflqglqhbsixmqnfpqhh +8five89threevkvgbtjrhhkqdkllkqtdjrv +ninelldnine4 +fourseven52threebstwo +9zdkqprhfdnthreeddj +threetwo5tzthreetwoslzdkf91 +eightone5twofourdhdjpsbj7 +2nine1ninesixlnine7 +threethree824six +threecbcvvcdgnzthree8nine2ckcvvqvghhthree +nineninefour9ddctwo38 +sixthreeghnblhbsk5 +8threephn +tpvoneight1sixjzkrtjcbpkxgvnccxvxbglhhgsevenkchhvchz +xcdsxxfivethreecdd77 +seven3twomrjfrxninefive2 +82twotwolsm +njljffrkrgnineone5fourtwo34 +9fsrnjjfkeightstjffdpeight +lz77jfdvgq +8skninektrzgsonesbnszbzsbfxgczgt +6lkmpnhjbsjeightvhfqnhtg +jmkrn89onenine4 +84xznbtgmsrg +twonineldsmg59five +z8vgkntnsmntqdhnphjppx8hfvptkrpbmjkg +1sixsixonemzjcbchdkeightsix6 +cnthtftdzhjxc9fivetwo +four99 +tsfhcrqthreecnsf49tnpjtvfjm +3vmrlbdone +fourtwoseven8klx8cjqnlf +5533 +96threesixbb8jcbtlhd +93mjghj +tpq7ninenine58 +twosxzrdncbhr5gnqv +8tgmmjxntmbdrtoneone4five +onehgnthree24 +4ninebrjplcxdthreekmzchvhpkm3zfkvbtp +sixgjrgcvhphv5threekgqtszxllxhdldzbv +krq9nine3fqhdvnrbmncseven6 +six85njxj3mmphzpv6dhqlkmptldvlflckgk +44eightxjtvfbmt +2fp9 +skjxglseven5nxfdgjlclv9 +zbmxptthreechlxvxszszztqqs4threefouroneone +47633nine +8584mrvjdspgmsevenfour8two +five5nzcmgx +4threenine19twonine +kztfivessbtzfjbmjmsnjxkct7 +2onesix +nine6kfpkqhkjzsknrldfcghcgkghnine +9cbhmrchmqjrhqx7zsdxmtlbrzfive7 +87eight16dmgpfcfvbt +three45sfourtwo3 +2xvmdthreeeightthree +zblpmvk2fivefqdjqpdk2eightwods +nvrngd1one642 +twoninesix8tvcm4 +sixjjrjrpjbdlsix5kscvgfour6 +oneninefjmblx25lgstzzkvnqcjl +5fournhphcqqzngvcjphfnhgr +fourninetwo226 +sqszqk8154five8eightnine +5rcqxrbv +3three7three118 +9dlgvvnpsjrhxjpjr +cgttwo97qceight658 +3eight8threefourthree8jvld +sixbctkcmzbtb4ntgtctgtr7three +36three92 +9twonezv +ddrhf7ninefiveonefivefive +4dpc75eighttwonine +27three +837ninethreezdcdbmjtph +two3jgj8pfptxbpjcfournine6 +r8mzqvthlnljthree2 +foursshmxt4qhsnxtwotwo3fpqhpd +ntlfvnxkxxvtktmbqfourqjzjdcdthree76ninetwo +7zfhfmqmbkzrknxcfgxmqh +zfzfcsbkld9eightthree +threethreebxqqsnfzvqfivefmnc71 +one3onesix63mxgmcpqfvnfiveq +9four7twofourtwotjlpcqeight3 +1dcnsvzrstslsqvcvonetwofour7 +cg12five +5twosxfsbmxrtl +seveneightsix3gshhcnjsqb5 +9xkvfhcmrs87 +lpkcnjpsix1fivetwo +9dsninefive6lhjpdkpcr +838mjxsleightnine +seven4ninefivefourhxplgzfvsevenbbdjqc +1drcgshkfthree3nlkztjtrx9five +7three4seveneightfxsz +7onetjjkznvlb +93two4foureight +8fqddclzvlx +tdpcspmg39ddqkdlpjxvkdtjpc21 +fivessmncpxsd3eight +44hjrhqdqf19pxkb +bmcgjkkkhfive5twonekc +twomv4nine +16rrksxjzjlt5plmvjtvhkfnineeight +cmczrnjjsntptjffzrpqthreemjpfhsjbrmnlkzpvvvmj8 +one81six +9jfivefive82rz +one32fourfivelkrczztone +seveneighteightfour1 +58twoxgklhpndxjrpb86 +five2sixfourcjfvnmhrxrtwovhrdrfrssphgtcqthhzxh +lxtbmsevenbms3one8dsbsixnine +sevenhcgr6ninefour +trknlxnv43zxlrqjtwonect diff --git a/src/adventofcode2023/data/day_01/day01_test_1.txt b/src/adventofcode2023/data/day_01/day01_test_1.txt new file mode 100644 index 00000000..7bbc69a6 --- /dev/null +++ b/src/adventofcode2023/data/day_01/day01_test_1.txt @@ -0,0 +1,4 @@ +1abc2 +pqr3stu8vwx +a1b2c3d4e5f +treb7uchet diff --git a/src/adventofcode2023/data/day_01/day01_test_2.txt b/src/adventofcode2023/data/day_01/day01_test_2.txt new file mode 100644 index 00000000..41aa89cf --- /dev/null +++ b/src/adventofcode2023/data/day_01/day01_test_2.txt @@ -0,0 +1,7 @@ +two1nine +eightwothree +abcone2threexyz +xtwone3four +4nineeightseven2 +zoneight234 +7pqrstsixteen diff --git a/src/adventofcode2023/data/day_02/day02.txt b/src/adventofcode2023/data/day_02/day02.txt new file mode 100644 index 00000000..0bb1d4b6 --- /dev/null +++ b/src/adventofcode2023/data/day_02/day02.txt @@ -0,0 +1,100 @@ +Game 1: 8 green, 4 red, 4 blue; 1 green, 6 red, 4 blue; 7 red, 4 green, 1 blue; 2 blue, 8 red, 8 green +Game 2: 11 green, 7 blue, 15 red; 13 red, 6 green, 2 blue; 7 green, 9 red, 10 blue; 5 blue, 1 red, 11 green; 4 blue, 18 green; 4 red, 8 blue, 18 green +Game 3: 7 red, 10 green, 4 blue; 2 blue, 3 green, 5 red; 9 red, 7 green, 3 blue; 3 blue, 6 green, 18 red +Game 4: 1 blue, 2 green, 5 red; 10 red, 1 blue, 3 green; 14 red +Game 5: 16 red, 4 green, 19 blue; 13 blue, 9 red; 7 green, 14 red, 2 blue; 5 green, 18 blue, 4 red; 7 red, 2 blue, 3 green; 8 blue, 12 green +Game 6: 3 blue, 8 green; 4 red, 5 green; 5 red, 8 blue, 5 green; 8 blue, 4 green; 3 red, 7 green, 2 blue +Game 7: 7 red, 2 blue; 5 red, 6 green; 10 red; 2 blue, 12 red, 2 green; 4 red, 1 blue, 1 green; 9 green, 2 blue, 10 red +Game 8: 3 red, 7 green, 3 blue; 2 green, 3 blue, 3 red; 3 blue, 4 green, 1 red; 3 blue, 3 red; 2 blue, 6 green; 2 red, 7 green, 1 blue +Game 9: 5 red, 6 green; 6 red; 2 blue, 3 green, 9 red; 6 green, 2 blue +Game 10: 5 red, 8 blue, 5 green; 15 red, 6 green, 7 blue; 8 blue, 6 red, 5 green; 5 green, 2 blue; 12 red, 6 blue; 6 green, 16 red, 6 blue +Game 11: 3 red, 7 blue; 2 red, 3 blue, 6 green; 4 red, 5 green, 2 blue +Game 12: 15 green, 6 red, 2 blue; 3 red, 8 green, 9 blue; 8 blue, 2 red, 7 green; 5 red, 11 green, 6 blue +Game 13: 1 blue; 1 green, 6 red; 8 red, 3 blue; 5 blue, 8 red, 2 green +Game 14: 4 green, 1 blue; 8 blue, 5 green, 1 red; 2 green, 8 blue, 3 red +Game 15: 7 blue, 9 red, 8 green; 9 green, 12 blue, 5 red; 8 green, 10 blue, 2 red +Game 16: 1 blue, 1 red, 14 green; 6 green, 4 blue, 1 red; 16 blue, 14 green; 6 green, 2 red, 9 blue; 1 red, 1 blue; 2 red, 13 green, 7 blue +Game 17: 1 red, 9 green; 9 red, 5 blue, 2 green; 2 red, 8 green, 5 blue; 5 blue, 1 green, 3 red; 3 green, 5 blue; 3 red, 5 blue, 9 green +Game 18: 3 blue, 5 red, 3 green; 8 blue, 14 green; 3 blue, 11 red; 2 blue, 10 red, 9 green +Game 19: 7 green, 8 blue, 10 red; 1 green, 10 red, 2 blue; 6 blue, 4 red, 11 green; 7 red, 4 green; 6 blue, 4 red; 4 green, 2 red, 3 blue +Game 20: 5 red; 16 blue, 4 green, 7 red; 1 red, 1 green, 4 blue; 3 blue, 4 green, 7 red; 5 blue, 2 red, 3 green; 17 blue, 5 red +Game 21: 11 red, 4 green, 4 blue; 11 red, 5 blue, 2 green; 11 red, 13 green, 2 blue; 13 green, 6 red, 5 blue; 7 green, 4 blue, 8 red; 6 red, 8 blue, 14 green +Game 22: 2 green, 1 red, 6 blue; 3 blue, 2 green; 7 green, 10 red; 10 red, 7 blue, 5 green +Game 23: 14 green, 8 blue; 2 red, 5 green; 8 red, 16 green, 10 blue; 1 green, 7 red, 8 blue; 15 green, 5 red; 15 green, 2 red, 5 blue +Game 24: 4 blue, 1 green, 1 red; 1 blue, 8 green, 3 red; 4 red, 9 blue, 4 green +Game 25: 2 blue, 1 green, 3 red; 2 green, 4 red; 2 green, 1 blue +Game 26: 3 red, 5 green, 4 blue; 5 green, 8 blue; 1 blue, 3 green, 3 red; 7 blue, 2 red +Game 27: 13 red, 9 green, 6 blue; 19 blue, 9 red, 4 green; 14 red, 4 green, 11 blue; 5 green, 12 blue, 7 red +Game 28: 9 green, 4 blue, 15 red; 18 blue, 14 red, 12 green; 14 red, 12 blue, 3 green; 6 blue, 7 green, 15 red; 17 blue, 6 green, 9 red; 7 red, 12 green +Game 29: 17 red, 2 blue, 9 green; 5 blue, 15 red, 11 green; 13 red, 3 green, 5 blue; 4 green, 11 red, 1 blue; 5 green, 1 blue +Game 30: 3 green, 12 blue; 15 red, 2 blue, 6 green; 12 red, 11 blue, 10 green; 9 blue, 7 green, 14 red; 1 green, 7 red, 5 blue +Game 31: 6 green, 7 red, 18 blue; 2 green, 3 blue, 10 red; 9 blue, 8 red; 18 blue, 10 green, 4 red; 14 blue, 11 red, 10 green +Game 32: 7 green, 1 red, 5 blue; 5 green, 3 blue; 6 blue, 5 green; 5 red, 11 green, 6 blue +Game 33: 9 blue, 5 red; 2 blue; 6 red, 8 blue; 10 blue, 4 green, 6 red; 2 red, 4 green; 1 red, 6 blue, 2 green +Game 34: 1 red, 6 green; 3 green, 6 red, 2 blue; 2 red, 2 blue, 1 green; 5 green, 1 red, 2 blue +Game 35: 7 red, 2 green, 4 blue; 4 red, 2 green, 3 blue; 14 green, 2 blue, 5 red; 14 green, 2 red, 3 blue; 5 green, 2 red, 1 blue; 2 green, 8 red, 3 blue +Game 36: 7 green, 1 red, 1 blue; 3 blue, 6 green, 9 red; 2 blue, 17 red; 18 red, 2 green +Game 37: 6 red, 14 blue; 3 green, 2 blue; 18 blue, 6 red; 3 red, 18 blue, 3 green +Game 38: 6 blue, 8 red; 9 blue, 1 green, 1 red; 2 green, 10 blue, 1 red +Game 39: 9 red, 2 green; 7 red, 2 blue, 2 green; 2 blue, 1 red, 8 green +Game 40: 15 green, 1 blue, 1 red; 3 blue, 1 red, 6 green; 2 blue, 11 green; 2 blue, 11 green; 3 green, 4 blue, 1 red; 2 blue, 6 green +Game 41: 4 blue, 9 green; 11 green, 1 blue, 7 red; 1 red, 3 blue, 17 green; 17 green, 2 red; 2 blue, 16 green, 8 red; 1 blue, 8 green, 3 red +Game 42: 7 green, 15 blue, 2 red; 1 green, 5 blue, 5 red; 4 green, 6 red; 4 red, 4 blue, 1 green; 1 blue, 4 red +Game 43: 10 green, 6 blue, 8 red; 9 green, 9 red, 4 blue; 6 blue, 3 green, 6 red; 8 blue, 16 green, 7 red +Game 44: 14 red, 14 blue; 11 red, 1 blue; 1 green, 9 red, 15 blue; 1 green, 10 red +Game 45: 10 blue, 5 red; 1 green, 2 red, 11 blue; 2 blue, 10 red, 1 green +Game 46: 10 red, 9 green, 5 blue; 9 green, 2 red, 5 blue; 3 blue, 14 red, 4 green; 2 red, 1 green, 6 blue; 2 red, 9 blue, 4 green; 5 green, 2 blue, 11 red +Game 47: 9 red, 5 green, 1 blue; 3 red, 1 green; 8 red, 2 blue, 10 green; 9 green, 9 red, 2 blue; 13 green, 3 blue, 6 red +Game 48: 15 blue, 3 red, 8 green; 2 blue; 12 green, 7 blue, 1 red +Game 49: 9 blue, 3 red, 2 green; 12 green, 17 blue, 2 red; 3 green, 1 red, 8 blue; 16 blue, 3 green, 3 red +Game 50: 17 blue, 2 red, 14 green; 18 blue, 12 green; 13 blue, 6 red, 8 green; 4 blue, 6 red, 4 green +Game 51: 3 blue, 8 green, 4 red; 5 blue, 5 green, 4 red; 2 red, 8 blue, 2 green; 8 green, 3 blue; 9 green, 5 blue, 1 red +Game 52: 9 red, 5 green, 6 blue; 3 red, 8 green; 2 red, 3 blue, 6 green; 8 red, 4 blue, 2 green +Game 53: 6 green, 13 blue; 4 red, 7 green; 2 green, 7 red; 11 red, 2 blue; 12 blue, 9 green, 8 red +Game 54: 3 red, 3 blue, 3 green; 3 green, 2 red, 1 blue; 13 blue, 3 green; 5 red, 4 green, 13 blue; 4 green, 7 blue, 9 red +Game 55: 15 blue, 3 green, 2 red; 1 red, 8 green; 19 blue, 7 green; 4 green, 19 blue; 9 blue, 7 green, 2 red +Game 56: 1 blue, 9 green, 11 red; 3 blue, 12 green, 2 red; 1 blue, 12 green, 4 red; 16 green, 3 blue, 3 red; 18 red, 9 green +Game 57: 7 blue, 6 red, 3 green; 11 red, 5 blue, 4 green; 9 blue, 1 green, 5 red +Game 58: 17 green, 17 red, 6 blue; 10 red, 13 blue, 1 green; 7 red, 14 green; 6 red, 2 blue, 8 green; 13 red, 13 blue, 4 green +Game 59: 1 green, 4 red, 1 blue; 1 red, 1 green; 1 red; 4 blue; 6 red, 6 blue, 1 green +Game 60: 7 blue, 17 red, 8 green; 12 green, 6 red, 8 blue; 1 red, 9 blue, 12 green +Game 61: 2 green, 15 blue, 2 red; 1 green, 9 blue, 12 red; 12 red, 3 green, 19 blue +Game 62: 17 red, 1 blue; 5 green, 16 blue, 14 red; 3 red, 7 blue; 8 blue, 3 red, 1 green +Game 63: 9 red, 9 blue; 10 blue, 6 red, 9 green; 11 green, 1 blue, 13 red; 6 green, 13 blue, 9 red +Game 64: 16 blue, 2 red; 9 blue; 10 red, 1 blue, 4 green +Game 65: 1 blue, 18 green; 19 green, 1 red; 10 green, 1 blue, 1 red +Game 66: 12 blue, 5 green, 13 red; 3 green, 3 blue; 1 green, 1 blue, 11 red +Game 67: 5 red, 2 green; 7 red, 3 blue; 1 green, 8 red, 6 blue; 2 red, 5 blue; 8 red, 6 blue +Game 68: 8 green, 6 red, 18 blue; 8 green, 6 red, 3 blue; 4 red, 14 blue, 11 green +Game 69: 6 blue, 3 red, 1 green; 4 green, 6 red, 6 blue; 2 green, 13 red; 9 red, 5 blue, 6 green; 2 green, 11 red; 6 green, 2 red, 1 blue +Game 70: 7 blue, 18 green, 12 red; 17 green, 2 red, 8 blue; 17 red, 13 green, 2 blue; 1 red, 2 green, 7 blue +Game 71: 3 blue, 1 red, 15 green; 13 green, 2 red, 8 blue; 7 green, 12 blue; 7 blue, 12 green; 7 blue, 5 green +Game 72: 6 blue, 18 red; 1 blue, 4 green, 3 red; 11 red, 3 green; 6 blue, 5 red, 13 green; 11 green, 16 red, 5 blue; 3 green, 5 blue +Game 73: 18 red, 1 blue, 3 green; 4 blue, 4 red, 4 green; 1 blue, 3 red; 2 red, 1 green +Game 74: 5 red; 12 red, 4 green; 4 green, 5 red; 2 red, 1 blue, 4 green +Game 75: 2 red, 2 blue, 6 green; 2 blue, 6 green; 3 green, 1 red +Game 76: 6 green, 1 blue, 12 red; 2 green, 2 red, 3 blue; 3 green, 10 red, 3 blue; 3 blue, 16 red, 11 green; 15 red, 5 blue, 7 green; 4 green, 4 red, 3 blue +Game 77: 14 green, 4 blue, 11 red; 12 blue, 9 red, 19 green; 10 green, 4 blue +Game 78: 1 blue, 11 red; 1 blue, 14 green, 4 red; 7 green, 3 blue, 5 red +Game 79: 3 red, 13 blue; 14 blue, 5 red, 5 green; 1 green, 7 blue, 2 red; 5 green, 13 blue, 3 red; 7 blue, 5 red, 2 green +Game 80: 2 green, 11 blue; 2 red, 12 blue, 1 green; 11 blue, 11 green; 2 green, 12 blue, 1 red +Game 81: 8 blue, 5 green, 1 red; 1 red, 6 blue, 4 green; 6 green, 10 blue; 2 red, 9 blue, 2 green; 6 blue, 2 green; 6 green, 9 blue, 2 red +Game 82: 13 red, 12 green, 3 blue; 4 blue, 4 red, 1 green; 4 green, 8 red, 2 blue; 7 red, 13 green +Game 83: 2 green, 8 red, 1 blue; 2 blue, 6 red, 8 green; 5 green, 1 blue +Game 84: 6 red, 18 blue, 5 green; 3 green, 15 blue, 2 red; 6 red, 6 blue, 8 green; 1 red, 4 blue, 2 green; 2 blue, 5 green +Game 85: 3 red, 11 green, 2 blue; 3 blue, 6 green; 2 red, 4 green, 4 blue; 1 blue, 3 red, 10 green; 4 blue, 7 green, 4 red +Game 86: 7 green, 16 blue; 4 blue, 1 green, 7 red; 6 red, 15 green, 9 blue; 7 green, 9 red, 2 blue; 14 green, 2 blue +Game 87: 8 red, 3 blue, 8 green; 3 red, 1 blue, 8 green; 6 red, 5 green; 2 red, 6 green, 2 blue; 6 green, 2 red +Game 88: 1 blue, 4 red, 12 green; 4 red, 1 blue, 14 green; 1 blue, 10 green, 4 red; 1 blue, 10 red, 9 green +Game 89: 7 green, 6 red, 10 blue; 4 red, 5 green; 2 green, 13 blue, 2 red +Game 90: 16 blue, 2 green, 10 red; 4 green, 7 red, 14 blue; 4 blue, 11 green, 3 red; 3 red, 10 blue, 3 green +Game 91: 7 green, 7 red, 4 blue; 14 red, 11 blue; 16 red, 8 green, 15 blue +Game 92: 5 blue, 12 red, 3 green; 2 blue, 8 green, 5 red; 5 blue, 10 green; 11 green, 6 red, 4 blue; 5 red, 4 green, 4 blue +Game 93: 4 blue, 3 green, 5 red; 7 red, 17 blue; 8 blue, 7 green; 17 blue, 1 green; 2 red, 6 blue, 2 green; 15 blue, 3 red, 4 green +Game 94: 9 green, 3 red, 2 blue; 3 green, 6 red; 13 green, 4 red, 2 blue; 7 green; 4 green, 7 red; 2 red, 9 green, 2 blue +Game 95: 3 green, 11 red, 5 blue; 6 blue, 8 green; 9 green, 6 blue; 6 red, 1 green +Game 96: 3 blue, 3 green, 10 red; 2 blue, 12 red; 4 red, 3 blue; 2 green, 3 red, 1 blue; 2 green, 6 blue +Game 97: 5 blue, 3 green, 2 red; 2 blue, 3 green, 5 red; 12 red, 3 blue +Game 98: 2 blue, 2 red, 9 green; 4 green, 5 blue, 1 red; 15 green, 3 red, 9 blue +Game 99: 15 red, 7 green, 11 blue; 2 blue, 12 green, 17 red; 6 red, 3 blue, 11 green; 14 red, 13 green, 5 blue +Game 100: 5 green, 17 blue, 5 red; 15 blue; 13 green, 8 red, 3 blue; 16 blue, 15 green, 8 red; 16 green, 2 blue, 3 red diff --git a/src/adventofcode2023/data/day_02/day02_test.txt b/src/adventofcode2023/data/day_02/day02_test.txt new file mode 100644 index 00000000..295c36dd --- /dev/null +++ b/src/adventofcode2023/data/day_02/day02_test.txt @@ -0,0 +1,5 @@ +Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green +Game 2: 1 blue, 2 green; 3 green, 4 blue, 1 red; 1 green, 1 blue +Game 3: 8 green, 6 blue, 20 red; 5 blue, 4 red, 13 green; 5 green, 1 red +Game 4: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red +Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green diff --git a/src/adventofcode2023/data/day_03/day03.txt b/src/adventofcode2023/data/day_03/day03.txt new file mode 100644 index 00000000..73e32db8 --- /dev/null +++ b/src/adventofcode2023/data/day_03/day03.txt @@ -0,0 +1,140 @@ +.........874.772...........787..........556.....292......141................910............54............................................... +.......*..*.......314............308.......*....*..............156.759.....*................*.......408*954.84..55.......................515 +......927.49...........734...............115...738..=....723..........*...599.......+........573.....................324..../508............ +........................*.....222..................298....+........313.............504...../.....375.................................114.... +.962...262............988..........*170.....................543...........61............827..244.&..................610......310....#....... +...*..........129...............243...................809....&...+.........*...742............%....*96..100.....766...*..308....*......37... +..2...295....../........*336..*......#..185...........*.........502......301...*.......................*...........-.770..-...599........... +.......-.............343......750..661....%........+..323.....1..............480.........+..............198.......................533.../764 +..................................................799.....832.......640.................413...392............597.................=.......... +......$795...678....954.....*96...........671.%..........*.......23....@.536..................*...450..........*.....427..............413... +..314...........*.....+.827.......757.550*.....475.148.614.........@......$.......*429.....849....*...%584....706....*..........248...*..... +.......246.......830....*..........................*.......52..................663...............55...............606........%.......72..... +......&.....378.........342....10.849............394.....&...*.....697*............................./629...700........=.......217........... +........208*......*783.........*...*.......496.........108...757..............564..............................904....448................... +..../..........716............428..28..879*..........................*506.823....*690......53...................*.............291......357.. +..920.@172.........869..................................185.......809......../.............*......*821.......296..............*.......*..... +...........965........*...................669.793........................*................238..609......465.........504.....574..970=.575... +...................520.....................*.....&......................2.44..*......*..............@...*.......254*.....17................. +............574../.......*..............894...........939....236...875........92..873....555.825*.543..344..483......677*......123.......... +...257..../.*....301.....83......*929........+.......&.............*...=...#..............#...................................*............. +.......218...648...../.....................533.683*....419........76.461.268......915...............523.....482.............788........845.. +..................846......405.807.................693....%...................668*....193$....*......*.....@.......368.67..........703*..... +................&.............*.........752.988......................967*..................652.746.772...6........*......................... +....638.....769.829....*...97......536.#..........................&......786......@......................*......440......................... +....*........*..........55...*......*...............598*387.......744..........141....254*......157.....977..32...................606.392... +...682........268............134...187.........25.........................................561.....*............*.................*......*... +.......718........773............................*.....781...380......856....445......601.......71..........884........949*13..888.......277 +.......*......487*.......$....$........8..@613....868.....*.....&....*............899*....*994........116............................806.... +....807.............441..848.692.-13...*...................723........646.....525...........................*............289...........*.957 +........-......891.....@.............185........672............................*.....626..937............838............@...........698..... +....634..418.....@.......75.430................*.......588-....815..56*685....714...@....*........+................385*..................... +620..*.......720....580........*521.772...222..763.888...........*........../..........537.818..534....................370..942.384...991... +.....462.......*...&.......118......*....................915.....797......255.....734........*.................*.............=.....-....*... +...............529..........+..701#..56.......@447..@......%..........-..............=.....197..../..........37....223.................186.. +............#......................................702.846...........791..85..698..............755......458........#........847............. +.........993......916...@669.....493.........&...........*.....*..........*..-...........921...........$...............100...*..717.....489. +..................-................*.456..634.........202....=.815.......769................*...................300.....#..649...*......*... +....................762................*........211.......164.........27............817.286.....@493..............*............@..422.837... +......470.............*...............160...........560.......962.....*.....431.909..*..*...712.........852....838.........64.614........... +........*........404...406.=561....98........@........-.195.....*...320..........*..922.777..*.............%.&.........530.................. +.71.....680.-79.....*..............*..859....625...............300..............465....................515...795...111.....646@............. +...................13...545.....386....*...............................865..........537.815........731.*.............*..........=.572*...... +...........173.......................324...............................*...../.......*.....*157......*.480........175...662$..471.....136... +.....443*6...*...........*165....481............211/...373*297........470.....982..402............895........54............................. +...........11...&.....848...........@..........................@769.......................120...................555*........%........734.... +..............827..........723...........178.............308........659............#492......*.............10.......80.......966.....*...... +.....438-........................$.........................$./......*....%196..............299...393......*..............78.........629..... +.......................743....200...............243..702......447....775.........328.......................274.......360*.......459......... +....723..........514..../...........479......76*......*.........../......&....../......861...........$807......................*......+..... +.......*.....987................226....*.........#..867..........481......165......415*...................212...%649.....923-...685....346.. +...+....914...*...........336.....@.278..622....204......269.976........................487.....%...727-.*.................................. +..937.........38..-......$.................-........992.......*................628..740*.....%.445........360..............429.......917.... +..........$.......592........481*285.....=.................126.............................269.......702........................823.#....... +..........593..52........546.............282..*226..............108..412.............=............#..................869....@....&.......... +628............*..768......=.655...................*............*.....*...../..909....855....$....400.......238.........*11..545............ +.............577....................../......147....945.31......979.846....403../.............742............*.......=.............#........ +505+................485.............411......-..........-...........................536...-.........144......885....42...218.147...329...... +......................&.849*714..........94*...856..........89..457.......*.....%...&...180........*......@..............*......*........... +....................-.......................68........651../...........264...&..252...............359...256..669*.......766..668...193...... +.........992....743.860..174....&303............883.....*.....732..........433..........609...125................308.................*...... +..592....#...64..*..........*........656..505..*......546.....&........422.........#............*.613.382..123............%....721...572.... +...*.........*..........839.364.........*....*.549..............336...*...........129.......632....*....*.....#..647..122..25............... +.612...-..%............$..............628..489......................-.850..633.........=......*...972.660........*....*..................... +.....410..765.........................................../102.652..529.....*.............533..788............449&..8..875...846..392..649.... +....................&.......581.....352............107+..................251.....130........................................./.......$...... +.....807.........722...........*....*..........#...............+.116...............+..122.................184*491..&142..................... +.....&....755............894..227.315.........648..968......515....&.................*.....+..62............................................ +............*.............-...........523............*....-...........165......434...106.427....#............241...........461......451..... +...#246...905.297..#668......=.....=....$...........712..778..968........*........*...............592........*.......703#..............*.... +..............*............837....396........898..............+.....232.110....785...............*.........644...803...................178.. +.......&190....69...*665....................*...................161.&.................618.../.........660..........*............850......... +.............$.............896.896.........884.............287...#........568................588.........@.........236....369$.....&........ +.....@........464.........$....*............................*......958....*.......816....................................................... +..385.................877............160........263...&763..634...-........556.....*....658......953.......276........634+..&...........861. +......................*.....914.208.*..............*................472....................@........*937.#....*745..........841..910...-.... +.......851........259..339.....*.....756.........285................*.........-................66+.......111........................@....... +.409....@........*.........................474.........+...197......180.@.....567.......................................850................. +....*......972.739.....*.....831*.............=......489.................611............*246.....................27.......*..631#......+.... +.....314...*........334.968......739......505...............844.......................................732..............322...........33..... +............49...&..........*...............*........791..........152.....................247....166.............243.........826............ +529&..544........275.....140.322..........73......+......435...................942...273....*.......#........749....*.......*............... +........*.......................................665.....*..................562....@........114.170-............/..92.........443..........51 +......534.............212..........385................306.....863.....357....&........717...............570#................................ +..............783.......*...........*..........................@...@.*............593*....*249....*338.............804..#...496............. +...=..........*......373....../570.65................../...836.....1..685....*39.......584................938........&.642....*..865..40#... +.715...909..142...........................136....892..192...@.............121...............629..........$.................651.............. +................147........-....758..........=...*.............+...89.........678...815.997....*.....................990.................... +...........*90.*....777.....868...*.............909.........361.....&..354....*...........+..200.....438.......62...*........521............ +...............840...&..144.....861.....................479.............*...+...........................&.....*.....682......#........950... +....456.237................*................................146.......927..917..858....601..................834........................$.... +.......*.....794...661.....618................369...#.......&....&................*.....*.....753.................381/.....*397..........524 +.415................*.............490+.......*......533...........766..=.......657.......511...=........................766................. +...............539@.50..164...............583...574......409............126........34...................%652........44........%......886.... +...907...................*..................................*346.............359.....*.........&.887...............*........115.837.=....... +......*...............3.666.............................736.........208.226..-......616.....250.......859..628....829.............*....+600. +......153..262.........................947......260......*.........*......*............................*...*..../...............93.../...... +..........*..........421.................$.........%..500..107......402.264...407.....703..49..........54..424..372..684...........147.249.. +......363..942...137*.....197..............*83............*...................*......*....*...158.......................-....73........*.... +.........+...............*..........116..32............*...900..............360....479....54.........435*192.@850...........*...........325. +..390*..............=..431...518......*......436.......892.......787.517................%.......18.....................625.95....582........ +......600...-176..415.......=.........780.......*...........*702..*..*.....699..........914.........186.......49*897..............*..558.... +......................312........................40......481.........872.#....$./198..........764...+............................352........ +.............800.........*.248.............571..................14........845............627.....*.......*...............336.664............ +.........910.......395.506....*.........@..&.............567...*..............573..913....*......334..*..759......29.%.....&....+........... +..328.......*399.....*...........180...936....97$..376...*......251.....#447...............304.......450.....226.=...408..............*..... +......479............259........*...................*....78.........848......568......305..................=.*.............917..542.667..... +......#......332.............785.........422......624.63...........@.....896.@.........+..=770...530.....630..641.............*.........292. +............*..............................-.@..........*...$.............*......&..%..........%............................832..534...#.... +.....560...400......................246*......411.....377...645.........62......620..465....146................#.986..185........*.......... +......*.........761*......323@..........466...........................................................-111..382....*.....*.......408...164.. +.......247.....................575*..........................836.496*380..125...321...............841...........648.....976............@.... +.254.......74-.....+.......926.......-....844*.........224................*......*......562..811../...226................................... +...*..............162.*261.....287....758.....638........+.....479........834...80............=...........................188........287.... +...734....396...................*.............................*.....406.*.............244#..............&....320.............*.*165.$....... +..........*..........31......221.......$384............*115.308.87..../..306....88#....................230...@............768............... +........694......441*............53..............35.814.........-.......................77......379.....................&..........-........ +..................................*............-.+.......527......975...........594*......*........*857.#37..........302...........947..716. +.......104*561......978.226....925...........244.....107.........*..................336...749.............................691...........*... +..654..........561+...*....&.......54....924........=.........385..238........661*...............49......=.......456.859+...$.........479... +...*......392.........587....-....*.........*.965.....863.........&.....801.......19..$......*.....*529.881..670*.................790....... +.615.....-........570.....11.547.166.....347...*..190*.....................=...........302...236...........................&................ +.....................*686.....................43..........79...........475......396.......................................610..#856......... +..................+...............$......................*...592.........*.....*.........804.......@30......629...23........................ +...............202..954..%..958..894....503..579........904..*.....573..603.....450......*...734.........56....&..&.....415......408.511&... +.........750.........*..454....*......%..../..$..747#.......493......=......455.......252...*.....999.....................*........*........ +...239...*........180.........594......280............412*.............255.....*..........17..338...........950..228.......840..809......... +........572.............326......................518.........................700.............*........263......*....@.675*............22.... +...182....................*......................*......85...731...@.........................130.........*........*.......408....727@.+..... +...*....110....$899..+...755...568.=309........192.......*...*...259.847...557*42.......*........304/.....608....351........................ +...823.+.............765......../........-508.........516...412.......*..............704...............................275.........210...... +...........356........................#..........439......*........564....372*...846.............=........+62....-........*..298......*964.. +.......%......*...308.....-4.........420......./..*....905.551..........$..........#.452*........417.195..........276...956.....*...$....... +....996.......413.....569.....#.810..........889..328..........*.........595.............359..........+..%.......................35.416..... +551......$...............*..357....*....627.............94..784.719..........697*76..........135..735....690.........944*177................ +.......711............770...........664...=.......#...../...............730*..........58....*.......*...........182............848.......... +...*........800................#..............#....929......=843............216.........*...412....473...735....*.....610*.....*...505...... +348.5.......*......317......920................224...............503..-158.............463..............*.......865.......674.750.....@..... +.......367.723......*...................42.........636............+............$599..........948.......882..............................173. +.........&........873........=...........*...........*....292..-..............................*......................597*923................ +..............................871.......497..........159........452.................900...116..450...878...........................302...574 diff --git a/src/adventofcode2023/data/day_03/day03_test.txt b/src/adventofcode2023/data/day_03/day03_test.txt new file mode 100644 index 00000000..b20187f3 --- /dev/null +++ b/src/adventofcode2023/data/day_03/day03_test.txt @@ -0,0 +1,10 @@ +467..114.. +...*...... +..35..633. +......#... +617*...... +.....+.58. +..592..... +......755. +...$.*.... +.664.598.. diff --git a/src/adventofcode2023/data/day_04/day04.txt b/src/adventofcode2023/data/day_04/day04.txt new file mode 100644 index 00000000..93f8c7bb --- /dev/null +++ b/src/adventofcode2023/data/day_04/day04.txt @@ -0,0 +1,203 @@ +Card 1: 87 75 80 68 71 57 58 59 70 48 | 56 67 75 76 31 49 48 22 43 68 98 86 70 91 27 46 4 87 72 37 71 58 29 79 80 +Card 2: 95 97 90 91 79 71 60 87 46 80 | 28 90 55 87 82 34 44 96 77 15 22 63 31 33 5 99 36 91 17 10 64 59 68 37 13 +Card 3: 23 73 50 78 93 30 56 10 8 64 | 61 48 87 46 12 75 92 37 62 45 24 81 79 55 76 82 9 1 16 72 13 27 41 86 19 +Card 4: 16 50 13 24 94 27 74 58 15 53 | 58 53 20 57 69 28 47 2 41 4 66 61 15 44 24 68 50 74 86 45 36 73 43 27 91 +Card 5: 39 53 29 10 84 22 83 4 5 32 | 50 28 45 5 6 65 18 7 92 83 3 55 81 26 80 39 44 60 90 37 91 36 54 14 74 +Card 6: 84 12 96 93 72 97 91 76 7 82 | 85 15 29 33 37 60 14 30 63 73 38 62 77 44 86 39 51 2 99 75 70 36 32 98 78 +Card 7: 78 12 1 50 48 62 33 8 83 99 | 12 50 79 48 59 81 26 14 5 11 37 8 36 91 95 20 46 44 21 32 58 93 53 90 54 +Card 8: 55 58 8 36 16 23 88 73 45 65 | 19 10 34 64 52 27 75 22 33 58 74 45 16 11 63 56 12 14 8 25 59 4 95 47 78 +Card 9: 95 14 83 17 7 69 44 31 45 37 | 2 69 81 39 76 86 29 73 72 32 67 5 9 16 95 90 36 27 88 55 61 6 37 79 1 +Card 10: 24 83 98 76 87 6 32 59 4 96 | 54 5 68 85 76 50 60 33 58 32 88 61 27 55 90 65 93 13 53 29 44 15 6 45 24 +Card 11: 55 92 57 65 44 21 49 8 13 48 | 17 44 79 11 65 50 46 14 40 69 31 62 55 86 36 60 30 52 25 93 41 56 48 99 51 +Card 12: 14 93 52 89 35 42 13 22 76 26 | 14 5 46 80 22 39 1 67 43 31 78 87 68 95 90 83 96 71 74 29 15 88 36 11 76 +Card 13: 55 78 95 85 43 53 80 12 1 59 | 42 60 32 70 10 91 94 88 68 99 45 71 54 93 76 52 44 30 2 18 72 90 9 7 63 +Card 14: 6 44 46 59 91 60 47 26 12 17 | 35 52 36 5 18 30 63 79 75 55 45 99 84 81 71 34 48 24 14 70 11 69 1 4 77 +Card 15: 29 17 94 87 84 3 96 33 5 48 | 65 25 20 45 85 1 43 37 14 11 69 81 6 92 93 46 8 23 31 2 30 61 22 79 71 +Card 16: 73 81 13 23 61 35 49 48 99 5 | 10 69 22 40 73 29 61 23 13 99 26 7 39 70 5 56 88 46 49 81 68 25 35 48 14 +Card 17: 64 47 6 10 16 74 26 95 28 73 | 86 27 47 6 68 49 64 48 74 26 16 28 20 99 61 10 12 25 73 88 70 95 67 3 76 +Card 18: 1 29 86 72 65 52 67 64 68 79 | 5 88 77 52 18 31 67 41 37 55 68 65 39 22 72 97 23 64 34 29 48 1 79 49 86 +Card 19: 71 33 43 91 59 35 69 18 78 9 | 86 55 54 59 91 36 45 9 94 43 39 11 44 1 93 23 66 97 4 62 71 98 18 31 28 +Card 20: 72 86 59 6 85 1 74 25 87 20 | 21 14 6 39 4 54 37 2 61 83 82 59 10 67 19 50 12 16 51 55 1 5 45 98 73 +Card 21: 35 39 40 21 19 87 58 49 78 32 | 28 91 27 45 44 25 11 35 84 26 98 87 14 97 93 70 55 19 34 16 8 7 67 54 5 +Card 22: 87 30 6 9 73 47 29 7 33 63 | 87 80 21 3 63 38 14 7 20 9 73 31 33 29 11 30 22 68 57 54 43 42 47 34 6 +Card 23: 51 61 36 99 86 88 21 6 30 74 | 30 42 99 86 20 44 74 64 72 67 81 93 79 51 5 48 21 75 36 23 6 60 4 66 88 +Card 24: 96 21 44 42 57 34 59 45 58 2 | 6 81 92 13 66 98 47 73 26 10 84 62 93 49 57 35 90 27 75 19 52 1 37 32 85 +Card 25: 17 55 53 49 25 59 71 33 35 11 | 55 82 92 74 29 17 46 40 2 26 25 32 96 49 11 35 53 3 87 59 71 33 73 36 38 +Card 26: 33 85 26 21 13 51 73 76 20 7 | 85 53 42 21 31 76 33 97 71 73 20 90 13 52 95 98 93 99 11 32 26 51 24 37 7 +Card 27: 62 39 22 67 69 5 89 1 36 34 | 10 52 68 95 32 82 22 94 21 29 5 45 87 51 18 4 15 19 59 55 11 78 60 63 84 +Card 28: 65 31 58 70 2 49 46 14 72 11 | 24 95 11 14 27 22 38 65 15 35 36 18 59 49 6 70 69 62 46 58 60 34 92 72 2 +Card 29: 78 6 94 55 65 17 97 30 66 33 | 80 32 56 48 49 16 88 61 57 20 37 75 51 58 86 29 42 39 41 60 62 69 10 81 24 +Card 30: 72 33 93 5 58 92 10 90 29 20 | 77 73 41 42 67 17 24 28 23 69 27 43 80 49 75 74 2 3 21 26 76 32 48 30 4 +Card 31: 9 93 77 42 49 71 36 98 46 1 | 68 39 10 32 36 7 47 55 95 33 48 56 31 61 98 40 50 81 94 77 45 12 16 6 35 +Card 32: 35 54 65 19 62 37 63 68 17 47 | 14 20 65 27 84 48 85 56 64 37 51 81 11 52 63 40 93 15 92 90 19 35 43 68 7 +Card 33: 21 80 78 56 29 65 6 12 57 22 | 51 61 7 1 19 22 77 62 78 54 58 29 89 97 34 83 56 57 11 98 73 6 17 16 70 +Card 34: 57 83 56 87 58 68 46 86 78 77 | 98 58 46 51 14 1 17 60 11 13 5 49 56 96 19 15 99 28 62 38 9 40 57 92 22 +Card 35: 34 29 33 85 95 9 47 11 39 25 | 49 91 61 13 99 84 80 96 77 82 97 59 20 30 4 65 70 74 5 37 41 81 75 93 48 +Card 36: 42 30 69 88 84 90 58 26 2 47 | 98 14 3 30 56 20 49 83 29 48 46 34 99 51 12 61 92 1 55 60 70 53 75 52 27 +Card 37: 7 70 87 71 25 85 50 86 77 72 | 94 23 90 73 52 79 31 30 49 71 8 26 88 38 42 5 81 82 69 51 63 35 80 22 19 +Card 38: 37 4 98 58 7 95 19 22 17 86 | 60 38 13 79 62 49 85 77 8 52 63 20 16 81 21 59 43 36 80 70 87 35 51 10 12 +Card 39: 68 79 63 42 17 92 99 95 2 29 | 85 24 88 25 52 81 61 1 27 50 84 98 31 49 19 51 38 93 33 15 22 28 14 70 67 +Card 40: 7 15 73 55 87 18 52 17 34 12 | 87 73 42 77 21 33 44 69 24 52 94 17 7 16 78 12 34 97 67 41 15 47 55 91 18 +Card 41: 70 1 14 88 52 46 32 59 67 75 | 17 1 75 13 46 87 64 32 48 52 53 80 30 21 3 88 94 14 38 70 73 67 28 41 86 +Card 42: 65 18 51 72 76 7 93 64 21 92 | 51 64 94 77 45 98 28 67 11 42 41 72 93 22 21 56 65 76 54 7 26 92 74 18 55 +Card 43: 35 82 2 99 52 68 81 38 14 94 | 51 46 27 10 21 7 56 71 77 6 38 44 25 79 94 33 76 15 22 99 68 84 5 14 81 +Card 44: 7 47 1 61 51 46 36 87 43 34 | 14 43 91 86 47 51 29 95 76 61 39 85 84 7 87 69 46 56 88 36 27 1 10 67 34 +Card 45: 17 83 85 90 65 18 67 75 68 25 | 89 67 31 51 99 46 85 42 84 75 59 96 17 68 26 79 65 81 32 83 25 90 37 4 18 +Card 46: 2 56 38 47 9 11 61 68 51 49 | 53 56 60 47 49 61 82 5 38 2 97 9 51 80 86 22 68 31 11 59 24 4 35 13 8 +Card 47: 39 2 68 61 28 8 23 62 46 89 | 23 15 46 78 62 1 60 36 52 35 10 65 90 67 4 18 16 72 44 61 6 59 14 45 91 +Card 48: 60 49 62 14 88 84 80 18 7 20 | 88 91 77 10 2 59 94 25 67 9 16 72 80 20 32 78 14 69 56 70 73 96 15 6 92 +Card 49: 14 67 94 15 12 40 7 68 22 88 | 91 15 67 61 7 95 85 72 94 78 12 68 14 35 41 89 60 22 88 81 93 86 40 84 92 +Card 50: 65 75 63 30 38 28 27 51 58 54 | 30 99 21 28 2 81 77 85 25 38 27 63 70 62 87 58 16 9 75 54 65 69 51 78 8 +Card 51: 30 18 35 67 45 87 27 13 82 51 | 9 51 95 45 2 67 61 82 81 30 52 35 5 43 27 87 83 49 13 44 21 22 48 78 18 +Card 52: 23 21 13 53 5 78 43 94 98 59 | 72 57 18 34 11 39 95 26 56 68 22 10 21 98 96 87 4 43 74 7 46 40 88 97 58 +Card 53: 39 55 57 87 6 68 78 14 36 7 | 74 76 20 58 87 6 67 26 57 1 41 44 17 14 42 7 43 81 35 39 55 36 59 66 96 +Card 54: 26 62 39 28 76 32 98 19 2 61 | 9 62 61 75 28 42 40 39 64 32 98 37 58 16 15 19 35 2 80 76 10 26 70 18 47 +Card 55: 31 47 13 40 5 80 94 45 54 43 | 61 17 52 78 60 2 37 58 19 85 89 14 20 10 3 13 80 41 25 79 4 70 36 75 11 +Card 56: 59 68 42 47 97 53 32 46 17 76 | 64 94 32 46 68 5 49 14 91 19 59 53 26 80 33 39 6 99 18 73 45 87 69 54 66 +Card 57: 70 23 37 94 4 46 26 33 71 72 | 64 38 71 53 37 96 29 80 41 90 60 94 18 45 27 62 72 33 79 32 26 92 49 12 4 +Card 58: 47 44 65 83 91 78 17 60 7 35 | 95 65 26 52 68 9 69 61 19 87 93 27 90 57 49 23 24 17 86 16 28 62 11 63 85 +Card 59: 3 92 67 72 64 2 74 14 49 73 | 41 57 98 95 91 78 20 42 25 60 54 36 56 34 86 37 9 10 52 79 80 53 88 18 46 +Card 60: 38 5 63 77 69 9 79 50 58 51 | 20 72 80 52 68 64 33 61 47 84 65 90 29 48 16 82 4 98 83 89 17 94 81 41 85 +Card 61: 13 65 75 26 39 63 88 92 72 87 | 98 43 81 95 26 69 27 7 57 37 82 41 71 18 55 53 10 36 64 47 84 4 20 77 67 +Card 62: 19 70 5 25 23 76 90 29 61 97 | 17 20 38 58 1 29 74 13 94 47 86 56 60 14 82 83 87 91 52 39 33 37 77 62 45 +Card 63: 22 24 17 19 55 48 23 3 8 11 | 4 67 90 50 99 54 49 78 94 20 96 2 86 74 83 79 76 15 70 52 34 98 5 82 88 +Card 64: 15 92 72 63 95 34 58 85 18 57 | 64 40 67 81 89 27 84 54 75 43 70 77 13 52 19 35 46 30 12 61 78 10 82 55 45 +Card 65: 66 35 28 50 30 80 15 85 4 23 | 3 30 99 96 70 47 4 64 35 66 78 41 65 63 23 28 44 67 85 80 61 50 17 15 92 +Card 66: 71 67 68 20 93 6 76 30 15 89 | 12 69 80 11 91 34 2 65 95 8 37 86 38 10 79 3 43 90 87 45 92 50 88 39 56 +Card 67: 94 46 12 2 53 27 57 45 33 1 | 33 72 74 64 25 97 17 2 73 48 3 56 63 40 31 24 45 83 85 79 6 75 38 55 49 +Card 68: 82 68 40 3 73 81 61 1 60 50 | 15 29 82 51 73 28 43 94 85 50 96 11 98 9 86 20 6 14 5 95 10 23 61 12 62 +Card 69: 25 94 17 29 2 34 48 87 51 49 | 95 17 84 91 14 34 3 89 87 71 2 51 35 93 7 29 74 55 48 25 49 56 94 20 68 +Card 70: 37 51 36 79 15 29 88 69 6 97 | 27 66 88 90 41 29 25 36 82 56 69 37 18 40 33 97 42 91 62 6 65 79 15 28 51 +Card 71: 77 28 31 19 40 35 80 11 76 26 | 10 74 63 70 11 67 76 31 40 75 96 77 60 80 35 28 68 53 19 64 51 43 26 9 25 +Card 72: 18 96 9 79 87 37 94 69 8 74 | 69 18 9 41 21 80 72 96 71 20 15 12 36 87 99 37 44 79 46 54 94 19 8 74 39 +Card 73: 11 60 75 68 66 57 51 70 20 30 | 6 12 35 45 56 38 46 65 54 59 19 68 64 11 57 22 74 30 90 13 37 93 5 20 51 +Card 74: 6 20 99 75 87 1 70 52 4 61 | 97 98 99 34 75 11 8 92 49 81 19 12 87 20 70 6 27 4 44 61 52 67 82 1 55 +Card 75: 95 80 34 33 66 55 63 19 7 46 | 19 83 58 4 46 57 72 99 98 63 36 80 34 30 11 64 24 52 93 55 22 76 78 32 89 +Card 76: 55 56 58 16 50 24 27 75 35 44 | 75 42 35 87 7 13 55 44 8 27 56 14 24 78 61 4 19 38 18 58 50 1 16 51 22 +Card 77: 99 2 77 33 48 47 44 87 32 23 | 46 71 47 54 23 55 18 28 56 48 69 14 26 44 24 32 77 60 81 2 40 33 83 11 87 +Card 78: 67 46 27 29 44 1 22 4 13 52 | 80 98 63 29 97 67 58 86 25 52 95 23 92 76 27 74 13 93 78 22 81 96 1 46 64 +Card 79: 60 94 4 59 76 64 34 69 35 62 | 10 8 82 43 76 44 69 20 41 29 1 35 34 59 42 22 13 32 4 40 65 28 16 84 99 +Card 80: 88 60 47 76 82 5 14 63 58 16 | 83 62 57 21 89 79 53 60 87 22 76 20 78 96 63 68 56 91 5 7 47 16 94 98 45 +Card 81: 46 67 14 43 39 44 48 35 6 94 | 2 31 12 42 78 76 61 62 40 37 29 36 16 75 4 41 21 19 85 49 84 73 89 96 3 +Card 82: 61 73 72 47 71 96 4 2 41 20 | 76 78 94 65 51 85 92 60 31 80 81 34 46 69 90 70 17 74 89 40 27 35 14 15 10 +Card 83: 82 60 62 23 81 27 61 26 75 28 | 29 78 79 9 13 39 30 97 31 96 86 84 42 28 14 55 81 44 17 8 25 12 35 34 82 +Card 84: 91 61 73 55 98 28 11 40 33 50 | 21 55 27 2 54 44 94 59 58 67 79 66 82 87 92 25 9 7 65 80 38 30 10 97 16 +Card 85: 39 81 47 2 8 95 35 63 36 10 | 75 58 6 19 20 55 18 99 88 25 78 77 65 93 59 57 12 13 66 91 3 67 34 41 29 +Card 86: 15 33 8 84 57 35 50 76 43 17 | 34 20 55 59 97 51 44 46 53 5 10 79 58 89 39 82 16 42 71 81 22 40 85 63 56 +Card 87: 44 7 57 42 53 85 62 9 56 63 | 95 60 69 56 24 43 7 4 91 44 63 76 30 39 62 9 85 57 16 34 53 99 50 66 42 +Card 88: 47 85 12 1 98 86 94 84 33 51 | 27 54 45 55 38 12 96 51 1 83 36 65 13 85 32 94 29 52 47 59 33 48 86 82 98 +Card 89: 45 15 77 41 57 43 54 2 32 24 | 44 79 10 28 23 97 99 40 95 25 22 9 35 59 53 74 14 37 34 61 39 30 71 12 94 +Card 90: 76 75 36 82 28 2 87 81 31 14 | 38 67 87 90 6 9 19 2 13 37 24 15 65 84 32 85 44 18 98 79 23 35 80 60 47 +Card 91: 21 19 37 97 7 29 34 79 45 13 | 17 42 12 71 21 4 51 37 7 81 34 65 36 19 13 59 96 97 31 16 79 87 29 86 45 +Card 92: 16 14 67 60 39 25 26 34 12 96 | 79 66 11 93 38 29 37 12 50 32 7 82 39 59 84 54 42 83 43 92 19 1 34 26 77 +Card 93: 70 37 71 28 22 62 85 9 65 27 | 78 91 28 65 42 22 70 30 92 54 9 72 38 24 62 51 10 49 89 13 14 66 84 61 93 +Card 94: 80 48 40 83 87 19 53 66 69 33 | 80 79 66 76 58 94 60 70 20 42 72 87 19 30 75 40 67 12 36 96 11 29 59 63 33 +Card 95: 68 91 48 52 79 40 83 97 16 63 | 77 73 52 88 97 91 48 22 35 64 31 40 63 68 60 28 57 30 51 54 36 16 92 19 79 +Card 96: 78 81 13 87 20 8 80 63 2 3 | 20 29 62 72 44 90 54 22 3 35 55 16 96 80 37 93 73 23 50 33 6 63 78 8 13 +Card 97: 32 39 59 73 8 34 36 46 85 47 | 14 22 15 87 46 34 67 77 44 91 47 5 73 68 59 7 40 94 98 36 21 76 64 86 39 +Card 98: 19 75 37 82 94 6 57 15 78 58 | 9 79 6 71 91 39 38 61 59 89 90 1 80 17 86 35 98 63 27 74 5 49 25 70 73 +Card 99: 44 22 48 23 31 78 15 89 49 24 | 36 89 27 81 67 56 22 28 74 47 25 18 44 3 15 23 58 73 69 39 75 17 85 1 7 +Card 100: 56 15 30 64 37 89 51 96 63 90 | 56 23 24 57 44 9 41 65 6 26 69 36 21 66 94 67 7 10 34 59 14 40 99 93 98 +Card 101: 42 95 60 30 25 87 82 98 40 54 | 22 85 24 84 19 34 3 43 97 8 18 57 58 26 91 44 56 11 16 66 78 73 62 50 68 +Card 102: 14 64 72 79 55 78 44 12 76 36 | 69 74 13 78 59 82 15 46 49 11 81 83 97 9 58 4 98 60 43 34 30 67 2 47 37 +Card 103: 64 82 36 57 33 8 80 91 95 32 | 84 45 12 44 59 94 86 53 48 96 26 66 70 65 39 37 21 72 49 60 56 35 82 98 92 +Card 104: 76 18 88 52 69 44 57 99 20 12 | 60 74 21 35 77 39 40 29 46 37 95 65 93 36 43 86 48 59 6 11 16 72 28 55 97 +Card 105: 91 30 6 25 7 64 41 28 72 53 | 93 63 59 31 4 87 45 97 70 29 39 80 98 66 44 51 54 62 57 46 56 18 13 81 27 +Card 106: 15 59 45 36 74 86 35 62 87 14 | 29 35 81 53 60 69 47 25 61 43 13 62 84 96 79 75 68 23 32 18 37 72 63 4 36 +Card 107: 62 41 56 15 66 50 63 20 43 84 | 43 66 99 3 49 20 80 50 36 38 52 22 23 24 41 62 84 83 15 68 63 56 94 35 97 +Card 108: 67 51 97 26 11 61 91 55 7 23 | 47 96 26 78 22 87 33 51 34 59 53 3 97 91 86 11 21 89 13 61 23 67 55 7 24 +Card 109: 72 23 61 6 1 65 83 47 10 41 | 27 16 98 74 55 61 5 1 88 68 41 47 99 48 76 31 85 83 38 72 91 93 36 90 80 +Card 110: 34 22 81 62 40 25 43 60 12 69 | 69 81 71 66 54 15 17 79 25 93 34 51 43 62 40 12 30 56 27 47 60 33 22 94 65 +Card 111: 48 24 75 46 37 65 33 74 64 92 | 75 46 25 65 92 33 64 83 39 16 45 48 97 56 11 78 94 62 4 24 37 96 74 31 40 +Card 112: 94 92 39 58 34 78 61 7 50 88 | 83 6 52 39 92 17 40 63 54 34 7 85 89 64 25 50 99 77 33 13 11 81 35 78 41 +Card 113: 23 25 75 44 18 8 29 79 48 60 | 7 70 80 63 60 42 88 25 44 23 21 11 51 93 47 82 16 86 73 62 96 75 2 29 19 +Card 114: 52 42 66 15 57 29 21 47 89 22 | 77 81 52 8 66 21 98 61 71 2 85 34 42 95 93 25 67 60 82 47 78 56 63 87 84 +Card 115: 63 81 53 30 8 94 75 76 45 71 | 53 93 40 18 45 71 76 67 75 92 15 72 35 94 65 30 88 22 81 8 63 50 80 5 82 +Card 116: 8 33 23 82 63 25 65 4 97 28 | 79 75 71 46 41 74 6 86 64 33 24 70 82 87 9 76 36 3 5 97 92 4 1 12 62 +Card 117: 9 97 4 59 31 78 73 99 84 11 | 93 65 12 39 29 76 80 82 43 37 26 57 79 27 46 90 98 54 31 34 17 62 95 51 9 +Card 118: 11 42 73 23 28 62 68 15 31 48 | 17 81 29 15 10 86 25 68 28 80 33 78 89 11 82 96 12 34 19 99 67 13 64 59 91 +Card 119: 22 16 61 76 19 92 5 89 86 1 | 37 35 77 44 7 42 86 92 41 81 16 95 12 1 85 60 63 79 5 25 62 46 73 45 19 +Card 120: 97 11 71 31 44 24 12 49 15 17 | 97 44 78 49 64 61 42 55 31 38 12 87 53 32 41 6 68 62 19 94 13 79 29 56 71 +Card 121: 5 50 95 7 14 6 35 64 99 94 | 30 54 80 90 68 98 6 71 61 81 23 24 64 37 40 15 53 63 31 35 7 49 14 99 42 +Card 122: 5 72 29 22 71 35 41 82 15 56 | 3 45 61 68 70 41 56 26 82 62 29 36 84 80 95 81 96 83 20 35 28 54 21 76 47 +Card 123: 80 4 93 25 97 10 20 84 3 67 | 14 18 12 20 86 96 63 67 60 54 13 85 23 37 10 16 71 65 33 5 98 1 74 53 51 +Card 124: 43 64 62 31 86 1 30 23 15 28 | 77 1 99 27 48 35 2 40 57 61 23 9 37 74 91 46 92 83 24 90 96 32 80 45 31 +Card 125: 53 47 45 50 82 37 26 41 22 57 | 43 25 37 29 89 20 17 8 1 46 2 55 53 44 61 78 65 72 69 85 12 93 28 34 80 +Card 126: 36 27 94 41 56 21 18 13 59 96 | 73 91 2 14 29 98 79 8 11 3 38 16 69 71 77 92 66 60 18 9 1 57 12 22 43 +Card 127: 19 12 69 97 81 26 73 83 34 51 | 91 47 89 62 94 8 66 43 35 93 48 24 71 40 42 75 13 14 65 28 61 95 32 25 9 +Card 128: 99 78 81 4 44 58 10 83 67 5 | 5 83 95 17 34 68 91 10 4 88 56 38 49 44 66 11 78 7 50 67 45 21 98 99 58 +Card 129: 94 35 8 59 72 56 51 98 47 63 | 98 71 61 72 51 54 35 34 95 9 82 88 47 8 66 57 90 55 81 33 59 56 64 63 94 +Card 130: 81 25 85 84 88 26 87 14 40 77 | 25 74 20 13 30 11 72 77 88 40 70 67 47 14 80 86 81 26 45 87 79 33 85 84 39 +Card 131: 28 83 7 69 87 48 46 67 33 10 | 37 10 48 96 38 99 14 60 28 42 26 94 46 24 84 68 87 72 85 67 4 83 31 7 47 +Card 132: 33 65 47 66 48 9 69 68 76 73 | 21 18 70 64 55 19 31 81 20 77 12 94 59 15 98 44 57 52 92 54 93 40 89 16 78 +Card 133: 67 54 21 71 43 56 68 65 55 99 | 16 83 20 45 85 92 34 61 88 33 51 65 24 68 58 55 91 81 54 43 5 1 77 49 25 +Card 134: 73 82 41 78 91 72 13 7 46 88 | 78 88 32 57 12 56 44 73 41 79 27 99 49 13 82 91 87 97 62 46 83 7 23 60 71 +Card 135: 19 30 91 16 15 88 5 4 72 38 | 38 41 23 87 3 78 75 11 88 53 5 72 4 56 54 65 19 76 15 27 82 39 70 69 17 +Card 136: 39 66 64 79 90 51 69 6 44 23 | 51 1 21 44 23 78 27 66 69 42 6 50 74 48 39 79 57 29 53 3 10 13 30 90 64 +Card 137: 82 75 28 96 13 25 30 59 76 5 | 25 45 59 79 96 44 88 75 82 30 13 18 20 97 21 5 70 31 76 95 17 37 27 28 53 +Card 138: 23 21 53 59 82 11 99 30 68 1 | 51 11 21 53 8 43 24 71 33 63 75 66 23 82 1 20 92 50 86 59 99 45 84 30 68 +Card 139: 43 44 12 68 14 70 83 84 39 40 | 72 18 54 48 43 91 56 1 11 49 83 59 29 73 87 40 37 6 50 14 74 61 70 2 36 +Card 140: 64 4 86 61 11 72 66 73 83 14 | 74 86 84 8 36 5 76 73 83 88 10 28 38 64 4 12 72 23 53 42 33 91 61 45 55 +Card 141: 46 33 44 21 99 64 29 4 28 30 | 1 95 13 97 9 59 15 41 89 35 43 98 81 27 94 3 65 88 91 12 17 10 23 61 48 +Card 142: 2 85 8 98 74 62 76 7 79 60 | 59 42 2 49 24 34 25 76 8 71 98 86 6 7 16 33 74 62 89 13 39 31 85 79 87 +Card 143: 50 10 55 73 71 3 20 57 15 9 | 42 20 71 54 11 9 55 37 15 3 53 41 13 99 63 57 7 73 28 84 18 35 5 32 10 +Card 144: 26 38 75 71 89 40 96 81 83 48 | 42 77 11 76 78 15 19 86 10 34 61 58 29 14 64 94 63 33 70 13 88 82 59 28 93 +Card 145: 72 35 67 80 78 20 57 48 64 28 | 44 70 79 37 5 96 31 13 10 83 93 29 46 94 66 47 6 34 14 18 33 8 69 49 20 +Card 146: 42 10 61 56 2 22 38 15 67 6 | 72 83 53 80 52 31 74 73 20 12 87 71 78 95 25 45 75 43 32 85 82 7 13 90 19 +Card 147: 30 2 48 5 16 25 70 89 35 85 | 3 5 55 90 16 86 70 87 17 29 74 14 22 78 39 37 71 45 79 42 2 60 21 62 89 +Card 148: 61 50 41 22 75 80 46 93 55 6 | 62 68 95 45 74 21 13 52 66 2 17 53 97 83 90 40 44 28 25 86 14 82 15 30 84 +Card 149: 49 54 61 92 19 16 78 83 15 71 | 7 33 40 69 2 34 70 9 91 79 74 42 67 38 82 60 28 43 23 80 39 56 30 66 1 +Card 150: 47 85 71 36 9 98 45 28 7 58 | 94 88 20 62 13 77 85 27 43 92 18 41 31 3 2 45 74 99 30 40 26 93 19 23 65 +Card 151: 65 90 39 91 53 76 79 51 9 36 | 5 84 49 13 70 64 15 33 92 67 41 57 19 21 22 87 54 50 46 66 52 24 71 29 16 +Card 152: 61 62 51 11 14 44 10 29 31 35 | 95 47 96 16 5 32 88 90 52 65 70 94 9 80 81 56 50 43 15 34 45 68 67 42 18 +Card 153: 91 86 12 23 53 39 96 79 14 76 | 68 66 83 69 73 42 59 67 4 38 11 46 16 95 71 52 88 13 19 48 9 99 30 62 43 +Card 154: 47 44 72 6 95 7 21 64 59 29 | 72 7 12 33 21 14 91 3 99 71 64 44 70 63 6 22 88 16 43 57 73 59 76 60 47 +Card 155: 38 36 24 69 59 58 96 45 39 30 | 17 64 59 31 80 36 25 89 96 4 27 12 30 74 11 29 57 63 45 19 42 38 69 58 39 +Card 156: 60 93 14 54 53 40 34 26 1 28 | 46 62 40 69 48 39 35 68 86 22 19 10 42 25 88 67 58 96 54 44 56 85 31 90 99 +Card 157: 82 93 7 76 69 1 36 5 4 3 | 66 96 92 52 29 5 91 62 45 27 25 31 28 78 99 95 73 14 37 26 9 98 42 55 11 +Card 158: 34 52 78 67 96 62 54 85 86 31 | 21 42 63 51 12 70 15 83 34 35 62 69 52 54 36 85 31 86 67 41 53 7 1 96 82 +Card 159: 67 49 58 35 82 57 29 6 20 25 | 30 46 2 75 38 57 99 7 29 69 94 40 12 45 97 49 66 6 35 76 32 37 71 60 68 +Card 160: 17 49 10 5 34 2 23 91 3 19 | 29 39 67 53 14 61 41 85 18 65 56 77 54 55 13 27 28 45 60 7 62 6 96 38 35 +Card 161: 4 42 38 50 85 92 27 25 82 7 | 82 5 83 71 52 43 12 75 73 92 96 1 61 59 25 85 7 22 23 80 35 15 97 88 30 +Card 162: 42 69 75 64 40 12 29 56 33 62 | 57 5 83 79 26 55 84 60 70 16 47 2 19 30 7 62 89 76 20 90 66 78 21 9 87 +Card 163: 52 10 27 86 7 72 95 88 13 75 | 94 76 43 33 31 69 35 68 39 78 48 83 28 66 67 15 72 34 32 25 85 53 40 46 1 +Card 164: 14 95 31 43 91 56 22 68 17 33 | 74 98 24 59 4 93 67 23 64 35 51 42 92 88 63 20 29 70 16 82 89 45 39 27 12 +Card 165: 29 5 49 25 67 79 56 44 43 93 | 20 54 10 52 8 50 98 9 73 92 78 24 86 69 77 82 80 41 94 36 35 22 32 38 3 +Card 166: 63 92 68 93 58 16 90 6 13 46 | 31 45 39 8 65 49 23 81 62 72 7 15 82 35 53 4 80 83 48 13 10 11 71 40 61 +Card 167: 58 70 1 3 7 81 65 83 79 77 | 87 8 59 29 18 6 14 48 35 9 60 94 80 92 51 2 73 36 47 27 86 89 41 42 4 +Card 168: 69 93 96 77 76 90 17 88 11 26 | 31 13 77 9 86 82 51 67 53 99 76 35 81 6 28 92 24 14 87 59 41 37 88 18 96 +Card 169: 99 40 11 87 24 55 4 46 66 49 | 60 67 72 31 94 69 42 46 86 17 47 70 95 90 6 4 3 59 61 24 93 73 28 58 96 +Card 170: 29 84 4 80 72 94 9 7 55 68 | 24 62 7 35 21 55 85 94 29 4 84 38 42 33 2 77 58 9 11 80 41 72 76 13 68 +Card 171: 93 7 9 11 12 13 79 51 99 62 | 99 28 51 12 82 11 35 18 93 34 7 17 2 13 63 54 9 69 62 84 68 79 58 36 70 +Card 172: 16 79 33 10 58 22 67 98 46 43 | 75 24 96 64 4 50 38 10 5 31 45 21 98 7 17 34 60 72 97 92 6 3 99 86 9 +Card 173: 98 73 26 29 85 75 13 22 27 35 | 87 76 25 43 82 17 79 74 16 91 37 97 46 15 14 40 52 70 31 68 81 5 36 72 57 +Card 174: 4 29 72 26 46 89 61 15 16 11 | 4 68 89 24 58 94 46 26 55 15 67 61 72 98 75 84 29 11 47 2 54 13 9 28 16 +Card 175: 40 49 71 63 25 47 44 26 98 31 | 26 20 18 96 64 92 88 63 62 95 47 33 86 35 70 75 90 27 1 59 54 74 80 41 77 +Card 176: 92 17 34 39 64 49 70 69 44 91 | 49 24 4 81 74 31 28 36 69 39 68 16 98 2 3 26 96 76 57 19 44 95 93 29 34 +Card 177: 60 32 48 84 3 86 62 55 22 58 | 17 91 95 50 64 89 32 60 82 62 49 58 25 12 86 3 40 16 84 87 66 61 77 55 9 +Card 178: 92 4 66 65 13 87 57 16 78 3 | 92 16 81 7 78 42 25 44 43 24 66 29 50 40 19 71 89 53 59 77 67 76 39 84 1 +Card 179: 6 67 72 98 79 45 12 87 77 60 | 19 12 57 66 14 26 28 31 18 24 45 6 15 29 99 27 90 87 10 59 92 36 58 72 79 +Card 180: 6 9 43 74 48 87 52 56 76 30 | 97 8 88 19 2 54 9 29 3 39 23 71 93 41 95 87 98 68 36 42 94 40 45 84 85 +Card 181: 26 5 23 14 59 6 33 89 97 96 | 16 7 41 8 45 71 47 98 67 88 58 13 79 66 85 81 32 17 60 91 51 49 27 69 3 +Card 182: 53 5 83 87 3 44 25 98 48 24 | 14 77 95 98 40 81 97 85 80 15 33 38 75 17 5 56 71 43 65 28 87 10 66 22 70 +Card 183: 67 20 49 89 38 55 16 79 27 45 | 43 57 35 34 26 93 13 63 5 87 72 69 28 96 78 3 48 47 61 94 59 7 37 95 1 +Card 184: 1 73 35 99 24 74 64 21 14 81 | 48 81 57 15 28 49 31 82 91 8 62 79 54 20 95 13 21 97 98 19 51 6 83 70 61 +Card 185: 31 6 98 7 17 45 42 37 67 56 | 53 73 7 91 20 63 57 96 28 72 15 44 55 29 23 77 58 32 1 11 62 65 95 83 25 +Card 186: 93 81 16 50 3 40 87 46 90 58 | 89 70 62 28 4 19 2 63 21 53 14 9 55 25 54 38 94 82 47 86 36 96 49 8 80 +Card 187: 45 71 74 81 84 18 23 35 86 25 | 34 90 45 74 63 35 1 3 88 12 84 71 97 29 32 26 40 18 76 89 9 80 86 94 64 +Card 188: 3 21 56 32 1 26 54 60 13 28 | 40 24 26 28 78 12 11 92 17 98 30 27 1 87 25 97 57 49 52 38 51 32 42 47 7 +Card 189: 41 82 69 64 35 71 79 61 44 36 | 35 69 22 37 44 29 79 39 14 3 56 66 36 62 82 26 72 61 88 33 97 64 41 98 34 +Card 190: 96 84 47 27 31 17 59 40 64 67 | 16 32 82 27 21 75 93 74 60 80 29 48 23 31 54 98 79 58 17 67 18 43 12 25 96 +Card 191: 35 60 71 44 21 62 81 14 67 85 | 36 37 69 9 34 35 62 40 54 41 1 13 23 58 85 86 24 55 14 7 92 96 50 11 81 +Card 192: 82 95 6 69 48 56 42 96 94 93 | 98 92 96 63 42 76 16 50 95 48 28 8 39 6 94 47 69 97 56 82 44 93 21 26 7 +Card 193: 22 86 12 38 3 6 44 77 27 59 | 53 80 89 25 92 38 63 86 65 34 99 46 27 75 8 1 7 47 66 29 2 77 61 12 54 +Card 194: 15 20 33 91 80 61 37 99 58 92 | 10 76 99 58 97 91 71 64 33 36 29 30 42 37 87 66 90 6 49 22 68 40 92 2 73 +Card 195: 10 59 86 92 5 55 25 48 36 45 | 27 5 48 84 25 57 35 78 56 63 82 28 87 92 88 10 19 42 36 53 86 60 81 39 55 +Card 196: 69 95 34 9 80 55 11 30 49 88 | 15 89 44 26 48 49 74 54 35 77 47 11 9 21 25 95 31 88 53 56 42 69 18 10 60 +Card 197: 62 23 83 63 24 58 57 72 8 68 | 41 25 26 58 80 45 99 55 63 96 46 60 84 33 98 42 50 62 44 52 47 7 57 75 12 +Card 198: 86 22 73 29 41 40 11 76 69 83 | 78 20 14 67 51 93 8 47 43 44 82 16 2 55 96 98 61 48 31 49 91 24 3 27 87 +Card 199: 27 59 83 12 76 82 74 98 47 73 | 30 20 63 53 67 68 16 4 66 10 93 61 89 80 36 75 62 99 1 5 70 31 17 82 22 +Card 200: 49 66 64 92 36 61 44 96 68 67 | 57 55 19 18 78 64 90 85 72 84 5 10 38 71 74 34 68 30 46 83 86 25 89 50 49 +Card 201: 83 53 58 64 84 72 70 19 41 17 | 22 55 50 90 65 88 6 76 43 70 26 63 41 91 82 79 89 98 71 54 80 67 59 36 49 +Card 202: 70 55 83 56 42 25 11 1 41 49 | 32 54 80 59 53 23 75 8 68 6 94 45 86 3 61 98 36 14 44 18 89 39 81 51 88 +Card 203: 12 10 29 80 87 71 65 37 55 9 | 11 5 75 46 3 81 6 54 64 32 95 33 49 34 74 48 92 20 21 56 53 50 41 61 36 diff --git a/src/adventofcode2023/data/day_04/day04_test.txt b/src/adventofcode2023/data/day_04/day04_test.txt new file mode 100644 index 00000000..9bdb8745 --- /dev/null +++ b/src/adventofcode2023/data/day_04/day04_test.txt @@ -0,0 +1,6 @@ +Card 1: 41 48 83 86 17 | 83 86 6 31 17 9 48 53 +Card 2: 13 32 20 16 61 | 61 30 68 82 17 32 24 19 +Card 3: 1 21 53 59 44 | 69 82 63 72 16 21 14 1 +Card 4: 41 92 73 84 69 | 59 84 76 51 58 5 54 83 +Card 5: 87 83 26 28 32 | 88 30 70 12 93 22 82 36 +Card 6: 31 18 13 56 72 | 74 77 10 23 35 67 36 11 diff --git a/src/adventofcode2023/data/day_06/day06.txt b/src/adventofcode2023/data/day_06/day06.txt new file mode 100644 index 00000000..45e74fa2 --- /dev/null +++ b/src/adventofcode2023/data/day_06/day06.txt @@ -0,0 +1,2 @@ +Time: 40 92 97 90 +Distance: 215 1064 1505 1100 diff --git a/src/adventofcode2023/data/day_06/day06_test.txt b/src/adventofcode2023/data/day_06/day06_test.txt new file mode 100644 index 00000000..28f5ae95 --- /dev/null +++ b/src/adventofcode2023/data/day_06/day06_test.txt @@ -0,0 +1,2 @@ +Time: 7 15 30 +Distance: 9 40 200 diff --git a/src/adventofcode2023/data/day_07/day07.txt b/src/adventofcode2023/data/day_07/day07.txt new file mode 100644 index 00000000..fbb248a7 --- /dev/null +++ b/src/adventofcode2023/data/day_07/day07.txt @@ -0,0 +1,1000 @@ +8A7J7 301 +QAAT7 677 +J3K4K 622 +KJJ62 577 +49AAA 298 +45585 855 +33KKK 115 +4Q777 438 +7KK77 836 +5T55T 397 +85855 56 +Q6Q38 157 +AA8AA 85 +32J33 293 +KKQQA 247 +888J4 944 +2AJ2K 482 +33777 338 +KT434 696 +K3K63 648 +86866 136 +93983 584 +57857 489 +5JJ2Q 76 +82335 133 +J25T4 559 +9TQ2A 211 +596J6 926 +ATAAA 513 +6KKKQ 277 +AAA22 554 +J2265 332 +8Q3QQ 486 +6735A 28 +Q5555 595 +J9888 262 +5QQQ2 626 +J7777 953 +643TA 572 +8579Q 99 +23294 683 +55J54 501 +9JK93 567 +64388 941 +3J8T5 40 +29K29 422 +JQ4K2 401 +AA6A3 78 +2KK44 821 +9AA2A 884 +43434 386 +J7A67 177 +4JKKT 956 +AA999 296 +2A2T9 519 +9T9KT 342 +Q5J5A 19 +QJK7A 925 +AA9AA 337 +4T2QT 751 +77888 324 +343QT 914 +33229 576 +J5Q5Q 169 +22952 620 +J4444 17 +T9JTT 172 +48888 729 +28522 138 +66363 302 +68TTJ 778 +5Q885 66 +24KJ3 229 +5A68K 731 +A79A7 906 +QQQAQ 698 +J34AJ 109 +TTTTJ 503 +3J528 183 +5A5AA 598 +5AAAA 782 +TT77J 968 +24Q62 178 +T6K7A 811 +99788 53 +494K6 560 +7JQ87 327 +Q9QQQ 597 +496Q2 392 +2252K 995 +Q85TA 2 +KT66Q 165 +383T6 509 +9997Q 724 +4TT4T 368 +35TQA 707 +33534 24 +KKKJ4 469 +A9TAA 830 +A445A 481 +3Q63Q 192 +AATAT 680 +2225J 436 +Q4869 471 +A4JA4 330 +5K35T 545 +TK3A4 877 +8K62J 596 +9Q7T8 582 +898KK 813 +5AJJA 504 +T5TKQ 289 +6T88Q 359 +A8AAJ 526 +393J3 817 +Q2Q22 212 +Q8Q22 89 +265T8 757 +Q2584 807 +T33TT 853 +T22TA 391 +46999 61 +9AA9J 57 +6T538 674 +3T253 271 +63TAJ 395 +34943 323 +6QQQQ 497 +TA75K 938 +4T467 141 +36AQK 197 +884A4 228 +77277 453 +AQ854 50 +Q56QJ 456 +T4TKT 319 +K63Q4 30 +79793 110 +AJKQ6 421 +22278 996 +222TT 357 +42J74 647 +Q4QAT 634 +66574 951 +2KK22 446 +Q65Q3 533 +77887 267 +58533 719 +287K9 51 +Q5656 199 +564AQ 106 +QJ579 77 +9732T 46 +JAK23 808 +688K8 364 +A993A 651 +Q9QQ9 93 +74777 929 +QT722 723 +76QAQ 621 +8K836 573 +77557 783 +A5555 65 +TTT6T 643 +83595 933 +J3J97 734 +JTTA3 87 +TTAQA 282 +A555A 765 +4TQTT 538 +T777Q 763 +T82J9 63 +83359 213 +AQQAQ 363 +47AT9 311 +96A9T 310 +K5TK5 450 +ATKK8 429 +7K777 541 +5TJAK 987 +KAQ73 687 +TTATA 874 +J4TJ2 857 +666KK 204 +AA777 990 +J98A8 946 +7A95A 288 +3K2K3 820 +79K42 112 +A65KT 300 +596T8 266 +J5664 585 +75585 964 +73AT2 491 +2J2KT 375 +6888T 480 +A5765 992 +KK555 224 +AT2TA 514 +TTTTQ 753 +Q4348 273 +KK66K 887 +44JQ9 67 +Q339Q 341 +833Q8 574 +K456T 766 +J98KK 209 +K4644 328 +43935 79 +8848K 380 +K22A2 834 +8654Q 703 +4K2AT 96 +K276J 863 +8K64J 320 +AAA7A 571 +72747 950 +4A4Q9 120 +66636 814 +33637 881 +KK2AK 895 +J8677 851 +A48A8 430 +56656 866 +55355 976 +66J77 370 +3353J 896 +56556 237 +3KJ5Q 270 +J22J2 261 +AJ2AA 163 +JJJJJ 517 +48A28 819 +K4443 799 +TJTJ5 345 +T3K9J 868 +49AJ9 605 +45455 741 +KJJKK 754 +63333 789 +76677 989 +AJ774 264 +JKJ2A 531 +TQQQT 809 +Q6KJ6 411 +KQK7Q 704 +2A4Q5 410 +68KK8 652 +8K938 194 +72J22 242 +9J672 43 +7Q6Q5 903 +64666 95 +J2372 798 +A263T 781 +JK598 909 +55J92 625 +A2567 343 +4A7A7 174 +8KA3J 68 +JQTQ3 528 +74444 127 +QA5AT 306 +T9K7T 254 +75TT7 166 +83388 325 +888Q8 982 +8Q7A6 84 +2K7JA 663 +T9959 937 +3KA87 921 +4KJ92 786 +28A83 442 +99T8J 699 +TKKKK 457 +25552 431 +TTATK 862 +QJQKK 664 +QJQQ9 552 +T4J77 206 +Q7777 352 +QJ747 534 +9K9KK 656 +44646 479 +5T64Q 455 +QQQQK 475 +73478 827 +Q3J33 975 +Q655Q 930 +7T7T7 231 +53A72 409 +3333A 833 +29928 787 +97J58 307 +T2555 673 +Q44A5 382 +J5A57 144 +7J447 131 +8KK99 600 +99555 349 +43682 205 +63259 518 +AA3A8 591 +J444J 58 +52J23 772 +5KK3K 660 +5KT2K 329 +54K6K 252 +49J24 864 +673Q5 780 +TT848 333 +227A5 424 +JT9J5 675 +7K9QJ 825 +732Q7 461 +24343 859 +TJ333 604 +T33AJ 149 +KJ5KK 129 +54555 249 +25222 3 +TQJA3 38 +7Q7Q7 460 +999J4 557 +J6766 831 +K4KKK 185 +363K3 566 +K888J 885 +55855 488 +97979 565 +2597T 493 +77456 233 +Q9Q5Q 202 +99K23 98 +63763 7 +TQ498 849 +74626 590 +K44KK 73 +9AA97 498 +Q6696 706 +95555 697 +69969 670 +JQ294 203 +24246 425 +6QJ6A 16 +AQAAA 916 +6K6JK 313 +9AK99 41 +4T6J5 219 +6Q6T6 549 +96999 983 +79977 522 +57Q8A 732 +AQ6AQ 156 +284Q6 351 +K88KJ 123 +57A8A 606 +4J97Q 592 +5JTQ3 369 +A467T 742 +2878J 669 +KKAJ6 668 +T5TTT 570 +8AA88 665 +3238A 428 +67286 979 +88585 997 +T6866 132 +88T83 912 +68888 832 +A95TK 371 +T8Q33 167 +333K8 286 +KK888 722 +7TAK7 281 +A7J77 216 +9T85Q 969 +54444 918 +77822 151 +9KJ2T 759 +Q8483 536 +9JJA9 788 +J8Q8T 272 +27KJQ 958 +76666 671 +5T932 182 +887T4 628 +6499T 607 +447Q4 718 +9736J 716 +AQJAQ 611 +T4933 690 +3TJAJ 923 +K7722 412 +77737 22 +775AQ 812 +5QKQ5 362 +448T8 114 +A7A7A 502 +4Q466 583 +74744 749 +7363J 939 +88388 59 +Q3KQT 861 +42222 794 +96669 294 +54959 378 +TTTTA 544 +796JA 867 +92KK9 238 +9TJT9 848 +8A2A2 309 +687K3 515 +KTKKT 610 +J8659 210 +22K4K 423 +586Q9 55 +AAA7K 599 +33J73 198 +K74KJ 936 +55JJ5 943 +Q6QJQ 801 +5435J 137 +QJ5QQ 553 +AAA78 485 +67676 404 +34K33 376 +8Q32J 326 +A66KA 649 +52K8Q 179 +A32A2 561 +JTQJQ 645 +59KK7 11 +6763Q 189 +KKK88 426 +8KTJ8 681 +2222T 767 +KK5J7 372 +QQQ57 942 +7A72J 904 +2222J 467 +7KQQQ 186 +J3993 629 +73437 952 +8A37T 771 +966J9 752 +4KT29 710 +82378 840 +4QT72 785 +3629T 934 +JTK77 977 +KKQ33 915 +4242A 744 +TQA9A 215 +A6666 854 +23333 170 +TTT9T 587 +J3377 34 +6JJ66 835 +A3AAA 897 +96936 427 +8JJJ4 686 +32332 173 +QJ868 640 +67388 111 +88988 613 +4TJTT 435 +T988T 702 +K59K5 894 +Q8Q88 688 +5Q847 347 +9J599 154 +958K6 462 +AAQQA 959 +JKJKQ 846 +7992T 72 +9899A 510 +22Q22 389 +939J7 971 +J4K4A 367 +TT7TQ 816 +KKKT3 297 +97KK6 793 +7QQQ7 824 +ATQQA 102 +J597K 797 +78J88 473 +87A87 42 +828A7 527 +K8777 107 +8963J 949 +29399 998 +3TKA8 190 +3TQ66 889 +JJ5T5 985 +J566T 568 +T38K2 815 +2J5KA 646 +A8J32 184 +622Q6 777 +TK7QT 26 +47766 790 +2J5Q6 932 +9K969 878 +82235 64 +3A3JK 152 +49494 540 +7JJJ7 350 +39233 437 +5466Q 239 +Q3QQQ 961 +A8J5Q 623 +Q3333 739 +4T396 90 +25T2J 284 +TK7T3 9 +5555K 993 +J2666 383 +22292 250 +J5T95 478 +22T29 226 +24242 126 +99939 121 +73373 414 +78Q92 738 +A5362 826 +3KK2J 756 +77877 291 +T9TT9 879 +3JJTT 145 +3T363 524 +6Q6QQ 619 +Q2QQQ 8 +8J58J 967 +65KJK 398 +KTA2T 464 +T7JJJ 922 +44888 948 +2KJ2K 755 +63858 353 +49K4T 483 +5833J 180 +62822 105 +99JK9 635 +QAJAA 962 +977T5 691 +655KK 274 +9966A 393 +55J5T 303 +284K5 589 +27636 872 +K29KK 774 +K9JJ4 792 +6JKTT 108 +TK8TJ 745 +T3A7K 400 +9J3TQ 901 +ATJKK 917 +666A5 448 +A5AT6 588 +6T4J6 822 +Q9A9A 260 +594J3 241 +Q3A34 279 +A9999 220 +7AQQ9 49 +737Q3 999 +JQQ8Q 882 +78977 399 +53333 689 +2K2JQ 25 +34848 800 +2585T 334 +5T799 908 +69864 644 +659TK 278 +J4363 633 +T9J97 101 +QJ94T 615 +363J6 373 +J777J 379 +99J93 966 +TT26T 312 +TA8T8 870 +3J535 245 +86A63 283 +2KTK2 508 +Q9Q2Q 162 +59QJT 667 +6JJKQ 71 +55J25 200 +89993 980 +45474 581 +Q4394 159 +45697 346 +KK99Q 496 +J3J53 466 +3QQ3Q 348 +7843J 612 +T733K 164 +42589 818 +Q9K36 232 +QQ22Q 762 +5AA3J 287 +48KKK 449 +7QQQJ 248 +K5KJA 616 +KQ387 965 +Q4898 12 +A3T9Q 227 +K7KTT 269 +JTJ22 768 +85K88 875 +6T666 624 +97K7Q 586 +7854J 804 +T4TTT 609 +8T44T 415 +3T3KK 601 +5AAAJ 258 +8555K 828 +4Q8JQ 593 +JT823 396 +J9K96 838 +55565 632 +7J77T 713 +36353 578 +5Q962 529 +5KQ9T 181 +82697 627 +66654 88 +7747J 919 +A3AAJ 441 +569KJ 805 +TTQJ5 445 +444T4 661 +29959 37 +62J26 955 +Q4JT5 214 +KQA4T 44 +24424 758 +2Q4AK 222 +729A4 195 +4Q35T 928 +329T8 551 +6T5T5 33 +T25Q9 978 +9Q9J9 407 +A4KT7 911 +27397 603 +4244Q 490 +JA255 384 +2AAJ2 876 +6222K 125 +AA46A 360 +J4343 672 +JAJQ9 880 +888J2 468 +Q5K9J 268 +A85Q9 387 +J4A35 705 +66A64 97 +QAQQ8 700 +55TJ4 31 +88J58 650 +693AK 679 +259K2 806 +9998J 176 +6822T 235 +9J699 913 +7QQQQ 602 +T7T4T 317 +6226T 725 +JJ9J9 316 +55575 761 +A6A66 796 +K9T29 764 +33334 608 +KKK7K 893 +99988 579 +J8JJJ 259 +4AJ89 390 +9QQ84 14 +9KJ3K 580 +77736 433 +KK22K 555 +755J2 940 +4JA9A 492 +9Q555 484 +6J687 542 +99K53 910 +6236J 36 +9J999 54 +6663J 454 +85JJK 122 +966J3 171 +QJ2KK 747 +KJA2A 676 +788J5 858 +78833 218 +6KJ6J 308 +T75AT 318 +7JQ36 728 +AJ8TA 354 +96KTQ 899 +52993 402 +9K5AJ 898 +Q7JQJ 748 +5Q5QQ 48 +A5858 148 +85888 988 +2TJ82 556 +9AJK4 843 +TJ26Q 406 +2296K 356 +22K22 18 +KJ6KQ 253 +T444T 117 +6T257 715 +AA444 113 +39737 693 +877QQ 521 +TK454 735 +38QA8 562 +KT4A4 984 +JKKKK 920 +666J6 452 +8JAJT 280 +A62QJ 945 +868TT 243 +KQ66K 511 +J3J33 512 +T9K9K 160 +66TT3 537 +J3T48 234 +44999 158 +9876A 666 +JJ73Q 546 +85A3Q 20 +3333K 750 +6AJ73 381 +Q3Q58 637 +69644 654 +J6669 641 +8K2KK 733 +33535 447 +32K56 153 +TA94Q 994 +7979A 543 +Q663Q 432 +KQJ7Q 516 +66K65 6 +484T4 991 +88387 15 +96229 21 +7AK62 499 +88KK7 618 +3K344 69 +6A6KK 569 +22J24 784 +QKT53 837 +7K2KK 1 +87T95 810 +2228Q 82 +Q66AQ 548 +J6Q66 366 +5J42Q 465 +8QQJ8 246 +JAAKJ 630 +5TT99 408 +5T7Q6 779 +768A7 631 +22262 201 +664AA 104 +A96A6 128 +T666K 5 +3984K 684 +3335K 208 +79A77 891 +K7K76 285 +AQ8A6 678 +36535 130 +JT443 760 +477T9 547 +48A33 532 +AA66A 321 +56666 776 +3AQKJ 888 +K6Q68 83 +2J727 902 +3TT33 339 +85Q6T 714 +QT333 717 +7T74T 335 +J3A85 974 +8J888 617 +K974K 802 +8777Q 947 +A9Q6K 175 +77757 75 +7JA22 458 +3K499 791 +98TTJ 256 +5555J 505 +QTQQJ 70 +T232T 506 +Q9999 907 +J4A88 74 +A4K58 191 +K3888 263 +2QJ22 23 +3368Q 155 +QKKKQ 743 +JK222 139 +KQ84Q 905 +T25T2 91 +Q9TJJ 844 +QQ8Q8 720 +335KK 355 +29T76 963 +39AQ6 292 +27222 276 +88JJ8 388 +52A22 134 +7A95Q 86 +7TTTA 314 +9642K 187 +A33A3 416 +6Q66Q 92 +93A23 403 +77722 523 +33J34 196 +J8333 639 +K8TJ5 736 +222AA 116 +JT3TT 970 +87A65 225 +82555 459 +22JT2 255 +Q2223 972 +K63JA 143 +8AQ86 653 +JJ3J9 614 +3A77A 365 +KK9KT 47 +5T959 385 +7JKQ4 477 +497T3 711 +34A33 770 +57557 869 +777KJ 193 +KKK5Q 892 +9Q299 230 +34J83 795 +3KTTQ 692 +66696 695 +57472 960 +77J26 841 +TAT2T 685 +33969 662 +9Q393 295 +QKQ88 142 +TTT98 32 +25555 374 +265QK 924 +JAAJA 440 +9999K 257 +346KT 500 +JJ299 535 +QJ4KA 135 +7A422 305 +A2T85 773 +4T69J 52 +73Q8A 463 +KK6KK 420 +8Q7QJ 251 +QQK3K 168 +66644 150 +44424 444 +84T53 299 +AKAAK 240 +6A952 35 +Q5875 217 +22888 829 +38589 642 +94848 417 +32222 727 +966Q9 27 +JQ9QT 336 +52K2T 886 +J7787 721 +AAQ3A 147 +6K823 957 +6668Q 839 +AAA88 39 +KJ33K 4 +J5J5J 419 +2A7T9 275 +4A777 470 +7KK7K 377 +99992 418 +93TA8 865 +95T34 709 +K34JA 322 +94674 658 +AJAA7 45 +JQ22A 304 +K83Q2 13 +A6923 439 +98977 331 +689J6 769 +99953 931 +QQQJQ 94 +J5AA5 871 +TJTJT 413 +ATA28 530 +6T66T 564 +KAKKK 873 +T43QQ 657 +TTTT2 563 +9898J 118 +QQQQ8 659 +99997 236 +88826 188 +6KKK5 394 +2QQJ2 495 +8T864 900 +888K8 655 +28KQ4 361 +33732 472 +AA2A7 845 +TTT7T 726 +68A84 852 +3KKKK 161 +343Q2 358 +75792 476 +AAAJA 550 +KK9A9 558 +72569 737 +4AT33 708 +KKKQ9 119 +8JJJ6 315 +78A77 850 +JJQJ7 140 +3A5A5 740 +78278 344 +Q4Q44 103 +44JA4 146 +74T95 636 +2A2AT 507 +TK5Q5 474 +7T982 712 +AJ378 1000 +75858 494 +AAA99 746 +72T94 981 +TT77T 803 +393K3 124 +T8T95 265 +AJA66 244 +AA4TA 207 +44777 638 +68QT2 973 +9K628 340 +7595K 443 +9A949 682 +KJKTT 954 +23T26 100 +5KJ5T 434 +66626 81 +K33K3 856 +J7555 525 +JQJJ5 60 +868J6 935 +22299 823 +J4445 539 +9KKK7 890 +JAA48 80 +755Q5 520 +4JQQJ 223 +997T9 405 +8A888 575 +K369T 730 +A5565 847 +39JQ4 29 +QQQJJ 694 +86789 860 +333J3 10 +9A94A 221 +J99JT 62 +87888 701 +AA6A2 290 +T5QK4 775 +35354 927 +323Q3 451 +25TA5 883 +2954J 487 +376J6 594 +2K975 842 +AAAA6 986 diff --git a/src/adventofcode2023/data/day_07/day07_test.txt b/src/adventofcode2023/data/day_07/day07_test.txt new file mode 100644 index 00000000..e3500c3b --- /dev/null +++ b/src/adventofcode2023/data/day_07/day07_test.txt @@ -0,0 +1,5 @@ +32T3K 765 +T55J5 684 +KK677 28 +KTJJT 220 +QQQJA 483 diff --git a/src/adventofcode2023/data/day_08/day08.txt b/src/adventofcode2023/data/day_08/day08.txt new file mode 100644 index 00000000..d95e19ba --- /dev/null +++ b/src/adventofcode2023/data/day_08/day08.txt @@ -0,0 +1,716 @@ +LRRLRRLLRRRLRRLRLRRRLRRLRRRLRLLRRRLRRRLRLRRRLRRLRRLRLRLLLRRRLRRRLRRLRRLRLRRRLRRLLRRLRRLRLLRLRLRRLRLLRLRLRRRLRRLRLLRLRLLRRLRLRRLLLRLRRLRRRLLLRRLRLRRRLLRRLLLRRRLRRRLLLRRLLRLRRLRLRRLLLRLRRLLLLRRLLRRRLRRLRRLRLRLLRLRRRLLRRLLRRLRRLRRLRRLRLLRRLRRRLRLRLLLRRRLLRRRLRRLRRLLLLRRRR + +VRN = (CSM, GPD) +XDT = (QBK, PJR) +HVC = (MKM, TJS) +KRH = (BHN, PXB) +GTX = (VFD, TXR) +BQB = (MQV, PFQ) +TDV = (VSG, MJX) +VJM = (QHP, XMB) +KLG = (QLJ, HCV) +TSM = (JPG, DNP) +KHS = (QNR, DXJ) +FXM = (PHF, PHF) +RMV = (BMM, KHS) +QXL = (BKG, TLP) +MHS = (QXL, CFQ) +TBT = (TVT, BRD) +QXS = (GPP, RND) +XLL = (JHQ, LDV) +PBQ = (VXK, RJR) +FXB = (HMN, THX) +DPF = (GLX, GNC) +HVG = (HJF, SCH) +QMN = (DQJ, GMN) +MBS = (PFX, JHG) +VGL = (FHX, CCK) +QLV = (BLT, FDR) +MNS = (BDB, BMJ) +MMT = (TSM, SFR) +NRP = (FKB, QPH) +XFQ = (GTS, CCQ) +XFF = (HKG, NVL) +TXR = (VHQ, CKP) +VPL = (GHC, VMT) +SGC = (BGM, MJV) +SMS = (GJV, LSC) +BVC = (PRH, FJJ) +JHQ = (VJQ, XTX) +RJF = (GKK, NKX) +RJR = (JJQ, JTK) +VHQ = (JPS, JPS) +SFR = (JPG, DNP) +RDP = (GPD, CSM) +GGQ = (MVX, XBP) +XGK = (GBB, VPH) +XBH = (PTH, GSL) +MKG = (RBP, MGG) +FSG = (KFC, RMB) +NHC = (RQG, CVF) +SSV = (MVF, QFP) +RLP = (FXC, HCP) +FBZ = (FJF, CRJ) +HFL = (FKB, QPH) +NBM = (QBD, XGK) +NSP = (QKG, NDN) +TQF = (RMH, TDB) +RBB = (QTC, HPT) +CVF = (BSV, VTR) +XQG = (LFJ, JXD) +KXF = (CRJ, FJF) +MQC = (MQL, BSL) +RCC = (NHC, QLC) +TNT = (VKQ, NSX) +TVN = (NDN, QKG) +SCH = (FXB, NTM) +CVD = (XLJ, XDT) +QVF = (MQR, RDB) +GXS = (HCK, SHD) +KBD = (JHG, PFX) +KXV = (HVQ, QCJ) +MQR = (RNQ, SVC) +CBC = (SXB, BVC) +GKK = (HDR, LTF) +FRT = (CFQ, QXL) +VMT = (SQQ, DBB) +QPV = (NVQ, VVV) +XGD = (MPL, PMQ) +MNT = (JDD, NQC) +RGT = (QHD, SQP) +HXV = (RQD, RRX) +LGR = (FHX, CCK) +PHF = (CBV, TMC) +BTP = (JSC, QMN) +CXS = (SCH, HJF) +MQV = (FGJ, QPD) +HRZ = (CCX, BCF) +DDB = (DJK, CVD) +XNL = (QLJ, HCV) +GLX = (MGN, CFV) +QCJ = (NDK, XBR) +XBX = (CQM, VKD) +QPH = (XBH, CFG) +NSL = (LFJ, JXD) +DJQ = (VMN, STS) +RNV = (XFF, KSR) +JTR = (QLG, XRD) +VVV = (MDH, KHK) +TLR = (DMH, NXC) +GBH = (GLS, XLK) +LRN = (QRM, FMC) +BRM = (DCK, DSK) +GQS = (FXV, QPV) +XMT = (NHF, RXG) +KLR = (HFN, KDR) +SVH = (RMR, JLC) +QSG = (KQC, CMH) +VVX = (XGM, FNX) +BCF = (LNR, MTS) +RPJ = (RCC, CKG) +JJD = (NRP, HFL) +FGP = (MFS, RBB) +BJX = (BTD, KSC) +PQC = (VMN, STS) +JPG = (RQL, CSQ) +SLK = (JJC, BPJ) +JTK = (XHN, BFH) +HCV = (BRF, VPT) +VPH = (BVS, RRT) +MSH = (JQF, XFJ) +JHL = (QPF, QPF) +FGD = (MPC, TVB) +DCB = (JBC, XFB) +RKN = (TSL, VQG) +QBQ = (QLV, NRT) +MQX = (JSX, MCV) +XHX = (FNX, XGM) +DTL = (JDM, BDX) +LST = (JHL, CQN) +VGR = (HQV, HRZ) +CTQ = (XCF, TJK) +SQP = (HHB, NBM) +RRL = (TSL, VQG) +NNM = (DDS, XSF) +KHK = (HSG, NDF) +MGN = (VXT, VGV) +TLB = (DPK, MLV) +NMM = (TRR, XJH) +SJG = (XRJ, XBX) +GSC = (RRL, RKN) +KDR = (PSJ, TBM) +LRP = (SQP, QHD) +DKF = (MVR, QQB) +FHC = (BPT, BKC) +PLT = (JGG, GGQ) +XRD = (HMH, PBQ) +RHP = (JPD, XVL) +MXF = (MQR, RDB) +DML = (BRD, TVT) +CKP = (JPS, RBS) +BFK = (BCL, TLK) +KSR = (NVL, HKG) +XQF = (BMM, KHS) +BVJ = (CBL, PLC) +BCS = (RQF, GTB) +JCC = (VTT, VPQ) +BCL = (BNV, PDB) +HCK = (DDB, CBX) +SVG = (FGD, VQL) +BLT = (XNK, LHM) +MVQ = (LRG, NPB) +RND = (QCK, QRN) +HFR = (FBT, CLS) +KNK = (XDS, BCK) +XBB = (BRM, FDC) +XGM = (FFC, GJX) +PTN = (TQF, QKP) +RNQ = (GSC, XKH) +TPT = (CMK, KXT) +HPL = (CKB, QLR) +MVX = (QSG, TKJ) +QFP = (RLP, RSF) +GXF = (LNB, VNJ) +QHD = (NBM, HHB) +KSS = (LLH, PFK) +MFD = (XGJ, GGS) +JJQ = (XHN, BFH) +JDD = (HXV, FVH) +CFR = (FXM, FXM) +FDR = (XNK, LHM) +DHG = (BRS, TLR) +TDB = (SBS, XBB) +BVS = (GQH, BFS) +DGZ = (TMC, CBV) +HQD = (JSC, QMN) +TMZ = (XFB, JBC) +BRF = (MBF, KGJ) +RQG = (VTR, BSV) +CSQ = (FTS, RHR) +FFJ = (QCL, CTQ) +XKH = (RRL, RKN) +VJQ = (BTL, GQS) +NGK = (JGG, GGQ) +RQN = (GVG, SJN) +GRR = (RNV, FHF) +LSR = (VBL, SLK) +VQG = (QBV, NJV) +BHK = (BVJ, LJR) +BRS = (DMH, NXC) +NKX = (LTF, HDR) +QBD = (GBB, VPH) +RGQ = (CLM, FHK) +VXX = (KRH, VGN) +KRF = (VFQ, SMN) +XFR = (XGD, RMM) +JGC = (JGM, PFR) +SHD = (DDB, CBX) +QKG = (QTS, GXP) +CDL = (GLX, GNC) +RBP = (HKK, CMN) +CLN = (HDG, BHM) +XFX = (RNV, FHF) +AAA = (DXX, SVG) +FXC = (MMT, KLS) +PTF = (SKF, SDF) +QPF = (RQF, RQF) +DTB = (HQV, HQV) +RRF = (FNV, MKG) +MGG = (HKK, CMN) +NDF = (KMD, FFH) +DVL = (RKL, CLC) +JRQ = (BXV, BRB) +HVM = (DRT, SSV) +BHM = (KNK, BPP) +TDT = (DPS, VCP) +JPC = (DCH, FHD) +RSF = (FXC, HCP) +KSX = (BVJ, LJR) +NLT = (LTB, QBQ) +SBD = (NKX, GKK) +VQL = (MPC, TVB) +JXD = (MLK, LHN) +XNN = (TNT, LPQ) +HMH = (RJR, VXK) +JGG = (MVX, XBP) +PTP = (MVQ, NPS) +FQC = (XQF, RMV) +FXT = (TDH, JGD) +RGP = (CPN, KGF) +BTD = (NKN, NTQ) +BGM = (NRJ, CJN) +RMM = (PMQ, MPL) +DQJ = (DPF, CDL) +TVT = (TFJ, VJM) +TGL = (CGS, SJG) +NHF = (HVC, LVM) +NMK = (GRR, XFX) +QRN = (MMP, XSL) +FFH = (DJQ, PQC) +PDJ = (NQC, JDD) +CGS = (XBX, XRJ) +NTQ = (RXX, FLX) +CFB = (TVC, PTP) +GXK = (FLC, GXS) +RBS = (DCB, TMZ) +CFQ = (TLP, BKG) +QHP = (KVX, GSG) +HDJ = (RPH, QPK) +VXT = (GXF, JKM) +NCM = (NJL, TGL) +HFN = (TBM, PSJ) +JGF = (CFB, NMC) +JDM = (CLN, PHJ) +DJS = (RMR, JLC) +RDB = (RNQ, SVC) +RRX = (HQD, BTP) +HHS = (MXF, QVF) +MMP = (GTX, HKC) +JRK = (KKP, PTN) +TRR = (VGD, HGC) +JKM = (LNB, VNJ) +BRD = (TFJ, VJM) +TLK = (BNV, PDB) +QTS = (CHL, LSR) +BPP = (XDS, BCK) +RXX = (BKP, TLS) +VFD = (VHQ, VHQ) +BQF = (DHG, DQC) +XDL = (QVF, MXF) +ZZZ = (SVG, DXX) +GGB = (LTB, QBQ) +QTN = (JHL, CQN) +BVK = (BHQ, SSG) +VGB = (BXV, BRB) +QLR = (XFR, KNM) +QBK = (KNC, VJX) +BMJ = (JLK, TDV) +FDC = (DSK, DCK) +XDS = (SMS, TVR) +GBC = (NGK, PLT) +HPT = (XHQ, SXT) +FHK = (JCC, FJS) +KNM = (RMM, XGD) +GTB = (KLR, JVZ) +VCT = (PTN, KKP) +LDV = (XTX, VJQ) +KTK = (MQV, PFQ) +TVC = (MVQ, NPS) +BXV = (XLL, KDL) +BFA = (BCF, CCX) +CCF = (CLM, FHK) +JGS = (VCP, DPS) +RVK = (MKJ, QLH) +FNX = (FFC, GJX) +XBP = (QSG, TKJ) +LMJ = (FPH, JVL) +HKG = (VXX, RNX) +KMD = (DJQ, PQC) +BRB = (XLL, KDL) +NDK = (DJS, SVH) +BSV = (XVC, QXS) +TLS = (FSJ, MNS) +CRJ = (SGC, RNH) +BNV = (QSF, FSG) +SMN = (MNK, QGN) +JVV = (TRN, DVL) +JJC = (HBT, RPJ) +KSB = (XVL, JPD) +JJT = (TLB, DTJ) +TSL = (QBV, NJV) +GNV = (GCS, JLR) +HJF = (FXB, NTM) +VMN = (CFR, CFR) +GVG = (XDL, HHS) +LNB = (HMP, XMP) +RTL = (FXT, RCT) +XVC = (RND, GPP) +GNS = (MFS, RBB) +XTG = (LRM, DKQ) +JVZ = (KDR, HFN) +QQB = (XTG, GFG) +HMN = (FHC, FMN) +XLC = (FXT, RCT) +CKG = (QLC, NHC) +NJB = (DVL, TRN) +VCP = (LRF, HPL) +KQJ = (MXH, MXH) +GJV = (TPT, QNJ) +CCX = (LNR, MTS) +DTJ = (MLV, DPK) +HDX = (JSX, MCV) +XRJ = (VKD, CQM) +DMH = (RGP, KPR) +QGN = (VRF, QDL) +JSC = (DQJ, GMN) +BPT = (LLB, XNN) +CJN = (JJT, PGM) +XDV = (XVD, HJH) +JHG = (LLF, MLJ) +NKN = (FLX, RXX) +TGP = (XJH, TRR) +TLP = (XLC, RTL) +HQT = (SSN, BPS) +BKP = (MNS, FSJ) +VPT = (KGJ, MBF) +JSJ = (PFK, LLH) +CBX = (DJK, CVD) +TJK = (VGL, LGR) +THP = (TGL, NJL) +NSX = (SQL, GNV) +JQF = (VDM, JJD) +SDF = (JPC, KRV) +XNK = (HDJ, MQJ) +DSD = (SJN, GVG) +SBS = (FDC, BRM) +FPH = (NCM, THP) +LMR = (KQJ, BGV) +VKQ = (SQL, GNV) +FMC = (CPV, GBC) +HHB = (QBD, XGK) +HVQ = (NDK, XBR) +KXT = (JKG, NLS) +GJX = (TVP, JTR) +JLT = (MHM, MSH) +VNJ = (HMP, XMP) +TDH = (JGF, GGD) +VPQ = (HDX, MQX) +SKF = (JPC, KRV) +NXT = (RXG, NHF) +TRN = (CLC, RKL) +RRT = (BFS, GQH) +JFJ = (SXB, BVC) +KBR = (CGD, JGC) +PGG = (HFR, TJJ) +CMK = (JKG, NLS) +CBV = (FCX, KBR) +GMN = (DPF, CDL) +BTL = (QPV, FXV) +PFX = (MLJ, LLF) +DCT = (XLK, GLS) +PGM = (DTJ, TLB) +NVL = (VXX, RNX) +RPD = (TLK, BCL) +QDL = (FFJ, SFH) +JVL = (THP, NCM) +NVQ = (MDH, KHK) +TMC = (FCX, KBR) +LPQ = (NSX, VKQ) +RHR = (PPL, LCD) +JSX = (DHM, PMS) +DPK = (KBD, MBS) +LTF = (PGG, QPN) +BPS = (GXK, HCM) +HKC = (VFD, TXR) +PXB = (RPN, BQF) +FLX = (TLS, BKP) +PJR = (VJX, KNC) +PDB = (QSF, FSG) +NMC = (TVC, PTP) +MLP = (MSH, MHM) +PMQ = (KXV, QFJ) +FKB = (XBH, CFG) +JRV = (SMN, VFQ) +SQL = (GCS, JLR) +DXX = (FGD, VQL) +XMM = (GMG, LRN) +PFK = (HDL, XFQ) +XSL = (GTX, HKC) +CLC = (JRQ, VGB) +LMH = (KXF, FBZ) +NMX = (KSC, BTD) +GTJ = (KLG, XNL) +THX = (FMN, FHC) +RMH = (XBB, SBS) +SSG = (MFD, KFP) +QNR = (RBG, HNG) +DSK = (LMJ, FRP) +GQP = (FXM, XVT) +MFS = (QTC, HPT) +VHX = (VBD, RDD) +SQS = (GTJ, MSR) +LJR = (CBL, PLC) +QSF = (KFC, KFC) +DHM = (VFJ, DTL) +MDH = (NDF, HSG) +SSN = (HCM, GXK) +HCM = (FLC, GXS) +PQX = (FGG, BXR) +DQC = (BRS, TLR) +KRV = (DCH, FHD) +FNH = (SKF, SDF) +LFJ = (LHN, MLK) +MVR = (GFG, XTG) +HBT = (RCC, CKG) +VKD = (NMK, PFV) +TKJ = (KQC, CMH) +MRH = (RHV, ZZZ) +CKB = (XFR, KNM) +BMM = (DXJ, QNR) +KDL = (JHQ, LDV) +VFJ = (BDX, JDM) +PLC = (PND, GNP) +MNK = (QDL, VRF) +MXT = (RMV, XQF) +TJS = (PTF, FNH) +PHJ = (BHM, HDG) +FSJ = (BDB, BMJ) +CFV = (VGV, VXT) +XVD = (CBF, SQS) +TFJ = (QHP, XMB) +CPV = (PLT, NGK) +VTR = (XVC, QXS) +BKC = (XNN, LLB) +NPS = (NPB, LRG) +FXV = (NVQ, VVV) +FTS = (PPL, LCD) +HMP = (QMD, SNX) +VBD = (DTB, DTB) +VFQ = (QGN, MNK) +KFP = (GGS, XGJ) +BHN = (RPN, BQF) +PFV = (GRR, XFX) +QMD = (MGK, XDV) +MLK = (RPD, BFK) +GFG = (DKQ, LRM) +NLS = (BQB, KTK) +XLK = (HVG, CXS) +LSC = (QNJ, TPT) +FNV = (RBP, MGG) +HKK = (RCX, MQC) +GPD = (NSL, XQG) +RQL = (RHR, FTS) +HDB = (GHC, VMT) +HJH = (SQS, CBF) +QTC = (SXT, XHQ) +TRS = (BXR, FGG) +MTS = (DML, TBT) +RHV = (DXX, SVG) +XVL = (FGP, GNS) +GSG = (RRF, CSP) +VBL = (JJC, BPJ) +CCK = (RJF, SBD) +QPN = (TJJ, HFR) +PRH = (TGP, NMM) +PQT = (TRS, PQX) +QKP = (RMH, TDB) +XMP = (SNX, QMD) +QPD = (KRF, JRV) +RQD = (HQD, BTP) +XVT = (PHF, DGZ) +GXP = (CHL, LSR) +LHM = (MQJ, HDJ) +STS = (CFR, GQP) +FJJ = (NMM, TGP) +MPC = (CCF, RGQ) +MKM = (PTF, FNH) +QVH = (VBD, VBD) +XMB = (KVX, GSG) +CHL = (VBL, SLK) +XBR = (DJS, SVH) +KPR = (CPN, KGF) +MQL = (KSB, RHP) +CQM = (PFV, NMK) +XHQ = (HCR, HVM) +FFC = (JTR, TVP) +FMN = (BPT, BKC) +SNX = (MGK, XDV) +KNC = (QVJ, NNM) +DPS = (LRF, HPL) +GBB = (BVS, RRT) +BFH = (XMM, XQL) +GLS = (HVG, CXS) +RXG = (LVM, HVC) +MPL = (QFJ, KXV) +NXC = (KPR, RGP) +NJV = (TVN, NSP) +LLB = (LPQ, TNT) +SXT = (HVM, HCR) +LLH = (HDL, XFQ) +MLV = (KBD, MBS) +CBF = (GTJ, MSR) +JBC = (KTX, QQG) +FLC = (SHD, HCK) +FRP = (FPH, JVL) +BHQ = (MFD, KFP) +LNR = (DML, TBT) +CSP = (MKG, FNV) +GHC = (SQQ, DBB) +NRT = (BLT, FDR) +VTT = (HDX, MQX) +HSG = (FFH, KMD) +VGA = (CBV, TMC) +KLS = (TSM, SFR) +PFQ = (FGJ, QPD) +MKJ = (JLT, MLP) +MFX = (RVK, NSF) +QNJ = (KXT, CMK) +QBV = (NSP, TVN) +MSR = (KLG, XNL) +NSF = (QLH, MKJ) +DKQ = (JDR, DQQ) +PLH = (RVK, NSF) +JKG = (BQB, KTK) +LVM = (MKM, TJS) +QLJ = (VPT, BRF) +FVH = (RRX, RQD) +MJX = (DCT, GBH) +QLH = (MLP, JLT) +NPB = (XMT, NXT) +HDL = (CCQ, GTS) +JPS = (DCB, DCB) +CQN = (QPF, BCS) +GNP = (DSD, RQN) +JLK = (MJX, VSG) +PMS = (DTL, VFJ) +BFS = (JGS, TDT) +XJH = (VGD, HGC) +VRF = (SFH, FFJ) +BCK = (SMS, TVR) +DRT = (QFP, MVF) +PND = (DSD, RQN) +VSG = (GBH, DCT) +VGV = (JKM, GXF) +FHD = (MXT, FQC) +GPP = (QRN, QCK) +BDX = (CLN, PHJ) +LLF = (HQT, DCL) +DXA = (HFN, KDR) +MCV = (DHM, PMS) +NTM = (HMN, THX) +JLC = (RDP, VRN) +HQV = (BCF, CCX) +NDN = (QTS, GXP) +QVJ = (DDS, XSF) +MQJ = (RPH, QPK) +FGJ = (KRF, JRV) +LHN = (BFK, RPD) +MXH = (RHV, RHV) +HGC = (DNN, PQT) +MHM = (XFJ, JQF) +JGD = (JGF, GGD) +FCX = (JGC, CGD) +GCS = (LST, QTN) +RCX = (BSL, MQL) +XGJ = (VCT, JRK) +SXB = (FJJ, PRH) +LRG = (XMT, NXT) +XSF = (LRP, RGT) +DNP = (CSQ, RQL) +RKL = (VGB, JRQ) +KVX = (CSP, RRF) +JPD = (FGP, GNS) +GNC = (MGN, CFV) +PFR = (MHS, FRT) +DCK = (LMJ, FRP) +KKP = (TQF, QKP) +XQL = (GMG, LRN) +QCL = (TJK, XCF) +TVP = (XRD, QLG) +HDR = (QPN, PGG) +HLN = (BHQ, SSG) +GGS = (VCT, JRK) +SJN = (HHS, XDL) +DBB = (BHK, KSX) +QPK = (MFX, PLH) +MBF = (NLT, GGB) +BDB = (TDV, JLK) +KSC = (NKN, NTQ) +CPN = (HDB, VPL) +TVB = (RGQ, CCF) +VJX = (NNM, QVJ) +FBT = (JLL, LMR) +TVR = (GJV, LSC) +RNX = (KRH, VGN) +RPH = (MFX, PLH) +VJA = (JBC, XFB) +CLS = (JLL, LMR) +PSJ = (DKF, MSL) +QLG = (PBQ, HMH) +DXJ = (HNG, RBG) +XFB = (KTX, QQG) +TJJ = (FBT, CLS) +KFC = (JRF, JRF) +XFJ = (JJD, VDM) +RCT = (TDH, JGD) +RNH = (BGM, MJV) +VGD = (PQT, DNN) +KQC = (JFJ, CBC) +PPL = (JSJ, KSS) +HCR = (DRT, SSV) +XLJ = (PJR, QBK) +PTH = (QVH, VHX) +RQF = (KLR, KLR) +MSL = (MVR, QQB) +NRJ = (PGM, JJT) +JLL = (KQJ, KQJ) +DCL = (BPS, SSN) +GTS = (MNT, PDJ) +BXR = (NMX, BJX) +CBL = (PND, GNP) +VXK = (JJQ, JTK) +BSL = (RHP, KSB) +NJL = (SJG, CGS) +DQQ = (XHX, VVX) +SQQ = (BHK, KSX) +KTX = (BVK, HLN) +QCK = (XSL, MMP) +SVC = (GSC, XKH) +BGV = (MXH, MRH) +GMG = (QRM, FMC) +KGJ = (NLT, GGB) +LRF = (QLR, CKB) +CMN = (RCX, MQC) +CGD = (JGM, PFR) +LCD = (JSJ, KSS) +HDG = (BPP, KNK) +DDS = (LRP, RGT) +LRM = (DQQ, JDR) +CMH = (CBC, JFJ) +GQH = (TDT, JGS) +BKG = (RTL, XLC) +RMR = (VRN, RDP) +MGK = (XVD, HJH) +FJS = (VTT, VPQ) +SFH = (CTQ, QCL) +XHN = (XQL, XMM) +BPA = (CRJ, FJF) +XCF = (VGL, LGR) +TBM = (MSL, DKF) +JLR = (LST, QTN) +QFJ = (HVQ, QCJ) +CCQ = (MNT, PDJ) +VGN = (PXB, BHN) +LTB = (QLV, NRT) +DCH = (MXT, FQC) +CFG = (PTH, GSL) +JRF = (KXF, KXF) +QRM = (CPV, GBC) +XTX = (BTL, GQS) +FHX = (SBD, RJF) +FHF = (KSR, XFF) +CSM = (NSL, XQG) +HCP = (MMT, KLS) +DJK = (XDT, XLJ) +QLC = (CVF, RQG) +MLJ = (HQT, DCL) +CLM = (JCC, FJS) +NQC = (HXV, FVH) +RDD = (DTB, VGR) +RPN = (DQC, DHG) +GSL = (QVH, VHX) +FGG = (NMX, BJX) +BPJ = (RPJ, HBT) +RBG = (NJB, JVV) +FJF = (SGC, RNH) +GGD = (CFB, NMC) +QQG = (HLN, BVK) +MVF = (RLP, RSF) +JGM = (MHS, FRT) +RMB = (JRF, LMH) +VDM = (HFL, NRP) +HNG = (NJB, JVV) +MJV = (CJN, NRJ) +DNN = (PQX, TRS) +JDR = (XHX, VVX) +KGF = (HDB, VPL) diff --git a/src/adventofcode2023/data/day_08/day08_test_1.txt b/src/adventofcode2023/data/day_08/day08_test_1.txt new file mode 100644 index 00000000..9029a1b2 --- /dev/null +++ b/src/adventofcode2023/data/day_08/day08_test_1.txt @@ -0,0 +1,9 @@ +RL + +AAA = (BBB, CCC) +BBB = (DDD, EEE) +CCC = (ZZZ, GGG) +DDD = (DDD, DDD) +EEE = (EEE, EEE) +GGG = (GGG, GGG) +ZZZ = (ZZZ, ZZZ) diff --git a/src/adventofcode2023/data/day_08/day08_test_2.txt b/src/adventofcode2023/data/day_08/day08_test_2.txt new file mode 100644 index 00000000..7d1b58d4 --- /dev/null +++ b/src/adventofcode2023/data/day_08/day08_test_2.txt @@ -0,0 +1,5 @@ +LLR + +AAA = (BBB, BBB) +BBB = (AAA, ZZZ) +ZZZ = (ZZZ, ZZZ) diff --git a/src/adventofcode2023/data/day_08/day08_test_3.txt b/src/adventofcode2023/data/day_08/day08_test_3.txt new file mode 100644 index 00000000..5b3fa585 --- /dev/null +++ b/src/adventofcode2023/data/day_08/day08_test_3.txt @@ -0,0 +1,10 @@ +LR + +11A = (11B, XXX) +11B = (XXX, 11Z) +11Z = (11B, XXX) +22A = (22B, XXX) +22B = (22C, 22C) +22C = (22Z, 22Z) +22Z = (22B, 22B) +XXX = (XXX, XXX) diff --git a/src/adventofcode2023/data/day_09/day09.txt b/src/adventofcode2023/data/day_09/day09.txt new file mode 100644 index 00000000..3a91709c --- /dev/null +++ b/src/adventofcode2023/data/day_09/day09.txt @@ -0,0 +1,200 @@ +14 28 56 121 263 554 1131 2270 4549 9201 18855 39034 81081 167714 343319 692592 1373532 2674454 5110126 9579947 17622015 +-3 1 11 21 24 22 39 132 395 951 1927 3407 5358 7524 9283 9462 6105 -3811 -24717 -62855 -126748 +19 33 58 112 229 464 911 1744 3295 6199 11669 22016 41599 78474 147102 272564 496803 887453 1549804 2642368 4396329 +9 14 20 26 31 40 83 250 745 1962 4586 9722 19055 35044 61153 102122 164281 255910 387648 572954 828623 +3 -2 -10 -22 -42 -79 -137 -181 -56 698 3260 10419 28423 70739 165664 371788 809539 1725541 3623323 7526796 15506848 +-1 -7 -15 -19 5 111 398 1033 2286 4580 8558 15168 25766 42236 67125 103790 156553 230859 333431 472415 657507 +14 23 56 138 310 639 1231 2241 3872 6352 9875 14499 20039 26137 33053 44522 75675 172337 454665 1211606 3100405 +12 21 39 74 141 262 466 789 1274 1971 2937 4236 5939 8124 10876 14287 18456 23489 29499 36606 44937 +19 29 48 92 202 465 1054 2295 4779 9575 18693 36148 70395 139749 284055 589010 1235351 2595681 5420598 11189176 22757108 +12 24 49 105 234 529 1186 2594 5491 11242 22336 43253 81919 152047 276755 493958 864150 1481324 2487923 4094873 6607920 +8 17 32 60 131 322 790 1822 3922 7967 15476 29048 53037 94544 164818 281170 469516 767677 1229576 1930484 2973479 +21 39 80 160 312 605 1168 2216 4067 7127 11804 18292 26142 33509 35932 24468 -17039 -115817 -315464 -683048 -1318428 +12 32 56 77 81 45 -58 -246 -501 -706 -490 1140 6616 21501 57778 139897 315366 672532 1369348 2678423 5055571 +2 0 4 23 72 182 414 874 1730 3257 5990 11154 21677 44312 93775 200496 424830 882778 1792004 3553021 6889970 +27 56 106 186 321 579 1126 2320 4859 10010 19966 38406 71369 128597 225554 386388 648171 1066828 1725250 2744178 4296545 +3 21 58 118 205 323 476 668 903 1185 1518 1906 2353 2863 3440 4088 4811 5613 6498 7470 8533 +18 33 50 63 69 73 95 194 538 1563 4278 10787 25113 54423 110767 213458 392234 691357 1174818 1932831 3089813 +7 -1 -11 -22 -33 -43 -51 -56 -57 -53 -43 -26 -1 33 77 132 199 279 373 482 607 +13 20 39 92 216 463 900 1609 2687 4246 6413 9330 13154 18057 24226 31863 41185 52424 65827 81656 100188 +23 46 90 174 325 593 1077 1967 3613 6643 12187 22368 41474 78745 154662 314266 653811 1371804 2863764 5894602 11908011 +20 33 51 78 119 185 304 540 1022 1995 3941 7903 16309 34873 76590 169493 370760 791013 1634311 3261484 6287171 +29 46 72 118 201 341 565 933 1616 3082 6483 14384 32034 69449 144658 288555 551903 1015150 1801842 3096554 5168407 +-3 -8 -13 -18 -23 -28 -33 -38 -43 -48 -53 -58 -63 -68 -73 -78 -83 -88 -93 -98 -103 +24 49 94 175 315 555 990 1859 3731 7848 16715 35063 71341 139891 263884 478884 836478 1406655 2276400 3540123 5274867 +10 23 39 67 134 294 650 1398 2901 5797 11150 20707 37510 67571 124264 238823 483264 1016695 2172997 4618055 9619058 +9 29 57 98 163 272 465 822 1498 2804 5421 10932 23008 49799 108371 232406 484855 977815 1902601 3573814 6492177 +7 -2 -5 17 99 309 790 1855 4176 9121 19306 39442 77570 146790 267603 470998 802429 1326840 2134909 3350695 5140885 +5 25 54 97 161 251 366 495 613 677 622 357 -239 -1321 -3082 -5757 -9627 -15023 -22330 -31991 -44511 +2 7 17 45 131 360 880 1920 3818 7093 12650 22317 40111 74970 146279 294605 602193 1232162 2504430 5044920 10081198 +25 49 87 140 209 295 399 522 665 829 1015 1224 1457 1715 1999 2310 2649 3017 3415 3844 4305 +14 24 43 86 181 368 711 1346 2613 5375 11735 26556 60512 135901 297189 629280 1287864 2547906 4878395 9053818 16315343 +8 16 17 7 -18 -62 -129 -223 -348 -508 -707 -949 -1238 -1578 -1973 -2427 -2944 -3528 -4183 -4913 -5722 +16 34 58 101 186 346 624 1073 1756 2746 4126 5989 8438 11586 15556 20481 26504 33778 42466 52741 64786 +27 43 67 103 162 275 521 1087 2388 5301 11626 25012 52845 110125 227416 466980 954921 1943671 3930069 7871917 15573412 +8 11 23 53 103 180 320 632 1392 3245 7597 17284 37571 77436 150902 277859 483328 793415 1225235 1766799 2341191 +-8 -8 0 32 122 333 779 1674 3438 6911 13758 27204 53351 103562 198851 378040 712850 1335454 2488122 4612280 8509902 +0 -1 -5 -5 23 130 408 1017 2253 4729 9824 20691 44318 95420 203319 423457 855798 1673123 3163121 5789243 10276529 +11 15 19 23 27 31 35 39 43 47 51 55 59 63 67 71 75 79 83 87 91 +15 14 20 54 147 336 660 1162 1909 3055 5012 8898 17671 38877 91013 217640 517478 1206335 2740499 6055505 13016002 +2 -4 -8 3 44 127 256 422 598 734 752 541 -48 -1207 -3176 -6248 -10774 -17168 -25912 -37561 -52748 +23 31 41 74 173 408 878 1710 3055 5081 7963 11870 16949 23306 30984 39938 50007 60883 72077 82882 92333 +7 8 11 18 34 77 197 499 1159 2416 4517 7581 11317 14447 13488 142 -44205 -159640 -429293 -1019020 -2247008 +4 10 16 38 118 343 879 2042 4436 9186 18277 34973 64228 112909 189524 302981 459692 658074 879182 1071832 1130130 +1 13 39 99 237 533 1112 2142 3812 6282 9604 13640 18084 22910 30111 48933 110020 301296 854730 2347394 6148964 +0 -9 -24 -33 4 170 612 1583 3531 7284 14428 28063 54267 104819 202050 387129 733674 1369333 2508936 4504007 7914878 +9 18 33 70 151 311 620 1239 2544 5367 11418 23967 48880 96118 181823 331130 581859 989256 1631967 2619444 4100997 +9 14 23 36 53 74 99 128 161 198 239 284 333 386 443 504 569 638 711 788 869 +13 25 40 66 121 246 529 1140 2377 4723 8914 16018 27525 45448 72435 111892 168117 246445 353404 496882 686305 +14 29 44 61 89 158 351 870 2163 5158 11698 25389 53327 109659 222816 449832 904062 1808185 3595410 7103715 13950703 +14 26 54 98 153 206 227 152 -137 -808 -1966 -3221 -2494 6774 41457 139973 382532 925766 2059406 4295648 8505623 +2 11 23 38 64 123 266 607 1400 3212 7304 16450 36645 80537 174042 368560 762618 1538757 3024209 5787554 10788306 +6 7 25 87 235 526 1032 1840 3052 4785 7171 10357 14505 19792 26410 34566 44482 56395 70557 87235 106711 +10 25 53 116 259 559 1148 2260 4314 8054 14783 26751 47787 84302 146834 252357 427634 713959 1173705 1899174 3024331 +24 36 50 77 148 333 777 1758 3773 7666 14837 27646 50332 91269 168480 322548 645294 1340369 2845850 6073450 12861288 +12 15 30 80 197 426 832 1522 2710 4871 9065 17592 35299 72139 148031 301779 606960 1199651 2326312 4426252 8273793 +-2 9 40 101 205 381 700 1323 2596 5241 10727 21960 44523 88856 174043 334351 630474 1168765 2133866 3843451 6838793 +6 10 10 11 36 141 433 1107 2530 5410 11103 22140 43105 82062 152799 278197 494986 859934 1457012 2404133 3856478 +8 15 23 35 51 73 113 211 494 1357 3950 11353 31179 80964 198740 462887 1028108 2188775 4487913 8901223 17143107 +11 15 34 94 233 497 938 1623 2673 4380 7520 14120 29183 64270 144432 320835 692591 1442869 2896390 5607994 10495197 +14 21 31 44 60 79 101 126 154 185 219 256 296 339 385 434 486 541 599 660 724 +26 45 80 156 313 614 1171 2201 4138 7862 15171 29726 58851 116779 230210 447397 852410 1586755 2881154 5101032 8810117 +5 22 64 142 265 438 651 851 889 437 -1121 -4798 -12040 -24526 -43411 -67432 -88895 -85964 -8818 243946 863895 +6 1 -4 -9 -14 -19 -24 -29 -34 -39 -44 -49 -54 -59 -64 -69 -74 -79 -84 -89 -94 +20 26 33 46 69 114 217 462 1032 2346 5427 12820 30700 73352 172059 391723 860467 1820397 3712384 7315609 13976426 +4 15 39 76 126 189 265 354 456 571 699 840 994 1161 1341 1534 1740 1959 2191 2436 2694 +-6 1 16 35 54 69 76 71 50 9 -56 -149 -274 -435 -636 -881 -1174 -1519 -1920 -2381 -2906 +14 24 37 64 131 291 650 1405 2899 5716 10865 20131 36696 66145 117960 207556 358812 606880 1000797 1605058 2498809 +0 12 45 125 301 652 1308 2513 4769 9115 17633 34380 67219 131660 259205 515543 1039634 2125851 4392779 9122926 18933417 +11 28 56 98 159 238 330 466 833 2030 5545 14617 35841 82291 179753 379184 781311 1584428 3175934 6305560 12409707 +12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 +0 12 46 115 241 475 938 1891 3842 7698 14970 28039 50491 87529 146470 237335 373540 572696 857526 1256907 1807045 +21 32 62 133 287 597 1173 2168 3798 6414 10727 18424 33672 66451 139366 300661 647715 1367484 2803332 5561663 10676949 +30 45 67 118 231 460 908 1785 3524 7003 13944 27585 53747 102447 190251 343647 603906 1034293 1731257 2842620 4598159 +14 14 16 25 44 69 84 56 -70 -376 -976 -2021 -3704 -6265 -9996 -15246 -22426 -32014 -44560 -60691 -81116 +22 32 43 50 43 7 -78 -237 -500 -902 -1483 -2288 -3367 -4775 -6572 -8823 -11598 -14972 -19025 -23842 -29513 +16 19 21 30 66 171 421 940 1916 3619 6421 10818 17454 27147 40917 60016 85960 120563 165973 224710 299706 +19 37 74 139 242 405 685 1208 2222 4192 7972 15095 28244 52077 94928 172751 318390 602318 1175903 2355506 4775763 +-2 4 30 96 231 485 964 1894 3716 7208 13636 24979 44385 77231 133514 232821 413834 751228 1383906 2559754 4703435 +6 24 54 101 184 348 678 1318 2519 4778 9199 18334 37993 80936 174177 373301 790724 1652238 3411282 6979903 14190706 +18 30 50 78 114 158 210 270 338 414 498 590 690 798 914 1038 1170 1310 1458 1614 1778 +-1 9 37 102 230 464 893 1714 3360 6761 13869 28692 59269 121305 244607 484069 937821 1776397 3288557 5951958 10540544 +19 42 74 123 209 379 747 1586 3507 7778 16875 35424 71791 140705 267452 494347 890363 1564954 2687232 4511721 7411885 +24 35 48 67 108 223 534 1271 2819 5804 11284 21161 39028 71919 134086 255471 500884 1012731 2103598 4450869 9494278 +19 32 58 110 217 431 847 1654 3240 6379 12533 24307 46100 85000 151976 263425 443137 724746 1154740 1796108 2732707 +-7 -2 10 35 101 279 708 1620 3361 6404 11350 18913 29885 45077 65232 90906 122313 159130 200258 243535 285397 +15 31 51 71 86 90 76 36 -39 -159 -335 -579 -904 -1324 -1854 -2510 -3309 -4269 -5409 -6749 -8310 +5 11 34 86 184 367 726 1443 2833 5388 9838 17275 29436 49314 82366 138718 236933 410113 715354 1247868 2161432 +12 33 60 93 132 177 228 285 348 417 492 573 660 753 852 957 1068 1185 1308 1437 1572 +13 11 9 7 5 3 1 -1 -3 -5 -7 -9 -11 -13 -15 -17 -19 -21 -23 -25 -27 +23 47 92 177 331 607 1112 2057 3833 7137 13216 24387 45168 84690 161676 314408 620255 1233543 2458876 4893321 9701941 +7 7 3 -12 -51 -140 -320 -622 -966 -887 1087 8694 30271 82765 198179 433293 883429 1700687 3116311 5465452 9210333 +18 30 54 104 197 357 630 1121 2064 3936 7626 14670 27563 50159 88170 149775 246350 393330 611214 926724 1374129 +4 13 40 106 253 562 1175 2321 4346 7747 13210 21652 34267 52576 78481 114323 162944 227753 312796 422830 563401 +2 16 40 71 111 185 383 936 2336 5511 12077 24733 47983 89624 163920 298208 546006 1011706 1894870 3566283 6693583 +26 38 50 62 74 86 98 110 122 134 146 158 170 182 194 206 218 230 242 254 266 +4 21 45 75 122 216 417 839 1699 3406 6708 12918 24243 44243 78450 135180 226574 369907 589207 917229 1397832 +-8 -18 -28 -19 48 236 644 1443 2957 5816 11217 21343 40011 73650 132751 233985 403254 680026 1123410 1820553 2898090 +25 37 64 116 202 337 552 919 1631 3222 7083 16554 39103 90537 202996 439959 924174 1889257 3774365 7396820 14265161 +14 15 23 53 133 320 720 1511 2968 5481 9550 15766 24902 38530 61169 106032 208307 453348 1034086 2366996 5329344 +30 46 73 117 186 303 526 975 1866 3552 6571 11701 20022 32985 52488 80959 121446 177714 254349 356869 491842 +7 2 12 55 167 412 891 1754 3226 5687 9926 17861 34341 71217 155842 347784 770197 1666568 3500268 7124627 14066671 +11 16 33 72 150 308 651 1430 3190 7020 14976 30832 61488 119689 229271 435065 821009 1542132 2879119 5328428 9746750 +5 16 39 82 153 260 411 614 877 1208 1615 2106 2689 3372 4163 5070 6101 7264 8567 10018 11625 +5 11 31 79 169 315 531 831 1229 1739 2375 3151 4081 5179 6459 7935 9621 11531 13679 16079 18745 +11 25 46 83 156 309 628 1264 2461 4589 8182 13981 22982 36489 56172 84130 122959 175825 246542 339655 460528 +7 17 37 84 196 451 987 2032 3962 7409 13440 23822 41377 70415 117212 190474 301697 465297 698343 1019680 1448178 +-7 -12 -10 8 63 205 531 1203 2472 4736 8705 15821 29209 55687 109905 222838 459183 952588 1975388 4072510 8309999 +-3 -5 -7 -13 -22 -10 102 505 1603 4185 9703 20699 41432 78764 143372 251361 426361 702199 1126245 1763539 2701814 +11 15 20 30 70 208 588 1490 3452 7527 15830 32692 67028 137005 278839 562647 1119837 2188659 4187404 7828486 14291454 +-3 -6 -10 -5 27 110 270 529 897 1362 1878 2351 2623 2454 1502 -699 -4763 -11478 -21834 -37053 -58621 +6 28 62 108 166 236 318 412 518 636 766 908 1062 1228 1406 1596 1798 2012 2238 2476 2726 +11 27 62 128 243 438 770 1345 2361 4187 7500 13508 24293 43314 76116 131297 221791 366531 592562 937680 1453679 +9 5 -7 -21 -23 7 93 261 537 945 1505 2231 3129 4195 5413 6753 8169 9597 10953 12131 13001 +8 18 31 65 164 408 930 1951 3844 7238 13173 23317 40256 67868 111792 180003 283504 437146 660587 979401 1426348 +9 17 46 110 238 490 982 1933 3767 7338 14409 28639 57570 116539 236173 476286 950733 1870247 3613656 6842308 12678166 +19 46 93 168 277 424 629 975 1690 3262 6574 13032 24642 43972 73912 117119 175005 246094 323539 391552 420459 +6 5 14 57 173 416 855 1574 2672 4263 6476 9455 13359 18362 24653 32436 41930 53369 67002 83093 101921 +6 22 52 117 248 495 952 1814 3503 6941 14122 29255 60929 126002 256252 509262 985556 1854672 3393664 6042481 10481790 +25 42 74 145 291 563 1034 1806 3009 4780 7206 10211 13363 15573 14654 6704 -14727 -59730 -143438 -287787 -523693 +20 38 83 179 371 744 1462 2840 5462 10358 19253 34901 61517 105320 175200 283522 447080 688214 1036103 1528247 2212151 +9 14 28 57 119 268 642 1549 3610 7985 16717 33240 63110 115033 202281 344606 570783 921936 1455826 2252307 3420185 +6 4 1 9 61 230 656 1594 3521 7391 15228 31435 65523 137497 287977 596446 1213093 2413074 4687570 8895407 16515070 +3 2 11 44 121 268 517 906 1479 2286 3383 4832 6701 9064 12001 15598 19947 25146 31299 38516 46913 +19 38 72 123 193 284 398 537 703 898 1124 1383 1677 2008 2378 2789 3243 3742 4288 4883 5529 +16 21 27 34 42 51 61 72 84 97 111 126 142 159 177 196 216 237 259 282 306 +-6 -6 1 28 102 286 716 1653 3550 7134 13503 24238 41530 68322 108466 166895 249810 364882 521469 730848 1006462 +8 3 8 29 74 154 292 566 1238 3067 7976 20352 49440 113652 248414 521011 1059980 2115267 4182768 8260087 16360846 +3 10 36 98 225 469 931 1806 3457 6550 12336 23281 44463 86522 171490 343511 687182 1356910 2621513 4930598 9016916 +24 44 72 113 188 350 705 1436 2842 5429 10133 18849 35662 69680 141457 297259 640012 1394806 3044098 6599693 14135664 +5 23 46 78 141 292 658 1507 3392 7442 15945 33512 69400 142119 288415 580329 1156575 2278345 4425344 8456050 15867759 +19 31 52 91 163 295 542 1029 2058 4356 9601 21479 47778 104593 224933 476452 997557 2069089 4251986 8642359 17327613 +4 2 -3 -11 -22 -36 -53 -73 -96 -122 -151 -183 -218 -256 -297 -341 -388 -438 -491 -547 -606 +1 5 12 26 58 141 367 960 2399 5605 12206 24894 47888 87517 152937 256996 417261 657221 1007680 1508354 2209686 +17 29 58 112 208 382 694 1224 2053 3222 4662 6102 7035 7065 7605 17388 67347 246313 779428 2188570 5601476 +1 21 53 109 230 501 1077 2228 4420 8467 15819 29101 53101 96539 175157 316980 571043 1021497 1809841 3169125 5475384 +6 21 40 63 90 121 156 195 238 285 336 391 450 513 580 651 726 805 888 975 1066 +7 9 18 42 92 195 412 861 1761 3546 7162 14781 31389 68112 148903 323701 694248 1465287 3047717 6268886 12802095 +5 20 44 81 151 296 585 1118 2029 3488 5702 8915 13407 19492 27515 37848 50885 67036 86720 110357 138359 +12 25 48 83 132 197 280 383 508 657 832 1035 1268 1533 1832 2167 2540 2953 3408 3907 4452 +9 18 27 36 45 54 63 72 81 90 99 108 117 126 135 144 153 162 171 180 189 +12 23 45 102 243 557 1202 2475 4967 9867 19502 38226 73800 139437 256721 459647 800070 1354895 2235387 3599030 5664417 +3 17 44 89 158 248 336 379 350 358 952 3825 13369 39967 106658 262035 604149 1323079 2774060 5599113 10923592 +11 23 52 107 213 422 827 1595 3059 5953 11953 24829 52768 112877 239639 500344 1022479 2041031 3978006 7572651 14089435 +12 14 16 19 27 62 192 572 1498 3474 7292 14125 25633 44082 72476 114702 175688 261574 379896 539783 752167 +28 48 74 105 145 217 399 897 2167 5090 11196 22932 43980 79652 137403 227465 363422 562048 840630 1207839 1640299 +16 35 63 113 218 437 868 1681 3189 5980 11135 20566 37573 67968 122808 225380 428334 852889 1772455 3780047 8105492 +1 14 31 52 91 183 397 865 1833 3743 7376 14140 26700 50375 96197 187510 374013 761176 1570593 3260648 6760765 +16 36 75 141 237 369 561 882 1499 2791 5603 11801 25433 55042 118055 248718 511768 1024907 1994131 3767032 6910279 +25 36 52 74 96 98 46 -91 -289 -338 465 3999 14786 43076 111239 266808 608598 1337857 2856019 5946873 12107729 +4 16 35 56 74 84 81 60 16 -56 -161 -304 -490 -724 -1011 -1356 -1764 -2240 -2789 -3416 -4126 +14 24 48 106 223 431 780 1365 2384 4273 8048 16163 34532 76973 174400 392907 867870 1865866 3893160 7879276 15477025 +12 27 58 128 271 536 991 1727 2876 4689 7779 13743 26594 55885 123345 276760 618632 1364483 2959404 6306378 13203773 +21 31 50 96 212 477 1014 1995 3643 6231 10078 15542 23010 32885 45570 61449 80865 104095 131322 162604 197840 +8 19 34 61 115 220 411 736 1258 2057 3232 4903 7213 10330 14449 19794 26620 35215 45902 59041 75031 +2 12 36 82 173 352 698 1374 2748 5657 11931 25388 53717 112108 230379 467029 936622 1861910 3670142 7165434 13827661 +7 31 77 155 276 461 764 1321 2445 4804 9758 20010 40874 82732 165735 328658 645299 1254301 2412331 4586949 8615296 +24 41 66 106 179 327 645 1339 2828 5907 11990 23454 44107 79805 139245 234963 384568 612245 950562 1442618 2144571 +14 17 19 26 55 143 366 890 2091 4810 10865 24038 51904 109084 222798 441980 851708 1595311 2907255 5160794 8935413 +5 16 32 63 132 279 569 1104 2039 3602 6118 10037 15966 24705 37287 55022 79545 112868 157436 216187 292616 +18 32 53 81 120 198 401 921 2118 4596 9293 17585 31404 53370 86937 136553 207834 307752 444837 629393 873728 +16 28 45 64 92 167 391 975 2296 4966 9913 18474 32500 54473 87635 136129 205152 301120 431845 606724 836940 +8 4 -7 -24 -39 -36 10 134 382 812 1495 2516 3975 5988 8688 12226 16772 22516 29669 38464 49157 +10 15 29 73 187 432 885 1625 2720 4258 6537 10673 20162 44465 106733 259895 619607 1431209 3205097 6988666 14907396 +15 24 40 64 113 230 501 1094 2350 4987 10534 22215 46697 97476 201316 410242 823341 1625334 3152912 6005630 11226269 +0 5 11 31 94 258 631 1405 2924 5837 11436 22352 43884 86372 169200 327234 620768 1150373 2078425 3659533 6282602 +-1 9 40 102 205 359 574 860 1227 1685 2244 2914 3705 4627 5690 6904 8279 9825 11552 13470 15589 +0 3 14 33 60 95 138 189 248 315 390 473 564 663 770 885 1008 1139 1278 1425 1580 +3 17 38 81 176 380 802 1643 3253 6207 11402 20177 34458 56930 91238 142219 216167 321133 467262 667169 936356 +14 20 30 44 62 84 110 140 174 212 254 300 350 404 462 524 590 660 734 812 894 +17 31 64 121 211 349 556 867 1374 2370 4737 10865 26662 65748 157985 366599 822270 1790440 3802693 7909280 16155408 +15 36 84 186 389 774 1490 2822 5321 10057 19112 36507 69844 133018 250377 462624 834487 1463630 2489312 4097764 6518955 +13 26 40 57 79 108 146 195 257 334 428 541 675 832 1014 1223 1461 1730 2032 2369 2743 +6 11 20 33 50 71 96 125 158 195 236 281 330 383 440 501 566 635 708 785 866 +-3 -2 8 37 95 192 338 543 817 1170 1612 2153 2803 3572 4470 5507 6693 8038 9552 11245 13127 +10 7 1 -9 -28 -57 -71 22 445 1647 4458 10395 22371 46454 96245 203494 442940 988347 2234695 5056651 11340670 +12 25 41 69 133 288 656 1489 3269 6859 13719 26195 47893 84220 143433 239205 397142 670373 1173977 2155505 4130321 +-6 -9 -1 41 156 405 877 1695 3022 5067 8091 12413 18416 26553 37353 51427 69474 92287 120759 155889 198788 +10 27 63 135 272 524 984 1825 3348 6031 10571 17947 29674 48841 83611 157378 335212 787365 1932553 4745545 11391002 +15 25 43 69 103 145 195 253 319 393 475 565 663 769 883 1005 1135 1273 1419 1573 1735 +26 43 79 142 244 415 734 1402 2895 6248 13534 28615 58255 113698 212827 383033 664936 1117113 1822001 2893156 4484062 +19 31 41 57 109 262 642 1485 3217 6575 12787 23852 43034 75899 132773 234729 427691 813843 1617513 3315823 6885023 +11 38 88 177 326 561 913 1418 2117 3056 4286 5863 7848 10307 13311 16936 21263 26378 32372 39341 47386 +14 25 50 106 231 497 1030 2036 3827 6844 11699 19336 31610 53040 95472 189401 409732 931699 2148060 4908018 10992969 +2 10 29 66 130 228 359 501 592 521 166 -458 -840 769 8798 33101 94134 232596 527027 1125106 2297718 +10 16 24 34 55 128 377 1110 3015 7538 17609 39032 83124 171641 345765 682118 1320736 2513256 4705242 8676246 15777445 +-1 0 16 62 165 371 752 1413 2499 4202 6768 10504 15785 23061 32864 45815 62631 84132 111248 145026 186637 +4 13 45 119 276 588 1169 2198 3969 6991 12172 21141 36826 64615 114998 209912 397708 786612 1614895 3388996 7139814 +5 21 44 84 159 301 579 1152 2369 4937 10182 20432 39555 73689 132205 228948 383805 624653 989744 1530588 2315399 +11 19 36 73 161 362 774 1536 2861 5159 9363 17649 34861 71134 146477 298464 594719 1152611 2169542 3968465 7064865 +20 46 96 190 372 723 1368 2468 4196 6726 10325 15739 25214 44701 88069 184501 390684 809934 1621030 3120276 5781176 +1 5 21 65 173 422 972 2139 4513 9138 17782 33365 60715 108031 189805 332561 585689 1040979 1866299 3361329 6046489 +16 42 87 160 272 436 667 982 1400 1942 2631 3492 4552 5840 7387 9226 11392 13922 16855 20232 24096 +15 26 57 134 309 681 1425 2829 5339 9612 16577 27504 44081 68499 103545 152703 220263 311438 432489 590858 795309 +7 17 37 79 165 343 715 1480 2993 5839 10919 19543 33523 55257 87793 134860 200851 290741 409921 563927 758041 +8 18 45 98 186 318 503 750 1068 1466 1953 2538 3230 4038 4971 6038 7248 8610 10133 11826 13698 +22 41 74 129 229 436 893 1897 4024 8347 16841 33195 64519 124952 243102 476797 941082 1859125 3651148 7084229 13516489 +7 17 42 99 225 488 1004 1985 3868 7619 15373 31669 65692 135206 273401 540985 1048083 1994786 3746952 6977130 12921917 +8 15 38 96 232 520 1072 2056 3755 6726 12167 22697 43966 87990 180160 374080 782726 1642429 3440152 7157650 14722640 +9 30 64 108 169 286 561 1193 2519 5090 9842 18456 34031 62212 112905 202639 357449 615843 1031246 1674479 2642949 +7 14 32 61 101 152 214 287 371 466 572 689 817 956 1106 1267 1439 1622 1816 2021 2237 diff --git a/src/adventofcode2023/data/day_09/day09_test.txt b/src/adventofcode2023/data/day_09/day09_test.txt new file mode 100644 index 00000000..539a763f --- /dev/null +++ b/src/adventofcode2023/data/day_09/day09_test.txt @@ -0,0 +1,3 @@ +0 3 6 9 12 15 +1 3 6 10 15 21 +10 13 16 21 30 45 diff --git a/src/adventofcode2023/data/day_10/day10.txt b/src/adventofcode2023/data/day_10/day10.txt new file mode 100644 index 00000000..c349300d --- /dev/null +++ b/src/adventofcode2023/data/day_10/day10.txt @@ -0,0 +1,140 @@ +L77FF.FJF|FL-7F7FF-F7F7FL.|.F-77.F--|.J7.FFLL--|7-7.7-L77F7-7.F-7F7-FF7F|77.|-JF7-FFF.L-7FFF7---|F7.|.FLF-JF-|-7---|F77FF-F-77FL77|-77.|-J.F +L7F-|7LLFJFL-FJ7L|.FL.LJJF7.|.|L-FJFJJ7L.777L-7.F7F-|7.F-7L7-F7LF-7.|L-JJF7-J-L7|F-JJFJLJ-L||.|LL|JF7-7FJ-FJ.J.J.|FLLJ7-F-L-L|7LJ-7-JL7F7|FJ +FF7|.-7F|J-|.|LFJJL-J7|.7FJ7L-77JLJJJ7F77JLJ77|-F--FJ.-JLL-J.LJJ.L|--7.J-JJ.|-F----LL-7FJJF||F--7F-7.F-7.L7-|.-LL-77JFJ.J7F-JL|.||L.FF||JLJ| +-JL-|--JF-7FFJFJ7FL7F-J7.L7L77L-7|JLF7-J|.7||J|L7.LF-J|.FJ.--7L|F|J|L|.|J.LF7--7J|F.|FF-7FF|||F-J|FJFJJFFJL-FJLF-J|7F7J..FF.|..|-LL---777J|7 +||.||L|7||-JJFF|.|.F-J.7-FLJL77-L--.|.|LJFL-L|FFL||L|F-7L77.FJ7|F7L-.F-7.|F7L|.-JFFF7-|FJF7||||7.||F7L-.L-7.|..|7.|L7J..L-7L-77|.|J.FLLJ77|. +FF7-7|F7LJ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7|L7|||FJ|LJ|L7|L7|||F7||L7L-J|FJL-JF--JLL----7FJF7L--7FJ||FJLJ||FJ||L7FJ|FJL7L7LF-7F--77.J.-7L-L|7|FF-|. +|||F7-|.F7F-7L7|L7L-7.F7|||||L7L7||||FJ||||FJF-JFJL7|||LJLJL7L-7FJL7F-7L---7F7F7FJL7||F--JL7||L--7LJL-JL7|L-JL--JFJFJFJL7FJ-||F|-7|||7FF..J- +JF7||||FJLJFJFJL7L-7|FJLJ||||FJ7|||LJ|FJLJ||FJF7L7FJ|||F----JF-J|JLLJJL7F--J|LJLJF7LJ|L---7|||F7FJF7F7F-J|F--7F--JFJFJF-JL7.F7F7-J|-F-FF|.|. +LFLFLF7L--7|7L-7|F7||L--7LJLJ|F7||L7FJL--7LJL7|L7||FJ||L-7F-7L-7L7FF7F7||F7JL--7FJL--JF-7FJLJ||||FJLJLJF7||F7LJFF7L7|FJF-7L-J|||JF7FJFLL|7-L +F-7-JF7LF-JL---JLJ|||F--JF--7LJLJL7||||F7L-7FJL7||||FJ|F7LJFJF7L7L7|||LJLJL7FF-J|FF--7L7LJF--J||||LF7.FJLJLJL7F7||FJLJFJJ|F--J||FJ|7FFLJJ|FJ +.LJ|-|L7L-7F---7F7LJLJF-7|F7L---7FJ|L7FJL-7||F-J|||||FJ|L--JL||FJFJ|||F---7L7L-7L7L-7L7L-7L7F7|LJL7||FJF-----J|||||F--JF7LJF77||L7L-7-7J.7JJ +J.---L7L-7||F--J|L----JFJ||L----JL7L7|L7F-J||L-7||||||FJF7FF7||L7|F||||F77L-JF7|FJF7|FJF7|FJ||L-7FJ||L7|F-----JLJ||L-7FJL7FJL7||-|F-J.FF7LJ| +L7J.--L-7LJ|L--7|F-----JFJL------7|FJL7||F7|L7FJ||||||L7|L7||||FJ|FJ||LJL7F7FJ|||FJ||L7||||FJ|F7||FJ|FJ||F-------J|F-J|F-JL7FJ||FJL----JL7.| +L--JJ||LL--J|F7LJL7F7F7FJF-------JLJF7|||||L7|L7LJLJ|L7|L7||LJ||L||FJL--7|||L7|||L7||FJ|||LJJ||||||FJL7||L------7FJL--JL7F-JL-JLJF-7F7F7FJ-| +FLF.FF7.F----JL-7.LJLJ|L7L7F-------7||LJ|||FJL7L7F--JFJL-JLJF-JL7|||F7F7|||L7|LJ|FJ||L7||L--7||||LJL7FJLJF------J|F7F---J|F----7FJ.||||LJJ.| +|LF-F77FL------7|F7F--JFJLLJF7F77F7LJL-7||LJ7FJFJ|F-7|7F--7FJF7FJLJLJ||LJLJL|L7FJL7||FJ||F--JLJ|||F7|L-7FJF------J|LJ|F--J|F--7|L-7||LJJJ7-| +|7J-L||7F7F7-F7|LJLJF-7L7F--JLJL-J|F7F7|||FF7L7|FJ|FJL-JF7|L7||L-7F--JL----7|FJL7FJ||L-J|L-7F7FJ|FJLJF7|L7L7F-----JF-7|F-7LJF-J|F7|LJ7|77L.J +J-F-7LLF||||FJLJF-7FJ.L-JL-------7||LJLJ||FJL-J||FJ|F7F7|LJFJ||F7||F--7F-7FJLJ7FJ|FLJF--JF7LJ|L7|L7F-JLJ-L-JL-----7|FJ|L7|F7L-7|||L7F-LJJL-. +|.|F-7F-JLJLJF7FJJ|L-7F-7LF--7JF7||L---7LJ|F--7|LJFJ||||L-7L7|||LJLJF-J|F|L---7L7|F--JF-7||F-JFJL7LJF7F7|F7F7F7F--J|L-JFJ||L--JLJ|FJJ-FJ--|| +7-||LLL7F7F7FJ|L-7L--JL7|FJF7L-JLJ|F---JF-JL-7|L-7L7|||L7FJFJ|||F-7FJF7L7|F--7L7LJL7F7|FJ||L-7L7FJF-JLJL7|LJLJLJJF-JF-7L7|L-----7||JJ-|--.|J +F7F-77LLJLJ|L7L--JF----J|L-JL----7|L-7F7L-7F7||F-J|LJ|L7|L7L7|LJL7LJFJ|FJ|L-7|FJF--J|||L7||F7L7LJ|L--7F7LJF77F7LFJF7L7|FJL----7FJLJ7J.L-J-|F +LJFJLJ|FF--JFJF--7L----7L77F-----JL--J||F7LJ|||L----7L7||FJFJ|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FJL7L--------J||F-J|FJLJF7F7JFJLJFJLJ|F7FJFJ||L7L7F-JFJF7||F7FJ||F-7L--7|L7FJL7F-7|||L-7F7LJ-F7F7-|||L7LL--J.|LL7 +.--|7F|||FJL-7||F--7L----J|L-7|F------7F7LJL--JL---JLJL7L--7L--7||||LL7||FJ7|L-7L7|||LJ||LLJL7L7F-J|J||7FJ|FJLJL--J||F7FJLJL-JLJFJ7.L7|-LL|J +.F-F--JLJL7F-JLS|F-JF--7F-JF-J|L-----7LJ|F----7F--7F7F-JF--JF--J||||F-J||L-7|F7|LLJ||F-JL--7.L7|L-7L-JL7L-JL-7F7F7J|||LJF-7F7F--JJLL7-L.|F77 +.-.L--7F-7LJF7F-JL-7|F-J|F7L7FJF-----JFFJ|F--7|L7FJ||L-7L--7L--7LJLJ|F7||F-JLJ||FF-J||F7F7FJF-JL-7L-7F7L-----J||||FJLJF-J.LJ||.|-||-L.L-J|J| +F.FFLJ||FJF7|||F---J|L-7||L7LJJL------7L-J|F-JL-JL-J|F-JF7FJF-7L-7F7|||||L--7FJ|7L-7||||||L7|F7F7L--J|L---7F--JLJLJF7FJ7F7F7LJ7F--7|L--|.J-7 +L|FL7FJ||FJ|||||F-7FJF7LJL7|F7FF-----7L---JL-------7LJF7|LJFJFJF-J|LJ|LJL7F-JL-JF--J|||LJL-J||LJL----JLF--J|F------JLJ-FJLJL--7|F-J7J.FL-LL7 +FLL7-|FJ||JLJLJ||FJ|FJL---JLJL-JF--7FJF7F7F7F------JF7|LJF7L7L7L-7L-7L7LL||7|77.L---JLJF7F7|LJF-7F----7L-7FJL--7F7F--7FJF--7F7LJL--7--FJ.FF7 +FJLLFJL7|L7JLLFJ|L7|L--7F------7|F-JL-JLJ|||L-------J||F7||FJ.|F-JLFJFJ.L||7L-77F7F----JLJL7F7L7|L---7|F7LJF7F-J|LJF-JL7L7.LJL7F-7FJ7LJ-FL-J +|J.FL--JL-J7|.|FJ-LJF7FJ|F---7LLJL------7|||F-7F-----JLJLJ||F-J|.L7L7|.L7LJL|JF-JLJF7F---7FJ||FJ|F---JLJL-7||L--JF-JFF-JFJF7F7LJ|LJ.F-|-|JJ| +.7-|J7|LLL|F7FJ|JFF7||L-JL7F7L7F7F7F---7|LJ|L7LJF------7F7LJL--JFLLJLJ-F7LJ.7-|F7F7|||F--JL-JLJFJL7F-----7LJL----JFF7L7FJFJ|||F-77.LLJLFF7-J +.|JL--JJFF7||L-JF-JLJL7F-7LJL7LJLJLJF-7LJF7L7L--JF--7F7LJL--7L|L7|7FJ|FJLL|7J.||LJ||LJL-----7F7L7FJ|F----JJF7|F7F7FJL-JL-JFJ|||FJJ7L|7FF|L-J +FFF.FLJ-L||||F77L----7||FJF77L------JFJF-JL7|F---JF7LJ|F7F7FJ7JF-7-L7LJJ.|F7F-LJ|FLJJF7F7F7FLJL7|L-JL------JL-JLJLJF-----7|FJLJL7L|-J7FJJ7.| +FF7F7JF-J|||||L7F7F-7|LJL-JL---------JFJF-7|||F7F-JL-7||LJLJ--7FJ.FLL-JJFF|LF-|-FLJF-JLJLJ|F--7||F7LF------7F7F7F-7|F7F7|LJ|F---J.F7FL-J.|-F +L|LJJ|F|-||||L7|||L7||F---7F----------JFJ.LJLJ|LJF---JLJLJ|L|-|FFF7FL|LF--JF-F-F-.-L7F-7F7|L-7LJLJL7L-----7||||LJFJLJLJL-7FJL---7F-7J7|FFJL- +L7J.LF-7J|LJ|FJLJL-J|LJF7||L7F---------JF7F7F7|F-JF7JF7J-LFJ|J||JJL77F7|J.FF-L7|7-|7LJ7|||L7-L7F7F7L------JLJLJF7|F7F----JL7F--7LJFJ.JFFJ7-| +FL|-7.|J7L-7|L-----7|FFJL-JFJL-7F-------JLJLJLJL-7|L-JL-7-J7F7F7.7-7-LJ7L-J|LL|JL7-F---J|L7L--J|||L7F----------J||||L----7FJL7-L--JJF.L-LJ-| +FF|JF7L-L7FJL---7F-JL7L-7F7|F--J|F---7F7F--7F---7LJF7F7FJFF-JLJ|JJ.L.|LL7.F|LLF-7|7L----J7L7F7FJLJ7LJF7F--------JLJ|F----J|F-J7F7F-7|LJ|-LJ| +F-JFJ-7FLLL7F--7LJF-7L7FJ|LJL---J|F-7|||L-7|L-7JL--JLJLJF7L7F-7|J7FL-|F|FF7J7.LLLF7F---7F--J|LJF7F7F-JLJF-------7F7LJFF---JL---JLJFJ-LF-7L7J +.LF.|.L7|FFLJF-JF7|FJFJL7|F---7F7LJFJLJL--J|F7L-----7F-7||FJL7LJF-7FLJ-JJ|L|F7J.F|LJF7FJL---JF7|LJ|L----JF7F----J||F-7|F-7F7F7F7F-JF7.J.|-77 +J7LJ|..|FL|.FJF7|LJL7|7FJ|L--7LJL7LL-7F7F7FLJ|F7F7F-J|FJ|LJF7|JJ7F||J|7|-FJFJL-LFL7FJ||F77F7FJ|L-7L------JLJF7JF7||L7LJL7LJLJ|||L-7F|7|7|.|7 +F77LJ.LJ-JF-JFJLJ.F7|L7L-J7F7L-7FJF-7LJLJL--7||||||F7|L-JF-JLJJ|L-7J7L7F.|F77|.LF|LJFJLJL-J|L7L-7L-------7F-J|FJLJL7|F-7L7F7.LJ|F7|F7F7-F-|7 +||F.|7FLJ.L7FJF---JLJFJF7FFJL7FJL7L7|F------JLJLJ|||LJF-7L-7J|.|-LLJF7|.FF.L-|--FF--JF7F--7|.L-7L----7JF7LJF-J|F---J|L7L7LJL--7|||LJLJ|J..JJ +F|7J|F-7LFFJ|.L-----7L7||FJF7LJF7L-JLJF7F7F7F7F7-LJ|F-JJ|F7L--7J..|7.FJFF--|JJFFJL---JLJF-J|F7JL----7L-JL-7L--JL----JFJ|L-----JLJ|F-7FJ.F--7 +L||F7|L7JFL7|-F-----JFJ||L7||F7|L-----JLJLJLJ||L-7L|L-7FJ||F7FJ-J7FFF7.F7.FJ|.FLF7F-----JF7LJ|F7F7F-JF7F-7L----7F-7F-JF7F7F----7-LJL||.F|.F| +LFJ7F7L|-L|LJ-|F----7L-JL7LJLJLJF------------J|F-JFJF-JL7|LJLJL|7F7F|L7|L7||LFF-J||F-----J|F7LJ||LJF7|||FJF---7|L7LJF7|LJLJF7F7L7FF7LJF-77FF +-LJF-7-7FLF7F7LJF7F7L--7FJF-----JF------7F----JL--JFJF-7LJF---7-L|L7L7||FJ-L-FJF-JLJF7F---J||F7LJF-J||LJL-JF--JL-JF-JLJF7F-JLJL-JFJL7FJFJ-L7 +..FLFJF7F7||||F-JLJL77FJL-JF7F-7FJFF---7LJF7F7F7F--J-|FJF7|F--JJFL7L-J||L7J|FL7L7F7FJ|L----JLJL7FJF-J|.F7F7L---7F7L7F7FJLJF-7F--7L-7LJFJ|L|F +F--7|F|LJLJLJ|L----7L-JF-7FJLJFJ|F7L-7-|F7|||LJ|L-7F7||FJ|||F--77-|F7FJ|FJF7F7L7||||FJJF7F7F7F-J|.L7FJFJLJL----J||.||LJ7F7|FJ|F-JF7|F-JF-7-J +|J|.F7L-----7|F----JF-7|.LJF77L-J|L-7L7LJLJ|L-7|F-J|LJLJFJ|||F-JJFJ||L-JL7||||FJLJLJ|F7|||LJLJF-JF7LJ-L------7F-JL-JL7F7|LJL7||F7|||L--JFJF| +FF-FJ7JFF---J|L----7L7LJF--JL----JF7L-JF7F7L--JLJF7|F7F7L-JLJL7F7L-JL---7LJLJ|L---7FJ|LJ|L-7F7|-FJL---7F---7FJ|F-7F7FJ|LJF-7LJLJ||||F--7|J-7 +|J-J||F-JF--7L-----JFJF-JF7F7F7F--JL---JLJL--7F7-||||LJL-7F7F7LJL7FF77F7|F-7FJF7F-JL7L-7|F7LJ|L7|F-7F7LJF7L|L-JL7||LJJ|F-JJL-7F7LJLJL7FLJJJF +7|J|LLL-7|JFJF7F--7FJFJF-J||LJ||F-7F-----7F--J|L7|LJL---7||||L7F-JFJL7|||L7LJFJ|L-7FJF-JLJL--JFJ|L7LJL--JL7|F-7FJ|L---JL---7FJ||F-7F7L-7|.FJ +.7L|7|7LLJLL-JLJF-J|||FJF-JL7.LJL7LJF---7|L-7FL7LJF7F-7FJLJ|L7LJF7L-7||LJFJF7L7L7FJ|FL-7F-7F--JJL-JF------J|L7LJ||F--7F---7|L-J|L7|||F-J-J7J +F.F77LFF|F---7F7|F7L7||FJF7FJF--7L--JF--JL--JF-JF-JLJLLJ|F7L7|F7|L7FJLJF-JFJ||L7||FJF7|||FLJ7F7|F7JL-7F--7JL-JF-7|L-7LJ.F7LJF--JFJ||||F-7|JJ +.FL|JF-F7L--7LJLJ||FJLJL-JLJFL-7L-7F-JF7F7F7FJF7L----7F--JL7LJ||L7|L-7FJF7L7|F-JLJ|FJL7LJF7F-JL-JL-7|LJF-JF7F-JFJ|F7|F7FJL-7L--7L7|||LJFJ-JJ +F.L|L||||7F7L7F7FJLJF7F-7F--7F7L-7LJ|FJLJLJLJFJL7F7F7|L-7F7L7FJ|FJ|F7||F||FJ|L--7FJ|F-JF7||L7F----7|F7FJF7|LJF-JL|||LJLJF--JF77L7|LJ|F-JJL.F +L|.|LLFJL-JL-J|LJF-7||L7|L-7||L--JF-7|F------JF7LJLJLJF7LJL7LJFJL7||LJL7||L7|7F-JL7|L-7||||||L7F--JLJ|L-JLJF7L--7|||F7F7L---JL-7LJF7LJJ||F-J +||-J|LL----7F7|F7L7LJL-JL-7||L----JFJ||F------JL----7FJ|F7FJF-JF7|LJF--J||FJL7L7F-J|F-J|||L7L-JL7F7F7L--7F7|L7F7|||||LJL7F-----JF-JL-77F77|F +LLJL7JLF---J||||L-JF--7F7FJ||F7F---JFJLJF-----------J|FJ||L7|F7|LJF-JF--J||F7L7|L--J|F-J||FJF7F-J|LJ|F-7LJLJ7LJLJLJ|L--7|L-7F7F7|F--7L7FLJ7J +L|F7.LFL7F-7||||F--J7FJ||L-JLJLJF7F-JF7FJF7F7F-7F7F7FJ|FJL-J|||L-7L-7L-7FJLJL7|L7F7FJL-7|||FJ|L-7|F-J|JL----7F-7F-7L7F-J|F7LJLJLJL-7L7|7|.|L +FFL-|-FFJL7LJ||||F--7L7|L7F7F---JLJF-J|L-JLJLJFJ|||||FJL---7LJ|F-JF7|F-JL7LF7|L7||LJ-F7|||||FJF7LJL-7|F-----JL7|L7|FJL7-LJL-7F-7F7FJF|L7J.J. +F|7F-7LL--JF7LJLJ|F7L7||.LJLJ7F7-F7L-7|F-7F7F7L7|||||L7F--7|F-JL-7|LJL7F7L-JLJFJ|L7F7||||||||L||LF7|LJL---7F--JL-J|L--JF---7|L7LJLJFLL-J-7F7 +JJJ.|-7||F7||F7F7LJL7|LJF--7F-JL-JL--JLJ-LJ|||FJ|LJ||FJL-7LJL-7F-J|F7FLJL----7L7|FJ||||||||||FJ|FJ|F7F----J|F-----J.F-7|F--JL-JF-7-F-|J|.LLF +LL|F|L7-FJ||LJLJL7F-JL-7L-7|L--7F---------7LJ||FJF-J|L--7L--7FJL-7|||F7F7F7F7|FJ||FJ||LJ|||||L7LJFJ||L-----JL------7L7LJL7F7F--JFJ7|7J.|FFLJ +|L-F-7F7L7|L----7|L--7FJF7|L--7||F--------JF7LJ|FJF7|F--JF--J||F7|||||||||LJ|||FJ||FJL-7|||||JL7FJFJL7F77F--------7L-JF-7LJLJF7FJ7L|7FF|-7J. +7-LFJL||FJL7LF-7|L---J|FJ||F-7LJ||F--7F---7|L7FJ|FJ|||F-7L--7|FJ|||||||||L-7||LJFJ|L---J||LJ|F7|L7L-7LJL-JF------7L--7L7|F7F7||L-7--7-|LJLLL +J7.F7.||L-7L7L7|L---7FJL7|LJJL-7|||F7LJF--J|FJ|FJL7|||L7|F7J||L7LJ|||||||F7||L7FJ-L7F---JL7FJ|||FJF7L7F7F7|F--7F7L--7|FJLJLJLJ|F7L7|F-L7JFFJ +||-||FJL7.L7L7||F7F-JL7FJL-----J|LJ|L--JFF7||FJL-7|||L7||||FJ|FJF-J|||||LJ|||FJL--7|L---7FJL7|||L-JL7LJLJLJL-7LJL7F-J|L-7F7F-7||L7|7|..|.FJF +|L-.FL-7|F7L7LJLJLJF-7LJF7F7F-7FJF-JF---7||||L7F7||||FJ|LJ|L7|L7|F7||||L7FJ|||F---JL7F--JL-7||LJF---JF--7F7F-JF7L|L7.L-7LJLJFJLJ-LJ77J---7.7 +JJ..F--J|||JL7F-7F7|FJF7|||||.LJ.L-7L7F-J|||||||LJ|||L7L-7L7|L7||||||||FJL7|LJL--7F-J|F7F7FJLJF-JF--7L-7LJ|L--JL7L7L-7-L7F7FJ7.L-|JJFJ||-L-F +|||7L7F7LJL--JL7|||||FJ||||||F----7|L||F-J||L7|L7|||L7L7FJFJ|FJ|||||||||F7||F----JL-7|||||L--7|F7L7FJF7L-7L---7FJ.|F7|F7LJLJF7F7L|-F|--J-7|. +FLF-LLJ|F7F7F7FJ||LJLJFJ|||LJ|F--7LJFJ||F-J|FJL7|FJL7|FJL7|FJ|FJ||||LJ|LJ|||L7F--7F-JLJ|||F7FJLJL7|L7|L-7L-7F7LJF7LJLJ|L----J|7|.|F||LJ7-7LJ +F-J-JFFJ|||LJLJ|LJF--7|FJLJF-J|F-JF7L7|||F7||F7||L7FJ||F7|||FJL7||||F-JF7|||FJ|F-JL--7FJ||||L7F--J|FJL7FJF7LJL7FJL7-F-JF-----JJF7|7LLJL-77|J +LF|LJLL-J|L7|F--7-L-7|LJF7|L--J|F7|L7|||||||||LJL7||FJ||||LJ|F-J||||L7FJ||||L7|L7F7F-JL7||||FJ|F7FJ|F7||FJL7F7LJF7L7|F7L-----7F|J-7FJJ|L|-7| +FLLJFL|J|L-J-L-7L---JL--JL-----J|||F||||||LJ|L-7FJ|||FJ|LJF-JL-7|||||||FJ||L7||FJ||L-7|||||||FJ||L7||||LJF-J||F7|L7LJ||F7F7F-J-7J.77.FL.F7L7 +7-J-J.7.-F7|JF7L---7F7F7F-7F----J|L7||LJLJF-JF7|L7|LJL7L-7L7F--J|||L7||L7||FJLJ|FJL7FJFJ|||||L-J|FJ|||L-7L7FJ||||.L7FJLJLJLJL|7.F7.F-|...FJL +J|LJ7F7--|L--JL----J|LJLJFJ|F----JFJ||F---JF7||L7||F--JF7|FJL-7FJ||FJ||7||||F7FJL7FJL7L7|||||F--JL7|||F7|F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--F|-FF7JJF7|L-7. +L.L--.J.L7-7JJL.|-JL-LL-7L|J-L.FJ-JLLLJ.L7J|JJF-7JJ.LJ.L--FJLLJ.J-J-JJ.L--|L-L.L-F.JLFLF-J-|-.L|---LL7JJ.L...|LL.-LF-FLFJJ7---JJJ|JL-J.L-L-- diff --git a/src/adventofcode2023/data/day_10/day10_loop_10.txt b/src/adventofcode2023/data/day_10/day10_loop_10.txt new file mode 100644 index 00000000..8f950ae8 --- /dev/null +++ b/src/adventofcode2023/data/day_10/day10_loop_10.txt @@ -0,0 +1,10 @@ +FF7FSF7F7F7F7F7F---7 +L|LJ||||||||||||F--J +FL-7LJLJ||||||LJL-77 +F--JF--7||LJLJ7F7FJ- +L---JF-JLJ.||-FJLJJ7 +|F|F-JF---7F7-L7L|7| +|FFJF7L7F-JF7|JL---7 +7-L-JL7||F7|L7F-7F7| +L.L7LFJ|||||FJL7||LJ +L7JLJL-JLJLJL--JLJ.L diff --git a/src/adventofcode2023/data/day_10/day10_loop_4.txt b/src/adventofcode2023/data/day_10/day10_loop_4.txt new file mode 100644 index 00000000..bd9cdf53 --- /dev/null +++ b/src/adventofcode2023/data/day_10/day10_loop_4.txt @@ -0,0 +1,9 @@ +........... +.S-------7. +.|F-----7|. +.||.....||. +.||.....||. +.|L-7.F-J|. +.|..|.|..|. +.L--J.L--J. +........... diff --git a/src/adventofcode2023/data/day_10/day10_loop_8.txt b/src/adventofcode2023/data/day_10/day10_loop_8.txt new file mode 100644 index 00000000..adaae963 --- /dev/null +++ b/src/adventofcode2023/data/day_10/day10_loop_8.txt @@ -0,0 +1,10 @@ +.F----7F7F7F7F-7.... +.|F--7||||||||FJ.... +.||.FJ||||||||L7.... +FJL7L7LJLJ||LJ.L-7.. +L--J.L7...LJS7F-7L7. +....F-J..F7FJ|L7L7L7 +....L7.F7||L7|.L7L7| +.....|FJLJ|FJ|F7|.LJ +....FJL-7.||.||||... +....L---J.LJ.LJLJ... diff --git a/src/adventofcode2023/data/day_10/day10_test_4.txt b/src/adventofcode2023/data/day_10/day10_test_4.txt new file mode 100644 index 00000000..7650925b --- /dev/null +++ b/src/adventofcode2023/data/day_10/day10_test_4.txt @@ -0,0 +1,5 @@ +..... +.S-7. +.|.|. +.L-J. +..... diff --git a/src/adventofcode2023/data/day_10/day10_test_8.txt b/src/adventofcode2023/data/day_10/day10_test_8.txt new file mode 100644 index 00000000..682499d9 --- /dev/null +++ b/src/adventofcode2023/data/day_10/day10_test_8.txt @@ -0,0 +1,5 @@ +..F7. +.FJ|. +SJ.L7 +|F--J +LJ... diff --git a/src/adventofcode2023/data/day_11/day11.txt b/src/adventofcode2023/data/day_11/day11.txt new file mode 100644 index 00000000..0723e735 --- /dev/null +++ b/src/adventofcode2023/data/day_11/day11.txt @@ -0,0 +1,140 @@ +.......#.....#.....................#.............#.................#.........................#.............................................. +#.....................#.......#.................................................................................#.......#................... +.......................................................................#.........................#..................................#....... +................................................................#..............#..............................................#............. +.........................................#............................................................#....................................# +.................#..................................................#....................................................................... +...........................#...............................................................................#................................ +....#.......#...........................................#..........................#.............................#.......................... +....................#.............#........#................................................................................................ +...................................................#...................................................#...................#................ +.........................#........................................#..................................................#...................... +......#..........#...........................................#...........#............#..................................................... +......................................#..........................................#.........................#.....................#.......... +.#...................#..................................#.......................................#........................................... +............#.................................#.....................#....................................................................... +............................................................................................................................................ +..............................#.....................................................................................#..................#.... +....................................................................................#........#......#....................................... +.........................#.........................#............#...........................................#............................... +.#......#.....#.......................#.................#........................................................#.....#.................... +...........................................................................#.................................................#.............. +...............................................#.......................................#...............#..........................#......... +......................#..................#.................................................................................................. +..........................................................................................................................#................. +......#...........................#.........................................................#........................#...................... +..............................................................................................................................#............. +..#.......................#.................#............................................................................................#.. +..................#....................................................#................#................................................... +....................................................#.....#....................#............................................................ +...............................#............................................................................................................ +..............................................#...............#..........................................................#...........#...... +.#.........#........................#..................................................................#.................................... +..........................................................................#.......................#........................................# +...................#......................................................................#................................................. +.............................................................................................................................#.............. +.....#...................................................................................................................................... +........................................................#........................#.......................................................... +.............................#...............#.....................#.....#............#..................#..............................#... +............................................................................................#......#...........#............................ +.........................#........#...................................................................................#..................... +...........................................................................................................................................# +.....................................................#.....#.................................................................#.............. +#.........................................................................................................#.......................#......... +................#...........................................................#.....................#......................................... +..............................#..............#...................................#.......#...........................#...................... +........#................#.........#............................#............................................#.............#.........#...... +............................................................................................................................................ +.......................................................#...............#.............................#...........................#.......... +.............#.................................#............................................................................................ +............................................................................................................................................ +..#.............................................................................#...........................................#...........#... +............................................................................................................................................ +......................................#..........................................................#................#......................... +............................#................#......#......................#...........#.................................................... +............................................................................................................................................ +....................................................................................................#................#..........#........... +.#............#...................#...............................#........................................#.............................#.. +.........#...............................................................#.................................................................. +.......................#....................#........#...........................................#.......................................... +............................................................#.....................................................#......................... +..............................#.......................................................................#...................#.......#......... +............#.......................#...................#............................#...................................................... +...................................................#......................................#..............................................#.. +.#................#...................................................#........................#............................................ +......#....................................................................#................................#............................... +...............................#....................................................................................#....................... +.........................#.....................#......#.............................................#.................................#..... +............................................................................................................................................ +...............#.....................#....................................................#................................................. +..................................................................................................................#......................... +....#......#.....................................#..............................#............................#............#.....#........... +....................#.............................................#....................#.........#.......................................#.. +.........................................................#..............#.............................#..................................... +............................#...........#...........................................................................#....................... +............................................................................................................................................ +#..................................#...............................................................#..........#............................. +.......#......................................................................................#.................................#.......#... +.....................#....................#...............................#.....#......................................#.................... +................................#..........................#......#....................#..........................#......................... +..............#...................................#........................................................................#...............# +....#....................................................................................................#.................................. +.......................#.................................................................................................................... +......................................#................................#..................#................................................. +.....................................................#............................................#...............................#......... +............................................................................................................................................ +............................................................................................................................................ +....#.................#..................................#.........................#..........................#............................. +.............#........................................................................................#..................#.................. +......................................#............................................................................#........................ +.........#....................................................#.........#............................................................#...... +.............................................................................................#.............................................. +.............................#...........#............................................................................#..................... +#..................#................................................#....................#.......................................#.........# +...................................................................................................#......#................................. +...........#.............................................#...........................#...................................................... +....................................#....................................................................................................... +..................................................#..........#.........#......................#.....................#....................... +.#......#....................................#..............................................................#............................... +.............................#.............................................#................................................................ +.......................#...............................................................................#....................#............... +....................................................#.....................................#...........................................#..... +................#.....................#..................#.................................................................................# +...#.....#..........................................................#................#...................................................... +.............................................#...............#................................#......#...................................... +...............................#...............................................#............................................................ +.............................................................................................................................#.........#.... +.....................#................................................#.................................................#................... +...............#.........................#.......................#..................#....................................................... +.....#......................................................................................................#.......................#....... +....................................#.................#.........................#..................#........................................ +........................................................................................................................................#... +.........#..............#.....................................#........................................#.....................#.............. +...............................................#...................#........................................................................ +......................................#.............#..................................#.....#.......................#...................... +............#.....#...............................................................................#......................................... +...#...................................................................................................................................#.... +.......................#.........................#.......................................................................................... +.........................................................#...........#.........................#........#..........#.............#.......... +............................#..............#....................#........................................................#.................. +.......#.................................................................#................#................................................. +.................#..................................................................................#........................#...........#.. +...................................................#.......#................................................................................ +.........................................#......................................#......................................#.................... +....................................#...........................................................................#........................... +..............................#.............................................................#...........#.......................#......#.... +.........#...............................................#..............#................................................................... +........................#....................#.....................................#........................................................ +#........................................................................................................................................... +............................#......................................................................#.......#................................ +......................................#..................................................................................................... +.....#............#.........................................#..........................#..........................................#......... +...........................................#......................#..............................................#.......................... +..............#..............................................................................#............................#.............#... +..#......#...........................................#..............................#..................#.....#.............................. +....................#..........#.....#...............................#...................................................................... +............................................................................................................................................ +.................................................#.......................................................................................... +.............#..........#...............................#...............#.............#..........#.........#........#....................... +............................................#................#.................#............................................................ +....................................#....................................................................................#.............#.... diff --git a/src/adventofcode2023/data/day_11/day11_test.txt b/src/adventofcode2023/data/day_11/day11_test.txt new file mode 100644 index 00000000..986aad4a --- /dev/null +++ b/src/adventofcode2023/data/day_11/day11_test.txt @@ -0,0 +1,10 @@ +...#...... +.......#.. +#......... +.......... +......#... +.#........ +.........# +.......... +.......#.. +#...#..... diff --git a/src/adventofcode2023/day01.py b/src/adventofcode2023/day01.py new file mode 100644 index 00000000..30614c56 --- /dev/null +++ b/src/adventofcode2023/day01.py @@ -0,0 +1,41 @@ +from __future__ import annotations + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day01: + pass + + +class Day01PartA(Day01, FileReaderSolution): + def solve(self, input_data: str) -> int: + total = 0 + for line in input_data.splitlines(): + digits = [i for i in line if i.isdigit()] + total += int("".join([digits[0], digits[-1]])) + return total + + +class Day01PartB(Day01, FileReaderSolution): + # Replace, but keep the first and last letter in place. This could be part of + # the next word. Something that was *not* specified in the text.. + digitmap = { + "one": "o1e", + "two": "t2o", + "three": "t3e", + "four": "f4r", + "five": "f5e", + "six": "s6x", + "seven": "s7n", + "eight": "e8t", + "nine": "n9e", + } + + def solve(self, input_data: str) -> int: + total = 0 + for line in input_data.splitlines(): + for digit, replacement in self.digitmap.items(): + line = line.replace(digit, replacement) + digits = [i for i in line if i.isdigit()] + total += int("".join([digits[0], digits[-1]])) + return total diff --git a/src/adventofcode2023/day02.py b/src/adventofcode2023/day02.py new file mode 100644 index 00000000..8a7cd692 --- /dev/null +++ b/src/adventofcode2023/day02.py @@ -0,0 +1,66 @@ +from __future__ import annotations + +from collections import Counter + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day02: + pass + + +class Day02PartA(Day02, FileReaderSolution): + def solve(self, input_data: str) -> int: + valid_games = 0 + + for line in input_data.splitlines(): + line = line.replace(":", "").replace(";", "").replace(",", "") + + parts = line.split() + game_id = int(parts[1]) + is_valid = True + for number_idx in range(2, len(parts), 2): + colors = Counter() + color_idx = number_idx + 1 + colors[parts[color_idx]] += int(parts[number_idx]) + + if ( + colors["red"] <= 12 + and colors["green"] <= 13 + and colors["blue"] <= 14 + ): + pass + else: + is_valid = False + if is_valid: + valid_games += game_id + return valid_games + + +class Day02PartB(Day02, FileReaderSolution): + def solve(self, input_data: str) -> int: + total = 0 + + for line in input_data.splitlines(): + line = line.replace(":", "").replace(";", "").replace(",", "") + + parts = line.split() + max_colors = { + "red": False, + "green": False, + "blue": False, + } + + for number_idx in range(2, len(parts), 2): + color_idx = number_idx + 1 + color = parts[color_idx] + number = int(parts[number_idx]) + + # Check if the number is the lowest + if not max_colors[color]: + max_colors[color] = number + else: + max_colors[color] = max(max_colors[color], number) + res = max_colors["red"] * max_colors["green"] * max_colors["blue"] + total += res + return total diff --git a/src/adventofcode2023/day03.py b/src/adventofcode2023/day03.py new file mode 100644 index 00000000..df767ecd --- /dev/null +++ b/src/adventofcode2023/day03.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from collections import defaultdict +from math import prod + +import attrs + +from adventofcode.utils.abstract import FileReaderSolution + + +@attrs.define(frozen=True) +class Symbol: + symbol: str + row: int + col: int + + +class Day03: + grid: list[list[str]] + + def parse_into_parts(self, input_data: str) -> list[tuple[int, Symbol]]: + """Parse into a list of integers with symbols connected""" + # Create a row/col grid from the input data + self.grid = [list(line) for line in input_data.splitlines()] + part_numbers = [] + for row in range(0, len(self.grid)): + is_digit = False + current_digits = [] + for col in range(0, len(self.grid[0])): + if self.grid[row][col].isdigit(): + is_digit = True + # If we're working on a digit, add it to the running total + current_digits.append(self.grid[row][col]) + else: + # Not a digit anymore, validate + if current_digits and ( + symbol := self.validate(current_digits, row, col - 1) + ): + part_numbers.append((int("".join(current_digits)), symbol)) + is_digit = False + current_digits = [] + # We have reached the edge, check if we have a valid digit in the bugger + if is_digit and (symbol := self.validate(current_digits, row, col)): + part_numbers.append((int("".join(current_digits)), symbol)) + + return part_numbers + + @staticmethod + def check_symbol(input_value: str) -> bool: + if input_value.isdigit(): + return False + if input_value == ".": + return False + return True + + def validate(self, digits, row, col) -> bool | Symbol: + """Validate if the digits in are real. If they are real, return a Symbol""" + # If we end at column 5 with 3 digits, we need to check + # (eg, col - len(digits) ... col+1) + # 23456 + min_col = col - len(digits) + max_col = col + 1 + # Check above and below the current row + for check_row in (row - 1, row, row + 1): + for check_col in range(min_col, max_col + 1): + try: + if self.check_symbol(self.grid[check_row][check_col]): + return Symbol( + self.grid[check_row][check_col], check_row, check_col + ) + except IndexError: + # Index out of bounds, ignoring + pass + return False + + +class Day03PartA(Day03, FileReaderSolution): + def solve(self, input_data: str) -> int: + part_numbers = self.parse_into_parts(input_data) + res = sum([number for number, _ in part_numbers]) + return res + + +class Day03PartB(Day03, FileReaderSolution): + def solve(self, input_data: str) -> int: + part_numbers = self.parse_into_parts(input_data) + # Find the symbols with a * + valid_parts = [ + (value, symbol) for value, symbol in part_numbers if symbol.symbol == "*" + ] + # Convert the row/col locations to see if we have duplicates + locations: defaultdict[Symbol, list] = defaultdict(list) + for amount, symbol in valid_parts: + locations[symbol].append(amount) + + # Add the total if we have 2 (or more?!?) amounts on one location + total = 0 + for value in locations.values(): + if len(value) >= 2: + total += prod(value) + return total diff --git a/src/adventofcode2023/day04.py b/src/adventofcode2023/day04.py new file mode 100644 index 00000000..5dbb3df9 --- /dev/null +++ b/src/adventofcode2023/day04.py @@ -0,0 +1,67 @@ +from __future__ import annotations + +from collections import Counter + +import attrs + +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.parsing import extract_digits_from_string + + +@attrs.define +class Card: + cardnr: int + winning_numbers: set[int] + numbers_have: set[int] + + @classmethod + def from_string(cls, input_string: str) -> Card: + # Split on | + winning_part, have_part = input_string.split("|") + cardnr = extract_digits_from_string(winning_part)[0] + winning = extract_digits_from_string(winning_part)[1:] + have = extract_digits_from_string(have_part) + + return cls(cardnr, set(winning), set(have)) + + def matches(self) -> int: + return len(self.numbers_have & self.winning_numbers) + + def score(self) -> int: + matches = self.matches() + if matches <= 1: + return matches + # 1 for the first match, then doubled three times for each of the three + # matches after the first). + score = 1 + for _ in range(matches - 1): + score += score + return score + + +class Day04: + pass + + +class Day04PartA(Day04, FileReaderSolution): + def solve(self, input_data: str) -> int: + cards = [Card.from_string(line) for line in input_data.splitlines()] + return sum([card.score() for card in cards]) + + +class Day04PartB(Day04, FileReaderSolution): + def solve(self, input_data: str) -> int: + cards = [Card.from_string(line) for line in input_data.splitlines()] + card_matches = [(card.cardnr, card.matches()) for card in cards] + card_counter = Counter() + + # Prime the counter, we need at least 1 of every card + for n in range(len(cards)): + card_counter[n + 1] = 1 + + for cardnr, matches in card_matches: + for n in range(matches): + multiplier = card_counter[cardnr] + card_counter[n + cardnr + 1] += multiplier + + return sum(card_counter.values()) diff --git a/src/adventofcode2023/day06.py b/src/adventofcode2023/day06.py new file mode 100644 index 00000000..2e111093 --- /dev/null +++ b/src/adventofcode2023/day06.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +import math + +import attrs + +from adventofcode.utils.abstract import FileReaderSolution +from adventofcode.utils.parsing import extract_digits_from_string + + +@attrs.define(frozen=True) +class Result: + time: int + distance: int + + +class Day06: + @staticmethod + def parse(input_data: str, strip_spaces=False) -> list[Result]: + lines = input_data.splitlines() + if strip_spaces: + lines[0] = lines[0].replace(" ", "") + lines[1] = lines[1].replace(" ", "") + times = extract_digits_from_string(lines[0]) + distances = extract_digits_from_string(lines[1]) + results = [] + for time, distance in zip(times, distances): + results.append(Result(time=time, distance=distance)) + return results + + @staticmethod + def compute_options(result: Result) -> int: + options = 0 + for charge in range(result.time): + # charge the boat for charge seconds + distance = charge * (result.time - charge) + if distance > result.distance: + options += 1 + return options + + def find_options(self, input_data: str, bad_kerning: bool) -> int: + times = self.parse(input_data, bad_kerning) + return math.prod([self.compute_options(result) for result in times]) + + +class Day06PartA(Day06, FileReaderSolution): + def solve(self, input_data: str) -> int: + return self.find_options(input_data, False) + + +class Day06PartB(Day06, FileReaderSolution): + def solve(self, input_data: str) -> int: + return self.find_options(input_data, True) diff --git a/src/adventofcode2023/day07.py b/src/adventofcode2023/day07.py new file mode 100644 index 00000000..177328b4 --- /dev/null +++ b/src/adventofcode2023/day07.py @@ -0,0 +1,204 @@ +from __future__ import annotations + +import functools +import logging +from collections import Counter +from collections.abc import Callable +from enum import Enum + +from adventofcode.utils.abstract import FileReaderSolution + +logger = logging.getLogger(__name__) + + +class Score(Enum): + FIVE_OF_A_KIND = 7 + FOUR_OF_A_KIND = 6 + FULL_HOUSE = 5 + THREE_OF_A_KIND = 4 + TWO_PAIR = 3 + ONE_PAIR = 2 + HIGH_CARD = 1 + + +@functools.total_ordering +class Hand: + cards: str + bid: int + + def __init__(self, cards: str, bid: int): + self.cards = cards + self.bid = bid + + @property + def score(self) -> Score: + return self._calculate_score(self.cards) + + @staticmethod + def _calculate_score(cards: str) -> Score: + """Compute the sore for this hand. + This score can then be used for comparing cards against each other. + + In the order: + - Five of a kind -> 7 points + - Four of a kind -> 6 points + - Full house -> 5 + - Three of a kind -> 4 + - Two Pair -> 3 + - One pair -> 2 + - High card -> 1 + """ + counter = Counter(cards) + most_common = counter.most_common() + unique_cards = len(counter) + + # Five of a kind, where all five cards have the same label + if len(counter) == 1: + return Score.FIVE_OF_A_KIND + + # Four of a kind, where four cards have the same label and one card has a + # different label + if unique_cards == 2 and most_common[0][1] == 4 and most_common[1][1] == 1: + return Score.FOUR_OF_A_KIND + + # Full house, where three cards have the same label, + # and the remaining two cards share a different label + if unique_cards == 2 and most_common[0][1] == 3 and most_common[1][1] == 2: + return Score.FULL_HOUSE + + # Three of a kind, where three cards have the same label, + # and the remaining two cards are each different from any other card in the hand + if ( + unique_cards == 3 + and most_common[0][1] == 3 + and most_common[1][1] == 1 + and most_common[2][1] == 1 + ): + return Score.THREE_OF_A_KIND + + # Two pair, where two cards share one label, + # two other cards share a second label, and the remaining card has a third label + if ( + unique_cards == 3 + and most_common[0][1] == 2 + and most_common[1][1] == 2 + and most_common[2][1] == 1 + ): + return Score.TWO_PAIR + + # One pair, where two cards share one label, + # and the other three cards have a different label from the pair and each other + if ( + unique_cards == 4 + and most_common[0][1] == 2 + and most_common[1][1] == 1 + and most_common[2][1] == 1 + and most_common[3][1] == 1 + ): + return Score.ONE_PAIR + # High card, where all cards' labels are distinct: 23456 + if len(counter) == 5: + return Score.HIGH_CARD + + raise ValueError(f"Unknown Score for cards: {cards}") + + @staticmethod + def letter_to_score(letter: str) -> int: + scores = { + "A": 14, + "K": 13, + "Q": 12, + "J": 11, + "T": 10, + } + try: + return scores[letter] + except KeyError: + return int(letter) + + def __repr__(self): + return f"" + + def __eq__(self, other): + if not isinstance(other, Hand): + raise ValueError("Can't compare, must be a Hand") + if self.cards == other.cards and self.score == other.score: + return True + else: + return False + + def __lt__(self, other) -> bool: + if self.score != other.score: + return self.score.value < other.score.value + else: + for c, r in zip(self.cards, other.cards): + if c == r: + continue + else: + return self.letter_to_score(c) < self.letter_to_score(r) + return False + + +class JokerHand(Hand): + """New rule with Jokers!""" + + @staticmethod + def letter_to_score(letter: str) -> int: + if letter == "J": + return 1 + else: + return Hand.letter_to_score(letter) + + @staticmethod + def find_indexes(string, search): + return [i for i, ltr in enumerate(string) if ltr == search] + + def _calculate_score(self, cards: str) -> Score: + """Calculate the score, but then with a joker in it!""" + # What to to: + # I want to replace the Jokers to create the strongest card + # What if: I just replace the jokers with A, K Q, T, ... 2 + # and calculate the highest score? + jokers = self.find_indexes(self.cards, "J") + + if len(jokers) == 0: + # If there are no jokers, don't replace + return Hand._calculate_score(cards) + + if len(jokers) == 5: + # JJJJJ Lucky hand! + return Score(7) + + max_score = 0 + for replacement in ("A", "K", "Q", "T", "9", "8", "7", "6", "5", "4", "3", "2"): + test_card = cards.replace("J", replacement) + score = Hand._calculate_score(test_card) + if score.value > max_score: + max_score = score.value + logger.debug("For cards %s, score %s", cards, max_score) + return Score(max_score) + + +class Day07: + def generic_solve(self, input_data: str, hand: Callable) -> int: + hands = sorted( + [ + hand(line.split()[0], int(line.split()[1])) + for line in input_data.splitlines() + ] + ) + total = 0 + for idx, bid in enumerate(hands, start=1): + score = bid.bid * idx + total += score + return total + + +class Day07PartA(Day07, FileReaderSolution): + def solve(self, input_data: str) -> int: + return self.generic_solve(input_data, Hand) + + +class Day07PartB(Day07, FileReaderSolution): + def solve(self, input_data: str) -> int: + return self.generic_solve(input_data, JokerHand) diff --git a/src/adventofcode2023/day08.py b/src/adventofcode2023/day08.py new file mode 100644 index 00000000..419f3202 --- /dev/null +++ b/src/adventofcode2023/day08.py @@ -0,0 +1,60 @@ +from __future__ import annotations + +import logging +import math +import re +from itertools import cycle + +from adventofcode.utils.abstract import FileReaderSolution + +logger = logging.getLogger(__name__) + + +class Day08: + instructions: str + nodes: dict[str, list[str]] + + def parse(self, input_data: str): + instructions, nodes = input_data.split("\n\n") + self.instructions = instructions + + self.parse_nodes(nodes) + + def parse_nodes(self, input_data: str): + """Parse a line with into parts, and add to the nodes dict + Format must be: VRN = (CSM, GPD)""" + match = re.compile(r"[A-Z\d]{3}") + self.nodes = {} + + for line in input_data.splitlines(): + parts = re.findall(match, line) + self.nodes[parts[0]] = parts[1:] + + def find_cycle(self, start_node: str) -> int: + steps = 0 + current_node = start_node + + for instruction in cycle(self.instructions): + steps += 1 + if instruction == "L": + current_node = self.nodes[current_node][0] + else: + current_node = self.nodes[current_node][1] + if current_node.endswith("Z"): + return steps + + +class Day08PartA(Day08, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.parse(input_data) + return self.find_cycle("AAA") + + +class Day08PartB(Day08, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.parse(input_data) + + starts = [node for node in self.nodes.keys() if node[2] == "A"] + logger.info("We have %s starts", len(starts)) + + return math.lcm(*(self.find_cycle(start) for start in starts)) diff --git a/src/adventofcode2023/day09.py b/src/adventofcode2023/day09.py new file mode 100644 index 00000000..bfa3182f --- /dev/null +++ b/src/adventofcode2023/day09.py @@ -0,0 +1,55 @@ +from __future__ import annotations + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day09: + @staticmethod + def create_differences(line: str) -> list[list[int]]: + numbers = [int(digit) for digit in line.split()] + differences = [numbers] + while set(numbers) != {0}: + numbers = [ + numbers[idx + 1] - number for idx, number in enumerate(numbers[:-1]) + ] + differences.append(numbers) + return differences + + def calculate_line(self, line: str) -> int: + differences = self.create_differences(line) + # Adding numbers: + # I need to add current last one + previous last one and add that to previous + differences.reverse() + previous_add = 0 + for idx, line in enumerate(differences[:-1]): + line.append(previous_add) + previous_add = differences[idx + 1][-1] + previous_add + + return previous_add + + def calculate_backwards_line(self, line: str) -> int: + """Do the same as calculate_line but backwards...""" + differences = self.create_differences(line) + differences.reverse() + reversed_differences = [] + for line in differences: + reversed_differences.append(list(reversed(line))) + + previous_add = 0 + for idx, line in enumerate(reversed_differences[:-1]): + line.append(previous_add) + previous_add = reversed_differences[idx + 1][-1] - previous_add + + return previous_add + + +class Day09PartA(Day09, FileReaderSolution): + def solve(self, input_data: str) -> int: + return sum([self.calculate_line(line) for line in input_data.splitlines()]) + + +class Day09PartB(Day09, FileReaderSolution): + def solve(self, input_data: str) -> int: + return sum( + [self.calculate_backwards_line(line) for line in input_data.splitlines()] + ) diff --git a/src/adventofcode2023/day10.py b/src/adventofcode2023/day10.py new file mode 100644 index 00000000..59c01226 --- /dev/null +++ b/src/adventofcode2023/day10.py @@ -0,0 +1,249 @@ +from __future__ import annotations + +from enum import Enum + +from adventofcode.utils.abstract import FileReaderSolution + + +class Tile(Enum): + NS = "|" # is a vertical pipe connecting north and south. + EW = "-" # is a horizontal pipe connecting east and west. + NE = "L" # is a 90-degree bend connecting north and east. + NW = "J" # is a 90-degree bend connecting north and west. + SW = "7" # is a 90-degree bend connecting south and west. + SE = "F" # is a 90-degree bend connecting south and east. + GG = "." # is ground; there is no pipe in this tile. + SS = "S" # is the starting position of the animal. + + @property + def has_north(self) -> bool: + return "N" in self.name + + @property + def has_east(self) -> bool: + return "E" in self.name + + @property + def has_south(self) -> bool: + # If the name is "SS", it is the starting position, and might now have south. + return "S" in self.name and self.name != "SS" + + @property + def has_west(self) -> bool: + return "W" in self.name + + @property + def connections(self) -> list[tuple[int, int]]: + """Return the connections from this Tile as direction tuples as (row, col)""" + options = [] + if self.has_north: + options.append((-1, 0)) + if self.has_east: + options.append((0, 1)) + if self.has_south: + options.append((1, 0)) + if self.has_west: + options.append((0, -1)) + return options + + +class Day10: + grid: dict[tuple[int, int], str] + max_row: int + max_col: int + start_point = tuple[int, int] + + def parse(self, input_data: str): + self.grid = {} + for row_idx, row in enumerate(input_data.splitlines()): + for col_idx, char in enumerate(row): + self.grid[(row_idx, col_idx)] = char + if char == "S": + self.start_point = (row_idx, col_idx) + self.max_row = row_idx + self.max_col = col_idx + + def find_path(self) -> list[tuple[int, int]]: + # We know our startpoint, which nodes connect? + # This is the opposite to the connections on a Tile + connections = [] + for direction in [(1, 0, "N"), (0, 1, "W"), (-1, 0, "S"), (0, -1, "E")]: + nb_rc = ( + self.start_point[0] + direction[0], + self.start_point[1] + direction[1], + ) + try: + neighbour = self.grid[nb_rc] + if direction[2] in Tile(neighbour).name: + connections.append(nb_rc) + except KeyError: + pass + if len(connections) != 2: + raise ValueError( + f"Starting point does not have 2 connections, but : {connections}" + ) + # Also, get the start type and update it in the grid + valid_directions = [] + for direction in [(1, 0, "S"), (0, 1, "E"), (-1, 0, "N"), (0, -1, "W")]: + if ( + self.start_point[0] + direction[0], + self.start_point[1] + direction[1], + ) in connections: + valid_directions.append(direction[2]) + direction = "".join(valid_directions) + + try: + replacement = Tile[direction] + except KeyError: + replacement = Tile[direction[::-1]] + + self.grid[self.start_point] = replacement.value + + # Let's follow the path + cur_point = connections[0] + path = [self.start_point, cur_point] + visited = {cur_point} + + while cur_point != self.start_point: + tile = Tile(self.grid[cur_point]) + connections = [ + (cur_point[0] + delta[0], cur_point[1] + delta[1]) + for delta in tile.connections + ] + next_step = [ + connection + for connection in connections + if connection not in visited and connection != self.start_point + ] + if len(next_step) == 0: + # We have found the loop, nowhere to go + return path + + next_step = next_step[0] + path.append(next_step) + visited.add(next_step) + cur_point = next_step + + return path + + +class Day10PartA(Day10, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.parse(input_data) + path = self.find_path() + steps = (len(path) + 1) // 2 + return steps + + +class Day10PartB(Day10, FileReaderSolution): + def raytracing( + self, path: list[tuple[int, int]], row: int + ) -> list[tuple[int, int]]: + """Return a list if points that are inside the path""" + outside_points = [] + outside = True + start_f = None + for col in range(self.max_col + 1): + char = self.grid[(row, col)] + if char == "." and not outside: + # We are outside, and hit an empty spot! + outside_points.append((row, col)) + + elif char == "|": + outside = not outside + + elif char == "F": + start_f = True + + elif char == "L": + start_f = False + + elif char == "-": + # Alongside a wall, can only happen if not with bend + if start_f is None: + raise ValueError("Horizontal line but outside?!") + + elif char == "7": + # End of a pipe + if start_f is None: + raise ValueError("Horizontal end `7`, but not started!?") + if not start_f: + outside = not outside + start_f = None + + elif char == "J": + if start_f is None: + raise ValueError("Horizontal end `J`, but not started!?") + if start_f: + outside = not outside + start_f = None + return outside_points + + def convert_to_box_chars(self, path=None, inside=None): + if path is None: + path = [] + if inside is None: + inside = [] + thin_box_chars = { + "F": "┌", + "7": "┐", + "L": "└", + "J": "┘", + "-": "─", + "|": "│", + "S": "@", + ".": " ", + "I": "│", + } + thick_box_chars = { + "F": "╔", + "7": "╗", + "L": "╚", + "J": "╝", + "-": "═", + "|": "║", + "S": "@", + ".": " ", + "I": "║", + } + grid = {} + for row_idx in range(self.max_row + 1): + for col_idx in range(self.max_col + 1): + loc = (row_idx, col_idx) + if loc in inside: + grid[loc] = "I" + elif loc in path: + grid[loc] = thick_box_chars[self.grid[loc]] + else: + grid[loc] = thin_box_chars[self.grid[loc]] + + return grid + + def print_grid(self, grid): + print() + lines = [] + for row in range(self.max_row + 1): + lines.append("".join([grid[(row, col)] for col in range(self.max_col + 1)])) + print("\n".join(lines)) + print() + + def solve(self, input_data: str) -> int: + self.parse(input_data) + path = self.find_path() + + # First cleanup the grid. Everything that is not in path, or Start! + # will become a "." + for location, tile in self.grid.items(): + if tile != "." and tile != "S" and location not in path: + self.grid[location] = "." + + valid_points = 0 + inside = [] + for row in range(0, self.max_row + 1): + inside_points = self.raytracing(path, row) + valid_points += len(inside_points) + inside.extend(inside_points) + + print(self.print_grid(self.convert_to_box_chars(path, inside))) + + return valid_points diff --git a/src/adventofcode2023/day11.py b/src/adventofcode2023/day11.py new file mode 100644 index 00000000..6270531c --- /dev/null +++ b/src/adventofcode2023/day11.py @@ -0,0 +1,113 @@ +from __future__ import annotations + +import itertools + +from adventofcodeutils.point import XYNRPoint as Point + +from adventofcode.utils.abstract import FileReaderSolution + + +class Day11: + galaxy_points: list[Point] + max_x: int + max_y: int + used_x: set + used_y: set + + def parse(self, input_data: str): + self.galaxy_points = [] + self.used_x = set() + self.used_y = set() + number = 1 + + for x, line in enumerate(input_data.splitlines()): + for y, char in enumerate(line): + if char == "#": + self.galaxy_points.append(Point(x, y, number)) + self.used_x.add(x) + self.used_y.add(y) + number += 1 + + self.max_y = y + 1 + self.max_x = x + 1 + + @staticmethod + def missing_elements(elements): + start, end = elements[0], elements[-1] + return sorted(set(range(start, end + 1)).difference(elements)) + + def expand_universe(self, expansion=1): + """Expand the universe, if a line is empty""" + offset_x = 0 + offset_y = 0 + # Mind the gaps + missing_x = self.missing_elements(list(self.used_x)) + missing_y = self.missing_elements(list(self.used_y)) + + # Loop over every planet there offset is x + offset_x and add x + for x in missing_x: + points_do_delete = [] + points_to_add = [] + for point in self.galaxy_points: + if point.x > x + offset_x: + points_to_add.append(Point(point.x + expansion, point.y, point.nr)) + points_do_delete.append(point) + for point in points_do_delete: + del self.galaxy_points[self.galaxy_points.index(point)] + self.galaxy_points.extend(points_to_add) + offset_x += expansion + for y in missing_y: + points_do_delete = [] + points_to_add = [] + for point in self.galaxy_points: + if point.y > y + offset_y: + points_to_add.append(Point(point.x, point.y + expansion, point.nr)) + points_do_delete.append(point) + + for point in points_do_delete: + del self.galaxy_points[self.galaxy_points.index(point)] + self.galaxy_points.extend(points_to_add) + offset_y += expansion + self.max_x = max(point.x for point in self.galaxy_points) + 1 + self.max_y = max(point.y for point in self.galaxy_points) + 1 + + def compute_shortest_paths(self) -> int: + """Compute the shortest paths between pairs""" + return sum( + pair1.distance(pair2) + for pair1, pair2 in itertools.combinations(self.galaxy_points, 2) + ) + + def print_solution(self): + print() + for x in range(self.max_x): + line = [] + for y in range(self.max_y): + point = next( + (pp for pp in self.galaxy_points if pp == Point(x, y, 0)), None + ) + if point: + line.append(str(point.nr)) + else: + line.append(".") + print("".join(line)) + print() + + +class Day11PartA(Day11, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.parse(input_data) + # self.print_solution() + + self.expand_universe() + # self.print_solution() + return self.compute_shortest_paths() + + +class Day11PartB(Day11, FileReaderSolution): + def solve(self, input_data: str) -> int: + self.parse(input_data) + # Each empty column or row must be replaced by 1 million rows. + # Add 999.999 rows. + self.expand_universe(1_000_000 - 1) + return self.compute_shortest_paths() diff --git a/src/adventofcodeutils/__init__.py b/src/adventofcodeutils/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/template/cookiecutter.json b/template/cookiecutter.json index c3698059..edb0bde0 100644 --- a/template/cookiecutter.json +++ b/template/cookiecutter.json @@ -1,6 +1,7 @@ { - "advendofcode2016": ".", + "adventofcode": ".", "day": "32", + "year": "2030", "directory_name": "day_{{cookiecutter.day}}", "file_name": "day{{cookiecutter.day}}", "class_name": "Day{{cookiecutter.day}}" diff --git a/template/hooks/pre_gen_project.py b/template/hooks/pre_gen_project.py index adb581af..0c0a534b 100644 --- a/template/hooks/pre_gen_project.py +++ b/template/hooks/pre_gen_project.py @@ -3,6 +3,7 @@ MODULE_REGEX = r"^[_a-zA-Z][_a-zA-Z0-9]+$" day_name = "{{ cookiecutter.day }}" +year_name = "{{ cookiecutter.year }}" # Convert to int: try: @@ -11,11 +12,22 @@ print(f"ERROR: day_name: {day_name} is not a valid integer!") sys.exit(1) +try: + int_year_name = int(year_name) +except ValueError: + print(f"ERROR: day_name: {year_name} is not a valid integer!") + sys.exit(1) if not (1 <= int_day_name <= 25): print(f"ERROR: day_name: {day_name} is not a valid day, must be between 1 and 25") sys.exit(1) +if not (2015 <= int_year_name <= 2025): + print( + f"ERROR: day_name: {day_name} is not a valid day, must be between 2015 and 2025" + ) + sys.exit(1) + # Check that we have a leading zero when needed: prefix_day_name = f"{int_day_name:02d}" if prefix_day_name != day_name: diff --git a/template/{{cookiecutter.advendofcode2019}}/src/solutions/{{cookiecutter.file_name}}.py b/template/{{cookiecutter.advendofcode2019}}/src/solutions/{{cookiecutter.file_name}}.py deleted file mode 100644 index 29ba2d1b..00000000 --- a/template/{{cookiecutter.advendofcode2019}}/src/solutions/{{cookiecutter.file_name}}.py +++ /dev/null @@ -1,15 +0,0 @@ -from utils.abstract import FileReaderSolution - - -class {{cookiecutter.class_name}}: - pass - - -class {{cookiecutter.class_name}}PartA({{cookiecutter.class_name}}, FileReaderSolution): - def solve(self, input_data: str) -> int: - raise NotImplementedError - - -class {{cookiecutter.class_name}}PartB({{cookiecutter.class_name}}, FileReaderSolution): - def solve(self, input_data: str) -> int: - raise NotImplementedError diff --git a/template/{{cookiecutter.advendofcode2019}}/tests/solutions/test_{{cookiecutter.file_name}}_a.py b/template/{{cookiecutter.advendofcode2019}}/tests/solutions/test_{{cookiecutter.file_name}}_a.py deleted file mode 100644 index e2b0ed6a..00000000 --- a/template/{{cookiecutter.advendofcode2019}}/tests/solutions/test_{{cookiecutter.file_name}}_a.py +++ /dev/null @@ -1,19 +0,0 @@ -import pytest - -from solutions.{{cookiecutter.file_name}} import {{cookiecutter.class_name}}PartA - - -class Test{{cookiecutter.class_name}}PartA: - @pytest.mark.skip("This code is not yet implemented.") - @pytest.mark.parametrize(("input_data", "expected_result"), [("", ""), ("", "")]) - def test_{{cookiecutter.file_name}}a_solve(self, input_data, expected_result): - solution = {{cookiecutter.class_name}}PartA() - result = solution.solve(input_data) - assert result == expected_result - - @pytest.mark.skip("This code is not yet implemented.") - def test_{{cookiecutter.file_name}}a_data(self): - """ Result we got when we did the real solution """ - solution = {{cookiecutter.class_name}}PartA() - res = solution("{{cookiecutter.directory_name}}/{{cookiecutter.file_name}}.txt") - assert res == 0 diff --git a/template/{{cookiecutter.advendofcode2019}}/tests/solutions/test_{{cookiecutter.file_name}}_b.py b/template/{{cookiecutter.advendofcode2019}}/tests/solutions/test_{{cookiecutter.file_name}}_b.py deleted file mode 100644 index 543ac75e..00000000 --- a/template/{{cookiecutter.advendofcode2019}}/tests/solutions/test_{{cookiecutter.file_name}}_b.py +++ /dev/null @@ -1,19 +0,0 @@ -import pytest - -from solutions.{{cookiecutter.file_name}} import {{cookiecutter.class_name}}PartB - - -class Test{{cookiecutter.class_name}}PartB: - @pytest.mark.skip("This code is not yet implemented.") - @pytest.mark.parametrize(("input_data", "expected_result"), [("", ""), ("", "")]) - def test_{{cookiecutter.file_name}}b_solve(self, input_data, expected_result): - solution = {{cookiecutter.class_name}}PartB() - result = solution.solve(input_data) - assert result == expected_result - - @pytest.mark.skip("This code is not yet implemented.") - def test_{{cookiecutter.file_name}}b_data(self): - """ Result we got when we did the real solution """ - solution = {{cookiecutter.class_name}}PartB() - res = solution("{{cookiecutter.directory_name}}/{{cookiecutter.file_name}}.txt") - assert res == 0 diff --git a/template/{{cookiecutter.adventofcode}}/src/adventofcode{{cookiecutter.year}}/data/{{cookiecutter.directory_name}}/{{cookiecutter.file_name}}.txt b/template/{{cookiecutter.adventofcode}}/src/adventofcode{{cookiecutter.year}}/data/{{cookiecutter.directory_name}}/{{cookiecutter.file_name}}.txt new file mode 100644 index 00000000..e69de29b diff --git a/template/{{cookiecutter.adventofcode}}/src/adventofcode{{cookiecutter.year}}/data/{{cookiecutter.directory_name}}/{{cookiecutter.file_name}}_test.txt b/template/{{cookiecutter.adventofcode}}/src/adventofcode{{cookiecutter.year}}/data/{{cookiecutter.directory_name}}/{{cookiecutter.file_name}}_test.txt new file mode 100644 index 00000000..e69de29b diff --git a/template/{{cookiecutter.advendofcode2016}}/src/adventofcode2016/solutions/{{cookiecutter.file_name}}.py b/template/{{cookiecutter.adventofcode}}/src/adventofcode{{cookiecutter.year}}/{{cookiecutter.file_name}}.py similarity index 87% rename from template/{{cookiecutter.advendofcode2016}}/src/adventofcode2016/solutions/{{cookiecutter.file_name}}.py rename to template/{{cookiecutter.adventofcode}}/src/adventofcode{{cookiecutter.year}}/{{cookiecutter.file_name}}.py index c9dbeb81..06b803b0 100644 --- a/template/{{cookiecutter.advendofcode2016}}/src/adventofcode2016/solutions/{{cookiecutter.file_name}}.py +++ b/template/{{cookiecutter.adventofcode}}/src/adventofcode{{cookiecutter.year}}/{{cookiecutter.file_name}}.py @@ -1,6 +1,6 @@ from __future__ import annotations -from adventofcode2016.utils.abstract import FileReaderSolution +from adventofcode.utils.abstract import FileReaderSolution class {{cookiecutter.class_name}}: diff --git a/template/{{cookiecutter.advendofcode2016}}/tests/solutions/test_{{cookiecutter.file_name}}_a.py b/template/{{cookiecutter.adventofcode}}/tests/adventofcode{{cookiecutter.year}}/test_{{cookiecutter.file_name}}_a.py similarity index 68% rename from template/{{cookiecutter.advendofcode2016}}/tests/solutions/test_{{cookiecutter.file_name}}_a.py rename to template/{{cookiecutter.adventofcode}}/tests/adventofcode{{cookiecutter.year}}/test_{{cookiecutter.file_name}}_a.py index b1d0d5d4..9c275e46 100644 --- a/template/{{cookiecutter.advendofcode2016}}/tests/solutions/test_{{cookiecutter.file_name}}_a.py +++ b/template/{{cookiecutter.adventofcode}}/tests/adventofcode{{cookiecutter.year}}/test_{{cookiecutter.file_name}}_a.py @@ -1,9 +1,15 @@ import pytest -from adventofcode2016.solutions.{{cookiecutter.file_name}} import {{cookiecutter.class_name}}PartA +from adventofcode{{cookiecutter.year}}.{{cookiecutter.file_name}} import {{cookiecutter.class_name}}PartA class Test{{cookiecutter.class_name}}PartA: + @pytest.mark.xfail(reason="Not yet implemented", raises=NotImplementedError) + def test_{{cookiecutter.file_name}}a_testdata(self, testdata): + solution = {{cookiecutter.class_name}}PartA() + result = solution.solve(testdata) + assert result == 0 + @pytest.mark.xfail(reason="Not yet implemented", raises=NotImplementedError) @pytest.mark.parametrize(("input_data", "expected_result"), [("", ""), ("", "")]) def test_{{cookiecutter.file_name}}a_solve(self, input_data, expected_result): diff --git a/template/{{cookiecutter.advendofcode2016}}/tests/solutions/test_{{cookiecutter.file_name}}_b.py b/template/{{cookiecutter.adventofcode}}/tests/adventofcode{{cookiecutter.year}}/test_{{cookiecutter.file_name}}_b.py similarity index 68% rename from template/{{cookiecutter.advendofcode2016}}/tests/solutions/test_{{cookiecutter.file_name}}_b.py rename to template/{{cookiecutter.adventofcode}}/tests/adventofcode{{cookiecutter.year}}/test_{{cookiecutter.file_name}}_b.py index 7db011e4..f8a813e8 100644 --- a/template/{{cookiecutter.advendofcode2016}}/tests/solutions/test_{{cookiecutter.file_name}}_b.py +++ b/template/{{cookiecutter.adventofcode}}/tests/adventofcode{{cookiecutter.year}}/test_{{cookiecutter.file_name}}_b.py @@ -1,9 +1,15 @@ import pytest -from adventofcode2016.solutions.{{cookiecutter.file_name}} import {{cookiecutter.class_name}}PartB +from adventofcode{{cookiecutter.year}}.{{cookiecutter.file_name}} import {{cookiecutter.class_name}}PartB class Test{{cookiecutter.class_name}}PartB: + @pytest.mark.xfail(reason="Not yet implemented", raises=NotImplementedError) + def test_{{cookiecutter.file_name}}b_testdata(self, testdata): + solution = {{cookiecutter.class_name}}PartB() + result = solution.solve(testdata) + assert result == 0 + @pytest.mark.xfail(reason="Not yet implemented", raises=NotImplementedError) @pytest.mark.parametrize(("input_data", "expected_result"), [("", ""), ("", "")]) def test_{{cookiecutter.file_name}}b_solve(self, input_data, expected_result): diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/adventofcode2016/test_day01_a.py b/tests/adventofcode2016/test_day01_a.py index 6a0657e1..b5f8442f 100644 --- a/tests/adventofcode2016/test_day01_a.py +++ b/tests/adventofcode2016/test_day01_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day01 import Day01PartA, Instruction +from adventofcode2016.day01 import Day01PartA, Instruction class TestDay01PartA: diff --git a/tests/adventofcode2016/test_day01_b.py b/tests/adventofcode2016/test_day01_b.py index 690d8d0f..54aa0642 100644 --- a/tests/adventofcode2016/test_day01_b.py +++ b/tests/adventofcode2016/test_day01_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day01 import Day01PartB +from adventofcode2016.day01 import Day01PartB class TestDay01PartB: diff --git a/tests/adventofcode2016/test_day02_a.py b/tests/adventofcode2016/test_day02_a.py index 7555aaf4..7ac7a949 100644 --- a/tests/adventofcode2016/test_day02_a.py +++ b/tests/adventofcode2016/test_day02_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day02 import Day02PartA, XYPoint +from adventofcode2016.day02 import Day02PartA, XYPoint class TestDay02PartA: diff --git a/tests/adventofcode2016/test_day02_b.py b/tests/adventofcode2016/test_day02_b.py index 73697406..f425515e 100644 --- a/tests/adventofcode2016/test_day02_b.py +++ b/tests/adventofcode2016/test_day02_b.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day02 import Day02PartB, XYPoint +from adventofcode2016.day02 import Day02PartB, XYPoint class TestDay02PartB: diff --git a/tests/adventofcode2016/test_day03_a.py b/tests/adventofcode2016/test_day03_a.py index 2eafbcbb..dd81cd06 100644 --- a/tests/adventofcode2016/test_day03_a.py +++ b/tests/adventofcode2016/test_day03_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day03 import Day03PartA +from adventofcode2016.day03 import Day03PartA class TestDay03PartA: diff --git a/tests/adventofcode2016/test_day03_b.py b/tests/adventofcode2016/test_day03_b.py index 439897e2..ce740677 100644 --- a/tests/adventofcode2016/test_day03_b.py +++ b/tests/adventofcode2016/test_day03_b.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day03 import Day03PartB +from adventofcode2016.day03 import Day03PartB class TestDay03PartB: diff --git a/tests/adventofcode2016/test_day04_a.py b/tests/adventofcode2016/test_day04_a.py index 98935b39..8193ea39 100644 --- a/tests/adventofcode2016/test_day04_a.py +++ b/tests/adventofcode2016/test_day04_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day04 import Day04PartA, Room +from adventofcode2016.day04 import Day04PartA, Room class TestDay04PartA: diff --git a/tests/adventofcode2016/test_day04_b.py b/tests/adventofcode2016/test_day04_b.py index deedb7a8..0b299ec0 100644 --- a/tests/adventofcode2016/test_day04_b.py +++ b/tests/adventofcode2016/test_day04_b.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day04 import Day04PartB, Room +from adventofcode2016.day04 import Day04PartB, Room class TestDay04PartB: diff --git a/tests/adventofcode2016/test_day05_a.py b/tests/adventofcode2016/test_day05_a.py index 223208dd..7da1a048 100644 --- a/tests/adventofcode2016/test_day05_a.py +++ b/tests/adventofcode2016/test_day05_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day05 import Day05PartA +from adventofcode2016.day05 import Day05PartA class TestDay05PartA: diff --git a/tests/adventofcode2016/test_day05_b.py b/tests/adventofcode2016/test_day05_b.py index 6e6d48ef..267ff310 100644 --- a/tests/adventofcode2016/test_day05_b.py +++ b/tests/adventofcode2016/test_day05_b.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day05 import Day05PartB +from adventofcode2016.day05 import Day05PartB class TestDay05PartB: diff --git a/tests/adventofcode2016/test_day06_a.py b/tests/adventofcode2016/test_day06_a.py index a9d6515c..4fbf260c 100644 --- a/tests/adventofcode2016/test_day06_a.py +++ b/tests/adventofcode2016/test_day06_a.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day06 import Day06PartA +from adventofcode2016.day06 import Day06PartA class TestDay06PartA: diff --git a/tests/adventofcode2016/test_day06_b.py b/tests/adventofcode2016/test_day06_b.py index 53289ffd..3448c926 100644 --- a/tests/adventofcode2016/test_day06_b.py +++ b/tests/adventofcode2016/test_day06_b.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day06 import Day06PartB +from adventofcode2016.day06 import Day06PartB class TestDay06PartB: diff --git a/tests/adventofcode2016/test_day07_a.py b/tests/adventofcode2016/test_day07_a.py index 5c8b3a0b..3685dc61 100644 --- a/tests/adventofcode2016/test_day07_a.py +++ b/tests/adventofcode2016/test_day07_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day07 import Day07PartA, IPv7 +from adventofcode2016.day07 import Day07PartA, IPv7 class TestDay07PartA: diff --git a/tests/adventofcode2016/test_day07_b.py b/tests/adventofcode2016/test_day07_b.py index 6ddf9f59..17a406a5 100644 --- a/tests/adventofcode2016/test_day07_b.py +++ b/tests/adventofcode2016/test_day07_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day07 import Day07PartB, IPv7 +from adventofcode2016.day07 import Day07PartB, IPv7 class TestDay07PartB: diff --git a/tests/adventofcode2016/test_day08_a.py b/tests/adventofcode2016/test_day08_a.py index c4ce233d..a204141f 100644 --- a/tests/adventofcode2016/test_day08_a.py +++ b/tests/adventofcode2016/test_day08_a.py @@ -1,12 +1,7 @@ import numpy as np import pytest -from adventofcode2016.solutions.day08 import ( - Day08PartA, - Direction, - Instruction, - Operation, -) +from adventofcode2016.day08 import Day08PartA, Direction, Instruction, Operation class TestDay08PartA: diff --git a/tests/adventofcode2016/test_day08_b.py b/tests/adventofcode2016/test_day08_b.py index dc291d2d..469e0e65 100644 --- a/tests/adventofcode2016/test_day08_b.py +++ b/tests/adventofcode2016/test_day08_b.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day08 import Day08PartB +from adventofcode2016.day08 import Day08PartB class TestDay08PartB: diff --git a/tests/adventofcode2016/test_day09_a.py b/tests/adventofcode2016/test_day09_a.py index 110d8089..e7afbce6 100644 --- a/tests/adventofcode2016/test_day09_a.py +++ b/tests/adventofcode2016/test_day09_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day09 import Day09PartA +from adventofcode2016.day09 import Day09PartA class TestDay09PartA: diff --git a/tests/adventofcode2016/test_day09_b.py b/tests/adventofcode2016/test_day09_b.py index 09ea1a12..38a683f6 100644 --- a/tests/adventofcode2016/test_day09_b.py +++ b/tests/adventofcode2016/test_day09_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day09 import Day09PartB +from adventofcode2016.day09 import Day09PartB class TestDay09PartB: diff --git a/tests/adventofcode2016/test_day10_a.py b/tests/adventofcode2016/test_day10_a.py index 6719c0e7..a2cbe3bf 100644 --- a/tests/adventofcode2016/test_day10_a.py +++ b/tests/adventofcode2016/test_day10_a.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day10 import Day10PartA +from adventofcode2016.day10 import Day10PartA class TestDay10PartA: diff --git a/tests/adventofcode2016/test_day10_b.py b/tests/adventofcode2016/test_day10_b.py index 93fae08c..b3e08eb5 100644 --- a/tests/adventofcode2016/test_day10_b.py +++ b/tests/adventofcode2016/test_day10_b.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day10 import Day10PartB +from adventofcode2016.day10 import Day10PartB class TestDay10PartB: diff --git a/tests/adventofcode2016/test_day11_a.py b/tests/adventofcode2016/test_day11_a.py index e9d8cfa2..80dced8a 100644 --- a/tests/adventofcode2016/test_day11_a.py +++ b/tests/adventofcode2016/test_day11_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day11 import Day11PartA, FacilityState +from adventofcode2016.day11 import Day11PartA, FacilityState class TestDay11PartA: @@ -61,11 +61,6 @@ def test_eq_facility(self, testdata): assert facility1 == facility2 assert hash(facility1) == hash(facility2) - @pytest.mark.skip - def test_facility_without_elevator(self): - with pytest.raises(ValueError, match="Elevator not found"): - FacilityState(floors=[]) - f1 = "The first floor contains a " @pytest.mark.parametrize( diff --git a/tests/adventofcode2016/test_day11_b.py b/tests/adventofcode2016/test_day11_b.py index b6d934d9..62e6692c 100644 --- a/tests/adventofcode2016/test_day11_b.py +++ b/tests/adventofcode2016/test_day11_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day11 import Day11PartB +from adventofcode2016.day11 import Day11PartB class TestDay11PartB: diff --git a/tests/adventofcode2016/test_day12_a.py b/tests/adventofcode2016/test_day12_a.py index f851a804..ae453c18 100644 --- a/tests/adventofcode2016/test_day12_a.py +++ b/tests/adventofcode2016/test_day12_a.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day12 import Day12PartA +from adventofcode2016.day12 import Day12PartA class TestDay12PartA: diff --git a/tests/adventofcode2016/test_day12_b.py b/tests/adventofcode2016/test_day12_b.py index 856fc211..ad6b3278 100644 --- a/tests/adventofcode2016/test_day12_b.py +++ b/tests/adventofcode2016/test_day12_b.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day12 import Day12PartB +from adventofcode2016.day12 import Day12PartB class TestDay12PartB: diff --git a/tests/adventofcode2016/test_day13_a.py b/tests/adventofcode2016/test_day13_a.py index 6f3ef8fa..c8d37301 100644 --- a/tests/adventofcode2016/test_day13_a.py +++ b/tests/adventofcode2016/test_day13_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day13 import Day13PartA, Maze, MazeLocation +from adventofcode2016.day13 import Day13PartA, Maze, MazeLocation class TestDay13PartA: diff --git a/tests/adventofcode2016/test_day13_b.py b/tests/adventofcode2016/test_day13_b.py index 2c172d85..dbf6f497 100644 --- a/tests/adventofcode2016/test_day13_b.py +++ b/tests/adventofcode2016/test_day13_b.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day13 import Day13PartB +from adventofcode2016.day13 import Day13PartB class TestDay13PartB: diff --git a/tests/adventofcode2016/test_day14_a.py b/tests/adventofcode2016/test_day14_a.py index 3c1b231f..082d2161 100644 --- a/tests/adventofcode2016/test_day14_a.py +++ b/tests/adventofcode2016/test_day14_a.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day14 import Day14PartA +from adventofcode2016.day14 import Day14PartA class TestDay14PartA: diff --git a/tests/adventofcode2016/test_day14_b.py b/tests/adventofcode2016/test_day14_b.py index 118bb98c..88e609b1 100644 --- a/tests/adventofcode2016/test_day14_b.py +++ b/tests/adventofcode2016/test_day14_b.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day14 import Day14PartB +from adventofcode2016.day14 import Day14PartB class TestDay14PartB: diff --git a/tests/adventofcode2016/test_day15_a.py b/tests/adventofcode2016/test_day15_a.py index 7697ad30..fe073bd0 100644 --- a/tests/adventofcode2016/test_day15_a.py +++ b/tests/adventofcode2016/test_day15_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day15 import Day15PartA, Disc +from adventofcode2016.day15 import Day15PartA, Disc class TestDay15PartA: diff --git a/tests/adventofcode2016/test_day15_b.py b/tests/adventofcode2016/test_day15_b.py index cdb08d08..78a3f06f 100644 --- a/tests/adventofcode2016/test_day15_b.py +++ b/tests/adventofcode2016/test_day15_b.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day15 import Day15PartB +from adventofcode2016.day15 import Day15PartB class TestDay15PartB: diff --git a/tests/adventofcode2016/test_day16_a.py b/tests/adventofcode2016/test_day16_a.py index 2578d89d..38e5c017 100644 --- a/tests/adventofcode2016/test_day16_a.py +++ b/tests/adventofcode2016/test_day16_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day16 import Day16PartA +from adventofcode2016.day16 import Day16PartA class TestDay16PartA: diff --git a/tests/adventofcode2016/test_day16_b.py b/tests/adventofcode2016/test_day16_b.py index cb62443b..43a48c0b 100644 --- a/tests/adventofcode2016/test_day16_b.py +++ b/tests/adventofcode2016/test_day16_b.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day16 import Day16PartB +from adventofcode2016.day16 import Day16PartB class TestDay16PartB: diff --git a/tests/adventofcode2016/test_day17_a.py b/tests/adventofcode2016/test_day17_a.py index ea194b8e..b5106db2 100644 --- a/tests/adventofcode2016/test_day17_a.py +++ b/tests/adventofcode2016/test_day17_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day17 import Day17PartA, MazeLocation +from adventofcode2016.day17 import Day17PartA, MazeLocation class TestDay17PartA: @@ -31,7 +31,6 @@ def test_day17a_solve(self, input_data, expected_result): result = Day17PartA().run_search(input_data) assert result == expected_result - @pytest.mark.xfail(reason="Not yet implemented", raises=NotImplementedError) def test_day17a_data(self): """Result we got when we did the real solution""" solution = Day17PartA() diff --git a/tests/adventofcode2016/test_day17_b.py b/tests/adventofcode2016/test_day17_b.py index e45e9799..25e37ee5 100644 --- a/tests/adventofcode2016/test_day17_b.py +++ b/tests/adventofcode2016/test_day17_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day17 import Day17PartB +from adventofcode2016.day17 import Day17PartB class TestDay17PartB: diff --git a/tests/adventofcode2016/test_day18_a.py b/tests/adventofcode2016/test_day18_a.py index 0e54fd55..fd93e7ac 100644 --- a/tests/adventofcode2016/test_day18_a.py +++ b/tests/adventofcode2016/test_day18_a.py @@ -2,7 +2,7 @@ import pytest -from adventofcode2016.solutions.day18 import Day18PartA +from adventofcode2016.day18 import Day18PartA class TestDay18PartA: diff --git a/tests/adventofcode2016/test_day18_b.py b/tests/adventofcode2016/test_day18_b.py index b55066a4..cf80ae04 100644 --- a/tests/adventofcode2016/test_day18_b.py +++ b/tests/adventofcode2016/test_day18_b.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day18 import Day18PartB +from adventofcode2016.day18 import Day18PartB class TestDay18PartB: diff --git a/tests/adventofcode2016/test_day19_a.py b/tests/adventofcode2016/test_day19_a.py index 8631a65e..551a7549 100644 --- a/tests/adventofcode2016/test_day19_a.py +++ b/tests/adventofcode2016/test_day19_a.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day19 import Day19PartA +from adventofcode2016.day19 import Day19PartA class TestDay19PartA: diff --git a/tests/adventofcode2016/test_day19_b.py b/tests/adventofcode2016/test_day19_b.py index fb95ec3a..ce8ea267 100644 --- a/tests/adventofcode2016/test_day19_b.py +++ b/tests/adventofcode2016/test_day19_b.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day19 import Day19PartB +from adventofcode2016.day19 import Day19PartB class TestDay19PartB: diff --git a/tests/adventofcode2016/test_day20_a.py b/tests/adventofcode2016/test_day20_a.py index cadc2a5f..7f7229aa 100644 --- a/tests/adventofcode2016/test_day20_a.py +++ b/tests/adventofcode2016/test_day20_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day20 import Day20PartA +from adventofcode2016.day20 import Day20PartA class TestDay20PartA: diff --git a/tests/adventofcode2016/test_day20_b.py b/tests/adventofcode2016/test_day20_b.py index 84ad9af9..10609b50 100644 --- a/tests/adventofcode2016/test_day20_b.py +++ b/tests/adventofcode2016/test_day20_b.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day20 import Day20PartB +from adventofcode2016.day20 import Day20PartB class TestDay20PartB: diff --git a/tests/adventofcode2016/test_day21_a.py b/tests/adventofcode2016/test_day21_a.py index 649befb1..9ab3ed16 100644 --- a/tests/adventofcode2016/test_day21_a.py +++ b/tests/adventofcode2016/test_day21_a.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day21 import Day21PartA +from adventofcode2016.day21 import Day21PartA class TestDay21PartA: diff --git a/tests/adventofcode2016/test_day21_b.py b/tests/adventofcode2016/test_day21_b.py index bf801d7b..d652412a 100644 --- a/tests/adventofcode2016/test_day21_b.py +++ b/tests/adventofcode2016/test_day21_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day21 import Day21PartB +from adventofcode2016.day21 import Day21PartB class TestDay21PartB: diff --git a/tests/adventofcode2016/test_day22_a.py b/tests/adventofcode2016/test_day22_a.py index 24ca2628..06435936 100644 --- a/tests/adventofcode2016/test_day22_a.py +++ b/tests/adventofcode2016/test_day22_a.py @@ -1,4 +1,4 @@ -from adventofcode2016.solutions.day22 import Day22PartA, Node +from adventofcode2016.day22 import Day22PartA, Node class TestDay22PartA: diff --git a/tests/adventofcode2016/test_day22_b.py b/tests/adventofcode2016/test_day22_b.py index 5fd7100d..d15f0807 100644 --- a/tests/adventofcode2016/test_day22_b.py +++ b/tests/adventofcode2016/test_day22_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2016.solutions.day22 import Day22PartB +from adventofcode2016.day22 import Day22PartB class TestDay22PartB: diff --git a/tests/adventofcode2018/test_day01_a.py b/tests/adventofcode2018/test_day01_a.py new file mode 100644 index 00000000..1d56f33d --- /dev/null +++ b/tests/adventofcode2018/test_day01_a.py @@ -0,0 +1,21 @@ +import pytest + +from adventofcode2018.day01 import Day1PartA + + +class TestDay01PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [("+1 -2 +3 +1", 3), ("+1 +1 +1", 3), ("+1 +1 -2", 0), ("-1 -2 -3", -6)], + ) + def test_day01(self, input_data, expected_result): + d1 = Day1PartA() + res = d1.solve(input_data) + assert expected_result == res + + def test_day01_data(self): + """Result we got when we did the real solution""" + d1 = Day1PartA() + res = d1("day01/day_01_part01.txt") + + assert res == 525 diff --git a/tests/adventofcode2018/test_day01_b.py b/tests/adventofcode2018/test_day01_b.py new file mode 100644 index 00000000..08d1c058 --- /dev/null +++ b/tests/adventofcode2018/test_day01_b.py @@ -0,0 +1,27 @@ +import pytest + +from adventofcode2018.day01 import Day1PartB + + +class TestDay01PartB: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ("+1 -2 +3 +1 +1 -2", 2), + ("+1 -1", 0), + ("+3 +3 +4 -2 -4", 10), + ("-6 +3 +8 +5 -6", 5), + ("+7 +7 -2 -7 -4", 14), + ], + ) + def test_day01_b(self, input_data, expected_result): + d1 = Day1PartB() + res = d1.solve(input_data) + assert expected_result == res + + def test_day01_data(self): + """Result we got when we did the real solution""" + d1 = Day1PartB() + res = d1("day01/day_01_part01.txt") + + assert res == 75749 diff --git a/tests/adventofcode2018/test_day02_a.py b/tests/adventofcode2018/test_day02_a.py new file mode 100644 index 00000000..d6a66f46 --- /dev/null +++ b/tests/adventofcode2018/test_day02_a.py @@ -0,0 +1,55 @@ +import pytest + +from adventofcode2018.day02 import Day2PartA + + +class TestDay02PartA: + @pytest.mark.parametrize( + ("input_data", "expected_twice", "expected_thrice"), + [ + ("abcdef", 0, 0), + ("bababc", 1, 1), + ("abbcde", 1, 0), + ("abcccd", 0, 1), + ("aabcdd", 1, 0), + ("abcdee", 1, 0), + ("ababab", 0, 1), + ], + ) + def test_day02_checksum(self, input_data, expected_twice, expected_thrice): + solution = Day2PartA() + count_twice, count_thrice = solution.compute_counts(input_data) + assert count_twice == expected_twice + assert count_thrice == expected_thrice + + @pytest.mark.parametrize( + ("input_data", "expected_twice", "expected_thrice"), + [ + ( + ["abcdef", "bababc", "abbcde", "abcccd", "aabcdd", "abcdee", "ababab"], + 4, + 3, + ) + ], + ) + def test_02_compute_factors(self, input_data, expected_twice, expected_thrice): + solution = Day2PartA() + count_twice, count_thrice = solution.compute_factors(input_data) + assert count_twice == expected_twice + assert count_thrice == expected_thrice + + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [("abcdef bababc abbcde abcccd aabcdd abcdee ababab", 12)], + ) + def test_02_solve(self, input_data, expected_result): + solution = Day2PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day01_data(self): + """Result we got when we did the real solution""" + solution = Day2PartA() + res = solution("day02/day_02.txt") + + assert res == 4712 diff --git a/tests/adventofcode2018/test_day02_b.py b/tests/adventofcode2018/test_day02_b.py new file mode 100644 index 00000000..52305a9b --- /dev/null +++ b/tests/adventofcode2018/test_day02_b.py @@ -0,0 +1,58 @@ +import pytest + +from adventofcode2018.day02 import Day2PartB + + +class TestDay02PartB: + @pytest.mark.parametrize( + ("word1", "word2", "expected_distance"), + [("abcde", "axcye", 2), ("fghij", "fguij", 1)], + ) + def test_02_compute_distance_per_word(self, word1, word2, expected_distance): + solution = Day2PartB() + res = solution.compute_distance(word1, word2) + assert res == expected_distance + + @pytest.mark.parametrize( + ("input_data", "expected_result", "expected_distance"), + [ + ( + ["abcde", "fghij", "klmno", "pqrst", "fguij", "axcye", "wvxyz"], + ("fghij", "fguij"), + 1, + ) + ], + ) + def test_02_compute_shortest_distance( + self, input_data, expected_result, expected_distance + ): + solution = Day2PartB() + result, min_distance = solution.compute_shortest_distance(input_data) + assert result == expected_result + assert min_distance == expected_distance + + @pytest.mark.parametrize( + ("input_word1", "input_word2", "expected_result"), + [("fghij", "fguij", "fgij"), ("qwerewq", "qwzrewq", "qwrewq")], + ) + def test_02_compute_common_letters(self, input_word1, input_word2, expected_result): + solution = Day2PartB() + result = solution.compute_common_letters(input_word1, input_word2) + assert result == expected_result + + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [("abcde fghij klmno pqrst fguij axcye wvxyz", "fgij")], + ) + def test_02_solve(self, input_data, expected_result): + solution = Day2PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day02_data(self): + """Result we got when we did the real solution""" + solution = Day2PartB() + res = solution("day02/day_02.txt") + + assert res != "lufjygedpvbhtaxiwnorzmq" + assert res == "lufjygedpvfbhftxiwnaorzmq" diff --git a/tests/adventofcode2018/test_day03_a.py b/tests/adventofcode2018/test_day03_a.py new file mode 100644 index 00000000..014d1806 --- /dev/null +++ b/tests/adventofcode2018/test_day03_a.py @@ -0,0 +1,53 @@ +import pytest + +from adventofcode2018.day03 import Day3PartA + + +class TestDay03PartA: + def test_split_claim_into_sections(self): + string = "#1 @ 1,3: 4x4" + solution = Day3PartA() + result = solution.split_claim_into_sections(string) + expected_result = solution.Claim(id=1, left=1, top=3, width=4, height=4) + assert expected_result == result + + def test_split_invalid_claim(self): + string = "2@ 1:23x" + solution = Day3PartA() + with pytest.raises(ValueError): + solution.split_claim_into_sections(string) + + def test_print_map(self): + """ + This prints a map. We only test that it works, and doesn't give an error + """ + solution = Day3PartA() + solution.square_size = 11 + input_data = "#1 @ 1,3: 4x4", "#2 @ 3,1: 4x4", "#3 @ 5,5: 2x2" + solution.solve("\n".join(input_data)) + solution.print_map() + + @pytest.mark.parametrize( + ("input_data", "expected_result"), [(["#123 @ 3,2: 5x4"], 0)] + ) + def test_03_solve_simple(self, input_data, expected_result): + solution = Day3PartA() + input_data = "\n".join(input_data) + result = solution.solve(input_data) + assert result == expected_result + + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [(["#1 @ 1,3: 4x4", "#2 @ 3,1: 4x4", "#3 @ 5,5: 2x2"], 4)], + ) + def test_03_solve(self, input_data, expected_result): + solution = Day3PartA() + input_data = "\n".join(input_data) + result = solution.solve(input_data) + assert result == expected_result + + def test_day03_data(self): + """Result we got when we did the real solution""" + solution = Day3PartA() + res = solution("day03/day_03.txt") + assert res == 113716 diff --git a/tests/adventofcode2018/test_day03_b.py b/tests/adventofcode2018/test_day03_b.py new file mode 100644 index 00000000..f168177f --- /dev/null +++ b/tests/adventofcode2018/test_day03_b.py @@ -0,0 +1,22 @@ +import pytest + +from adventofcode2018.day03 import Day3PartB + + +class TestDay03PartB: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [(["#1 @ 1,3: 4x4", "#2 @ 3,1: 4x4", "#3 @ 5,5: 2x2"], 3)], + ) + def test_03_solve(self, input_data, expected_result): + solution = Day3PartB() + solution.square_size = 11 + input_data = "\n".join(input_data) + result = solution.solve(input_data) + assert result == expected_result + + def test_day03_data(self): + """Result we got when we did the real solution""" + solution = Day3PartB() + res = solution("day03/day_03.txt") + assert res == 742 diff --git a/tests/adventofcode2018/test_day04_a.py b/tests/adventofcode2018/test_day04_a.py new file mode 100644 index 00000000..0cb55272 --- /dev/null +++ b/tests/adventofcode2018/test_day04_a.py @@ -0,0 +1,80 @@ +import random + +import pytest + +from adventofcode2018.day04 import Day4PartA + + +class TestDay04PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ( + "[1518-11-01 00:00] Guard #10 begins shift", + { + "month": 11, + "day": 1, + "hour": 0, + "minute": 0, + "mode": "guard", + "guard": 10, + }, + ), + ( + "[1518-11-01 00:05] falls asleep", + { + "month": 11, + "day": 1, + "hour": 0, + "minute": 5, + "mode": "asleep", + "guard": False, + }, + ), + ], + ) + def test_split_line_into_sections(self, input_data, expected_result): + solution = Day4PartA() + result = solution.split_line_into_sections(input_data) + assert expected_result == result + + def test_split_invalid_line_into_sections(self): + input_data = "[1518-11-01 xx:xx] Guard #10 ends shift" + solution = Day4PartA() + with pytest.raises(ValueError): + solution.split_line_into_sections(input_data) + + test_data = [ + "[1518-11-01 00:00] Guard #10 begins shift", + "[1518-11-01 00:05] falls asleep", + "[1518-11-01 00:25] wakes up", + "[1518-11-01 00:30] falls asleep", + "[1518-11-01 00:55] wakes up", + "[1518-11-01 23:58] Guard #99 begins shift", + "[1518-11-02 00:40] falls asleep", + "[1518-11-02 00:50] wakes up", + "[1518-11-03 00:05] Guard #10 begins shift", + "[1518-11-03 00:24] falls asleep", + "[1518-11-03 00:29] wakes up", + "[1518-11-04 00:02] Guard #99 begins shift", + "[1518-11-04 00:36] falls asleep", + "[1518-11-04 00:46] wakes up", + "[1518-11-05 00:03] Guard #99 begins shift", + "[1518-11-05 00:45] falls asleep", + "[1518-11-05 00:55] wakes up", + ] + + def test_04a_solve(self): + solution = Day4PartA() + # Because our input is shuffled, we do the same here. + shuffled_test_data = self.test_data.copy() + random.shuffle(shuffled_test_data) + input_data = "\n".join(shuffled_test_data) + result = solution.solve(input_data) + assert result == 240 + + def test_day04a_data(self): + """Result we got when we did the real solution""" + solution = Day4PartA() + res = solution("day04/day_04.txt") + assert res == 87681 diff --git a/tests/adventofcode2018/test_day04_b.py b/tests/adventofcode2018/test_day04_b.py new file mode 100644 index 00000000..a4b60304 --- /dev/null +++ b/tests/adventofcode2018/test_day04_b.py @@ -0,0 +1,40 @@ +import random + +from adventofcode2018.day04 import Day4PartB + + +class TestDay04PartA: + test_data = [ + "[1518-11-01 00:00] Guard #10 begins shift", + "[1518-11-01 00:05] falls asleep", + "[1518-11-01 00:25] wakes up", + "[1518-11-01 00:30] falls asleep", + "[1518-11-01 00:55] wakes up", + "[1518-11-01 23:58] Guard #99 begins shift", + "[1518-11-02 00:40] falls asleep", + "[1518-11-02 00:50] wakes up", + "[1518-11-03 00:05] Guard #10 begins shift", + "[1518-11-03 00:24] falls asleep", + "[1518-11-03 00:29] wakes up", + "[1518-11-04 00:02] Guard #99 begins shift", + "[1518-11-04 00:36] falls asleep", + "[1518-11-04 00:46] wakes up", + "[1518-11-05 00:03] Guard #99 begins shift", + "[1518-11-05 00:45] falls asleep", + "[1518-11-05 00:55] wakes up", + ] + + def test_04b_solve(self): + solution = Day4PartB() + # Because our input is shuffled, we do the same here. + shuffled_test_data = self.test_data.copy() + random.shuffle(shuffled_test_data) + input_data = "\n".join(shuffled_test_data) + result = solution.solve(input_data) + assert result == 4455 + + def test_day04b_data(self): + """Result we got when we did the real solution""" + solution = Day4PartB() + res = solution("day04/day_04.txt") + assert res == 136461 diff --git a/tests/adventofcode2018/test_day05_a.py b/tests/adventofcode2018/test_day05_a.py new file mode 100644 index 00000000..15b937b6 --- /dev/null +++ b/tests/adventofcode2018/test_day05_a.py @@ -0,0 +1,35 @@ +import pytest + +from adventofcode2018.day05 import Day5PartA + + +class TestDay05PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ("Aa", ""), + ("abBA", ""), + ("abAB", "abAB"), + ("aabAAB", "aabAAB"), + ("dabAcCaCBAcCcaDA", "dabCBAcaDA"), + ], + ) + def test_day05a_reduce(self, input_data, expected_result): + solution = Day5PartA() + result = solution.recude_input(input_data) + assert result == expected_result + + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [("Aa", 0), ("abBA", 0), ("abAB", 4), ("aabAAB", 6), ("dabAcCaCBAcCcaDA", 10)], + ) + def test_day05a_solve(self, input_data, expected_result): + solution = Day5PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day05a_data(self): + """Result we got when we did the real solution""" + solution = Day5PartA() + res = solution("day05/day_05.txt") + assert res == 10888 diff --git a/tests/adventofcode2018/test_day05_b.py b/tests/adventofcode2018/test_day05_b.py new file mode 100644 index 00000000..daadd65f --- /dev/null +++ b/tests/adventofcode2018/test_day05_b.py @@ -0,0 +1,33 @@ +import pytest + +from adventofcode2018.day05 import Day5PartB + + +class TestDay05PartB: + @pytest.mark.parametrize( + ("input_data", "remove_combo", "expected_string"), + [ + ("dabAcCaCBAcCcaDA", "a", "dbCBcD"), + ("dabAcCaCBAcCcaDA", "B", "daCAcaDA"), + ("dabAcCaCBAcCcaDA", "c", "daDA"), + ("dabAcCaCBAcCcaDA", "D", "abCBAc"), + ], + ) + def test_day05b_remove_and_react(self, input_data, remove_combo, expected_string): + solution = Day5PartB() + result = solution.remove_and_react(input_data, remove_combo) + assert result == expected_string + + @pytest.mark.parametrize( + ("input_data", "expected_result"), [("dabAcCaCBAcCcaDA", 4)] + ) + def test_day05b_solve(self, input_data, expected_result): + solution = Day5PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day05b_data(self): + """Result we got when we did the real solution""" + solution = Day5PartB() + res = solution("day05/day_05.txt") + assert res == 6952 diff --git a/tests/adventofcode2018/test_day06_a.py b/tests/adventofcode2018/test_day06_a.py new file mode 100644 index 00000000..1a9e5e2b --- /dev/null +++ b/tests/adventofcode2018/test_day06_a.py @@ -0,0 +1,43 @@ +import pytest + +from adventofcode2018.day06 import Day06PartA + + +class TestDay06PartA: + @pytest.mark.parametrize( + ("test_input", "expected_result"), + [(["1, 1", "1, 6", "8, 3", "3, 4", "5, 5", "8, 9"], 17)], + ) + def test_day06a_grid(self, test_input, expected_result): + solution = Day06PartA() + solution.generate_points(test_input) + solution.generate_grid() + solution.generate_distance() + solution.print_grid() + result = solution.compute_biggest_area() + assert result == expected_result + + @pytest.mark.parametrize( + ("a", "b", "x", "y", "expected_result"), + [(1, 1, 3, 3, 4), (1, 1, 1, 2, 1), (1, 1, 1, 1, 0)], + ) + def test_day06a_compute_distance(self, a, b, x, y, expected_result): + solution = Day06PartA() + result = solution.compute_distance(a, b, x, y) + assert result == expected_result + + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [(["1, 1", "1, 6", "8, 3", "3, 4", "5, 5", "8, 9"], 17)], + ) + def test_day06a_solve(self, input_data, expected_result): + input_data = "\n".join(input_data) + solution = Day06PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day06a_data(self): + """Result we got when we did the real solution""" + solution = Day06PartA() + res = solution("day_06/day06.txt") + assert res == 4754 diff --git a/tests/adventofcode2018/test_day06_b.py b/tests/adventofcode2018/test_day06_b.py new file mode 100644 index 00000000..1ad4dba8 --- /dev/null +++ b/tests/adventofcode2018/test_day06_b.py @@ -0,0 +1,43 @@ +import pytest + +from adventofcode2018.day06 import Day06PartB + + +class TestDay06PartB: + test_input = ["1, 1", "1, 6", "8, 3", "3, 4", "5, 5", "8, 9"] + + @pytest.mark.parametrize( + ("test_input", "x", "y", "expected_result"), [(test_input, 4, 3, 30)] + ) + def test_day06b_get_score_for_location(self, test_input, x, y, expected_result): + # Get the score for a specific location + solution = Day06PartB() + solution.generate_points(test_input) + solution.generate_grid() + result = solution.get_score_for_location(x, y) + assert result == expected_result + + @pytest.mark.parametrize( + ("test_input", "max_score", "expected_result"), [(test_input, 32, 16)] + ) + def test_day06_test_region(self, test_input, max_score, expected_result): + solution = Day06PartB() + solution.generate_points(test_input) + solution.generate_grid() + result = solution.compute_area(max_score) + assert result == expected_result + + @pytest.mark.parametrize(("input_data", "expected_result"), [(test_input, 16)]) + def test_day06b_solve(self, input_data, expected_result): + # The test case requires a different max score then the final result. + # We supply this value, but set it to a default value in the final solution. + input_data = "\n".join(input_data) + solution = Day06PartB() + result = solution.solve(input_data, 32) + assert result == expected_result + + def test_day06b_data(self): + """Result we got when we did the real solution""" + solution = Day06PartB() + res = solution("day_06/day06.txt") + assert res == 42344 diff --git a/tests/adventofcode2018/test_day07_a.py b/tests/adventofcode2018/test_day07_a.py new file mode 100644 index 00000000..e757dc00 --- /dev/null +++ b/tests/adventofcode2018/test_day07_a.py @@ -0,0 +1,57 @@ +import pytest + +from adventofcode2018.day07 import Day07PartA + + +class TestDay07PartA: + test_input = [ + "Step C must be finished before step A can begin.", + "Step C must be finished before step F can begin.", + "Step A must be finished before step B can begin.", + "Step A must be finished before step D can begin.", + "Step B must be finished before step E can begin.", + "Step D must be finished before step E can begin.", + "Step F must be finished before step E can begin.", + ] + + def test_parse_string(self): + solution = Day07PartA() + + assert solution.parse_string( + "Step C must be finished before step A can begin." + ) == ("C", "A") + + def test_day07a_get_children(self): + input_data = "\n".join(self.test_input) + solution = Day07PartA() + input_lines = input_data.split("\n") + nodes = solution.parse_strings(input_lines) + solution.build_tree(nodes) + assert solution.get_parent("E") == ["B", "D", "F"] + assert solution.get_parent("F") == ["C"] + assert solution.get_parent("C") == [] + + def test_day07a_get_root(self): + input_data = "\n".join(self.test_input) + solution = Day07PartA() + input_lines = input_data.split("\n") + nodes = solution.parse_strings(input_lines) + solution.build_tree(nodes) + assert solution.get_root() == "C" + + @pytest.mark.parametrize( + ("input_data", "expected_result"), [(test_input, "CABDFE")] + ) + def test_day07a_solve(self, input_data, expected_result): + input_data = "\n".join(input_data) + solution = Day07PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day07a_data(self): + """Result we got when we did the real solution""" + solution = Day07PartA() + res = solution("day_07/day07.txt") + assert res != "SEFDGJLPKNRYOAMQIUHTCVWZXB" + assert res[0] != "C" + assert res == "FDSEGJLPKNRYOAMQIUHTCVWZXB" diff --git a/tests/adventofcode2018/test_day07_b.py b/tests/adventofcode2018/test_day07_b.py new file mode 100644 index 00000000..d1ef0d36 --- /dev/null +++ b/tests/adventofcode2018/test_day07_b.py @@ -0,0 +1,66 @@ +import pytest + +from adventofcode2018.day07 import Day07PartB, TimedNode + + +class TestDay07PartB: + def test_day07b_timed_node(self): + node = TimedNode("C", extra_seconds=5) + assert node.seconds_worked_on == 0 + # Seconds left == 3 + 5 + # A=1, B=2, C=3 + assert node.seconds_to_work == 8 + assert node.time_left() == 8 + + node = TimedNode("C", extra_seconds=0) + assert node.is_complete() is False + assert node.time_left() == 3 + + node.work() + assert node.is_complete() is False + assert node.time_left() == 2 + + node.work() + assert node.is_complete() is False + assert node.time_left() == 1 + + node.work() + assert node.is_complete() is True + assert node.time_left() == 0 + assert repr(node) == "C (3 - 3)" + + # When we work more, keep time left at 0 + node.work() + assert node.is_complete() is True + assert node.time_left() == 0 + + # also test the real input; + node = TimedNode("Z", extra_seconds=60) + assert node.seconds_worked_on == 0 + assert node.seconds_to_work == 86 + assert node.time_left() == 86 + assert repr(node) == "Z (86 - 0)" + + test_input = [ + "Step C must be finished before step A can begin.", + "Step C must be finished before step F can begin.", + "Step A must be finished before step B can begin.", + "Step A must be finished before step D can begin.", + "Step B must be finished before step E can begin.", + "Step D must be finished before step E can begin.", + "Step F must be finished before step E can begin.", + ] + + @pytest.mark.parametrize(("input_data", "expected_result"), [(test_input, 15)]) + def test_day07b_solve(self, input_data, expected_result): + solution = Day07PartB() + input_data = "\n".join(self.test_input) + result = solution.solve(input_data, extra_time=0, num_workers=2) + assert result == expected_result + + def test_day07b_data(self): + """Result we got when we did the real solution""" + solution = Day07PartB() + res = solution("day_07/day07.txt") + assert res != 1002 + assert res == 1000 diff --git a/tests/adventofcode2018/test_day08_a.py b/tests/adventofcode2018/test_day08_a.py new file mode 100644 index 00000000..43e9acf4 --- /dev/null +++ b/tests/adventofcode2018/test_day08_a.py @@ -0,0 +1,34 @@ +import pytest + +from adventofcode2018.day08 import Day08PartA + + +class TestDay08PartA: + def test_day08_test_str_to_ints(self): + input_data = "2 3 392 42 191 302 192" + solution = Day08PartA() + result = solution.parse_data(input_data) + assert result == [2, 3, 392, 42, 191, 302, 192] + + def test_day08_build_tree(self): + input_data = "2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2" + solution = Day08PartA() + list_ints = solution.parse_data(input_data) + solution.create_nodes(list_ints) + # Check that we have created 4 nodes? + assert len(solution.nodes) == 4 + + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [("2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2", 138)], + ) + def test_day08a_solve(self, input_data, expected_result): + solution = Day08PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day08a_data(self): + """Result we got when we did the real solution""" + solution = Day08PartA() + res = solution("day_08/day08.txt") + assert res == 41760 diff --git a/tests/adventofcode2018/test_day08_b.py b/tests/adventofcode2018/test_day08_b.py new file mode 100644 index 00000000..48cb7fcd --- /dev/null +++ b/tests/adventofcode2018/test_day08_b.py @@ -0,0 +1,42 @@ +import pytest + +from adventofcode2018.day08 import Day08PartB, Node + + +class TestDay08PartB: + def test_day08b_nodes(self): + node_b = Node(metadata=[10, 11, 12]) + assert node_b.value() == 33 + + node_d = Node(metadata=[99]) + assert node_d.value() == 99 + + def test_day08b_child_nodes(self): + # Test complex example. + node_a = Node(metadata=[1, 1, 2]) + node_b = Node(metadata=[10, 11, 12]) + node_c = Node(metadata=[2]) + node_d = Node(metadata=[99]) + node_a.add_child(node_b) + node_a.add_child(node_c) + node_c.add_child(node_d) + # First a simple test: + assert node_b.value() == 33 + assert node_d.value() == 99 + + assert node_c.value() == 0 + assert node_a.value() == 66 + + @pytest.mark.parametrize( + ("input_data", "expected_result"), [("2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2", 66)] + ) + def test_day08b_solve(self, input_data, expected_result): + solution = Day08PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day08b_data(self): + """Result we got when we did the real solution""" + solution = Day08PartB() + res = solution("day_08/day08.txt") + assert res == 25737 diff --git a/tests/adventofcode2018/test_day09_a.py b/tests/adventofcode2018/test_day09_a.py new file mode 100644 index 00000000..b2514f00 --- /dev/null +++ b/tests/adventofcode2018/test_day09_a.py @@ -0,0 +1,27 @@ +import pytest + +from adventofcode2018.day09 import Day09PartA + + +class TestDay09PartA: + @pytest.mark.parametrize( + ("players", "last_marble", "expected_result"), + [ + (9, 25, 32), + (10, 1618, 8317), + (13, 7999, 146373), + (17, 1104, 2764), + (21, 6111, 54718), + (30, 5807, 37305), + ], + ) + def test_day09a_solve(self, players, last_marble, expected_result): + solution = Day09PartA() + result = solution.compute_result(players, last_marble) + assert result == expected_result + + def test_day09a_data(self): + """Result we got when we did the real solution""" + solution = Day09PartA() + res = solution("day_09/day09.txt") + assert res == 424112 diff --git a/tests/adventofcode2018/test_day09_b.py b/tests/adventofcode2018/test_day09_b.py new file mode 100644 index 00000000..b021465c --- /dev/null +++ b/tests/adventofcode2018/test_day09_b.py @@ -0,0 +1,9 @@ +from adventofcode2018.day09 import Day09PartB + + +class TestDay09PartB: + def test_day09b_data(self): + """Result we got when we did the real solution""" + solution = Day09PartB() + res = solution("day_09/day09.txt") + assert res == 3487352628 diff --git a/tests/adventofcode2018/test_day10_a.py b/tests/adventofcode2018/test_day10_a.py new file mode 100644 index 00000000..00bf8aa8 --- /dev/null +++ b/tests/adventofcode2018/test_day10_a.py @@ -0,0 +1,55 @@ +import pytest + +from adventofcode2018.day10 import Day10PartA, Point + + +class TestDay10PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ("position=< 9, 1> velocity=< 0, 2>", [9, 1, 0, 2]), + ("position=< 3, -2> velocity=<-1, 1>", [3, -2, -1, 1]), + ("position=<15, 0> velocity=<-2, 0>", [15, 0, -2, 0]), + ("position=<-31716, -42432> velocity=< 3, 4>", [-31716, -42432, 3, 4]), + ], + ) + def test_day10a_test_string(self, input_data, expected_result): + result = Day10PartA().parse_string(input_data) + point = Point(*expected_result) + assert result == point + assert "position" in result.__repr__() + + @pytest.mark.parametrize( + ("input_data", "seconds", "expected_result"), + [("position=< 3, 9> velocity=< 1, -2>", 3, [6, 3])], + ) + def test_day10a_test_compute(self, input_data, seconds, expected_result): + result = Day10PartA().parse_string(input_data) + for x in range(0, seconds): + result.compute_step(seconds=1) + + point_seconds = Day10PartA().parse_string(input_data) + point_seconds.compute_step(seconds=seconds) + + expected_point = Point( + x=expected_result[0], + y=expected_result[1], + vel_x=result.vel_x, + vel_y=result.vel_y, + ) + assert point_seconds == expected_point + assert result == expected_point + + def test_day10a_testdata(self): + """Run with test data""" + solution = Day10PartA() + res = solution("day_10/day10_test.txt") + assert res == 3 + + def test_day10a_data(self): + """Result we got when we did the real solution""" + solution = Day10PartA() + res = solution("day_10/day10.txt") + # We cannot do a real test, but we can compute the iteration that should + # have our image. + assert res == 10645 diff --git a/tests/adventofcode2018/test_day10_b.py b/tests/adventofcode2018/test_day10_b.py new file mode 100644 index 00000000..f5829daa --- /dev/null +++ b/tests/adventofcode2018/test_day10_b.py @@ -0,0 +1,15 @@ +from adventofcode2018.day10 import Day10PartB + + +class TestDay10PartB: + def test_day10b_testdata(self): + """Run with test data""" + solution = Day10PartB() + res = solution("day_10/day10_test.txt") + assert res == 3 + + def test_day10b_data(self): + """Result we got when we did the real solution""" + solution = Day10PartB() + res = solution("day_10/day10.txt") + assert res == 10645 diff --git a/tests/adventofcode2018/test_day11_a.py b/tests/adventofcode2018/test_day11_a.py new file mode 100644 index 00000000..ed189cac --- /dev/null +++ b/tests/adventofcode2018/test_day11_a.py @@ -0,0 +1,45 @@ +import pytest + +from adventofcode2018.day11 import Day11PartA + + +class TestDay11PartA: + @pytest.mark.parametrize( + ("x", "y", "serial", "expected_result"), + [(3, 5, 8, 4), (122, 79, 57, -5), (217, 196, 39, 0), (101, 153, 71, 4)], + ) + def test_day11a_computer_power_level(self, x, y, serial, expected_result): + solution = Day11PartA() + result = solution.computer_power_level(x, y, serial) + assert result == expected_result + + def test_day11a_compute_grid(self): + solution = Day11PartA() + solution.generate_grid(18) + assert solution.grid[33][48] == 0 + assert solution.grid[33][47] == 1 + assert solution.grid[33][46] == 3 + assert solution.grid[33][45] == 4 + assert solution.grid[34][45] == 4 + + @pytest.mark.parametrize( + ("serial", "x", "y", "expected_result"), [(18, 33, 45, 29), (42, 21, 61, 30)] + ) + def test_day11a_sum_area(self, serial, x, y, expected_result): + solution = Day11PartA() + solution.generate_grid(serial) + solution.compute_summed_area() + result = solution.compute_from(x, y, size=3) + assert result == expected_result + + @pytest.mark.parametrize(("input_data", "expected_result"), [("18", "(33, 45)")]) + def test_day11a_solve(self, input_data, expected_result): + solution = Day11PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day11a_data(self): + """Result we got when we did the real solution""" + solution = Day11PartA() + res = solution("day_11/day11.txt") + assert res == "(235, 18)" diff --git a/tests/adventofcode2018/test_day11_b.py b/tests/adventofcode2018/test_day11_b.py new file mode 100644 index 00000000..8426ec9d --- /dev/null +++ b/tests/adventofcode2018/test_day11_b.py @@ -0,0 +1,20 @@ +import pytest + +from adventofcode2018.day11 import Day11PartB + + +class TestDay11PartB: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [("18", "90, 269, 16"), ("42", "232, 251, 12")], + ) + def test_day11b_solve(self, input_data, expected_result): + solution = Day11PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day11b_data(self): + """Result we got when we did the real solution""" + solution = Day11PartB() + res = solution("day_11/day11.txt") + assert res == "236, 227, 12" diff --git a/tests/adventofcode2018/test_day12_a.py b/tests/adventofcode2018/test_day12_a.py new file mode 100644 index 00000000..516175aa --- /dev/null +++ b/tests/adventofcode2018/test_day12_a.py @@ -0,0 +1,81 @@ +from adventofcode2018.day12 import Day12PartA, Garden + + +class TestDay12PartA: + test_input_string = "#..#.#..##......###...###" + test_notes = """...## => # + ..#.. => # + .#... => # + .#.#. => # + .#.## => # + .##.. => # + .#### => # + #.#.# => # + #.### => # + ##.#. => # + ##.## => # + ###.. => # + ###.# => # + ####. => # + ..... => . + """ + + def test_day12a_grid(self): + solution = Garden(list(self.test_input_string)) + solution.split_notes(self.test_notes.split("\n")) + # Check that out string is parsed with some spares + assert len(solution.table) == len(self.test_input_string) + solution.offset * 2 + + # We should have all the combinations in there (5 spots, 2 options == 2*2*2*2*2) + assert len(solution.notes) == 32 + + # assert repr(solution) == "....." + self.test_input_string + "....." + assert "...#..#.#..##......###...###.." in (repr(solution)) # Start (0) + # assert solution.offset == 5 + assert solution.table[0 + solution.offset] == solution.PLANT + assert solution.table[3 + solution.offset] == solution.PLANT + # Do a generation + solution.generate() + assert "...#...#....#.....#..#..#..#.." in repr(solution) # 1 + + solution.generate() + assert "...##..##...##....#..#..#..##." in repr(solution) # 2 + + solution.generate() + # assert solution.offset == 1 + # 32101234567890 + assert solution.generation == 3 + assert "..#.#...#..#.#....#..#..#...#..." in repr(solution) # 3 + assert solution.table[-1 + solution.offset] == solution.PLANT + assert solution.table[0 + solution.offset] == solution.EMPTY + assert solution.table[1 + solution.offset] == solution.PLANT + + solution.generate(4) + assert solution.generation == 7 + assert "...#..###.#...##..#...#...#...#...." in repr(solution) # 7 + + solution.generate(10) + assert solution.generation == 17 + assert "..#...##...#.#.#.#...##...#....#...#.." in repr(solution) # 17 + + solution.generate(3) + assert solution.generation == 20 + assert ".#....##....#####...#######....#.#..##." in repr(solution) # 20 + # assert solution.offset == 2 + assert solution.table[-2 + solution.offset] == solution.PLANT + assert solution.table[34 + solution.offset] == solution.PLANT + assert solution.table[33 + solution.offset] == solution.PLANT + assert solution.table[32 + solution.offset] == solution.EMPTY + + assert solution.count_plants() == 325 + + def test_day12a_solve(self): + solution = Day12PartA() + res = solution("day_12/day12_test.txt") + assert res == 325 + + def test_day12a_data(self): + """Result we got when we did the real solution""" + solution = Day12PartA() + res = solution("day_12/day12.txt") + assert res == 2911 diff --git a/tests/adventofcode2018/test_day12_b.py b/tests/adventofcode2018/test_day12_b.py new file mode 100644 index 00000000..5a9fa99f --- /dev/null +++ b/tests/adventofcode2018/test_day12_b.py @@ -0,0 +1,9 @@ +from adventofcode2018.day12 import Day12PartB + + +class TestDay12PartB: + def test_day12b_data(self): + """Result we got when we did the real solution""" + solution = Day12PartB() + res = solution("day_12/day12.txt") + assert res == 2500000000695 diff --git a/tests/adventofcode2018/test_day13_a.py b/tests/adventofcode2018/test_day13_a.py new file mode 100644 index 00000000..d4542a2b --- /dev/null +++ b/tests/adventofcode2018/test_day13_a.py @@ -0,0 +1,126 @@ +import pytest + +from adventofcode2018.day13 import Day13PartA, Direction, GridPosition, MineCart + + +class TestDay13PartA: + def test_day13a_minecart(self): + cart = MineCart(0, 0, Direction.UP) + assert cart.get_next_move().name == "LEFT" + assert cart.get_next_move().name == "STRAIGHT" + assert cart.get_next_move().name == "RIGHT" + assert cart.get_next_move().name == "LEFT" + + def test_day13a_direction(self): + assert Direction.sign_to_direction("^") == Direction.UP + assert Direction.sign_to_direction("<") == Direction.LEFT + with pytest.raises(ValueError): + Direction.sign_to_direction("|") + + def test_day13a_grid_position(self): + pos = GridPosition(x=0, y=2, symbol="-") + assert pos.__repr__() == "(0, 2) = -" + + pos = GridPosition(x=0, y=2, symbol="|", cart=MineCart(0, 2, Direction.UP)) + assert pos.__repr__() == "(0, 2) = UP" + + def test_day13a_solve_simple(self): + # Load a very simple grid into the class. Trains on positions 1 and 5, + # Crash at position (0, 3) + + solution = Day13PartA() + solution.build_grid(["|", "v", "|", "|", "|", "^", "|"]) + assert repr(solution.grid[(0, 0)]) == "(0, 0) = |" + assert repr(solution.grid[(0, 1)]) == "(0, 1) = DOWN" + assert repr(solution.grid[(0, 4)]) == "(0, 4) = |" + assert repr(solution.grid[(0, 5)]) == "(0, 5) = UP" + solution.tick() + assert repr(solution.grid[(0, 1)]) == "(0, 1) = |" + assert repr(solution.grid[(0, 2)]) == "(0, 2) = DOWN" + assert repr(solution.grid[(0, 4)]) == "(0, 4) = UP" + assert repr(solution.grid[(0, 5)]) == "(0, 5) = |" + solution.tick() + assert repr(solution.grid[(0, 3)]) == "(0, 3) = X" + + def test_day13a_round(self): + # Create a simple grid with corners: + # /--\ + # ^ | + # | | + # \--/ + solution = Day13PartA() + + solution.build_grid(["/--\\", "^ |", "| |", "\\--/"]) + assert len(solution.carts) == 1 + assert solution.carts[0].x == 0 + assert solution.carts[0].y == 1 + + solution.tick() + assert solution.carts[0].x == 0 + assert solution.carts[0].y == 0 + + # We are now on a turn, next turn should be to the right + solution.tick() + assert solution.carts[0].x == 1 + assert solution.carts[0].y == 0 + + # Complete the circle, we get a cart back that is going up + solution.ticks(10) + assert solution.carts[0].x == 0 + assert solution.carts[0].y == 1 + assert repr(solution.grid[(0, 1)]) == "(0, 1) = UP" + + def test_day13a_intersection(self): + # Create a simple grid with corners: + # 0123456789 + # 0/---\ + # 1| | + # 2^ /-+-\ + # 3| | | | + # 4\-+-/ | + # 5 | | + # 6 \---/ + solution = Day13PartA() + + solution.build_grid( + [ + "/---\\", + "| |", + "^ /-+-\\", + "| | | |", + "\\-+-/ |", + " | |", + " \\---/", + ] + ) + assert len(solution.carts) == 1 + assert solution.carts[0].x == 0 + assert solution.carts[0].y == 2 + + solution.ticks(7) + assert solution.carts[0].x == 4 + assert solution.carts[0].y == 1 + + solution.tick() + # Arived at intersection + assert solution.carts[0].x == 4 + assert solution.carts[0].y == 2 + + solution.tick() + # Should have taken a right, since we're going down + assert solution.carts[0].x == 5 + assert solution.carts[0].y == 2 + + # Next step should be straight + assert solution.carts[0].get_next_move().name == "STRAIGHT" + + def test_day13a_solve(self): + solution = Day13PartA() + res = solution("day_13/day13_test.txt") + assert res == (7, 3) + + def test_day13a_data(self): + """Result we got when we did the real solution""" + solution = Day13PartA() + res = solution("day_13/day13.txt") + assert res == (43, 91) diff --git a/tests/adventofcode2018/test_day13_b.py b/tests/adventofcode2018/test_day13_b.py new file mode 100644 index 00000000..0d7524e0 --- /dev/null +++ b/tests/adventofcode2018/test_day13_b.py @@ -0,0 +1,41 @@ +from adventofcode2018.day13 import Day13PartB + + +class TestDay13PartB: + def test_day13b_simple(self): + # Create the grid from the example: + # />-<\ + # | | + # | /<+-\ + # | | | v + # \>+/ + + solution = Day13PartB() + + solution.build_grid( + [ + "/>-<\\ ", + "| | ", + "| /<+-\\", + "| | | v ", + "\\>+/", + ] + ) + assert len(solution.carts) == 9 + # This will be a massacre + solution.tick(return_on_crash=False) + assert len(solution.carts) == 3 + + final_location = solution.tick_until_one_left() + assert len(solution.carts) == 1 + assert final_location == (6, 4) + + def test_day13b_data(self): + """Result we got when we did the real solution""" + solution = Day13PartB() + res = solution("day_13/day13.txt") + assert res == (35, 59) diff --git a/tests/adventofcode2018/test_day14_a.py b/tests/adventofcode2018/test_day14_a.py new file mode 100644 index 00000000..beaba160 --- /dev/null +++ b/tests/adventofcode2018/test_day14_a.py @@ -0,0 +1,87 @@ +import pytest + +from adventofcode2018.day14 import Day14PartA + + +class TestDay14PartA: + def test_day14a_test_input(self): + input_data = "37" + solution = Day14PartA() + solution.parse_data(input_data) + assert len(solution.scoreboard) == 2 + + def test_day14a_test_compute_digits(self): + # Test for one digit + input_data = "23" + solution = Day14PartA() + solution.initalise(input_data, num_elves=2) + assert solution.compute_new_recipes() == [5] + + def test_day14a_test_compute(self): + input_data = "37" + solution = Day14PartA() + solution.initalise(input_data, num_elves=2) + assert len(solution.elves) == 2 + assert solution.elves[0].current_recipe == 3 + assert solution.elves[1].current_recipe == 7 + assert solution.elves[0].current_recipe_idx == 0 + assert solution.elves[1].current_recipe_idx == 1 + + assert solution.compute_new_recipes() == [1, 0] + + solution.compute_next_recipes(num_recipes=1) + # After the first round the elves should be at the same position + assert len(solution.scoreboard) == 4 + assert solution.scoreboard == [3, 7, 1, 0] + assert solution.elves[0].current_recipe == 3 + assert solution.elves[1].current_recipe == 7 + assert solution.elves[0].current_recipe_idx == 0 + assert solution.elves[1].current_recipe_idx == 1 + + # Next step + solution.compute_next_recipes(num_recipes=1) + assert len(solution.scoreboard) == 6 + assert solution.scoreboard == [3, 7, 1, 0, 1, 0] + assert solution.elves[0].current_recipe_idx == 4 + assert solution.elves[1].current_recipe_idx == 3 + + # Let's go to the lest step + solution.compute_next_recipes(num_recipes=13) + round_15 = [3, 7, 1, 0, 1, 0, 1, 2, 4, 5, 1, 5, 8, 9, 1, 6, 7, 7, 9, 2] + assert solution.scoreboard == round_15 + + def test_day14a_test_num_recipes_created(self): + input_data = "37" + solution = Day14PartA() + solution.initalise(input_data, num_elves=2) + solution.compute_recipe_length(num_recipes_created=19) + assert len(solution.scoreboard) == 19 + + @pytest.mark.parametrize( + ("input_data", "after_num_recipes", "expected_result"), + [ + ("37", 9, "5158916779"), + ("37", 5, "0124515891"), + ("37", 18, "9251071085"), + ("37", 2018, "5941429882"), + ], + ) + def test_day14a_solve(self, input_data, after_num_recipes, expected_result): + solution = Day14PartA() + solution.initalise(input_data=input_data, num_elves=2) + + num_recipes_needed = after_num_recipes + 10 + solution.compute_recipe_length(num_recipes_created=num_recipes_needed) + # We need at least this many recipes. It can be more, last step could have + # double digits + assert len(solution.scoreboard) >= num_recipes_needed + + result = solution.total_score(after_num_recipes) + assert result == expected_result + + def test_day14a_data(self): + """Result we got when we did the real solution""" + solution = Day14PartA() + res = solution("day_14/day14.txt") + assert res != "4281681601" + assert res == "1342316410" diff --git a/tests/adventofcode2018/test_day14_b.py b/tests/adventofcode2018/test_day14_b.py new file mode 100644 index 00000000..c3b1b543 --- /dev/null +++ b/tests/adventofcode2018/test_day14_b.py @@ -0,0 +1,42 @@ +import pytest + +from adventofcode2018.day14 import Day14PartB + + +class TestDay14PartB: + @pytest.mark.parametrize( + ("needle", "haystack", "expected_result"), + ( + ([4, 5, 6], [1, 2, 3, 4, 5, 6], 0), + ([4, 5, 6], [1, 2, 3, 4, 5, 6, 7], 1), + ([4, 5, 6], [1, 2, 3, 4, 5, 6, 7, 8], 2), + ), + ) + def test_day14b_find_sequence_in_list(self, needle, haystack, expected_result): + solution = Day14PartB() + result = solution.find_sequence_in_list(needle, haystack) + assert result == expected_result + + def test_day14b_find_sequence_not_in_list(self): + solution = Day14PartB() + needle = [1, 2, 3] + haystack = [4] + result = solution.find_sequence_in_list(needle, haystack) + assert result is False + + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [("51589", 9), ("01245", 5), ("92510", 18), ("59414", 2018)], + ) + def test_day14b_solve(self, input_data, expected_result): + solution = Day14PartB() + solution.initalise(input_data="37", num_elves=2) + + result = solution.search_for_recipe(input_data) + assert result == expected_result + + def test_day14b_data(self): + """Result we got when we did the real solution""" + solution = Day14PartB() + res = solution("day_14/day14.txt") + assert res == 20235230 diff --git a/tests/adventofcode2018/test_day16_a.py b/tests/adventofcode2018/test_day16_a.py new file mode 100644 index 00000000..49e40c39 --- /dev/null +++ b/tests/adventofcode2018/test_day16_a.py @@ -0,0 +1,58 @@ +from adventofcode2018.day16 import Addi, Banr, Bori, Day16PartA, Device, Seti + + +class TestDay16PartA: + def test_day16a_device_eq(self): + device1 = Device() + device2 = Device() + + assert device1 == device2 + + device1.register[0] = 5 + + assert device1 != device2 + + def test_day16a_addi(self): + # Add value from register A (0) and value 7 and store in register C (3) + device = Device() + Addi.execute(device, 0, 7, 3) + assert device.register[0] == 0 + assert device.register[1] == 0 + assert device.register[2] == 0 + assert device.register[3] == 7 + + # Add value from register A (3) and value 7 and store in register C (3) + Addi.execute(device, 3, 3, 3) + assert device.register[0] == 0 + assert device.register[1] == 0 + assert device.register[2] == 0 + assert device.register[3] == 10 + + def test_day16a_banr_bori(self): + # stores into register C the result of the bitwise AND of register A and + # register B. + device = Device() + Seti.execute(device, 0xAA, None, 0) # 1111 1100 + Seti.execute(device, 0xFC, None, 1) # 1111 1100 + + Banr.execute(device, 0, 1, 2) + + assert device.register[2] == 0xA8 # 1111 1000 + + Bori.execute(device, 0, 0xFC, 3) + assert device.register[3] == 0xFE # 1111 1110 + + def test_day16a_solve(self): + input_data = "\n".join( + ["Before: [3, 2, 1, 1]", "9 2 1 2", "After: [3, 2, 2, 1]"] + ) + expected_result = 1 + solution = Day16PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day16a_data(self): + """Result we got when we did the real solution""" + solution = Day16PartA() + res = solution("day_16/day16.txt") + assert res == 618 diff --git a/tests/adventofcode2018/test_day16_b.py b/tests/adventofcode2018/test_day16_b.py new file mode 100644 index 00000000..ab03bd53 --- /dev/null +++ b/tests/adventofcode2018/test_day16_b.py @@ -0,0 +1,41 @@ +import pytest + +from adventofcode2018.day16 import Day16PartB + + +class TestDay16PartB: + def test_day16b_fetch_register(self): + input_data = "\n".join( + ["Before: [3, 2, 1, 1]", "9 2 1 2", "After: [3, 2, 2, 1]"] + ) + # Yield the first one + result = next(Day16PartB.fetch_instruction(input_data)) + + assert result["opcode"] == 9 + assert result["A"] == 2 + assert result["B"] == 1 + assert result["C"] == 2 + + input_data = "\n".join(["15 0 2 0", "9 0 1 1", "14 1 0 0"]) + generator = Day16PartB.fetch_instruction(input_data) + first = next(generator) + expected_first = {"opcode": 15, "A": 0, "B": 2, "C": 0} + assert first == expected_first + + seccond = next(generator) + expected_seccond = {"opcode": 9, "A": 0, "B": 1, "C": 1} + assert seccond == expected_seccond + + @pytest.mark.skip(reason="Not implemented yet") + @pytest.mark.parametrize(("input_data", "expected_result"), [("", ""), ("", "")]) + def test_day16b_solve(self, input_data, expected_result): + solution = Day16PartB() + result = solution.solve(input_data) + assert result == expected_result + + @pytest.mark.skip(reason="Not implemented yet") + def test_day16b_data(self): + """Result we got when we did the real solution""" + solution = Day16PartB() + res = solution("day_16/day16.txt") + assert res == 0 diff --git a/tests/adventofcode2019/test_advent_utils.py b/tests/adventofcode2019/test_advent_utils.py deleted file mode 100644 index c92aeeda..00000000 --- a/tests/adventofcode2019/test_advent_utils.py +++ /dev/null @@ -1,37 +0,0 @@ -import pytest - -from adventofcode2019.utils import advent_utils - - -def test_string_to_list_of_ints(): - input_data = "2,4,5, 300,-3,0" - result = advent_utils.string_to_list_of_ints(input_data) - - assert result == [2, 4, 5, 300, -3, 0] - - -def test_string_to_list_of_ints_with_dash(): - # Split on a -, does not support negative ints - input_data = "2-4-5-300-3-0" - result = advent_utils.string_to_list_of_ints(input_data, "-") - - assert result == [2, 4, 5, 300, 3, 0] - - -def test_invalid_list_to_list_of_ints(): - input_data = "these,are,not,the,ints,you're,looking,for" - with pytest.raises(ValueError): - advent_utils.string_to_list_of_ints(input_data) - - -def test_string_of_single_to_list_of_ints(): - input_data = "23272930" - result = advent_utils.string_of_single_to_list_of_ints(input_data) - - assert result == [2, 3, 2, 7, 2, 9, 3, 0] - - -def test_string_of_invalid_single_to_list_of_ints(): - input_data = "2327-2930" - with pytest.raises(ValueError): - advent_utils.string_of_single_to_list_of_ints(input_data) diff --git a/tests/adventofcode2019/test_day01_a.py b/tests/adventofcode2019/test_day01_a.py index 34f59713..8b4066d7 100644 --- a/tests/adventofcode2019/test_day01_a.py +++ b/tests/adventofcode2019/test_day01_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day01 import Day01PartA +from adventofcode2019.day01 import Day01PartA class TestDay01PartA: @@ -14,7 +14,7 @@ def test_day01a_solve(self, input_data, expected_result): assert result == expected_result def test_day01a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day01PartA() res = solution("day_01/day01.txt") assert res == 3465245 diff --git a/tests/adventofcode2019/test_day01_b.py b/tests/adventofcode2019/test_day01_b.py index a24b0e40..da23c74b 100644 --- a/tests/adventofcode2019/test_day01_b.py +++ b/tests/adventofcode2019/test_day01_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day01 import Day01PartB +from adventofcode2019.day01 import Day01PartB class TestDay01PartB: @@ -14,7 +14,7 @@ def test_day01b_solve_module(self, input_data, expected_result): assert result == expected_result def test_day01b_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day01PartB() res = solution("day_01/day01.txt") assert res == 5194970 diff --git a/tests/adventofcode2019/test_day02_a.py b/tests/adventofcode2019/test_day02_a.py index c174dc70..54bc3290 100644 --- a/tests/adventofcode2019/test_day02_a.py +++ b/tests/adventofcode2019/test_day02_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day02 import Day02PartA +from adventofcode2019.day02 import Day02PartA class TestDay02PartA: @@ -23,7 +23,7 @@ def test_day02a_solve(self, input_data, expected_result): assert result == expected_result def test_day02a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day02PartA() res = solution("day_02/day02.txt") assert res == 3306701 diff --git a/tests/adventofcode2019/test_day02_b.py b/tests/adventofcode2019/test_day02_b.py index a18e05a6..ad62ae1d 100644 --- a/tests/adventofcode2019/test_day02_b.py +++ b/tests/adventofcode2019/test_day02_b.py @@ -1,9 +1,9 @@ -from adventofcode2019.solutions.day02 import Day02PartB +from adventofcode2019.day02 import Day02PartB class TestDay02PartB: def test_day02b_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day02PartB() res = solution("day_02/day02.txt") assert res == 7621 diff --git a/tests/adventofcode2019/test_day03_a.py b/tests/adventofcode2019/test_day03_a.py index 0a50cad6..1e4d92a2 100644 --- a/tests/adventofcode2019/test_day03_a.py +++ b/tests/adventofcode2019/test_day03_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day03 import Day03PartA, Point +from adventofcode2019.day03 import Day03PartA, Point class TestDay03PartA: @@ -42,7 +42,7 @@ def test_day03a_solve(self, input_data, expected_result): assert result == expected_result def test_day03a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day03PartA() res = solution("day_03/day03.txt") assert res == 8015 diff --git a/tests/adventofcode2019/test_day03_b.py b/tests/adventofcode2019/test_day03_b.py index b2e5a383..3341885e 100644 --- a/tests/adventofcode2019/test_day03_b.py +++ b/tests/adventofcode2019/test_day03_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day03 import Day03PartB +from adventofcode2019.day03 import Day03PartB class TestDay03PartB: @@ -26,7 +26,7 @@ def test_day03b_solve(self, input_data, expected_result): assert result == expected_result def test_day03b_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day03PartB() res = solution("day_03/day03.txt") assert res == 163676 diff --git a/tests/adventofcode2019/test_day04_a.py b/tests/adventofcode2019/test_day04_a.py index 42a4d940..db9862d3 100644 --- a/tests/adventofcode2019/test_day04_a.py +++ b/tests/adventofcode2019/test_day04_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day04 import Day04PartA +from adventofcode2019.day04 import Day04PartA class TestDay04PartA: @@ -14,7 +14,7 @@ def test_day04a_solve(self, input_data, expected_result): assert result == expected_result def test_day04a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day04PartA() res = solution("day_04/day04.txt") assert res != 246666 diff --git a/tests/adventofcode2019/test_day04_b.py b/tests/adventofcode2019/test_day04_b.py index ff2a852a..f7111a30 100644 --- a/tests/adventofcode2019/test_day04_b.py +++ b/tests/adventofcode2019/test_day04_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day04 import Day04PartB +from adventofcode2019.day04 import Day04PartB class TestDay04PartB: @@ -22,7 +22,7 @@ def test_day04b_solve(self, input_data, expected_result): assert result == expected_result def test_day04b_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day04PartB() res = solution("day_04/day04.txt") assert res != 453 diff --git a/tests/adventofcode2019/test_day05_a.py b/tests/adventofcode2019/test_day05_a.py index 3b16217e..3ecfb3fa 100644 --- a/tests/adventofcode2019/test_day05_a.py +++ b/tests/adventofcode2019/test_day05_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day05 import Day05PartA +from adventofcode2019.day05 import Day05PartA class TestDay05PartA: @@ -18,7 +18,7 @@ def test_day05a_test_new(self, input_data, expected_result): assert solution.instructions == expected_result def test_day05a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day05PartA() res = solution("day_05/day05.txt") assert res == 9431221 diff --git a/tests/adventofcode2019/test_day05_b.py b/tests/adventofcode2019/test_day05_b.py index f56b5381..d3fe77dc 100644 --- a/tests/adventofcode2019/test_day05_b.py +++ b/tests/adventofcode2019/test_day05_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day05 import Day05PartB +from adventofcode2019.day05 import Day05PartB class TestDay05PartB: @@ -55,7 +55,6 @@ def test_day05b_test_input_equal(self): [3, 12, 6, 12, 15, 1, 13, 14, 13, 4, 13, 99, -1, 0, 1, 9], # Position Mode [3, 3, 1105, -1, 9, 1101, 0, 0, 12, 4, 12, 99, 1], # Immediate mode ): - solution.load_instructions(data) solution.load_input_values([0]) res = solution.run() @@ -95,7 +94,7 @@ def test_day05b_larger_example(self, input_value, exoected_output_value): assert res == exoected_output_value def test_day05b_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day05PartB() res = solution("day_05/day05.txt") assert res == 1409363 diff --git a/tests/adventofcode2019/test_day06_a.py b/tests/adventofcode2019/test_day06_a.py index d612a8f4..e36e49da 100644 --- a/tests/adventofcode2019/test_day06_a.py +++ b/tests/adventofcode2019/test_day06_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day06 import Day06PartA +from adventofcode2019.day06 import Day06PartA class TestDay06PartA: @@ -33,7 +33,7 @@ def test_day06a_solve(self, input_data, expected_result): assert result == expected_result def test_day06a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day06PartA() res = solution("day_06/day06.txt") assert res != 1606 diff --git a/tests/adventofcode2019/test_day06_b.py b/tests/adventofcode2019/test_day06_b.py index 3b394123..1b647be2 100644 --- a/tests/adventofcode2019/test_day06_b.py +++ b/tests/adventofcode2019/test_day06_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day06 import Day06PartB +from adventofcode2019.day06 import Day06PartB class TestDay06PartB: @@ -35,7 +35,7 @@ def test_day06b_solve(self, input_data, expected_result): assert result == expected_result def test_day06b_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day06PartB() res = solution("day_06/day06.txt") assert res == 322 diff --git a/tests/adventofcode2019/test_day07_a.py b/tests/adventofcode2019/test_day07_a.py index 29e8bfcb..e9be811f 100644 --- a/tests/adventofcode2019/test_day07_a.py +++ b/tests/adventofcode2019/test_day07_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day07 import Day07PartA +from adventofcode2019.day07 import Day07PartA class TestDay07PartA: @@ -38,7 +38,7 @@ def test_day07a_solve(self, instructions, expected_sequence, expected_thrust): assert thrust == expected_thrust def test_day07a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day07PartA() res = solution("day_07/day07.txt") assert res == 929800 diff --git a/tests/adventofcode2019/test_day07_b.py b/tests/adventofcode2019/test_day07_b.py index 912e436c..8a502da0 100644 --- a/tests/adventofcode2019/test_day07_b.py +++ b/tests/adventofcode2019/test_day07_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day07 import Day07PartB +from adventofcode2019.day07 import Day07PartB class TestDay07PartB: @@ -30,7 +30,7 @@ def test_day07b_solve(self, instructions, expected_sequence, expected_thrust): assert thrust == expected_thrust def test_day07b_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day07PartB() res = solution("day_07/day07.txt") assert res == 15432220 diff --git a/tests/adventofcode2019/test_day08_a.py b/tests/adventofcode2019/test_day08_a.py index 7b8c310a..bb5a52d0 100644 --- a/tests/adventofcode2019/test_day08_a.py +++ b/tests/adventofcode2019/test_day08_a.py @@ -1,9 +1,9 @@ -from adventofcode2019.solutions.day08 import Day08PartA +from adventofcode2019.day08 import Day08PartA class TestDay08PartA: def test_get_digits_per_layer(self): - """ Get the number of digits per layer""" + """Get the number of digits per layer""" solution = Day08PartA() solution.load_image(image_data="123456789012", width=3, height=2) assert solution.frames[0] == "123456" @@ -14,7 +14,7 @@ def test_get_digits_per_layer(self): assert solution.count_number_per_frame(number=9, frame=0) == 0 def test_layer_with_fewest_digit(self): - """ Get the number of digits per layer""" + """Get the number of digits per layer""" solution = Day08PartA() solution.load_image(image_data="123451789012134161", width=3, height=2) @@ -26,7 +26,7 @@ def test_layer_with_fewest_digit(self): assert solution.layer_with_fewest_digit(3) == 1 def test_day08a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day08PartA() res = solution("day_08/day08.txt") assert res == 2904 diff --git a/tests/adventofcode2019/test_day08_b.py b/tests/adventofcode2019/test_day08_b.py index baed23c3..ef393ee4 100644 --- a/tests/adventofcode2019/test_day08_b.py +++ b/tests/adventofcode2019/test_day08_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day08 import Day08PartB +from adventofcode2019.day08 import Day08PartB class TestDay08PartB: @@ -13,7 +13,7 @@ def test_compute_per_pixel(self, input_list, expected_result): assert result == expected_result def test_compose_image(self): - """ Get the number of digits per layer""" + """Get the number of digits per layer""" solution = Day08PartB() solution.load_image(image_data="0222112222120000", width=2, height=2) assert len(solution.frames) == 4 @@ -24,7 +24,7 @@ def test_compose_image(self): assert solution.printable_image(result) == "01\n10" def test_day08a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day08PartB() res = solution("day_08/day08.txt") expected = ( diff --git a/tests/adventofcode2019/test_day09_a.py b/tests/adventofcode2019/test_day09_a.py index d0fa605a..43dd20dd 100644 --- a/tests/adventofcode2019/test_day09_a.py +++ b/tests/adventofcode2019/test_day09_a.py @@ -1,10 +1,10 @@ -from adventofcode2019.solutions.day09 import Day09PartA -from adventofcode2019.solutions.intcode import IntCode +from adventofcode2019.day09 import Day09PartA +from adventofcode2019.intcode import IntCode class TestDay09PartA: def test_day09a_replicating_opcode(self): - """ takes no input and produces a copy of itself as output.""" + """takes no input and produces a copy of itself as output.""" instructions = "109,1,204,-1,1001,100,1,100,1008,100,16,101,1006,101,0,99" opcodes = [int(digit) for digit in instructions.split(",")] intcode = IntCode() @@ -13,7 +13,7 @@ def test_day09a_replicating_opcode(self): assert result == opcodes def test_day09a_16_digits(self): - """ should output a 16-digit number.""" + """should output a 16-digit number.""" instructions = "1102,34915192,34915192,7,4,7,99,0" opcodes = [int(digit) for digit in instructions.split(",")] intcode = IntCode() @@ -22,7 +22,7 @@ def test_day09a_16_digits(self): assert len(str(result)) == 16 def test_day09a_output_large_number(self): - """ should output the large number in the middle. """ + """should output the large number in the middle.""" instructions = "104,1125899906842624,99" opcodes = [int(digit) for digit in instructions.split(",")] intcode = IntCode() @@ -31,7 +31,7 @@ def test_day09a_output_large_number(self): assert result == opcodes[1] def test_day09a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day09PartA() res = solution("day_09/day09.txt") assert res != 203 diff --git a/tests/adventofcode2019/test_day09_b.py b/tests/adventofcode2019/test_day09_b.py index 0f3bf1f4..9dd69fd7 100644 --- a/tests/adventofcode2019/test_day09_b.py +++ b/tests/adventofcode2019/test_day09_b.py @@ -1,9 +1,9 @@ -from adventofcode2019.solutions.day09 import Day09PartB +from adventofcode2019.day09 import Day09PartB class TestDay09PartB: def test_day09b_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day09PartB() res = solution("day_09/day09.txt") assert res == 78831 diff --git a/tests/adventofcode2019/test_day10_a.py b/tests/adventofcode2019/test_day10_a.py index 700cead5..297188e9 100644 --- a/tests/adventofcode2019/test_day10_a.py +++ b/tests/adventofcode2019/test_day10_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day10 import Astroid, Day10PartA +from adventofcode2019.day10 import Astroid, Day10PartA class TestDay10PartA: @@ -78,7 +78,7 @@ def test_day10a_solve(self, input_data, best_location, expected_result): assert best_astroid == Astroid(x=best_location[0], y=best_location[1]) def test_day10a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day10PartA() res = solution("day_10/day10.txt") assert res == 319 diff --git a/tests/adventofcode2019/test_day10_b.py b/tests/adventofcode2019/test_day10_b.py index 74e490b7..65b89371 100644 --- a/tests/adventofcode2019/test_day10_b.py +++ b/tests/adventofcode2019/test_day10_b.py @@ -1,4 +1,4 @@ -from adventofcode2019.solutions.day10 import Astroid, Day10PartB +from adventofcode2019.day10 import Astroid, Day10PartB class TestDay10PartB: @@ -74,7 +74,7 @@ def test_day10b_big_map(self): assert solution.astroids_destroyed[199] == Astroid(8, 2) # 200th def test_day10b_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day10PartB() res = solution("day_10/day10.txt") assert res == 517 diff --git a/tests/adventofcode2019/test_day11_a.py b/tests/adventofcode2019/test_day11_a.py index 91c45a16..0d3957fc 100644 --- a/tests/adventofcode2019/test_day11_a.py +++ b/tests/adventofcode2019/test_day11_a.py @@ -1,4 +1,4 @@ -from adventofcode2019.solutions.day11 import Day11PartA, Direction, RotateDirection +from adventofcode2019.day11 import Day11PartA, Direction, RotateDirection class TestDay11PartA: @@ -22,7 +22,7 @@ def test_direction(self): assert direction == Direction.LEFT def test_day11a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day11PartA() res = solution("day_11/day11.txt") assert res != 10601 diff --git a/tests/adventofcode2019/test_day11_b.py b/tests/adventofcode2019/test_day11_b.py index bced5fc9..cac69068 100644 --- a/tests/adventofcode2019/test_day11_b.py +++ b/tests/adventofcode2019/test_day11_b.py @@ -1,9 +1,9 @@ -from adventofcode2019.solutions.day11 import Day11PartB +from adventofcode2019.day11 import Day11PartB class TestDay11PartB: def test_day11b_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day11PartB() res = solution("day_11/day11.txt") output = [ diff --git a/tests/adventofcode2019/test_day12_a.py b/tests/adventofcode2019/test_day12_a.py index a05c4503..0be4767b 100644 --- a/tests/adventofcode2019/test_day12_a.py +++ b/tests/adventofcode2019/test_day12_a.py @@ -1,4 +1,4 @@ -from adventofcode2019.solutions.day12 import Day12PartA, Galaxy, Moon +from adventofcode2019.day12 import Day12PartA, Galaxy, Moon class TestDay12PartA: @@ -53,7 +53,7 @@ def test_creation(self): assert galaxy.get_total_energy() == 179 def test_day12a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day12PartA() res = solution("day_12/day12.txt") assert res == 5350 diff --git a/tests/adventofcode2019/test_day12_b.py b/tests/adventofcode2019/test_day12_b.py index 41595de1..4f59c59c 100644 --- a/tests/adventofcode2019/test_day12_b.py +++ b/tests/adventofcode2019/test_day12_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day12 import Day12PartB +from adventofcode2019.day12 import Day12PartB class TestDay12PartB: @@ -34,7 +34,7 @@ def test_day12b_solve(self, input_data, expected_result): assert result == expected_result def test_day12b_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day12PartB() res = solution("day_12/day12.txt") assert res == 467034091553512 diff --git a/tests/adventofcode2019/test_day13_a.py b/tests/adventofcode2019/test_day13_a.py index bfc89cf5..b7066ea4 100644 --- a/tests/adventofcode2019/test_day13_a.py +++ b/tests/adventofcode2019/test_day13_a.py @@ -1,9 +1,9 @@ -from adventofcode2019.solutions.day13 import Day13PartA +from adventofcode2019.day13 import Day13PartA class TestDay13PartA: def test_day13a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day13PartA() res = solution("day_13/day13.txt") assert res == 205 diff --git a/tests/adventofcode2019/test_day13_b.py b/tests/adventofcode2019/test_day13_b.py index b9eccf10..77703005 100644 --- a/tests/adventofcode2019/test_day13_b.py +++ b/tests/adventofcode2019/test_day13_b.py @@ -1,9 +1,9 @@ -from adventofcode2019.solutions.day13 import Day13PartB +from adventofcode2019.day13 import Day13PartB class TestDay13PartB: def test_day13b_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day13PartB() res = solution("day_13/day13.txt") assert res == 10292 diff --git a/tests/adventofcode2019/test_day14_a.py b/tests/adventofcode2019/test_day14_a.py index 238a92f4..6ea1597e 100644 --- a/tests/adventofcode2019/test_day14_a.py +++ b/tests/adventofcode2019/test_day14_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day14 import Day14PartA, NanoFactory, Recipe +from adventofcode2019.day14 import Day14PartA, NanoFactory, Recipe class TestDay14PartA: @@ -99,7 +99,7 @@ def test_day14a_solve(self, input_data, expected_result): assert result == expected_result def test_day14a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day14PartA() res = solution("day_14/day14.txt") assert res == 1065255 diff --git a/tests/adventofcode2019/test_day14_b.py b/tests/adventofcode2019/test_day14_b.py index fd68bcf5..8948abb6 100644 --- a/tests/adventofcode2019/test_day14_b.py +++ b/tests/adventofcode2019/test_day14_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day14 import Day14PartB +from adventofcode2019.day14 import Day14PartB class TestDay14PartB: @@ -71,7 +71,7 @@ def test_day14b_solve(self, input_data, expected_result): assert result == expected_result def test_day14b_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day14PartB() res = solution("day_14/day14.txt") assert res != 1766155 diff --git a/tests/adventofcode2019/test_day15_a.py b/tests/adventofcode2019/test_day15_a.py index 4becdd59..c5e39d5f 100644 --- a/tests/adventofcode2019/test_day15_a.py +++ b/tests/adventofcode2019/test_day15_a.py @@ -1,9 +1,9 @@ -from adventofcode2019.solutions.day15 import Day15PartA +from adventofcode2019.day15 import Day15PartA class TestDay15PartA: def test_day15a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day15PartA() res = solution("day_15/day15.txt") assert res == 228 diff --git a/tests/adventofcode2019/test_day15_b.py b/tests/adventofcode2019/test_day15_b.py index a572bc70..2dca7c24 100644 --- a/tests/adventofcode2019/test_day15_b.py +++ b/tests/adventofcode2019/test_day15_b.py @@ -1,4 +1,4 @@ -from adventofcode2019.solutions.day15 import Day15PartB, Location, Point, Tile +from adventofcode2019.day15 import Day15PartB, Location, Point, Tile class TestDay15PartB: @@ -50,7 +50,7 @@ def test_day15b_solve(self): assert result == 5 def test_day15b_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day15PartB() res = solution("day_15/day15.txt") assert res != 346 diff --git a/tests/adventofcode2019/test_day16_a.py b/tests/adventofcode2019/test_day16_a.py index 6f6c1469..02610d8f 100644 --- a/tests/adventofcode2019/test_day16_a.py +++ b/tests/adventofcode2019/test_day16_a.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day16 import Day16PartA +from adventofcode2019.day16 import Day16PartA class TestDay16PartA: @@ -40,7 +40,7 @@ def test_day16a_solve(self, input_data, expected_result): assert result == expected_result def test_day16a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day16PartA() res = solution("day_16/day16.txt") assert res == 28430146 diff --git a/tests/adventofcode2019/test_day16_b.py b/tests/adventofcode2019/test_day16_b.py index fe3f690b..ba54ef13 100644 --- a/tests/adventofcode2019/test_day16_b.py +++ b/tests/adventofcode2019/test_day16_b.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.day16 import Day16PartB +from adventofcode2019.day16 import Day16PartB class TestDay16PartB: @@ -18,7 +18,7 @@ def test_day16b_solve(self, input_data, expected_result): assert result == expected_result def test_day16b_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day16PartB() res = solution("day_16/day16.txt") assert res != 36468541 diff --git a/tests/adventofcode2019/test_day17_a.py b/tests/adventofcode2019/test_day17_a.py index 2d1d313c..e5c533eb 100644 --- a/tests/adventofcode2019/test_day17_a.py +++ b/tests/adventofcode2019/test_day17_a.py @@ -1,26 +1,9 @@ from collections import defaultdict -import pytest - -from adventofcode2019.solutions.day17 import Day17PartA +from adventofcode2019.day17 import Day17PartA class TestDay17PartA: - @pytest.mark.skip("No longer required") - def test_day17a_grid_to_lists(self): - solution = Day17PartA() - - # fmt: off - grid = [ - 40, 50, 10, - 14, 15, 10, - 55, 66, 10, - ] - # fmt: on - - result = solution.grid_to_lists(grid) - assert result == [[40, 50], [14, 15], [55, 66]] - def test_day17a_grid(self, capsys): solution = Day17PartA() @@ -62,7 +45,7 @@ def test_day17a_grid(self, capsys): assert score == 76 def test_day17a_data(self): - """ Result we got when we did the real solution """ + """Result we got when we did the real solution""" solution = Day17PartA() res = solution("day_17/day17.txt") assert res == 5056 diff --git a/tests/adventofcode2019/test_infi.py b/tests/adventofcode2019/test_infi.py index d58ca9e1..fa3af00e 100644 --- a/tests/adventofcode2019/test_infi.py +++ b/tests/adventofcode2019/test_infi.py @@ -1,4 +1,4 @@ -from adventofcode2019.solutions.infi import Infi +from adventofcode2019.infi import Infi class TestInfi: diff --git a/tests/adventofcode2019/test_intcode.py b/tests/adventofcode2019/test_intcode.py index 2ca0c08a..b104bed0 100644 --- a/tests/adventofcode2019/test_intcode.py +++ b/tests/adventofcode2019/test_intcode.py @@ -1,6 +1,6 @@ import pytest -from adventofcode2019.solutions.intcode import IntCode +from adventofcode2019.intcode import IntCode class TestIntcode: diff --git a/tests/adventofcode2020/test_day01_a.py b/tests/adventofcode2020/test_day01_a.py new file mode 100644 index 00000000..17d43d04 --- /dev/null +++ b/tests/adventofcode2020/test_day01_a.py @@ -0,0 +1,9 @@ +from adventofcode2020.day01 import Day01PartA + + +class TestDay01PartA: + def test_day01a_data(self): + """Result we got when we did the real solution""" + solution = Day01PartA() + res = solution("day_01/day01.txt") + assert res == 437931 diff --git a/tests/adventofcode2020/test_day01_b.py b/tests/adventofcode2020/test_day01_b.py new file mode 100644 index 00000000..7484abdb --- /dev/null +++ b/tests/adventofcode2020/test_day01_b.py @@ -0,0 +1,9 @@ +from adventofcode2020.day01 import Day01PartB + + +class TestDay01PartB: + def test_day01b_data(self): + """Result we got when we did the real solution""" + solution = Day01PartB() + res = solution("day_01/day01.txt") + assert res == 157667328 diff --git a/tests/adventofcode2020/test_day02_a.py b/tests/adventofcode2020/test_day02_a.py new file mode 100644 index 00000000..581a4154 --- /dev/null +++ b/tests/adventofcode2020/test_day02_a.py @@ -0,0 +1,32 @@ +import pytest + +from adventofcode2020.day02 import Day02PartA, PassPol + + +class TestDay02PartA: + def test_day02_split(self): + input_str = "7-9 r: rrrkrrrrrnrrmj" + + result = Day02PartA.split(input_str) + + assert result == PassPol( + at_least=7, + at_most=9, + letter="r", + password="rrrkrrrrrnrrmj", # nosec B106 + ) + + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [("1-3 a: abcde\n1-3 b: cdefg\n2-9 c: ccccccccc\n", 2)], + ) + def test_day02a_solve(self, input_data, expected_result): + solution = Day02PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day02a_data(self): + """Result we got when we did the real solution""" + solution = Day02PartA() + res = solution("day_02/day02.txt") + assert res == 465 diff --git a/tests/adventofcode2020/test_day02_b.py b/tests/adventofcode2020/test_day02_b.py new file mode 100644 index 00000000..316fde78 --- /dev/null +++ b/tests/adventofcode2020/test_day02_b.py @@ -0,0 +1,20 @@ +import pytest + +from adventofcode2020.day02 import Day02PartB + + +class TestDay02PartB: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [("1-3 a: abcde\n1-3 b: cdefg\n2-9 c: ccccccccc\n", 1)], + ) + def test_day02b_solve(self, input_data, expected_result): + solution = Day02PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day02b_data(self): + """Result we got when we did the real solution""" + solution = Day02PartB() + res = solution("day_02/day02.txt") + assert res == 294 diff --git a/tests/adventofcode2020/test_day03_a.py b/tests/adventofcode2020/test_day03_a.py new file mode 100644 index 00000000..b109d300 --- /dev/null +++ b/tests/adventofcode2020/test_day03_a.py @@ -0,0 +1,10 @@ +from adventofcode2020.day03 import Day03PartA + + +class TestDay03PartA: + def test_day03a_data(self): + """Result we got when we did the real solution""" + solution = Day03PartA() + res = solution("day_03/day03.txt") + assert res != 105 + assert res == 151 diff --git a/tests/adventofcode2020/test_day03_b.py b/tests/adventofcode2020/test_day03_b.py new file mode 100644 index 00000000..a512a956 --- /dev/null +++ b/tests/adventofcode2020/test_day03_b.py @@ -0,0 +1,11 @@ +from adventofcode2020.day03 import Day03PartB + + +class TestDay03PartB: + def test_day03b_data(self): + """Result we got when we did the real solution""" + solution = Day03PartB() + res = solution("day_03/day03.txt") + assert res != 294 + assert res != 13163297103 + assert res == 7540141059 diff --git a/tests/adventofcode2020/test_day04_a.py b/tests/adventofcode2020/test_day04_a.py new file mode 100644 index 00000000..dd1e4d6e --- /dev/null +++ b/tests/adventofcode2020/test_day04_a.py @@ -0,0 +1,27 @@ +from adventofcode2020.day04 import Day04PartA + + +class Testday04PartA: + def test_day04a_solve(self): + input_data = """ecl:gry pid:860033327 eyr:2020 hcl:#fffffd +byr:1937 iyr:2017 cid:147 hgt:183cm + +iyr:2013 ecl:amb cid:350 eyr:2023 pid:028048884 +hcl:#cfa07d byr:1929 + +hcl:#ae17e1 iyr:2013 +eyr:2024 +ecl:brn pid:760753108 byr:1931 +hgt:179cm + +hcl:#cfa07d eyr:2025 pid:166559648 +iyr:2011 ecl:brn hgt:59in""" + solution = Day04PartA() + result = solution.solve(input_data) + assert result == 2 + + def test_day04a_data(self): + """Result we got when we did the real solution""" + solution = Day04PartA() + res = solution("day_04/day04.txt") + assert res == 216 diff --git a/tests/adventofcode2020/test_day04_b.py b/tests/adventofcode2020/test_day04_b.py new file mode 100644 index 00000000..f18e66ec --- /dev/null +++ b/tests/adventofcode2020/test_day04_b.py @@ -0,0 +1,58 @@ +import pytest + +from adventofcode2020.day04 import Day04PartB + + +class TestDay04PartB: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ( + """eyr:1972 cid:100 +hcl:#18171d ecl:amb hgt:170 pid:186cm iyr:2018 byr:1926 + +iyr:2019 +hcl:#602927 eyr:1967 hgt:170cm +ecl:grn pid:012533040 byr:1946 + +hcl:dab227 iyr:2012 +ecl:brn hgt:182cm pid:021572410 eyr:2020 byr:1992 cid:277 + +hgt:59cm ecl:zzz +eyr:2038 hcl:74454a iyr:2023 +pid:3556412378 byr:2007 +""", + 0, + ), + ( + "pid:087499704 hgt:74in ecl:grn iyr:2012 eyr:2030 byr:1980 hcl:#623a2f", + 1, + ), + ( + "eyr:2029 ecl:blu cid:129 byr:1989 " + "iyr:2014 pid:896056539 hcl:#a97842 hgt:165cm", + 1, + ), + ( + "hcl:#888785 hgt:164cm byr:2001 iyr:2015 " + "cid:88 pid:545766238 ecl:hzl eyr:2022", + 1, + ), + ( + "iyr:2010 hgt:158cm hcl:#b6652a " + "ecl:blu byr:1944 eyr:2021 pid:093154719", + 1, + ), + ], + ) + def test_day04b_solve(self, input_data, expected_result): + solution = Day04PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day04b_data(self): + """Result we got when we did the real solution""" + solution = Day04PartB() + res = solution("day_04/day04.txt") + assert res != 80 + assert res == 150 diff --git a/tests/adventofcode2020/test_day05_a.py b/tests/adventofcode2020/test_day05_a.py new file mode 100644 index 00000000..654a3958 --- /dev/null +++ b/tests/adventofcode2020/test_day05_a.py @@ -0,0 +1,33 @@ +import pytest + +from adventofcode2020.day05 import Day05PartA + + +class TestDay05PartA: + @pytest.mark.parametrize( + ("input_data", "row", "col", "seat_nr"), + [ + ("FBFBBFFRLR", 44, 5, 357), + ("BFFFBBFRRR", 70, 7, 567), + ("FFFBBBFRRR", 14, 7, 119), + ("BBFFBBFRLL", 102, 4, 820), + ("FFFFFFFRRR", 0, 7, 7), + ("BBBBBBBLLL", 127, 0, 1016), + ], + ) + def test_bin_search(self, input_data: str, row: int, col: int, seat_nr: int): + solution = Day05PartA() + calc_row = solution.compute_position_row(input_data) + assert calc_row == row + + calc_col = solution.compute_position_col(input_data) + assert calc_col == col + + assert solution.compute_seat_nr(input_data) == seat_nr + + def test_day05a_data(self): + """Result we got when we did the real solution""" + solution = Day05PartA() + res = solution("day_05/day05.txt") + assert res != 807 # Too low + assert res == 813 diff --git a/tests/adventofcode2020/test_day05_b.py b/tests/adventofcode2020/test_day05_b.py new file mode 100644 index 00000000..7ca631d9 --- /dev/null +++ b/tests/adventofcode2020/test_day05_b.py @@ -0,0 +1,9 @@ +from adventofcode2020.day05 import Day05PartB + + +class TestDay05PartB: + def test_day05b_data(self): + """Result we got when we did the real solution""" + solution = Day05PartB() + res = solution("day_05/day05.txt") + assert res == 612 diff --git a/tests/adventofcode2020/test_day06_a.py b/tests/adventofcode2020/test_day06_a.py new file mode 100644 index 00000000..4c3bbd4f --- /dev/null +++ b/tests/adventofcode2020/test_day06_a.py @@ -0,0 +1,39 @@ +import pytest + +from adventofcode2020.day06 import Day06PartA + + +class TestDay06PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ( + """abc + +a +b +c + +ab +ac + +a +a +a +a + +b""", + 11, + ) + ], + ) + def test_day06a_solve(self, input_data, expected_result): + solution = Day06PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day06a_data(self): + """Result we got when we did the real solution""" + solution = Day06PartA() + res = solution("day_06/day06.txt") + assert res == 6549 diff --git a/tests/adventofcode2020/test_day06_b.py b/tests/adventofcode2020/test_day06_b.py new file mode 100644 index 00000000..b928611e --- /dev/null +++ b/tests/adventofcode2020/test_day06_b.py @@ -0,0 +1,39 @@ +import pytest + +from adventofcode2020.day06 import Day06PartB + + +class TestDay06PartB: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ( + """abc + +a +b +c + +ab +ac + +a +a +a +a + +b""", + 6, + ) + ], + ) + def test_day06b_solve(self, input_data, expected_result): + solution = Day06PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day06b_data(self): + """Result we got when we did the real solution""" + solution = Day06PartB() + res = solution("day_06/day06.txt") + assert res == 3466 diff --git a/tests/adventofcode2020/test_day07_a.py b/tests/adventofcode2020/test_day07_a.py new file mode 100644 index 00000000..986612f4 --- /dev/null +++ b/tests/adventofcode2020/test_day07_a.py @@ -0,0 +1,55 @@ +import pytest + +from adventofcode2020.day07 import Day07PartA + + +class TestDay07PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result", "bag_color"), + [ + ( + "light red bags contain 1 bright white bag, 2 muted yellow bags", + 2, + "light red", + ), + ("faded blue bags contain no other bags.", 0, "faded blue"), + ("dark tan bags contain 4 faded white bags.", 1, "dark tan"), + ( + "dull turquoise bags contain 2 plaid olive bags, " + "5 striped turquoise bags, 5 muted brown bags, 1 vibrant magenta bag.", + 4, + "dull turquoise", + ), + ], + ) + def test_day07_from_string(self, input_data, expected_result, bag_color): + solution = Day07PartA() + bag = solution.from_string(input_data) + # Check how many bags the bag contains + assert len(bag.contains) == expected_result + assert bag.color == bag_color + + def test_day07a_solve(self): + test_input = "\n".join( + [ + "light red bags contain 1 bright white bag, 2 muted yellow bags.", + "dark orange bags contain 3 bright white bags, 4 muted yellow bags.", + "bright white bags contain 1 shiny gold bag.", + "muted yellow bags contain 2 shiny gold bags, 9 faded blue bags.", + "shiny gold bags contain 1 dark olive bag, 2 vibrant plum bags.", + "dark olive bags contain 3 faded blue bags, 4 dotted black bags.", + "vibrant plum bags contain 5 faded blue bags, 6 dotted black bags.", + "faded blue bags contain no other bags.", + "dotted black bags contain no other bags.", + ] + ) + + solution = Day07PartA() + result = solution.solve(test_input) + assert result == 4 + + def test_day07a_data(self): + """Result we got when we did the real solution""" + solution = Day07PartA() + res = solution("day_07/day07.txt") + assert res == 151 diff --git a/tests/adventofcode2020/test_day07_b.py b/tests/adventofcode2020/test_day07_b.py new file mode 100644 index 00000000..649f72e1 --- /dev/null +++ b/tests/adventofcode2020/test_day07_b.py @@ -0,0 +1,45 @@ +from adventofcode2020.day07 import Day07PartB + + +class TestDay07PartB: + def test_day07b_solve(self): + test_input = "\n".join( + [ + "light red bags contain 1 bright white bag, 2 muted yellow bags.", + "dark orange bags contain 3 bright white bags, 4 muted yellow bags.", + "bright white bags contain 1 shiny gold bag.", + "muted yellow bags contain 2 shiny gold bags, 9 faded blue bags.", + "shiny gold bags contain 1 dark olive bag, 2 vibrant plum bags.", + "dark olive bags contain 3 faded blue bags, 4 dotted black bags.", + "vibrant plum bags contain 5 faded blue bags, 6 dotted black bags.", + "faded blue bags contain no other bags.", + "dotted black bags contain no other bags.", + ] + ) + + solution = Day07PartB() + result = solution.solve(test_input) + assert result == 32 + + def test_day07b_test2(self): + test_input = "\n".join( + [ + "shiny gold bags contain 2 dark red bags.", + "dark red bags contain 2 dark orange bags.", + "dark orange bags contain 2 dark yellow bags.", + "dark yellow bags contain 2 dark green bags.", + "dark green bags contain 2 dark blue bags.", + "dark blue bags contain 2 dark violet bags.", + "dark violet bags contain no other bags.", + ] + ) + + solution = Day07PartB() + result = solution.solve(test_input) + assert result == 126 + + def test_day07b_data(self): + """Result we got when we did the real solution""" + solution = Day07PartB() + res = solution("day_07/day07.txt") + assert res == 41559 diff --git a/tests/adventofcode2020/test_day08_a.py b/tests/adventofcode2020/test_day08_a.py new file mode 100644 index 00000000..0ea712fa --- /dev/null +++ b/tests/adventofcode2020/test_day08_a.py @@ -0,0 +1,31 @@ +import pytest + +from adventofcode2020.day08 import Day08PartA + + +class TestDay08PartA: + instruction_1 = "\n".join( + [ + "nop +0", + "acc +1", + "jmp +4", + "acc +3", + "jmp -3", + "acc -99", + "acc +1", + "jmp -4", + "acc +6", + ] + ) + + @pytest.mark.parametrize(("instructions", "expected_result"), [(instruction_1, 5)]) + def test_day08a_solve(self, instructions, expected_result): + solution = Day08PartA() + result = solution.solve(instructions) + assert result == expected_result + + def test_day08a_data(self): + """Result we got when we did the real solution""" + solution = Day08PartA() + res = solution("day_08/day08.txt") + assert res == 2080 diff --git a/tests/adventofcode2020/test_day08_b.py b/tests/adventofcode2020/test_day08_b.py new file mode 100644 index 00000000..91d5b8ff --- /dev/null +++ b/tests/adventofcode2020/test_day08_b.py @@ -0,0 +1,31 @@ +import pytest + +from adventofcode2020.day08 import Day08PartB + + +class TestDay08PartB: + instruction_1 = "\n".join( + [ + "nop +0", + "acc +1", + "jmp +4", + "acc +3", + "jmp -3", + "acc -99", + "acc +1", + "jmp -4", + "acc +6", + ] + ) + + @pytest.mark.parametrize(("input_data", "expected_result"), [(instruction_1, 8)]) + def test_day08b_solve(self, input_data, expected_result): + solution = Day08PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day08b_data(self): + """Result we got when we did the real solution""" + solution = Day08PartB() + res = solution("day_08/day08.txt") + assert res == 2477 diff --git a/tests/adventofcode2020/test_day09_a.py b/tests/adventofcode2020/test_day09_a.py new file mode 100644 index 00000000..d7b77659 --- /dev/null +++ b/tests/adventofcode2020/test_day09_a.py @@ -0,0 +1,36 @@ +import pytest + +from adventofcode2020.day09 import Day09PartA + + +class TestDay09PartA: + @pytest.mark.parametrize(("begin", "is_valid"), [(0, True), (1, True), (9, False)]) + def test_day09a_solve(self, begin, is_valid): + """ + 127 is false, and on place 14. That will mean that 9, 10, 11, 12, 13 is the + preamble, 14 check digit. So we begin at 9 + """ + # fmt: off + integers = [ + 35, 20, 15, 25, 47, 40, 62, 55, + 65, 95, 102, 117, 150, 182, 127, + 219, 299, 277, 309, 576 + ] + # fmt: on + + solution = Day09PartA() + end = begin + 5 + slice = integers[begin:end] + assert len(slice) == 5 + check_digit = integers[begin + 5] + + result = solution.check_preamble(integers=slice, next_number=check_digit) + + assert result is is_valid + + def test_day09a_data(self): + """Result we got when we did the real solution""" + solution = Day09PartA() + res = solution("day_09/day09.txt") + assert res != 53 + assert res == 1492208709 diff --git a/tests/adventofcode2020/test_day09_b.py b/tests/adventofcode2020/test_day09_b.py new file mode 100644 index 00000000..d9af2b1e --- /dev/null +++ b/tests/adventofcode2020/test_day09_b.py @@ -0,0 +1,22 @@ +from adventofcode2020.day09 import Day09PartB + + +class TestDay09PartB: + def test_day09b_solve(self): + # fmt: off + integers = [ + 35, 20, 15, 25, 47, 40, 62, 55, + 65, 95, 102, 117, 150, 182, 127, + 219, 299, 277, 309, 576 + ] + # fmt: on + + solution = Day09PartB() + result = solution.find_slice(integers, 127) + assert result == 62 + + def test_day09b_data(self): + """Result we got when we did the real solution""" + solution = Day09PartB() + res = solution("day_09/day09.txt") + assert res == 238243506 diff --git a/tests/adventofcode2020/test_day10_a.py b/tests/adventofcode2020/test_day10_a.py new file mode 100644 index 00000000..55faabfb --- /dev/null +++ b/tests/adventofcode2020/test_day10_a.py @@ -0,0 +1,35 @@ +import pytest + +from adventofcode2020.day10 import Day10PartA + + +class TestDay10PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ( + """16 +10 +15 +5 +1 +11 +7 +19 +6 +12 +4""", + 35, + ), + ], + ) + def test_day10a_solve(self, input_data, expected_result): + solution = Day10PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day10a_data(self): + """Result we got when we did the real solution""" + solution = Day10PartA() + res = solution("day_10/day10.txt") + assert res == 1700 diff --git a/tests/adventofcode2020/test_day10_b.py b/tests/adventofcode2020/test_day10_b.py new file mode 100644 index 00000000..150db26c --- /dev/null +++ b/tests/adventofcode2020/test_day10_b.py @@ -0,0 +1,39 @@ +import pytest + +from adventofcode2020.day10 import Day10PartB + + +class TestDay10PartB: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + ( + ([0, 1, 4, 5, 6, 7], 4), + ([0, 16, 10, 15, 5, 1, 11, 7, 19, 6, 12, 4], 8), + ), + ) + def test_day10b_combinations(self, input_data, expected_result): + solution = Day10PartB() + result = solution.find_combinations(sorted(input_data)) + assert result == expected_result + + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ("16\n10\n15\n5\n1\n11\n7\n19\n6\n12\n4\n", 8), + ( + "28\n33\n18\n42\n31\n14\n46\n20\n48\n47\n24\n23\n49\n45\n19\n" + "38\n39\n11\n1\n32\n25\n35\n8\n17\n7\n9\n4\n2\n34\n10\n3\n", + 19208, + ), + ], + ) + def test_day10b_solve(self, input_data, expected_result): + solution = Day10PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day10b_data(self): + """Result we got when we did the real solution""" + solution = Day10PartB() + res = solution("day_10/day10.txt") + assert res == 12401793332096 diff --git a/tests/adventofcode2020/test_day11_a.py b/tests/adventofcode2020/test_day11_a.py new file mode 100644 index 00000000..5e09ae48 --- /dev/null +++ b/tests/adventofcode2020/test_day11_a.py @@ -0,0 +1,35 @@ +import pytest + +from adventofcode2020.day11 import Day11PartA + + +class TestDay11PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ( + """L.LL.LL.LL +LLLLLLL.LL +L.L.L..L.. +LLLL.LL.LL +L.LL.LL.LL +L.LLLLL.LL +..L.L..... +LLLLLLLLLL +L.LLLLLL.L +L.LLLLL.LL""", + 37, + ) + ], + ) + def test_day11a_solve(self, input_data, expected_result): + solution = Day11PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day11a_data(self): + """Result we got when we did the real solution""" + solution = Day11PartA() + res = solution("day_11/day11.txt") + assert res != 6415 # Too high + assert res == 2281 diff --git a/tests/adventofcode2020/test_day11_b.py b/tests/adventofcode2020/test_day11_b.py new file mode 100644 index 00000000..1c55b345 --- /dev/null +++ b/tests/adventofcode2020/test_day11_b.py @@ -0,0 +1,34 @@ +import pytest + +from adventofcode2020.day11 import Day11PartB + + +class TestDay11PartB: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ( + """L.LL.LL.LL +LLLLLLL.LL +L.L.L..L.. +LLLL.LL.LL +L.LL.LL.LL +L.LLLLL.LL +..L.L..... +LLLLLLLLLL +L.LLLLLL.L +L.LLLLL.LL""", + 26, + ) + ], + ) + def test_day11b_solve(self, input_data, expected_result): + solution = Day11PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day11b_data(self): + """Result we got when we did the real solution""" + solution = Day11PartB() + res = solution("day_11/day11.txt") + assert res == 2085 diff --git a/tests/adventofcode2020/test_day12_a.py b/tests/adventofcode2020/test_day12_a.py new file mode 100644 index 00000000..cf3febd3 --- /dev/null +++ b/tests/adventofcode2020/test_day12_a.py @@ -0,0 +1,35 @@ +import pytest + +from adventofcode2020.day12 import Day12PartA, Direction + + +class TestDay12PartA: + def test_day12a_next(self): + south = Direction.SOUTH + # Set the next direction + west = Direction.get_next(south, 1) + assert west == Direction.WEST + + east = Direction.get_next(west, -2) + assert east == Direction.EAST + + # Test looping: + assert Direction.get_next(Direction.NORTH, -2) == Direction.SOUTH + + assert Direction.get_next(west, 1) == Direction.NORTH + + @pytest.mark.parametrize( + ("input_data", "expected_result"), [(["F10", "N3", "F7", "R90", "F11"], 25)] + ) + def test_day12a_solve(self, input_data, expected_result): + input_str = "\n".join(input_data) + solution = Day12PartA() + result = solution.solve(input_str) + assert result == expected_result + + def test_day12a_data(self): + """Result we got when we did the real solution""" + solution = Day12PartA() + res = solution("day_12/day12.txt") + assert res != 746 # Too high + assert res == 362 diff --git a/tests/adventofcode2020/test_day12_b.py b/tests/adventofcode2020/test_day12_b.py new file mode 100644 index 00000000..e74bdb9c --- /dev/null +++ b/tests/adventofcode2020/test_day12_b.py @@ -0,0 +1,47 @@ +import pytest + +from adventofcode2020.day12 import Day12PartB + + +class TestDay12PartB: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + (["F10", "N3", "F7", "R90", "F11"], 286), + ( + [ + "F10", + "R180", + "F20", + "L180", + "F20", + "R90", + "R90", + "F20", + "L90", + "L90", + "F10", + ], + 0, + ), + ], + ) + def test_day12b_solve(self, input_data, expected_result): + input_str = "\n".join(input_data) + solution = Day12PartB() + result = solution.solve(input_str) + assert result == expected_result + + def test_day12b_data(self): + """Result we got when we did the real solution""" + solution = Day12PartB() + res = solution("day_12/day12.txt") + assert res < 35575 # Too high + assert res < 58937 # Too High + assert res != 18369 + assert res != 263381 + assert res != 26775 + assert res != 30045 + assert res != 77469 + assert res != 79083 + assert res == 29895 diff --git a/tests/adventofcode2020/test_day13_a.py b/tests/adventofcode2020/test_day13_a.py new file mode 100644 index 00000000..70a981d2 --- /dev/null +++ b/tests/adventofcode2020/test_day13_a.py @@ -0,0 +1,19 @@ +import pytest + +from adventofcode2020.day13 import Day13PartA + + +class TestDay13PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result"), [("939\n7,13,x,x,59,x,31,19", 295)] + ) + def test_day13a_solve(self, input_data, expected_result): + solution = Day13PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day13a_data(self): + """Result we got when we did the real solution""" + solution = Day13PartA() + res = solution("day_13/day13.txt") + assert res == 2545 diff --git a/tests/adventofcode2020/test_day13_b.py b/tests/adventofcode2020/test_day13_b.py new file mode 100644 index 00000000..39932af5 --- /dev/null +++ b/tests/adventofcode2020/test_day13_b.py @@ -0,0 +1,23 @@ +import pytest + +from adventofcode2020.day13 import Day13PartB + + +class TestDay13PartB: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ("0\n17,x,13,19", 3417), + ("939\n7,13,x,x,59,x,31,19", 1068781), + ], + ) + def test_day13b_solve(self, input_data, expected_result): + solution = Day13PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day13b_data(self): + """Result we got when we did the real solution""" + solution = Day13PartB() + res = solution("day_13/day13.txt") + assert res == 266204454441577 diff --git a/tests/adventofcode2020/test_day14_a.py b/tests/adventofcode2020/test_day14_a.py new file mode 100644 index 00000000..d1323b26 --- /dev/null +++ b/tests/adventofcode2020/test_day14_a.py @@ -0,0 +1,31 @@ +import pytest + +from adventofcode2020.day14 import Day14PartA + + +class TestDay14PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ( + [ + "mask = XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1XXXX0X", + "mem[8] = 11", + "mem[7] = 101", + "mem[8] = 0", + ], + 165, + ), + ], + ) + def test_day14a_solve(self, input_data, expected_result): + input_data = "\n".join(input_data) + solution = Day14PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day14a_data(self): + """Result we got when we did the real solution""" + solution = Day14PartA() + res = solution("day_14/day14.txt") + assert res == 18630548206046 diff --git a/tests/adventofcode2020/test_day14_b.py b/tests/adventofcode2020/test_day14_b.py new file mode 100644 index 00000000..c053834c --- /dev/null +++ b/tests/adventofcode2020/test_day14_b.py @@ -0,0 +1,69 @@ +import pytest + +from adventofcode2020.day14 import Day14PartB + + +class TestDay14PartB: + @pytest.mark.parametrize( + ("address", "input_mask", "possible_addresses"), + [ + ( + 42, + "000000000000000000000000000000X1001X", + [ + "000000000000000000000000000000011010", + "000000000000000000000000000000011011", + "000000000000000000000000000000111010", + "000000000000000000000000000000111011", + ], + ), + ( + 26, + "00000000000000000000000000000000X0XX", + [ + "000000000000000000000000000000010000", + "000000000000000000000000000000010001", + "000000000000000000000000000000010010", + "000000000000000000000000000000010011", + "000000000000000000000000000000011000", + "000000000000000000000000000000011001", + "000000000000000000000000000000011010", + "000000000000000000000000000000011011", + ], + ), + ], + ) + def test_day16b_mask_to_addresses(self, address, input_mask, possible_addresses): + solution = Day14PartB() + result = solution.mask_to_addresses(address=address, mask=input_mask) + assert len(result) == len(possible_addresses) + # Convert the possible addresses to integers + int_addresses = [int(x, 2) for x in possible_addresses] + for res in result: + assert res in int_addresses + + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ( + [ + "mask = 000000000000000000000000000000X1001X", + "mem[42] = 100", + "mask = 00000000000000000000000000000000X0XX", + "mem[26] = 1", + ], + 208, + ) + ], + ) + def test_day14b_solve(self, input_data, expected_result): + input_data = "\n".join(input_data) + solution = Day14PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day14b_data(self): + """Result we got when we did the real solution""" + solution = Day14PartB() + res = solution("day_14/day14.txt") + assert res == 4254673508445 diff --git a/tests/adventofcode2020/test_day15_a.py b/tests/adventofcode2020/test_day15_a.py new file mode 100644 index 00000000..978ac9c1 --- /dev/null +++ b/tests/adventofcode2020/test_day15_a.py @@ -0,0 +1,28 @@ +import pytest + +from adventofcode2020.day15 import Day15PartA + + +class TestDay15PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ("0,3,6", 436), + ("1,3,2", 1), + ("2,1,3", 10), + ("1,2,3", 27), + ("2,3,1", 78), + ("3,2,1", 438), + ("3,1,2", 1836), + ], + ) + def test_day15a_solve(self, input_data, expected_result): + solution = Day15PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day15a_data(self): + """Result we got when we did the real solution""" + solution = Day15PartA() + res = solution("day_15/day15.txt") + assert res == 206 diff --git a/tests/adventofcode2020/test_day16_a.py b/tests/adventofcode2020/test_day16_a.py new file mode 100644 index 00000000..2c9f94e3 --- /dev/null +++ b/tests/adventofcode2020/test_day16_a.py @@ -0,0 +1,43 @@ +import pytest + +from adventofcode2020.day16 import Day16PartA, Ticket + + +class TestDay16PartA: + def test_invalid_ticket(self): + with pytest.raises(ValueError): + Ticket.parse_input("class 1-3, 5-7") + + def test_ticket_range(self): + ticket = Ticket.parse_input("class: 1-3 or 5-7") + + assert ticket.rule == "class" + assert ticket.is_valid(1) + assert ticket.is_valid(2) + assert ticket.is_valid(3) + assert not ticket.is_valid(4) + assert ticket.is_valid(5) + + def test_day16a_solve(self): + test_data = """class: 1-3 or 5-7 +row: 6-11 or 33-44 +seat: 13-40 or 45-50 + +your ticket: +7,1,14 + +nearby tickets: +7,3,47 +40,4,50 +55,2,20 +38,6,12 +""" + solution = Day16PartA() + result = solution.solve(test_data) + assert result == 71 + + def test_day16a_data(self): + """Result we got when we did the real solution""" + solution = Day16PartA() + res = solution("day_16/day16.txt") + assert res == 20048 diff --git a/tests/adventofcode2020/test_day16_b.py b/tests/adventofcode2020/test_day16_b.py new file mode 100644 index 00000000..1589fa86 --- /dev/null +++ b/tests/adventofcode2020/test_day16_b.py @@ -0,0 +1,40 @@ +from adventofcode2020.day16 import Day16PartB + + +class TestDay16PartB: + def test_day16b_solve(self): + test_data = """class: 0-1 or 4-19 +row: 0-5 or 8-19 +seat: 0-13 or 16-19 + +your ticket: +11,12,13 + +nearby tickets: +3,9,18 +15,1,5 +5,14,9 +1,99,9 +""" + solution = Day16PartB() + solution.parse(test_data) + + assert len(solution.nearby_tickets) == 4 + solution.remove_invalid_tickets() + assert len(solution.nearby_tickets) == 3 + + mapping = solution.compute_mapping() + + assert mapping["class"] == 1 + assert mapping["row"] == 0 + assert mapping["seat"] == 2 + + assert solution.my_tickets[mapping["class"]] == 12 + assert solution.my_tickets[mapping["row"]] == 11 + assert solution.my_tickets[mapping["seat"]] == 13 + + def test_day16b_data(self): + """Result we got when we did the real solution""" + solution = Day16PartB() + res = solution("day_16/day16.txt") + assert res == 4810284647569 diff --git a/tests/adventofcode2021/test_day01_a.py b/tests/adventofcode2021/test_day01_a.py new file mode 100644 index 00000000..ae8a844e --- /dev/null +++ b/tests/adventofcode2021/test_day01_a.py @@ -0,0 +1,25 @@ +from adventofcode2021.day01 import Day01PartA + + +class TestDay01PartA: + def test_day01a_solve(self): + test_data = """199 +200 +208 +210 +200 +207 +240 +269 +260 +263 +""" + solution = Day01PartA() + result = solution.solve(test_data) + assert result == 7 + + def test_day01a_data(self): + """Result we got when we did the real solution""" + solution = Day01PartA() + res = solution("day_01/day01.txt") + assert res == 1766 diff --git a/tests/adventofcode2021/test_day01_b.py b/tests/adventofcode2021/test_day01_b.py new file mode 100644 index 00000000..4c3275fd --- /dev/null +++ b/tests/adventofcode2021/test_day01_b.py @@ -0,0 +1,25 @@ +from adventofcode2021.day01 import Day01PartB + + +class TestDay01PartB: + def test_day01b_solve(self): + test_data = """199 +200 +208 +210 +200 +207 +240 +269 +260 +263""" + + solution = Day01PartB() + result = solution.solve(test_data) + assert result == 5 + + def test_day01b_data(self): + """Result we got when we did the real solution""" + solution = Day01PartB() + res = solution("day_01/day01.txt") + assert res == 1797 diff --git a/tests/adventofcode2021/test_day02_a.py b/tests/adventofcode2021/test_day02_a.py new file mode 100644 index 00000000..3b8382d1 --- /dev/null +++ b/tests/adventofcode2021/test_day02_a.py @@ -0,0 +1,28 @@ +import pytest + +from adventofcode2021.day02 import Day02PartA + + +class TestDay02PartA: + def test_day02a_solve(self): + test_data = """forward 5 +down 5 +forward 8 +up 3 +down 8 +forward 2 +""" + solution = Day02PartA() + result = solution.solve(test_data) + assert result == 150 + + def test_day02a_invalid_direction(self): + with pytest.raises(ValueError): + solution = Day02PartA() + solution.solve("backwards 1") + + def test_day02a_data(self): + """Result we got when we did the real solution""" + solution = Day02PartA() + res = solution("day_02/day02.txt") + assert res == 1451208 diff --git a/tests/adventofcode2021/test_day02_b.py b/tests/adventofcode2021/test_day02_b.py new file mode 100644 index 00000000..2453b704 --- /dev/null +++ b/tests/adventofcode2021/test_day02_b.py @@ -0,0 +1,28 @@ +import pytest + +from adventofcode2021.day02 import Day02PartB + + +class TestDay02PartB: + def test_day02b_solve(self): + test_data = """forward 5 +down 5 +forward 8 +up 3 +down 8 +forward 2""" + + solution = Day02PartB() + result = solution.solve(test_data) + assert result == 900 + + def test_day02b_invalid_direction(self): + with pytest.raises(ValueError): + solution = Day02PartB() + solution.solve("backwards 1") + + def test_day02b_data(self): + """Result we got when we did the real solution""" + solution = Day02PartB() + res = solution("day_02/day02.txt") + assert res == 1620141160 diff --git a/tests/adventofcode2021/test_day03_a.py b/tests/adventofcode2021/test_day03_a.py new file mode 100644 index 00000000..d2cc6a88 --- /dev/null +++ b/tests/adventofcode2021/test_day03_a.py @@ -0,0 +1,26 @@ +from adventofcode2021.day03 import Day03PartA + + +class TestDay03PartA: + def test_day03a_solve(self): + test_data = """00100 +11110 +10110 +10111 +10101 +01111 +00111 +11100 +10000 +11001 +00010 +01010""" + solution = Day03PartA() + result = solution.solve(test_data) + assert result == 198 + + def test_day03a_data(self): + """Result we got when we did the real solution""" + solution = Day03PartA() + res = solution("day_03/day03.txt") + assert res == 3895776 diff --git a/tests/adventofcode2021/test_day03_b.py b/tests/adventofcode2021/test_day03_b.py new file mode 100644 index 00000000..8e96f29f --- /dev/null +++ b/tests/adventofcode2021/test_day03_b.py @@ -0,0 +1,26 @@ +from adventofcode2021.day03 import Day03PartB + + +class TestDay03PartB: + def test_day03b_solve(self): + test_data = """00100 +11110 +10110 +10111 +10101 +01111 +00111 +11100 +10000 +11001 +00010 +01010""" + solution = Day03PartB() + result = solution.solve(test_data) + assert result == 230 + + def test_day03b_data(self): + """Result we got when we did the real solution""" + solution = Day03PartB() + res = solution("day_03/day03.txt") + assert res == 7928162 diff --git a/tests/adventofcode2021/test_day04_a.py b/tests/adventofcode2021/test_day04_a.py new file mode 100644 index 00000000..f7fb06d3 --- /dev/null +++ b/tests/adventofcode2021/test_day04_a.py @@ -0,0 +1,35 @@ +from adventofcode2021.day04 import Day04PartA + +test_data = """7,4,9,5,11,17,23,2,0,14,21,24,10,16,13,6,15,25,12,22,18,20,8,19,3,26,1 + +22 13 17 11 0 + 8 2 23 4 24 +21 9 14 16 7 + 6 10 3 18 5 + 1 12 20 15 19 + + 3 15 0 2 22 + 9 18 13 17 5 +19 8 7 25 23 +20 11 10 24 4 +14 21 16 12 6 + +14 21 17 24 4 +10 16 15 9 19 +18 8 23 26 20 +22 11 13 6 5 + 2 0 12 3 7 + """ + + +class TestDay04PartA: + def test_day04a_solve(self): # noqa: E501 + solution = Day04PartA() + result = solution.solve(test_data) + assert result == 4512 + + def test_day04a_data(self): + """Result we got when we did the real solution""" + solution = Day04PartA() + res = solution("day_04/day04.txt") + assert res == 8136 diff --git a/tests/adventofcode2021/test_day04_b.py b/tests/adventofcode2021/test_day04_b.py new file mode 100644 index 00000000..4e4b93da --- /dev/null +++ b/tests/adventofcode2021/test_day04_b.py @@ -0,0 +1,15 @@ +from adventofcode2021.day04 import Day04PartB +from tests.adventofcode2021.test_day04_a import test_data + + +class TestDay04PartB: + def test_day04b_solve(self): + solution = Day04PartB() + result = solution.solve(test_data) + assert result == 1924 + + def test_day04b_data(self): + """Result we got when we did the real solution""" + solution = Day04PartB() + res = solution("day_04/day04.txt") + assert res == 12738 diff --git a/tests/adventofcode2021/test_day05_a.py b/tests/adventofcode2021/test_day05_a.py new file mode 100644 index 00000000..8093588e --- /dev/null +++ b/tests/adventofcode2021/test_day05_a.py @@ -0,0 +1,25 @@ +from adventofcode2021.day05 import Day05PartA + + +class TestDay05PartA: + def test_day05a_solve(self): + test_input = """0,9 -> 5,9 +8,0 -> 0,8 +9,4 -> 3,4 +2,2 -> 2,1 +7,0 -> 7,4 +6,4 -> 2,0 +0,9 -> 2,9 +3,4 -> 1,4 +0,0 -> 8,8 +5,5 -> 8,2 +""" + solution = Day05PartA() + result = solution.solve(test_input) + assert result == 5 + + def test_day05a_data(self): + """Result we got when we did the real solution""" + solution = Day05PartA() + res = solution("day_05/day05.txt") + assert res == 5306 diff --git a/tests/adventofcode2021/test_day05_b.py b/tests/adventofcode2021/test_day05_b.py new file mode 100644 index 00000000..16cb5efc --- /dev/null +++ b/tests/adventofcode2021/test_day05_b.py @@ -0,0 +1,37 @@ +from adventofcode2021.day05 import Day05PartB, Point + + +class TestDay05PartB: + def test_overlap(self): + solution = Day05PartB() + overlap = solution.find_overlap( + [ + (Point(1, 1), Point(3, 3)), + (Point(2, 2), Point(6, 6)), + (Point(8, 0), Point(0, 8)), + (Point(5, 5), Point(8, 2)), + ] + ) + assert len(overlap) == 4 + + def test_day05b_solve(self): + test_input = """0,9 -> 5,9 +8,0 -> 0,8 +9,4 -> 3,4 +2,2 -> 2,1 +7,0 -> 7,4 +6,4 -> 2,0 +0,9 -> 2,9 +3,4 -> 1,4 +0,0 -> 8,8 +5,5 -> 8,2 +""" + solution = Day05PartB() + result = solution.solve(test_input) + assert result == 12 + + def test_day05b_data(self): + """Result we got when we did the real solution""" + solution = Day05PartB() + res = solution("day_05/day05.txt") + assert res == 17787 diff --git a/tests/adventofcode2021/test_day06_a.py b/tests/adventofcode2021/test_day06_a.py new file mode 100644 index 00000000..77e277db --- /dev/null +++ b/tests/adventofcode2021/test_day06_a.py @@ -0,0 +1,15 @@ +from adventofcode2021.day06 import Day06PartA + + +class TestDay06PartA: + def test_day06a_solve(self): + test_data = "3,4,3,1,2" + solution = Day06PartA() + result = solution.solve(test_data) + assert result == 5934 + + def test_day06a_data(self): + """Result we got when we did the real solution""" + solution = Day06PartA() + res = solution("day_06/day06.txt") + assert res == 373378 diff --git a/tests/adventofcode2021/test_day06_b.py b/tests/adventofcode2021/test_day06_b.py new file mode 100644 index 00000000..d29c72a3 --- /dev/null +++ b/tests/adventofcode2021/test_day06_b.py @@ -0,0 +1,15 @@ +from adventofcode2021.day06 import Day06PartB + + +class TestDay06PartB: + def test_day06b_solve(self): + test_data = "3,4,3,1,2" + solution = Day06PartB() + result = solution.solve(test_data) + assert result == 26984457539 + + def test_day06b_data(self): + """Result we got when we did the real solution""" + solution = Day06PartB() + res = solution("day_06/day06.txt") + assert res == 1682576647495 diff --git a/tests/adventofcode2021/test_day07_a.py b/tests/adventofcode2021/test_day07_a.py new file mode 100644 index 00000000..7f65b965 --- /dev/null +++ b/tests/adventofcode2021/test_day07_a.py @@ -0,0 +1,19 @@ +import pytest + +from adventofcode2021.day07 import Day07PartA + + +class TestDay07PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result"), [("16,1,2,0,4,2,7,1,2,14", 37)] + ) + def test_day07a_solve(self, input_data, expected_result): + solution = Day07PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day07a_data(self): + """Result we got when we did the real solution""" + solution = Day07PartA() + res = solution("day_07/day07.txt") + assert res == 344535 diff --git a/tests/adventofcode2021/test_day07_b.py b/tests/adventofcode2021/test_day07_b.py new file mode 100644 index 00000000..07eb4ad7 --- /dev/null +++ b/tests/adventofcode2021/test_day07_b.py @@ -0,0 +1,39 @@ +import pytest + +from adventofcode2021.day07 import Day07PartB + + +class TestDay07PartB: + @pytest.mark.parametrize( + ("positions", "target", "expected_result"), + [ + ([16], 5, 66), + ([1], 5, 10), + ([2], 5, 6), + ([0], 5, 15), + ([4], 5, 1), + ([2], 5, 6), + ([7], 5, 3), + ([1], 5, 10), + ([2], 5, 6), + ([14], 5, 45), + ], + ) + def test_day07b_fuel_cost(self, positions, target, expected_result): + solution = Day07PartB() + result = solution.find_fuel_cost(positions=positions, target=target) + assert result == expected_result + + @pytest.mark.parametrize( + ("input_data", "expected_result"), [("16,1,2,0,4,2,7,1,2,14", 168)] + ) + def test_day07b_solve(self, input_data, expected_result): + solution = Day07PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day07b_data(self): + """Result we got when we did the real solution""" + solution = Day07PartB() + res = solution("day_07/day07.txt") + assert res == 95581659 diff --git a/tests/adventofcode2021/test_day08_a.py b/tests/adventofcode2021/test_day08_a.py new file mode 100644 index 00000000..c8c8d118 --- /dev/null +++ b/tests/adventofcode2021/test_day08_a.py @@ -0,0 +1,51 @@ +from adventofcode2021.day08 import Day08PartA + + +class TestDay08PartA: + test_input = ( + "acedgfb cdfbe gcdfa fbcad dab cefabd cdfgeb eafb cagedb ab " + "| cdfeb fcadb cdfeb cdbaf" + ) + test_easy_digits = """ +be cfbegad cbdgef fgaecd cgeb fdcge agebfd fecdb fabcd edb | fdgacbe cefdb cefbgd gcbe +edbfga begcd cbg gc gcadebf fbgde acbgfd abcde gfcbed gfec | fcgedb cgb dgebacf gc +fgaebd cg bdaec gdafb agbcfd gdcbef bgcad gfac gcb cdgabef | cg cg fdcagb cbg +fbegcd cbd adcefb dageb afcb bc aefdc ecdab fgdeca fcdbega | efabcd cedba gadfec cb +aecbfdg fbg gf bafeg dbefa fcge gcbea fcaegb dgceab fcbdga | gecf egdcabf bgf bfgea +fgeab ca afcebg bdacfeg cfaedg gcfdb baec bfadeg bafgc acf | gebdcfa ecba ca fadegcb +dbcfg fgd bdegcaf fgec aegbdf ecdfab fbedc dacgb gdcebf gf | cefg dcbef fcge gbcadfe +bdfegc cbegaf gecbf dfcage bdacg ed bedf ced adcbefg gebcd | ed bcgafe cdgba cbgef +egadfb cdbfeg cegd fecab cgb gbdefca cg fgcdab egfdb bfceg | gbdfcae bgc cg cgb +gcafb gcf dcaebfg ecagb gf abcdeg gaef cafbge fdbac fegbdc | fgae cfgab fg bagce +""" + + def test_day08a_simple(self): + solution = Day08PartA() + parsed = solution.parse(self.test_input) + assert parsed == ( + [ + "acedgfb", + "cdfbe", + "gcdfa", + "fbcad", + "dab", + "cefabd", + "cdfgeb", + "eafb", + "cagedb", + "ab", + ], + ["cdfeb", "fcadb", "cdfeb", "cdbaf"], + ) + + def test_day08a_solve(self): + solution = Day08PartA() + result = solution.solve(self.test_easy_digits) + + assert result == 26 + + def test_day08a_data(self): + """Result we got when we did the real solution""" + solution = Day08PartA() + res = solution("day_08/day08.txt") + assert res == 255 diff --git a/tests/adventofcode2021/test_day08_b.py b/tests/adventofcode2021/test_day08_b.py new file mode 100644 index 00000000..b3be5a1c --- /dev/null +++ b/tests/adventofcode2021/test_day08_b.py @@ -0,0 +1,59 @@ +from adventofcode2021.day08 import Day08PartB + + +class TestDay08PartB: + test_input = ( + "acedgfb cdfbe gcdfa fbcad dab cefabd cdfgeb eafb cagedb ab " + "| cdfeb fcadb cdfeb cdbaf" + ) + + def test_day08b_test_input(self): + solution = Day08PartB() + assert solution.solve(self.test_input) == 5353 + + test_easy_digits = """ +be cfbegad cbdgef fgaecd cgeb fdcge agebfd fecdb fabcd edb | fdgacbe cefdb cefbgd gcbe +edbfga begcd cbg gc gcadebf fbgde acbgfd abcde gfcbed gfec | fcgedb cgb dgebacf gc +fgaebd cg bdaec gdafb agbcfd gdcbef bgcad gfac gcb cdgabef | cg cg fdcagb cbg +fbegcd cbd adcefb dageb afcb bc aefdc ecdab fgdeca fcdbega | efabcd cedba gadfec cb +aecbfdg fbg gf bafeg dbefa fcge gcbea fcaegb dgceab fcbdga | gecf egdcabf bgf bfgea +fgeab ca afcebg bdacfeg cfaedg gcfdb baec bfadeg bafgc acf | gebdcfa ecba ca fadegcb +dbcfg fgd bdegcaf fgec aegbdf ecdfab fbedc dacgb gdcebf gf | cefg dcbef fcge gbcadfe +bdfegc cbegaf gecbf dfcage bdacg ed bedf ced adcbefg gebcd | ed bcgafe cdgba cbgef +egadfb cdbfeg cegd fecab cgb gbdefca cg fgcdab egfdb bfceg | gbdfcae bgc cg cgb +gcafb gcf dcaebfg ecagb gf abcdeg gaef cafbge fdbac fegbdc | fgae cfgab fg bagce +""" + test_easy_digit_summed = [ + 8394, + 9781, + 1197, + 9361, + 4873, + 8418, + 4548, + 1625, + 8717, + 4315, + ] + + def test_day08b_forline(self): + test_easy_digits = self.test_easy_digits[1:].splitlines() + # Test that our lists are equal in length + assert len(test_easy_digits) == len(self.test_easy_digit_summed) + for line, excpected_sum in zip(test_easy_digits, self.test_easy_digit_summed): + expected_sum_list = list(map(int, str(excpected_sum))) + solution = Day08PartB() + calculated_sum = solution.compute_digits(line) + assert expected_sum_list == calculated_sum + + def test_day08b_solve(self): + solution = Day08PartB() + result = solution.solve(self.test_easy_digits) + + assert result == 61229 + + def test_day08b_data(self): + """Result we got when we did the real solution""" + solution = Day08PartB() + res = solution("day_08/day08.txt") + assert res == 982158 diff --git a/tests/adventofcode2021/test_day09_a.py b/tests/adventofcode2021/test_day09_a.py new file mode 100644 index 00000000..310ee4ba --- /dev/null +++ b/tests/adventofcode2021/test_day09_a.py @@ -0,0 +1,28 @@ +from adventofcode2021.day09 import Day09PartA + +test_input = """\ +2199943210 +3987894921 +9856789892 +8767896789 +9899965678""" + + +class TestDay09PartA: + def test_create_grid(self): + grid = Day09PartA.create_grid(test_input.splitlines()) + assert len(grid) == 5 + assert len(grid[1]) == 10 + assert grid[0][0] == 2 + assert grid[4][9] == 8 + + def test_day09a_solve(self): + solution = Day09PartA() + result = solution.solve(test_input) + assert result == 15 + + def test_day09a_data(self): + """Result we got when we did the real solution""" + solution = Day09PartA() + res = solution("day_09/day09.txt") + assert res == 550 diff --git a/tests/adventofcode2021/test_day09_b.py b/tests/adventofcode2021/test_day09_b.py new file mode 100644 index 00000000..2c191f56 --- /dev/null +++ b/tests/adventofcode2021/test_day09_b.py @@ -0,0 +1,38 @@ +from adventofcode2021.day09 import Day09PartB +from tests.adventofcode2021.test_day09_a import test_input + + +class TestDay09PartB: + def test_find_basin1_locations(self): + solution = Day09PartB() + solution.grid = solution.create_grid(test_input.splitlines()) + + basin0 = solution.find_basin_locations(0, 1) + assert len(basin0) == 3 + + def test_find_basin2_locations(self): + solution = Day09PartB() + solution.grid = solution.create_grid(test_input.splitlines()) + + basin = solution.find_basin_locations(0, 9) + assert len(basin) == 9 + + def test_find_basin3_locations(self): + solution = Day09PartB() + solution.grid = solution.create_grid(test_input.splitlines()) + + basin = solution.find_basin_locations(4, 6) + assert len(basin) == 9 + + def test_day09b_solve(self): + solution = Day09PartB() + result = solution.solve(test_input) + assert result == 1134 + + def test_day09b_data(self): + """Result we got when we did the real solution""" + solution = Day09PartB() + res = solution("day_09/day09.txt") + # Solution is too low :( + assert res > 561946 + assert res == 1100682 diff --git a/tests/adventofcode2021/test_day10_a.py b/tests/adventofcode2021/test_day10_a.py new file mode 100644 index 00000000..09ce3ea6 --- /dev/null +++ b/tests/adventofcode2021/test_day10_a.py @@ -0,0 +1,52 @@ +import pytest + +from adventofcode2021.day10 import Day10PartA + +test_data = """[({(<(())[]>[[{[]{<()<>> +[(()[<>])]({[<{<<[]>>( +{([(<{}[<>[]}>{[]{[(<()> +(((({<>}<{<{<>}{[]{[]{} +[[<[([]))<([[{}[[()]]] +[{[{({}]{}}([{[{{{}}([] +{<[[]]>}<{[{[{[]{()[[[] +[<(<(<(<{}))><([]([]() +<{([([[(<>()){}]>(<<{{ +<{([{{}}[<[[[<>{}]]]>[]]""" + + +class TestDay10PartA: + @pytest.mark.parametrize( + ("input_data", "invalid_character"), + [ + ("{([(<{}[<>[]}>{[]{[(<()>", "}"), + ("[[<[([]))<([[{}[[()]]]", ")"), + ], + ) + def test_invalid_parsing(self, input_data, invalid_character): + solution = Day10PartA() + assert solution.parse_chunk(input_data) == invalid_character + + @pytest.mark.parametrize( + "input_data", + [ + "([])", + "{()()()}", + "<([{}])>", + "[<>({}){}[([])<>]]", + "(((((((((())))))))))", + ], + ) + def test_valid_parsing(self, input_data): + solution = Day10PartA() + assert solution.parse_chunk(input_data) is True + + def test_day10a_solve(self): + solution = Day10PartA() + result = solution.solve(test_data) + assert result == 26397 + + def test_day10a_data(self): + """Result we got when we did the real solution""" + solution = Day10PartA() + res = solution("day_10/day10.txt") + assert res == 389589 diff --git a/tests/adventofcode2021/test_day10_b.py b/tests/adventofcode2021/test_day10_b.py new file mode 100644 index 00000000..79b8d767 --- /dev/null +++ b/tests/adventofcode2021/test_day10_b.py @@ -0,0 +1,46 @@ +import pytest + +from adventofcode2021.day10 import Day10PartB +from tests.adventofcode2021.test_day10_a import test_data + + +class TestDay10PartB: + @pytest.mark.parametrize( + ("input_data", "invalid_character"), + [ + ("[({(<(())[]>[[{[]{<()<>>", "}}]])})]"), + ("[(()[<>])]({[<{<<[]>>(", ")}>]})"), + ("(((({<>}<{<{<>}{[]{[]{}", "}}>}>))))"), + ("{<[[]]>}<{[{[{[]{()[[[]", "]]}}]}]}>"), + ("<{([{{}}[<[[[<>{}]]]>[]]", "])}>"), + ("", ""), + ], + ) + def test_complete_chunk(self, input_data, invalid_character): + solution = Day10PartB() + assert solution.complete_chunk(input_data) == invalid_character + + @pytest.mark.parametrize( + ("input_string", "expected_score"), + [ + ("])}>", 294), + ("}}]])})]", 288957), + (")}>]})", 5566), + ("}}>}>))))", 1480781), + ("]]}}]}]}>", 995444), + ], + ) + def test_compute_score(self, input_string, expected_score): + solution = Day10PartB() + assert solution.compute_complete_score(input_string) == expected_score + + def test_day10b_solve(self): + solution = Day10PartB() + result = solution.solve(test_data) + assert result == 288957 + + def test_day10b_data(self): + """Result we got when we did the real solution""" + solution = Day10PartB() + res = solution("day_10/day10.txt") + assert res == 1190420163 diff --git a/tests/adventofcode2021/test_day11_a.py b/tests/adventofcode2021/test_day11_a.py new file mode 100644 index 00000000..61472b47 --- /dev/null +++ b/tests/adventofcode2021/test_day11_a.py @@ -0,0 +1,134 @@ +from adventofcode2021.day11 import Day11PartA, Octopus + + +class TestDay11PartA: + def test_octopus(self): + squidward = Octopus(8) + assert squidward.value == 8 + + flashed = squidward.update() + assert flashed is False + assert squidward.value == 9 + + flashed = squidward.update() + assert flashed is True + assert squidward.value == 0 + + def test_simple(self): + start_condition = """11111 +19991 +19191 +19991 +11111""" + + step_1 = """34543 +40004 +50005 +40004 +34543""" + + step_2 = """45654 +51115 +61116 +51115 +45654""" + + solution = Day11PartA() + solution.create_grid(start_condition.splitlines()) + + # Test that our print_grid() function works + assert solution.print_grid() == start_condition + + # And step and validate + solution.step() + assert solution.print_grid() == step_1 + + # And step and validate + solution.step() + assert solution.print_grid() == step_2 + + def test_day11a_solve(self): + start_condition = """5483143223 +2745854711 +5264556173 +6141336146 +6357385478 +4167524645 +2176841721 +6882881134 +4846848554 +5283751526""" + step_1 = """6594254334 +3856965822 +6375667284 +7252447257 +7468496589 +5278635756 +3287952832 +7993992245 +5957959665 +6394862637""" + step_2 = """8807476555 +5089087054 +8597889608 +8485769600 +8700908800 +6600088989 +6800005943 +0000007456 +9000000876 +8700006848""" + step_3 = """0050900866 +8500800575 +9900000039 +9700000041 +9935080063 +7712300000 +7911250009 +2211130000 +0421125000 +0021119000""" + step_4 = """2263031977 +0923031697 +0032221150 +0041111163 +0076191174 +0053411122 +0042361120 +5532241122 +1532247211 +1132230211""" + solution = Day11PartA() + solution.create_grid(start_condition.splitlines()) + + # Test that our print_grid() function works + assert solution.print_grid() == start_condition + assert solution.total_flashes == 0 + # And step and validate + solution.step() + assert solution.print_grid() == step_1 + solution.step() + assert solution.print_grid() == step_2 + solution.step() + assert solution.print_grid() == step_3 + solution.step() + assert solution.print_grid() == step_4 + + # We have done 4 steps, let's do 6 more to reach the 10 steps + for _ in range(0, 6): + solution.step() + assert solution.total_steps == 10 + assert solution.total_flashes == 204 + + # And 100 steps + for _ in range(0, 90): + solution.step() + assert solution.total_steps == 100 + assert solution.total_flashes == 1656 + + def test_day11a_data(self): + """Result we got when we did the real solution""" + solution = Day11PartA() + res = solution("day_11/day11.txt") + assert solution.total_steps == 100 + assert res == 1601 diff --git a/tests/adventofcode2021/test_day11_b.py b/tests/adventofcode2021/test_day11_b.py new file mode 100644 index 00000000..da27f2a5 --- /dev/null +++ b/tests/adventofcode2021/test_day11_b.py @@ -0,0 +1,25 @@ +from adventofcode2021.day11 import Day11PartB + + +class TestDay11PartB: + def test_day11b_solve(self): + start_condition = """5483143223 +2745854711 +5264556173 +6141336146 +6357385478 +4167524645 +2176841721 +6882881134 +4846848554 +5283751526""" + + solution = Day11PartB() + result = solution.solve(start_condition) + assert result == 195 + + def test_day11b_data(self): + """Result we got when we did the real solution""" + solution = Day11PartB() + res = solution("day_11/day11.txt") + assert res == 368 diff --git a/tests/adventofcode2021/test_day12_a.py b/tests/adventofcode2021/test_day12_a.py new file mode 100644 index 00000000..d9544084 --- /dev/null +++ b/tests/adventofcode2021/test_day12_a.py @@ -0,0 +1,62 @@ +import pytest + +from adventofcode2021.day12 import Day12PartA + +test_data_short = """start-A +start-b +A-c +A-b +b-d +A-end +b-end""" + +test_data = """dc-end +HN-start +start-kj +dc-start +dc-HN +LN-dc +HN-end +kj-sa +kj-HN +kj-dc""" + +test_data_longer = """fs-end +he-DX +fs-he +start-DX +pj-DX +end-zg +zg-sl +zg-pj +pj-he +RW-he +fs-DX +pj-RW +zg-RW +start-pj +he-WI +zg-he +pj-fs +start-RW""" + + +class TestDay12PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + (test_data_short, 10), + (test_data, 19), + (test_data_longer, 226), + ], + ) + def test_day12a_solve(self, input_data, expected_result): + solution = Day12PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day12a_data(self): + """Result we got when we did the real solution""" + solution = Day12PartA() + res = solution("day_12/day12.txt") + assert res == 5212 diff --git a/tests/adventofcode2021/test_day12_b.py b/tests/adventofcode2021/test_day12_b.py new file mode 100644 index 00000000..2fc96fb7 --- /dev/null +++ b/tests/adventofcode2021/test_day12_b.py @@ -0,0 +1,29 @@ +import pytest + +from adventofcode2021.day12 import Day12PartB +from tests.adventofcode2021.test_day12_a import ( + test_data, + test_data_longer, + test_data_short, +) + + +class TestDay12PartB: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + (test_data_short, 36), + (test_data, 103), + (test_data_longer, 3509), + ], + ) + def test_day12b_solve(self, input_data, expected_result): + solution = Day12PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day12b_data(self): + """Result we got when we did the real solution""" + solution = Day12PartB() + res = solution("day_12/day12.txt") + assert res == 134862 diff --git a/tests/adventofcode2021/test_day13_a.py b/tests/adventofcode2021/test_day13_a.py new file mode 100644 index 00000000..e392f98d --- /dev/null +++ b/tests/adventofcode2021/test_day13_a.py @@ -0,0 +1,76 @@ +import pytest + +from adventofcode2021.day13 import Day13PartA + +test_small_data = """0,0 +1,1 +2,2 +3,3 +4,4 +6,4 +7,3 +8,2 +9,1 +10,0 +4,1 +6,1 +1,10 + +fold along y=5 +""" + +test_data = """6,10 +0,14 +9,10 +0,3 +10,4 +4,11 +6,0 +6,12 +4,1 +0,13 +10,12 +3,4 +3,0 +8,4 +1,10 +2,14 +8,10 +9,0 + +fold along y=7 +fold along x=5 +""" + + +class TestDay13PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + (test_small_data, 13), + (test_data, 17), + ], + ) + def test_day13a_solve(self, input_data, expected_result): + solution = Day13PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day13a_two_folds(self): + solution = Day13PartA() + result = solution.solve(test_data) + assert result == 17 + + # To another fold + solution.start_folding(loops=1) + + # And after the second loop, we should have 16 left + assert solution.count_dots() == 16 + + def test_day13a_data(self): + """Result we got when we did the real solution""" + solution = Day13PartA() + res = solution("day_13/day13.txt") + assert res < 903 + assert res > 661 + assert res == 753 diff --git a/tests/adventofcode2021/test_day13_b.py b/tests/adventofcode2021/test_day13_b.py new file mode 100644 index 00000000..7eef6d87 --- /dev/null +++ b/tests/adventofcode2021/test_day13_b.py @@ -0,0 +1,25 @@ +from textwrap import dedent + +from adventofcode2021.day13 import Day13PartB + + +class TestDay13PartB: + def test_day13b_data(self): + """Result we got when we did the real solution""" + solution = Day13PartB() + res = solution("day_13/day13.txt") + # Since it's clear text, we compare the result with the actual result. + # Your puzzle answer was HZLEHJRK + asci_solution = """\ + #..#.####.#....####.#..#...##.###..#..# + #..#....#.#....#....#..#....#.#..#.#.#. + ####...#..#....###..####....#.#..#.##.. + #..#..#...#....#....#..#....#.###..#.#. + #..#.#....#....#....#..#.#..#.#.#..#.#. + #..#.####.####.####.#..#..##..#..#.#..#""" + + asci_solution = dedent(asci_solution).splitlines() + + result_list = res.splitlines()[:6] + assert asci_solution == result_list + assert solution.count_dots() == 98 diff --git a/tests/adventofcode2021/test_day14_a.py b/tests/adventofcode2021/test_day14_a.py new file mode 100644 index 00000000..69d5f8ef --- /dev/null +++ b/tests/adventofcode2021/test_day14_a.py @@ -0,0 +1,34 @@ +from adventofcode2021.day14 import Day14PartA + + +class TestDay14PartA: + def test_day14a_steps(self, testdata): + solution = Day14PartA() + solution.initialize(testdata) + + assert "".join(solution.polimers_to_list()) == "NNCB" + + # Do the first step + solution.step() + assert "".join(solution.polimers_to_list()) == "NCNBCHB" + solution.step() + assert "".join(solution.polimers_to_list()) == "NBCCNBBBCBHCB" + solution.step() + assert "".join(solution.polimers_to_list()) == "NBBBCNCCNBBNBNBBCHBHHBCHB" + solution.step() + assert ( + "".join(solution.polimers_to_list()) + == "NBBNBNBBCCNBCNCCNBBNBBNBBBNBBNBBCBHCBHHNHCBBCBHCB" + ) + + def test_day14a_solve(self, testdata): + solution = Day14PartA() + result = solution.solve(testdata) + assert result == 1588 + + def test_day14a_data(self): + """Result we got when we did the real solution""" + solution = Day14PartA() + res = solution("day_14/day14.txt") + assert res != 3292 + assert res == 2975 diff --git a/tests/adventofcode2021/test_day14_b.py b/tests/adventofcode2021/test_day14_b.py new file mode 100644 index 00000000..34b58bfc --- /dev/null +++ b/tests/adventofcode2021/test_day14_b.py @@ -0,0 +1,35 @@ +from adventofcode2021.day14 import Day14PartB + + +class TestDay14PartB: + def test_day14a_steps(self, testdata): + solution = Day14PartB() + solution.initialize(testdata) + + assert list(solution.cnt.keys()) == ["NN", "NC", "CB"] + + # Do the first step + solution.step() + assert list(solution.cnt.keys()) == ["NC", "CN", "NB", "BC", "CH", "HB"] + solution.step() + assert list(solution.cnt.keys()) == [ + "NB", + "BC", + "CC", + "CN", + "BB", + "CB", + "BH", + "HC", + ] + + def test_day14b_solve(self, testdata): + solution = Day14PartB() + result = solution.solve(testdata) + assert result == 2188189693529 + + def test_day14b_data(self): + """Result we got when we did the real solution""" + solution = Day14PartB() + res = solution("day_14/day14.txt") + assert res == 3015383850689 diff --git a/tests/adventofcode2021/test_day15_a.py b/tests/adventofcode2021/test_day15_a.py new file mode 100644 index 00000000..5cbc8039 --- /dev/null +++ b/tests/adventofcode2021/test_day15_a.py @@ -0,0 +1,30 @@ +import pytest + +from adventofcode2021.day15 import Day15PartA + +test_data = """\ +1163751742 +1381373672 +2136511328 +3694931569 +7463417111 +1319128137 +1359912421 +3125421639 +1293138521 +2311944581 +""" + + +class TestDay15PartA: + @pytest.mark.parametrize(("input_data", "expected_result"), [(test_data, 40)]) + def test_day15a_solve(self, input_data, expected_result): + solution = Day15PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day15a_data(self): + """Result we got when we did the real solution""" + solution = Day15PartA() + res = solution("day_15/day15.txt") + assert res == 702 diff --git a/tests/adventofcode2021/test_day15_b.py b/tests/adventofcode2021/test_day15_b.py new file mode 100644 index 00000000..b02352b1 --- /dev/null +++ b/tests/adventofcode2021/test_day15_b.py @@ -0,0 +1,38 @@ +import pytest + +from adventofcode2021.day15 import Day15PartB +from tests.adventofcode2021.test_day15_a import test_data + + +class TestDay15PartB: + @pytest.mark.parametrize(("input_data", "expected_result"), [(test_data, 315)]) + def test_day15b_solve(self, input_data, expected_result): + solution = Day15PartB() + result = solution.solve(input_data) + + assert solution.get_value(10, 9) == 3 + assert solution.get_value(10, 10) == 3 + + first_line = "".join(str(solution.get_value(0, n)) for n in range(50)) + assert first_line == "11637517422274862853338597396444961841755517295286" + + second_line = "".join(str(solution.get_value(1, n)) for n in range(50)) + assert second_line == "13813736722492484783351359589446246169155735727126" + + ten_line = "".join(str(solution.get_value(9, n)) for n in range(50)) + assert ten_line == "23119445813422155692453326671356443778246755488935" + + # First completely new line + eleven_line = "".join(str(solution.get_value(10, n)) for n in range(50)) + assert eleven_line == "22748628533385973964449618417555172952866628316397" + + assert solution.max_x == 49 + assert solution.max_y == 49 + + assert result == expected_result + + def test_day15b_data(self): + """Result we got when we did the real solution""" + solution = Day15PartB() + res = solution("day_15/day15.txt") + assert res == 2955 diff --git a/tests/adventofcode2021/test_day16_a.py b/tests/adventofcode2021/test_day16_a.py new file mode 100644 index 00000000..18e7fe1a --- /dev/null +++ b/tests/adventofcode2021/test_day16_a.py @@ -0,0 +1,64 @@ +import pytest + +from adventofcode2021.day16 import Day16PartA, Packet + + +class TestDay16PartA: + def test_packet_parsing(self): + test_data = "D2FE28" + packet = Packet().from_hex(test_data) + assert packet.version == 6 + assert packet.type_id == 4 + assert packet.value == 2021 + + # We still have 3 unused bits over + assert len(packet.packet_deq) == 3 + + def test_packet_operator_zero(self): + test_data = "38006F45291200" + packet = Packet().from_hex(test_data) + assert packet.version == 1 + assert packet.type_id == 6 + assert packet.length_type_id == 0 + assert len(packet.sub) == 2 + assert packet.sub[0].value == 10 + assert packet.sub[1].value == 20 + + def test_packet_operator_one(self): + test_data = "EE00D40C823060" + packet = Packet().from_hex(test_data) + assert packet.version == 7 + assert packet.type_id == 3 + assert packet.length_type_id == 1 + assert len(packet.sub) == 3 + assert packet.sub[0].value == 1 + assert packet.sub[1].value == 2 + assert packet.sub[2].value == 3 + + def test_nested(self): + packet = Packet().from_hex("8A004A801A8002F478") + assert packet.version == 4 + assert len(packet.sub) == 1 + assert packet.sub[0].version == 1 + assert packet.sub[0].sub[0].version == 5 + assert packet.sub[0].sub[0].sub[0].version == 6 + + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ("8A004A801A8002F478", 16), + ("620080001611562C8802118E34", 12), + ("C0015000016115A2E0802F182340", 23), + ("A0016C880162017C3686B18A3D4780", 31), + ], + ) + def test_day16a_solve(self, input_data, expected_result): + solution = Day16PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day16a_data(self): + """Result we got when we did the real solution""" + solution = Day16PartA() + res = solution("day_16/day16.txt") + assert res == 981 diff --git a/tests/adventofcode2021/test_day16_b.py b/tests/adventofcode2021/test_day16_b.py new file mode 100644 index 00000000..f299bdee --- /dev/null +++ b/tests/adventofcode2021/test_day16_b.py @@ -0,0 +1,29 @@ +import pytest + +from adventofcode2021.day16 import Day16PartB + + +class TestDay16PartB: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ("C200B40A82", 3), # (1+2) + ("04005AC33890", 54), # (6*9) + ("880086C3E88112", 7), # min(7,8,9) + ("CE00C43D881120", 9), # max(7,8,9) + ("D8005AC2A8F0", 1), # 5 < 15 + ("F600BC2D8F", 0), # 5 > 15 + ("9C005AC2F8F0", 0), # 5 != 15 + ("9C0141080250320F1802104A08", 1), # (1 + 3) == (2 * 2) + ], + ) + def test_day16b_solve(self, input_data, expected_result): + solution = Day16PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day16b_data(self): + """Result we got when we did the real solution""" + solution = Day16PartB() + res = solution("day_16/day16.txt") + assert res == 299227024091 diff --git a/tests/adventofcode2021/test_day17_a.py b/tests/adventofcode2021/test_day17_a.py new file mode 100644 index 00000000..58495ed4 --- /dev/null +++ b/tests/adventofcode2021/test_day17_a.py @@ -0,0 +1,63 @@ +import pytest + +from adventofcode2021.day17 import Day17PartA, Point, TargetArea + + +class TestDay17PartA: + @pytest.mark.parametrize( + ("x", "y", "expected_result"), + [ + (25, -7, True), + (20, -10, True), # Living on the edge + (15, -7, False), + (20, 0, False), + (0, 0, False), + ], + ) + def test_target(self, x, y, expected_result): + area = TargetArea(20, 30, -10, -5) + assert area.is_in_target(Point(x, y)) == expected_result + + @pytest.mark.parametrize( + ("x", "y", "expected_result"), + [ + (0, 0, False), # Starting position + (15, 5, False), # Above the target area, to the left of the area + (25, 7, False), # Right above it + (15, -5, False), # Vertically within the area, still above it + (31, -6, True), # Next to it, to the right + (29, -11, True), # Below the area + ], + ) + def test_overshot(self, x, y, expected_result): + area = TargetArea(20, 30, -10, -5) + assert area.overshot(Point(x, y)) == expected_result + + def test_trajectory(self): + solution = Day17PartA() + destination = solution.parse_str("target area: x=20..30, y=-10..-5") + assert destination.min_x == 20 + assert destination.max_x == 30 + assert destination.min_y == -10 + assert destination.max_y == -5 + + result = solution.compute_trajectory((7, 2), target=destination) + assert result == 3 + + assert solution.compute_trajectory((6, 3), target=destination) == 6 + assert solution.compute_trajectory((9, 0), target=destination) == 0 + assert solution.compute_trajectory((17, -4), target=destination) is False + + @pytest.mark.parametrize( + ("input_data", "expected_result"), [("target area: x=20..30, y=-10..-5", 45)] + ) + def test_day17a_solve(self, input_data, expected_result): + solution = Day17PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day17a_data(self): + """Result we got when we did the real solution""" + solution = Day17PartA() + res = solution("day_17/day17.txt") + assert res == 4095 diff --git a/tests/adventofcode2021/test_day17_b.py b/tests/adventofcode2021/test_day17_b.py new file mode 100644 index 00000000..d0930b3a --- /dev/null +++ b/tests/adventofcode2021/test_day17_b.py @@ -0,0 +1,31 @@ +import pytest + +from adventofcode2021.day17 import Day17PartB + + +class TestDay17PartB: + @pytest.mark.parametrize( + ("velocity", "expected_result"), + [ + ((23, -10), True), + ], + ) + def test_locations(self, velocity, expected_result): + solution = Day17PartB() + destination = solution.parse_str("target area: x=20..30, y=-10..-5") + result = solution.compute_trajectory(velocity, target=destination) + assert result is not expected_result + + @pytest.mark.parametrize( + ("input_data", "expected_result"), [("target area: x=20..30, y=-10..-5", 112)] + ) + def test_day17b_solve(self, input_data, expected_result): + solution = Day17PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day17b_data(self): + """Result we got when we did the real solution""" + solution = Day17PartB() + res = solution("day_17/day17.txt") + assert res == 3773 diff --git a/tests/adventofcode2021/test_day18_a.py b/tests/adventofcode2021/test_day18_a.py new file mode 100644 index 00000000..782ab4c6 --- /dev/null +++ b/tests/adventofcode2021/test_day18_a.py @@ -0,0 +1,207 @@ +from textwrap import dedent + +import pytest + +from adventofcode2021.day18 import Day18PartA, Snail + + +class TestDay18PartA: + test_data = """\ + [[[0,[5,8]],[[1,7],[9,6]]],[[4,[1,2]],[[1,4],2]]] + [[[5,[2,8]],4],[5,[[9,9],0]]] + [6,[[[6,2],[5,6]],[[7,6],[4,7]]]] + [[[6,[0,7]],[0,9]],[4,[9,[9,0]]]] + [[[7,[6,4]],[3,[1,3]]],[[[5,5],1],9]] + [[6,[[7,3],[3,2]]],[[[3,8],[5,7]],4]] + [[[[5,4],[7,7]],8],[[8,3],8]] + [[9,3],[[9,9],[6,[4,9]]]] + [[2,[[7,7],7]],[[5,8],[[9,3],[0,2]]]] + [[[[5,2],5],[8,[3,7]]],[[5,[7,5]],[4,4]]] + """ + + def test_repr(self): + zero_snail = Snail(value=0) + assert repr(zero_snail) == "0" + + def test_single_snail(self): + test_snail = "[3,9]" + root_snail = Day18PartA().create_tree(test_snail) + assert root_snail.left.value == 3 + assert root_snail.right.value == 9 + assert repr(root_snail) == test_snail + + # Not deep enough for an explosion to happen + deepest, depth = root_snail.find_deepest_snail() + assert deepest is None + assert depth == 0 + + def test_simple_parsing(self): + """Simple example""" + test_snail = "[1,[2,3]]" + root_snail = Day18PartA().create_tree(test_snail) + assert root_snail.left.value == 1 + assert root_snail.right.left.value == 2 + assert root_snail.right.right.value == 3 + assert root_snail.right.parent is root_snail + assert repr(root_snail) == test_snail + + # Not deep enough for an explosion to happen + deepest, depth = root_snail.find_deepest_snail() + assert deepest is None + assert depth == 0 + + def test_complex_parsing(self): + """Now, make is what more complex""" + test_snail = "[[[[[9,8],1],2],3],4]" + root_snail = Day18PartA().create_tree(test_snail) + assert root_snail.right.value == 4 + # [[[[9,8],1],2],3] + assert root_snail.left.right.value == 3 + # [[[9,8],1],2] + assert root_snail.left.left.right.value == 2 + assert root_snail.left.parent is root_snail + assert root_snail.left.left.left.parent is root_snail.left.left + assert repr(root_snail) == test_snail + deepest, depth = Snail.find_deepest_snail(root_snail) + assert repr(deepest) == "[9,8]" + assert depth == 5 + + def test_addition(self): + snail1 = Day18PartA().create_tree("[1,2]") + snail2 = Day18PartA().create_tree("[[3,4],5]") + + combined = snail1 + snail2 + assert repr(combined) == "[[1,2],[[3,4],5]]" + + def test_deepest(self): + snail = Day18PartA().create_tree("[[[[[4,3],4],4],[7,[[8,4],9]]],[1,1]]") + deepest, depth = snail.find_deepest_snail() + assert repr(deepest) == "[4,3]" + assert depth == 5 + + def test_full_example(self): + snail1_str = "[[[[4,3],4],4],[7,[[8,4],9]]]" + snail2_str = "[1,1]" + + snail1 = Day18PartA().create_tree(snail1_str) + assert repr(snail1) == snail1_str + + snail2 = Day18PartA().create_tree(snail2_str) + assert repr(snail2) == snail2_str + + snail = snail1 + snail2 + assert repr(snail) == "[[[[[4,3],4],4],[7,[[8,4],9]]],[1,1]]" + + # Time to explode, first time + snail = Day18PartA().explode(snail) + assert repr(snail) == "[[[[0,7],4],[7,[[8,4],9]]],[1,1]]" + + # Time to explode, second time + snail = Day18PartA().explode(snail) + assert repr(snail) == "[[[[0,7],4],[15,[0,13]]],[1,1]]" + + # We cannot explode anymore: + deepest, depth = snail.find_deepest_snail() + assert deepest is None + assert depth == 0 + + # And also the explode function will not change anything + with pytest.raises(StopIteration): + Day18PartA().explode(snail) + assert repr(snail) == "[[[[0,7],4],[15,[0,13]]],[1,1]]" + + # Time to split: + snail = Day18PartA().split(snail) + assert repr(snail) == "[[[[0,7],4],[[7,8],[0,13]]],[1,1]]" + snail = Day18PartA().split(snail) + assert repr(snail) == "[[[[0,7],4],[[7,8],[0,[6,7]]]],[1,1]]" + # And a new split does nothing: + with pytest.raises(StopIteration): + Day18PartA().split(snail) + assert repr(snail) == "[[[[0,7],4],[[7,8],[0,[6,7]]]],[1,1]]" + + # Explode for the last time: + final_state = "[[[[0,7],4],[[7,8],[6,0]]],[8,1]]" + + snail = Day18PartA().explode(snail) + assert repr(snail) == final_state + + # Exploding of splitting will no longer update the state + with pytest.raises(StopIteration): + Day18PartA().explode(snail) + assert repr(snail) == final_state + with pytest.raises(StopIteration): + Day18PartA().split(snail) + assert repr(snail) == final_state + + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ("[[[[[9,8],1],2],3],4]", "[[[[0,9],2],3],4]"), + ("[7,[6,[5,[4,[3,2]]]]]", "[7,[6,[5,[7,0]]]]"), + ("[[6,[5,[4,[3,2]]]],1]", "[[6,[5,[7,0]]],3]"), + ( + "[[[[0,7],4],[[7,8],[0,[6,7]]]],[1,1]]", + "[[[[0,7],4],[[7,8],[6,0]]],[8,1]]", + ), + ], + ) + def test_explode(self, input_data, expected_result): + solution = Day18PartA() + root_node = solution.create_tree(input_data) + exploded = solution.explode(root_node) + assert repr(exploded) == expected_result + + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ("[[[[0,7],4],[15,[0,13]]],[1,1]]", "[[[[0,7],4],[[7,8],[0,13]]],[1,1]]"), + ( + "[[[[0,7],4],[[7,8],[0,13]]],[1,1]]", + "[[[[0,7],4],[[7,8],[0,[6,7]]]],[1,1]]", + ), + ], + ) + def test_split(self, input_data, expected_result): + solution = Day18PartA() + root_node = solution.create_tree(input_data) + splitted = solution.split(root_node) + assert repr(splitted) == expected_result + + def test_reduce(self): + solution = Day18PartA() + snail1 = solution.create_tree("[[[[4,3],4],4],[7,[[8,4],9]]]") + snail2 = solution.create_tree("[1,1]") + + result = solution.reduce(snail1, snail2) + assert repr(result) == "[[[[0,7],4],[[7,8],[6,0]]],[8,1]]" + + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ("[9,1]", 29), + ("[1,9]", 21), + ("[[9,1],[1,9]]", 129), + ("[[1,2],[[3,4],5]]", 143), + ("[[[[0,7],4],[[7,8],[6,0]]],[8,1]]", 1384), + ("[[[[1,1],[2,2]],[3,3]],[4,4]]", 445), + ("[[[[3,0],[5,3]],[4,4]],[5,5]]", 791), + ("[[[[5,0],[7,4]],[5,5]],[6,6]]", 1137), + ("[[[[8,7],[7,7]],[[8,6],[7,7]]],[[[0,7],[6,6]],[8,7]]]", 3488), + ], + ) + def test_magnitude(self, input_data, expected_result): + solution = Day18PartA() + snail = solution.create_tree(input_data) + assert solution.magnitude(snail) == expected_result + + def test_day18a_solve(self): + solution = Day18PartA() + result = solution.solve(dedent(self.test_data)) + assert result == 4140 + + def test_day18a_data(self): + """Result we got when we did the real solution""" + solution = Day18PartA() + res = solution("day_18/day18.txt") + assert res == 3359 diff --git a/tests/adventofcode2021/test_day18_b.py b/tests/adventofcode2021/test_day18_b.py new file mode 100644 index 00000000..518f1306 --- /dev/null +++ b/tests/adventofcode2021/test_day18_b.py @@ -0,0 +1,28 @@ +from textwrap import dedent + +from adventofcode2021.day18 import Day18PartB + + +class TestDay18PartB: + def test_day18b_solve(self): + test_data = """\ + [[[0,[5,8]],[[1,7],[9,6]]],[[4,[1,2]],[[1,4],2]]] + [[[5,[2,8]],4],[5,[[9,9],0]]] + [6,[[[6,2],[5,6]],[[7,6],[4,7]]]] + [[[6,[0,7]],[0,9]],[4,[9,[9,0]]]] + [[[7,[6,4]],[3,[1,3]]],[[[5,5],1],9]] + [[6,[[7,3],[3,2]]],[[[3,8],[5,7]],4]] + [[[[5,4],[7,7]],8],[[8,3],8]] + [[9,3],[[9,9],[6,[4,9]]]] + [[2,[[7,7],7]],[[5,8],[[9,3],[0,2]]]] + [[[[5,2],5],[8,[3,7]]],[[5,[7,5]],[4,4]]] + """ + solution = Day18PartB() + result = solution.solve(dedent(test_data)) + assert result == 3993 + + def test_day18b_data(self): + """Result we got when we did the real solution""" + solution = Day18PartB() + res = solution("day_18/day18.txt") + assert res == 4616 diff --git a/tests/adventofcode2021/test_day19_a.py b/tests/adventofcode2021/test_day19_a.py new file mode 100644 index 00000000..4b7f8ceb --- /dev/null +++ b/tests/adventofcode2021/test_day19_a.py @@ -0,0 +1,14 @@ +from adventofcode2021.day19 import Day19PartA + + +class TestDay19PartA: + def test_day19a_solve(self, testdata): + solution = Day19PartA() + result = solution.solve(testdata) + assert result == 79 + + def test_day19a_data(self): + """Result we got when we did the real solution""" + solution = Day19PartA() + res = solution("day_19/day19.txt") + assert res == 323 diff --git a/tests/adventofcode2021/test_day19_b.py b/tests/adventofcode2021/test_day19_b.py new file mode 100644 index 00000000..d50e575f --- /dev/null +++ b/tests/adventofcode2021/test_day19_b.py @@ -0,0 +1,14 @@ +from adventofcode2021.day19 import Day19PartB + + +class TestDay19PartB: + def test_day19b_solve(self, testdata): + solution = Day19PartB() + result = solution.solve(testdata) + assert result == 3621 + + def test_day19b_data(self): + """Result we got when we did the real solution""" + solution = Day19PartB() + res = solution("day_19/day19.txt") + assert res == 10685 diff --git a/tests/adventofcode2021/test_day20_a.py b/tests/adventofcode2021/test_day20_a.py new file mode 100644 index 00000000..a7cccc0d --- /dev/null +++ b/tests/adventofcode2021/test_day20_a.py @@ -0,0 +1,51 @@ +from adventofcode2021.day20 import Day20PartA +from adventofcode.utils.point import XYPoint as Point + + +class TestDay20PartA: + def test_parsing(self, testdata): + solution = Day20PartA() + solution.parse(testdata) + + assert len(solution.enhancement) == 512 + + assert solution.image[Point(0, 0)] is True + assert solution.image[Point(1, 0)] is True + assert solution.image[Point(0, 1)] is False + + def test_points(self, testdata): + solution = Day20PartA() + solution.parse(testdata) + assert not solution.special_case + points = solution.get_pixels(Point(5, 10)) + assert len(points) == 9 + assert points == [ + Point(4, 9), + Point(4, 10), + Point(4, 11), + Point(5, 9), + Point(5, 10), + Point(5, 11), + Point(6, 9), + Point(6, 10), + Point(6, 11), + ] + + # For the example, we need other points: + points = solution.get_pixels(Point(2, 2)) + idx = solution.points_to_index(points) + assert idx == 34 + assert solution.points_to_pixel(points) is True + + def test_day20a_solve(self, testdata): + solution = Day20PartA() + result = solution.solve(testdata) + assert result == 35 + + def test_day20a_data(self): + """Result we got when we did the real solution""" + solution = Day20PartA() + res = solution("day_20/day20.txt") + assert solution.special_case + assert res != 9113 + assert res == 4968 diff --git a/tests/adventofcode2021/test_day20_b.py b/tests/adventofcode2021/test_day20_b.py new file mode 100644 index 00000000..18136dd0 --- /dev/null +++ b/tests/adventofcode2021/test_day20_b.py @@ -0,0 +1,14 @@ +from adventofcode2021.day20 import Day20PartB + + +class TestDay20PartB: + def test_day20b_solve(self, testdata): + solution = Day20PartB() + result = solution.solve(testdata) + assert result == 3351 + + def test_day20b_data(self): + """Result we got when we did the real solution""" + solution = Day20PartB() + res = solution("day_20/day20.txt") + assert res == 16793 diff --git a/tests/adventofcode2021/test_day21_a.py b/tests/adventofcode2021/test_day21_a.py new file mode 100644 index 00000000..ee679426 --- /dev/null +++ b/tests/adventofcode2021/test_day21_a.py @@ -0,0 +1,36 @@ +import pytest + +from adventofcode2021.day21 import Day21PartA + + +class TestDay21PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + (1, 1), + (2, 2), + (9, 9), + (10, 10), + (11, 1), + (12, 2), + (13, 3), + ], + ) + def test_mod(self, input_data, expected_result): + assert Day21PartA.modulo(input_data) == expected_result + + def test_day21a_solve(self): + start_data = """\ + Player 1 starting position: 4 + Player 2 starting position: 8 + """ + + solution = Day21PartA() + result = solution.solve(start_data) + assert result == 739785 + + def test_day21a_data(self): + """Result we got when we did the real solution""" + solution = Day21PartA() + res = solution("day_21/day21.txt") + assert res == 1196172 diff --git a/tests/adventofcode2021/test_day21_b.py b/tests/adventofcode2021/test_day21_b.py new file mode 100644 index 00000000..9eb7c611 --- /dev/null +++ b/tests/adventofcode2021/test_day21_b.py @@ -0,0 +1,19 @@ +from adventofcode2021.day21 import Day21PartB + + +class TestDay21PartA: + def test_day21a_solve(self): + start_data = """\ + Player 1 starting position: 4 + Player 2 starting position: 8 + """ + + solution = Day21PartB() + result = solution.solve(start_data) + assert result == 444356092776315 + + def test_day21a_data(self): + """Result we got when we did the real solution""" + solution = Day21PartB() + res = solution("day_21/day21.txt") + assert res == 106768284484217 diff --git a/tests/adventofcode2021/test_day22_a.py b/tests/adventofcode2021/test_day22_a.py new file mode 100644 index 00000000..453d1d23 --- /dev/null +++ b/tests/adventofcode2021/test_day22_a.py @@ -0,0 +1,81 @@ +from textwrap import dedent + +from adventofcode2021.day22 import Day22PartA, Step + + +class TestDay22PartA: + short_test = """\ + on x=10..12,y=10..12,z=10..12 + on x=11..13,y=11..13,z=11..13 + off x=9..11,y=9..11,z=9..11 + on x=10..10,y=10..10,z=10..10 + """ + + long_test = """\ + on x=-20..26,y=-36..17,z=-47..7 + on x=-20..33,y=-21..23,z=-26..28 + on x=-22..28,y=-29..23,z=-38..16 + on x=-46..7,y=-6..46,z=-50..-1 + on x=-49..1,y=-3..46,z=-24..28 + on x=2..47,y=-22..22,z=-23..27 + on x=-27..23,y=-28..26,z=-21..29 + on x=-39..5,y=-6..47,z=-3..44 + on x=-30..21,y=-8..43,z=-13..34 + on x=-22..26,y=-27..20,z=-29..19 + off x=-48..-32,y=26..41,z=-47..-37 + on x=-12..35,y=6..50,z=-50..-2 + off x=-48..-32,y=-32..-16,z=-15..-5 + on x=-18..26,y=-33..15,z=-7..46 + off x=-40..-22,y=-38..-28,z=23..41 + on x=-16..35,y=-41..10,z=-47..6 + off x=-32..-23,y=11..30,z=-14..3 + on x=-49..-5,y=-3..45,z=-29..18 + off x=18..30,y=-20..-8,z=-3..13 + on x=-41..9,y=-7..43,z=-33..15 + on x=-54112..-39298,y=-85059..-49293,z=-27449..7877 + on x=967..23432,y=45373..81175,z=27513..53682 + """ + + def test_steps(self): + test_strings = dedent(self.short_test).splitlines() + step1 = Step.from_str(test_strings[0]) + + assert step1.action + assert step1.x_start == step1.y_start == step1.z_start == 10 + assert step1.x_stop == step1.y_stop == step1.z_stop == 12 + + step2 = Step.from_str("off x=10..11,y=12..13,z=-14..-12") + assert not step2.action + assert step2.x_start == 10 + assert step2.x_stop == 11 + assert step2.y_start == 12 + assert step2.y_stop == 13 + assert step2.z_start == -14 + assert step2.z_stop == -12 + + def test_limit(self): + steps = [ + Step(True, 1, 2, 3, 4, 5, 6), + Step(True, -54112, -39298, -85059, -49293, -27449, 7877), + Step(False, 967, 23432, 45373, 81175, 27513, 53682), + ] + filtered = Day22PartA.apply_limit(steps) + + assert len(filtered) == 1 + assert filtered[0] == Step(True, 1, 2, 3, 4, 5, 6) + + def test_day22a_solve_short(self): + solution = Day22PartA() + result = solution.solve(dedent(self.short_test)) + assert result == 39 + + def test_day22a_solve(self): + solution = Day22PartA() + result = solution.solve(dedent(self.long_test)) + assert result == 590784 + + def test_day22a_data(self): + """Result we got when we did the real solution""" + solution = Day22PartA() + res = solution("day_22/day22.txt") + assert res == 603661 diff --git a/tests/adventofcode2021/test_day22_b.py b/tests/adventofcode2021/test_day22_b.py new file mode 100644 index 00000000..0013e19a --- /dev/null +++ b/tests/adventofcode2021/test_day22_b.py @@ -0,0 +1,93 @@ +from textwrap import dedent + +import pytest + +from adventofcode2021.day22 import Day22PartB + + +class TestDay22PartB: + small_input = """\ + on x=10..12,y=10..12,z=10..12 + on x=11..13,y=11..13,z=11..13 + off x=9..11,y=9..11,z=9..11 + on x=10..10,y=10..10,z=10..10 + """ + + test_data = """\ + on x=-5..47,y=-31..22,z=-19..33 + on x=-44..5,y=-27..21,z=-14..35 + on x=-49..-1,y=-11..42,z=-10..38 + on x=-20..34,y=-40..6,z=-44..1 + off x=26..39,y=40..50,z=-2..11 + on x=-41..5,y=-41..6,z=-36..8 + off x=-43..-33,y=-45..-28,z=7..25 + on x=-33..15,y=-32..19,z=-34..11 + off x=35..47,y=-46..-34,z=-11..5 + on x=-14..36,y=-6..44,z=-16..29 + on x=-57795..-6158,y=29564..72030,z=20435..90618 + on x=36731..105352,y=-21140..28532,z=16094..90401 + on x=30999..107136,y=-53464..15513,z=8553..71215 + on x=13528..83982,y=-99403..-27377,z=-24141..23996 + on x=-72682..-12347,y=18159..111354,z=7391..80950 + on x=-1060..80757,y=-65301..-20884,z=-103788..-16709 + on x=-83015..-9461,y=-72160..-8347,z=-81239..-26856 + on x=-52752..22273,y=-49450..9096,z=54442..119054 + on x=-29982..40483,y=-108474..-28371,z=-24328..38471 + on x=-4958..62750,y=40422..118853,z=-7672..65583 + on x=55694..108686,y=-43367..46958,z=-26781..48729 + on x=-98497..-18186,y=-63569..3412,z=1232..88485 + on x=-726..56291,y=-62629..13224,z=18033..85226 + on x=-110886..-34664,y=-81338..-8658,z=8914..63723 + on x=-55829..24974,y=-16897..54165,z=-121762..-28058 + on x=-65152..-11147,y=22489..91432,z=-58782..1780 + on x=-120100..-32970,y=-46592..27473,z=-11695..61039 + on x=-18631..37533,y=-124565..-50804,z=-35667..28308 + on x=-57817..18248,y=49321..117703,z=5745..55881 + on x=14781..98692,y=-1341..70827,z=15753..70151 + on x=-34419..55919,y=-19626..40991,z=39015..114138 + on x=-60785..11593,y=-56135..2999,z=-95368..-26915 + on x=-32178..58085,y=17647..101866,z=-91405..-8878 + on x=-53655..12091,y=50097..105568,z=-75335..-4862 + on x=-111166..-40997,y=-71714..2688,z=5609..50954 + on x=-16602..70118,y=-98693..-44401,z=5197..76897 + on x=16383..101554,y=4615..83635,z=-44907..18747 + off x=-95822..-15171,y=-19987..48940,z=10804..104439 + on x=-89813..-14614,y=16069..88491,z=-3297..45228 + on x=41075..99376,y=-20427..49978,z=-52012..13762 + on x=-21330..50085,y=-17944..62733,z=-112280..-30197 + on x=-16478..35915,y=36008..118594,z=-7885..47086 + off x=-98156..-27851,y=-49952..43171,z=-99005..-8456 + off x=2032..69770,y=-71013..4824,z=7471..94418 + on x=43670..120875,y=-42068..12382,z=-24787..38892 + off x=37514..111226,y=-45862..25743,z=-16714..54663 + off x=25699..97951,y=-30668..59918,z=-15349..69697 + off x=-44271..17935,y=-9516..60759,z=49131..112598 + on x=-61695..-5813,y=40978..94975,z=8655..80240 + off x=-101086..-9439,y=-7088..67543,z=33935..83858 + off x=18020..114017,y=-48931..32606,z=21474..89843 + off x=-77139..10506,y=-89994..-18797,z=-80..59318 + off x=8476..79288,y=-75520..11602,z=-96624..-24783 + on x=-47488..-1262,y=24338..100707,z=16292..72967 + off x=-84341..13987,y=2429..92914,z=-90671..-1318 + off x=-37810..49457,y=-71013..-7894,z=-105357..-13188 + off x=-27365..46395,y=31009..98017,z=15428..76570 + off x=-70369..-16548,y=22648..78696,z=-1892..86821 + on x=-53470..21291,y=-120233..-33476,z=-44150..38147 + off x=-93533..-4276,y=-16170..68771,z=-104985..-24507 + """ + + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [(small_input, 39), (test_data, 2758514936282235)], + ) + def test_day22b_solve(self, input_data, expected_result): + solution = Day22PartB() + result = solution.solve(dedent(input_data)) + assert result == expected_result + + def test_day22b_data(self): + """Result we got when we did the real solution""" + solution = Day22PartB() + res = solution("day_22/day22.txt") + assert res > 1_237_169_550_955_992 + assert res == 1_237_264_238_382_479 diff --git a/tests/adventofcode2022/test_day01_a.py b/tests/adventofcode2022/test_day01_a.py new file mode 100644 index 00000000..3145d059 --- /dev/null +++ b/tests/adventofcode2022/test_day01_a.py @@ -0,0 +1,9 @@ +from adventofcode2022.day01 import Day01PartA + + +class TestDay01PartA: + def test_day01a_data(self): + """Result we got when we did the real solution""" + solution = Day01PartA() + res = solution("day_01/day01.txt") + assert res == 70296 diff --git a/tests/adventofcode2022/test_day01_b.py b/tests/adventofcode2022/test_day01_b.py new file mode 100644 index 00000000..7cf46314 --- /dev/null +++ b/tests/adventofcode2022/test_day01_b.py @@ -0,0 +1,9 @@ +from adventofcode2022.day01 import Day01PartB + + +class TestDay01PartB: + def test_day01b_data(self): + """Result we got when we did the real solution""" + solution = Day01PartB() + res = solution("day_01/day01.txt") + assert res == 205381 diff --git a/tests/adventofcode2022/test_day02_a.py b/tests/adventofcode2022/test_day02_a.py new file mode 100644 index 00000000..ed830be0 --- /dev/null +++ b/tests/adventofcode2022/test_day02_a.py @@ -0,0 +1,15 @@ +from adventofcode2022.day02 import Day02PartA + + +class TestDay02PartA: + def test_day02a_solve(self): + test_data = "A Y\nB X\nC Z\n" + solution = Day02PartA() + result = solution.solve(test_data) + assert result == 15 + + def test_day02a_data(self): + """Result we got when we did the real solution""" + solution = Day02PartA() + res = solution("day_02/day02.txt") + assert res == 10404 diff --git a/tests/adventofcode2022/test_day02_b.py b/tests/adventofcode2022/test_day02_b.py new file mode 100644 index 00000000..f1b10a1a --- /dev/null +++ b/tests/adventofcode2022/test_day02_b.py @@ -0,0 +1,15 @@ +from adventofcode2022.day02 import Day02PartB + + +class TestDay02PartB: + def test_day02b_solve(self): + test_data = "A Y\nB X\nC Z\n" + solution = Day02PartB() + result = solution.solve(test_data) + assert result == 12 + + def test_day02b_data(self): + """Result we got when we did the real solution""" + solution = Day02PartB() + res = solution("day_02/day02.txt") + assert res == 10334 diff --git a/tests/adventofcode2022/test_day03_a.py b/tests/adventofcode2022/test_day03_a.py new file mode 100644 index 00000000..270a78df --- /dev/null +++ b/tests/adventofcode2022/test_day03_a.py @@ -0,0 +1,38 @@ +from textwrap import dedent + +import pytest + +from adventofcode2022.day03 import Day03PartA + + +class TestDay03PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ("a", 1), + ("z", 26), + ("A", 27), + ("Z", 52), + ], + ) + def test_char_to_value(self, input_data, expected_result): + assert Day03PartA.char_to_value(input_data) == expected_result + + def test_day03a_solve(self): + test_data = """\ + JrwpWtwJgWrhcsFMMfFFhFp + jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL + PmmdzqPrVvPwwTWBwg + wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn + ttgJtRGJQctTZtZT + CrZsJsPPZsGzwwsLwLmpwMDw + """ + solution = Day03PartA() + result = solution.solve(dedent(test_data)) + assert result == 157 + + def test_day03a_data(self): + """Result we got when we did the real solution""" + solution = Day03PartA() + res = solution("day_03/day03.txt") + assert res == 8153 diff --git a/tests/adventofcode2022/test_day03_b.py b/tests/adventofcode2022/test_day03_b.py new file mode 100644 index 00000000..326ee914 --- /dev/null +++ b/tests/adventofcode2022/test_day03_b.py @@ -0,0 +1,24 @@ +from textwrap import dedent + +from adventofcode2022.day03 import Day03PartB + + +class TestDay03PartB: + def test_day03b_solve(self): + test_data = """\ + JrwpWtwJgWrhcsFMMfFFhFp + jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL + PmmdzqPrVvPwwTWBwg + wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn + ttgJtRGJQctTZtZT + CrZsJsPPZsGzwwsLwLmpwMDw + """ + solution = Day03PartB() + result = solution.solve(dedent(test_data)) + assert result == 70 + + def test_day03b_data(self): + """Result we got when we did the real solution""" + solution = Day03PartB() + res = solution("day_03/day03.txt") + assert res == 2342 diff --git a/tests/adventofcode2022/test_day04_a.py b/tests/adventofcode2022/test_day04_a.py new file mode 100644 index 00000000..eebb69c2 --- /dev/null +++ b/tests/adventofcode2022/test_day04_a.py @@ -0,0 +1,24 @@ +from textwrap import dedent + +from adventofcode2022.day04 import Day04PartA + + +class TestDay04PartA: + def test_day04a_solve(self): + test_data = """\ + 2-4,6-8 + 2-3,4-5 + 5-7,7-9 + 2-8,3-7 + 6-6,4-6 + 2-6,4-8 + """ + solution = Day04PartA() + result = solution.solve(dedent(test_data)) + assert result == 2 + + def test_day04a_data(self): + """Result we got when we did the real solution""" + solution = Day04PartA() + res = solution("day_04/day04.txt") + assert res == 444 diff --git a/tests/adventofcode2022/test_day04_b.py b/tests/adventofcode2022/test_day04_b.py new file mode 100644 index 00000000..29031f17 --- /dev/null +++ b/tests/adventofcode2022/test_day04_b.py @@ -0,0 +1,24 @@ +from textwrap import dedent + +from adventofcode2022.day04 import Day04PartB + + +class TestDay04PartB: + def test_day04b_solve(self): + test_data = """\ + 2-4,6-8 + 2-3,4-5 + 5-7,7-9 + 2-8,3-7 + 6-6,4-6 + 2-6,4-8 + """ + solution = Day04PartB() + result = solution.solve(dedent(test_data)) + assert result == 4 + + def test_day04b_data(self): + """Result we got when we did the real solution""" + solution = Day04PartB() + res = solution("day_04/day04.txt") + assert res == 801 diff --git a/tests/adventofcode2022/test_day05_a.py b/tests/adventofcode2022/test_day05_a.py new file mode 100644 index 00000000..b906545b --- /dev/null +++ b/tests/adventofcode2022/test_day05_a.py @@ -0,0 +1,29 @@ +from textwrap import dedent + +from adventofcode2022.day05 import Day05PartA + + +class TestDay05PartA: + def test_day05a_solve(self): + test_data = """\ + [D].... + [N] [C].... + [Z] [M] [P] + 1 2 3 + + move 1 from 2 to 1 + move 3 from 1 to 3 + move 2 from 2 to 1 + move 1 from 1 to 2 + """.replace( + ".", " " + ) # noqa + solution = Day05PartA() + result = solution.solve(dedent(test_data)) + assert result == "CMZ" + + def test_day05a_data(self): + """Result we got when we did the real solution""" + solution = Day05PartA() + res = solution("day_05/day05.txt") + assert res == "VGBBJCRMN" diff --git a/tests/adventofcode2022/test_day05_b.py b/tests/adventofcode2022/test_day05_b.py new file mode 100644 index 00000000..6e3c02e2 --- /dev/null +++ b/tests/adventofcode2022/test_day05_b.py @@ -0,0 +1,29 @@ +from textwrap import dedent + +from adventofcode2022.day05 import Day05PartB + + +class TestDay05PartB: + def test_day05b_solve(self): + test_data = """\ + [D].... + [N] [C].... + [Z] [M] [P] + 1 2 3 + + move 1 from 2 to 1 + move 3 from 1 to 3 + move 2 from 2 to 1 + move 1 from 1 to 2 + """.replace( + ".", " " + ) # noqa + solution = Day05PartB() + result = solution.solve(dedent(test_data)) + assert result == "MCD" + + def test_day05b_data(self): + """Result we got when we did the real solution""" + solution = Day05PartB() + res = solution("day_05/day05.txt") + assert res == "LBBVJBRMH" diff --git a/tests/adventofcode2022/test_day06_a.py b/tests/adventofcode2022/test_day06_a.py new file mode 100644 index 00000000..8371e219 --- /dev/null +++ b/tests/adventofcode2022/test_day06_a.py @@ -0,0 +1,26 @@ +import pytest + +from adventofcode2022.day06 import Day06PartA + + +class TestDay06PartA: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ("mjqjpqmgbljsphdztnvjfqwrcgsmlb", 7), + ("bvwbjplbgvbhsrlpgdmjqwftvncz", 5), + ("nppdvjthqldpwncqszvftbrmjlhg", 6), + ("nznrnfrfntjfmvfwmzdfjlvtqnbhcprsg", 10), + ("zcfzfwzzqfrljwzlrfnpqdbhtmscgvjw", 11), + ], + ) + def test_day06a_solve(self, input_data, expected_result): + solution = Day06PartA() + result = solution.solve(input_data) + assert result == expected_result + + def test_day06a_data(self): + """Result we got when we did the real solution""" + solution = Day06PartA() + res = solution("day_06/day06.txt") + assert res == 1566 diff --git a/tests/adventofcode2022/test_day06_b.py b/tests/adventofcode2022/test_day06_b.py new file mode 100644 index 00000000..698e68f9 --- /dev/null +++ b/tests/adventofcode2022/test_day06_b.py @@ -0,0 +1,26 @@ +import pytest + +from adventofcode2022.day06 import Day06PartB + + +class TestDay06PartB: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ("mjqjpqmgbljsphdztnvjfqwrcgsmlb", 19), + ("bvwbjplbgvbhsrlpgdmjqwftvncz", 23), + ("nppdvjthqldpwncqszvftbrmjlhg", 23), + ("nznrnfrfntjfmvfwmzdfjlvtqnbhcprsg", 29), + ("zcfzfwzzqfrljwzlrfnpqdbhtmscgvjw", 26), + ], + ) + def test_day06b_solve(self, input_data, expected_result): + solution = Day06PartB() + result = solution.solve(input_data) + assert result == expected_result + + def test_day06b_data(self): + """Result we got when we did the real solution""" + solution = Day06PartB() + res = solution("day_06/day06.txt") + assert res == 2265 diff --git a/tests/adventofcode2022/test_day07_a.py b/tests/adventofcode2022/test_day07_a.py new file mode 100644 index 00000000..8db91856 --- /dev/null +++ b/tests/adventofcode2022/test_day07_a.py @@ -0,0 +1,47 @@ +from textwrap import dedent + +from adventofcode2022.day07 import Day07PartA + + +class TestDay07PartA: + test_data = """\ + $ cd / + $ ls + dir a + 14848514 b.txt + 8504156 c.dat + dir d + $ cd a + $ ls + dir e + 29116 f + 2557 g + 62596 h.lst + $ cd e + $ ls + 584 i + $ cd .. + $ cd .. + $ cd d + $ ls + 4060174 j + 8033020 d.log + 5626152 d.ext + 7214296 k + """ + + def test_day07(self): + solution = Day07PartA() + root_node = solution.parse_input(dedent(self.test_data)) + assert root_node.total_size() == 48381165 + + def test_day07a_solve(self): + solution = Day07PartA() + result = solution.solve(dedent(self.test_data)) + assert result == 95437 + + def test_day07a_data(self): + """Result we got when we did the real solution""" + solution = Day07PartA() + res = solution("day_07/day07.txt") + assert res == 1444896 diff --git a/tests/adventofcode2022/test_day07_b.py b/tests/adventofcode2022/test_day07_b.py new file mode 100644 index 00000000..e68023c7 --- /dev/null +++ b/tests/adventofcode2022/test_day07_b.py @@ -0,0 +1,42 @@ +from textwrap import dedent + +from adventofcode2022.day07 import Day07PartB + + +class TestDay07PartB: + test_data = """\ + $ cd / + $ ls + dir a + 14848514 b.txt + 8504156 c.dat + dir d + $ cd a + $ ls + dir e + 29116 f + 2557 g + 62596 h.lst + $ cd e + $ ls + 584 i + $ cd .. + $ cd .. + $ cd d + $ ls + 4060174 j + 8033020 d.log + 5626152 d.ext + 7214296 k + """ + + def test_day07b_solve(self): + solution = Day07PartB() + result = solution.solve(dedent(self.test_data)) + assert result == 24933642 + + def test_day07b_data(self): + """Result we got when we did the real solution""" + solution = Day07PartB() + res = solution("day_07/day07.txt") + assert res == 404395 diff --git a/tests/adventofcode2022/test_day08_a.py b/tests/adventofcode2022/test_day08_a.py new file mode 100644 index 00000000..6312fdcb --- /dev/null +++ b/tests/adventofcode2022/test_day08_a.py @@ -0,0 +1,40 @@ +from textwrap import dedent + +import pytest + +from adventofcode2022.day08 import Day08PartA +from adventofcode.utils.point import XYPoint as Point + + +class TestDay08PartA: + test_data = """\ + 30373 + 25512 + 65332 + 33549 + 35390 + """ + + @pytest.mark.parametrize( + ("point", "is_visible"), + [ + (Point(1, 1), True), # First 5 + (Point(1, 2), True), # Second 5 + (Point(1, 3), False), # 1 on second row + ], + ) + def test_valid_points(self, point, is_visible): + solution = Day08PartA() + solution.parse(dedent(self.test_data)) + assert solution.is_visible_point(point) == is_visible + + def test_day08a_solve(self): + solution = Day08PartA() + result = solution.solve(dedent(self.test_data)) + assert result == 21 + + def test_day08a_data(self): + """Result we got when we did the real solution""" + solution = Day08PartA() + res = solution("day_08/day08.txt") + assert res == 1779 diff --git a/tests/adventofcode2022/test_day08_b.py b/tests/adventofcode2022/test_day08_b.py new file mode 100644 index 00000000..0eeb2dd3 --- /dev/null +++ b/tests/adventofcode2022/test_day08_b.py @@ -0,0 +1,37 @@ +from textwrap import dedent + +from adventofcode2022.day08 import Day08PartB +from adventofcode.utils.point import XYPoint as Point + + +class TestDay08PartB: + test_data = """\ + 30373 + 25512 + 65332 + 33549 + 35390 + """ + + def test_day08b_for_point(self): + solution = Day08PartB() + solution.parse(dedent(self.test_data)) + # Point 5 has a store of 4 + tree = Point(1, 2) + assert solution.visible_points_for_direction(tree, 0, -1) == 1 # Left + assert solution.visible_points_for_direction(tree, 0, 1) == 2 # Right + assert solution.visible_points_for_direction(tree, -1, 0) == 1 # Up + assert solution.visible_points_for_direction(tree, 1, 0) == 2 # Down + # And 1 * 1 * 2 * 2 == 4 + assert solution.visible_trees(tree) == 4 + + def test_day08b_solve(self): + solution = Day08PartB() + result = solution.solve(dedent(self.test_data)) + assert result == 8 + + def test_day08b_data(self): + """Result we got when we did the real solution""" + solution = Day08PartB() + res = solution("day_08/day08.txt") + assert res == 172224 diff --git a/tests/adventofcode2022/test_day09_a.py b/tests/adventofcode2022/test_day09_a.py new file mode 100644 index 00000000..ec2cb9fb --- /dev/null +++ b/tests/adventofcode2022/test_day09_a.py @@ -0,0 +1,26 @@ +from textwrap import dedent + +from adventofcode2022.day09 import Day09PartA + + +class TestDay09PartA: + def test_day09a_solve(self): + test_data = """\ + R 4 + U 4 + L 3 + D 1 + R 4 + D 1 + L 5 + R 2 + """ + solution = Day09PartA() + result = solution.solve(dedent(test_data)) + assert result == 13 + + def test_day09a_data(self): + """Result we got when we did the real solution""" + solution = Day09PartA() + res = solution("day_09/day09.txt") + assert res == 6057 diff --git a/tests/adventofcode2022/test_day09_b.py b/tests/adventofcode2022/test_day09_b.py new file mode 100644 index 00000000..5afca1d3 --- /dev/null +++ b/tests/adventofcode2022/test_day09_b.py @@ -0,0 +1,27 @@ +from textwrap import dedent + +from adventofcode2022.day09 import Day09PartB + + +class TestDay09PartB: + def test_day09b_solve(self): + test_data = """\ + R 5 + U 8 + L 8 + D 3 + R 17 + D 10 + L 25 + U 20 + """ + solution = Day09PartB() + result = solution.solve(dedent(test_data)) + assert result == 36 + + def test_day09b_data(self): + """Result we got when we did the real solution""" + solution = Day09PartB() + res = solution("day_09/day09.txt") + assert res > 2342 + assert res == 2514 diff --git a/tests/adventofcode2022/test_day10_a.py b/tests/adventofcode2022/test_day10_a.py new file mode 100644 index 00000000..c395be00 --- /dev/null +++ b/tests/adventofcode2022/test_day10_a.py @@ -0,0 +1,37 @@ +from adventofcode2022.day10 import CPU, Day10PartA + + +class TestDay10PartA: + def test_day10_simple(self): + program = "noop\naddx 3\naddx -5\n" + instructions = Day10PartA.parse(program) + assert len(instructions) == 3 + assert instructions[2].value == -5 + + cpu = CPU(instructions=instructions) + assert cpu.x == 1 + cpu.cycle() # Perform noop + assert cpu.x == 1 + # Perform 1 step of addx 3 + cpu.cycle() + assert cpu.x == 1 + # Perform 2 stop of addx 3 + cpu.cycle() + assert cpu.x == 4 + # Begin instruction addx -5 + cpu.cycle() + assert cpu.x == 4 + cpu.cycle() + assert cpu.x == -1 + + def test_day10a_solve(self, testdata): + solution = Day10PartA() + result = solution.solve(testdata) + assert result == 13140 + + def test_day10a_data(self): + """Result we got when we did the real solution""" + solution = Day10PartA() + res = solution("day_10/day10.txt") + assert res < 15480 + assert res == 15360 diff --git a/tests/adventofcode2022/test_day10_b.py b/tests/adventofcode2022/test_day10_b.py new file mode 100644 index 00000000..aa98cf0d --- /dev/null +++ b/tests/adventofcode2022/test_day10_b.py @@ -0,0 +1,30 @@ +from textwrap import dedent + +from adventofcode2022.day10 import Day10PartB + + +class TestDay10PartB: + def test_day10b_solve(self, testdata): + expected_output = """\ + ##..##..##..##..##..##..##..##..##..##.. + ###...###...###...###...###...###...###. + ####....####....####....####....####.... + #####.....#####.....#####.....#####..... + ######......######......######......#### + #######.......#######.......#######.....""" + solution = Day10PartB() + result = solution.solve(testdata) + assert result == dedent(expected_output) + + def test_day10b_data(self): + """Result we got when we did the real solution""" + solution = Day10PartB() + res = solution("day_10/day10.txt") + expected_output = """\ + ###..#..#.#....#..#...##..##..####..##.. + #..#.#..#.#....#..#....#.#..#....#.#..#. + #..#.####.#....####....#.#......#..#..#. + ###..#..#.#....#..#....#.#.##..#...####. + #....#..#.#....#..#.#..#.#..#.#....#..#. + #....#..#.####.#..#..##...###.####.#..#.""" + assert res == dedent(expected_output) diff --git a/tests/adventofcode2022/test_day11_a.py b/tests/adventofcode2022/test_day11_a.py new file mode 100644 index 00000000..8cacd849 --- /dev/null +++ b/tests/adventofcode2022/test_day11_a.py @@ -0,0 +1,34 @@ +from textwrap import dedent + +from adventofcode2022.day11 import Day11PartA, Monkey + + +class TestDay11PartA: + def test_monkey(self): + test_string = """\ + Monkey 0: + Starting items: 79, 98 + Operation: new = old * 19 + Test: divisible by 23 + If true: throw to monkey 2 + If false: throw to monkey 3 + """ + + monkey = Monkey.from_string(dedent(test_string), perform_modulo=False) + assert monkey.monkid == 0 + assert repr(monkey.items) == "deque([79, 98])" + assert monkey.operation == "old * 19" + assert monkey.true_to == 2 + assert monkey.false_to == 3 + assert monkey.test_division == 23 + + def test_day11a_solve(self, testdata): + solution = Day11PartA() + result = solution.solve(testdata) + assert result == 10605 + + def test_day11a_data(self): + """Result we got when we did the real solution""" + solution = Day11PartA() + res = solution("day_11/day11.txt") + assert res == 120056 diff --git a/tests/adventofcode2022/test_day11_b.py b/tests/adventofcode2022/test_day11_b.py new file mode 100644 index 00000000..0a2e0cff --- /dev/null +++ b/tests/adventofcode2022/test_day11_b.py @@ -0,0 +1,14 @@ +from adventofcode2022.day11 import Day11PartB + + +class TestDay11PartB: + def test_day11b_solve(self, testdata): + solution = Day11PartB() + result = solution.solve(testdata) + assert result == 2713310158 + + def test_day11b_data(self): + """Result we got when we did the real solution""" + solution = Day11PartB() + res = solution("day_11/day11.txt") + assert res == 21816744824 diff --git a/tests/adventofcode2022/test_day12_a.py b/tests/adventofcode2022/test_day12_a.py new file mode 100644 index 00000000..7482c98f --- /dev/null +++ b/tests/adventofcode2022/test_day12_a.py @@ -0,0 +1,17 @@ +from adventofcode2022.day12 import Day12PartA + + +class TestDay12PartA: + def test_day12a_solve(self, testdata): + solution = Day12PartA() + result = solution.solve(testdata) + assert result == 31 + + def test_day12a_data(self): + """Result we got when we did the real solution""" + solution = Day12PartA() + res = solution("day_12/day12.txt") + assert res > 311 + assert res != 312 + assert res < 459 + assert res == 350 diff --git a/tests/adventofcode2022/test_day12_b.py b/tests/adventofcode2022/test_day12_b.py new file mode 100644 index 00000000..9a933250 --- /dev/null +++ b/tests/adventofcode2022/test_day12_b.py @@ -0,0 +1,14 @@ +from adventofcode2022.day12 import Day12PartB + + +class TestDay12PartB: + def test_day12b_solve(self, testdata): + solution = Day12PartB() + result = solution.solve(testdata) + assert result == 29 + + def test_day12b_data(self): + """Result we got when we did the real solution""" + solution = Day12PartB() + res = solution("day_12/day12.txt") + assert res == 349 diff --git a/tests/adventofcode2022/test_day13_a.py b/tests/adventofcode2022/test_day13_a.py new file mode 100644 index 00000000..5136dbaa --- /dev/null +++ b/tests/adventofcode2022/test_day13_a.py @@ -0,0 +1,40 @@ +import pytest + +from adventofcode2022.day13 import Day13PartA + + +class TestDay13PartA: + @pytest.mark.parametrize( + ("pair", "valid"), + [ + (1, True), + (2, True), + (3, False), + (4, True), + (5, False), + (6, True), + (7, False), + (8, False), + ], + ) + def test_day13a_individual_pairs(self, testdata, pair, valid): + pairs = testdata.split("\n\n") + + solution = Day13PartA() + result = solution.solve(pairs[pair - 1]) + assert result == valid + + def test_day13a_solve(self, testdata): + solution = Day13PartA() + result = solution.solve(testdata) + assert result == 13 + + def test_day13a_data(self): + """Result we got when we did the real solution""" + solution = Day13PartA() + res = solution("day_13/day13.txt") + assert res > 1008 + assert res > 3364 + assert res != 5738 + assert res < 7750 + assert res == 6420 diff --git a/tests/adventofcode2022/test_day13_b.py b/tests/adventofcode2022/test_day13_b.py new file mode 100644 index 00000000..ca22b2fb --- /dev/null +++ b/tests/adventofcode2022/test_day13_b.py @@ -0,0 +1,14 @@ +from adventofcode2022.day13 import Day13PartB + + +class TestDay13PartB: + def test_day13b_solve(self, testdata): + solution = Day13PartB() + result = solution.solve(testdata) + assert result == 140 + + def test_day13b_data(self): + """Result we got when we did the real solution""" + solution = Day13PartB() + res = solution("day_13/day13.txt") + assert res == 22000 diff --git a/tests/adventofcode2022/test_day14_a.py b/tests/adventofcode2022/test_day14_a.py new file mode 100644 index 00000000..8f54b14e --- /dev/null +++ b/tests/adventofcode2022/test_day14_a.py @@ -0,0 +1,14 @@ +from adventofcode2022.day14 import Day14PartA + + +class TestDay14PartA: + def test_day14a_solve(self, testdata): + solution = Day14PartA() + result = solution.solve(testdata) + assert result == 24 + + def test_day14a_data(self): + """Result we got when we did the real solution""" + solution = Day14PartA() + res = solution("day_14/day14.txt") + assert res == 885 diff --git a/tests/adventofcode2022/test_day14_b.py b/tests/adventofcode2022/test_day14_b.py new file mode 100644 index 00000000..b40b586e --- /dev/null +++ b/tests/adventofcode2022/test_day14_b.py @@ -0,0 +1,14 @@ +from adventofcode2022.day14 import Day14PartB + + +class TestDay14PartB: + def test_day14b_solve(self, testdata): + solution = Day14PartB() + result = solution.solve(testdata) + assert result == 93 + + def test_day14b_data(self): + """Result we got when we did the real solution""" + solution = Day14PartB() + res = solution("day_14/day14.txt") + assert res == 28691 diff --git a/tests/adventofcode2022/test_day15_a.py b/tests/adventofcode2022/test_day15_a.py new file mode 100644 index 00000000..6559231d --- /dev/null +++ b/tests/adventofcode2022/test_day15_a.py @@ -0,0 +1,14 @@ +from adventofcode2022.day15 import Day15PartA + + +class TestDay15PartA: + def test_day15a_solve(self, testdata): + solution = Day15PartA() + result = solution.execute(testdata, 10) + assert result == 26 + + def test_day15a_data(self): + """Result we got when we did the real solution""" + solution = Day15PartA() + res = solution("day_15/day15.txt") + assert res == 5083287 diff --git a/tests/adventofcode2022/test_day15_b.py b/tests/adventofcode2022/test_day15_b.py new file mode 100644 index 00000000..b90e8ab4 --- /dev/null +++ b/tests/adventofcode2022/test_day15_b.py @@ -0,0 +1,17 @@ +import pytest + +from adventofcode2022.day15 import Day15PartB + + +class TestDay15PartB: + def test_day15b_solve(self, testdata): + solution = Day15PartB() + result = solution.execute(testdata, 20) + assert result == 56000011 + + @pytest.mark.skip(reason="Right answer, but very slow") + def test_day15b_data(self): + """Result we got when we did the real solution""" + solution = Day15PartB() + res = solution("day_15/day15.txt") + assert res == 13134039205729 diff --git a/tests/adventofcode2022/test_day16_a.py b/tests/adventofcode2022/test_day16_a.py new file mode 100644 index 00000000..bc7b6f5e --- /dev/null +++ b/tests/adventofcode2022/test_day16_a.py @@ -0,0 +1,25 @@ +from adventofcode2022.day16 import Day16PartA + + +class TestDay16PartA: + def test_day16a_parsing(self, testdata): + solution = Day16PartA() + solution.parse(testdata) + assert len(solution.valves) == 10 + assert solution.valves["AA"].flow_rate == 0 + + assert solution.valves["JJ"].flow_rate == 21 + assert solution.valves["DD"].connections == ("CC", "AA", "EE") + # Make sure the Valve is hashable + assert hash(solution.valves["DD"]) + + def test_day16a_testdata(self, testdata): + solution = Day16PartA() + result = solution.solve(testdata) + assert result == 1651 + + def test_day16a_data(self): + """Result we got when we did the real solution""" + solution = Day16PartA() + res = solution("day_16/day16.txt") + assert res == 1767 diff --git a/tests/adventofcode2022/test_day16_b.py b/tests/adventofcode2022/test_day16_b.py new file mode 100644 index 00000000..2fe6be13 --- /dev/null +++ b/tests/adventofcode2022/test_day16_b.py @@ -0,0 +1,14 @@ +from adventofcode2022.day16 import Day16PartB + + +class TestDay16PartB: + def test_day16b_testdata(self, testdata): + solution = Day16PartB() + result = solution.solve(testdata) + assert result == 1707 + + def test_day16b_data(self): + """Result we got when we did the real solution""" + solution = Day16PartB() + res = solution("day_16/day16.txt") + assert res == 2528 diff --git a/tests/adventofcode2022/test_day22_a.py b/tests/adventofcode2022/test_day22_a.py new file mode 100644 index 00000000..ce69eff9 --- /dev/null +++ b/tests/adventofcode2022/test_day22_a.py @@ -0,0 +1,19 @@ +import pytest + +from adventofcode2022.day22 import Day22PartA + + +class TestDay22PartA: + @pytest.mark.xfail(reason="Not yet implemented", raises=NotImplementedError) + @pytest.mark.parametrize(("input_data", "expected_result"), [("", ""), ("", "")]) + def test_day22a_solve(self, input_data, expected_result): + solution = Day22PartA() + result = solution.solve(input_data) + assert result == expected_result + + @pytest.mark.xfail(reason="Not yet implemented", raises=NotImplementedError) + def test_day22a_data(self): + """Result we got when we did the real solution""" + solution = Day22PartA() + res = solution("day_22/day22.txt") + assert res == 0 diff --git a/tests/adventofcode2022/test_day22_b.py b/tests/adventofcode2022/test_day22_b.py new file mode 100644 index 00000000..34f0cbb4 --- /dev/null +++ b/tests/adventofcode2022/test_day22_b.py @@ -0,0 +1,19 @@ +import pytest + +from adventofcode2022.day22 import Day22PartB + + +class TestDay22PartB: + @pytest.mark.xfail(reason="Not yet implemented", raises=NotImplementedError) + @pytest.mark.parametrize(("input_data", "expected_result"), [("", ""), ("", "")]) + def test_day22b_solve(self, input_data, expected_result): + solution = Day22PartB() + result = solution.solve(input_data) + assert result == expected_result + + @pytest.mark.xfail(reason="Not yet implemented", raises=NotImplementedError) + def test_day22b_data(self): + """Result we got when we did the real solution""" + solution = Day22PartB() + res = solution("day_22/day22.txt") + assert res == 0 diff --git a/tests/adventofcode2023/test_day01_a.py b/tests/adventofcode2023/test_day01_a.py new file mode 100644 index 00000000..4b81f5a1 --- /dev/null +++ b/tests/adventofcode2023/test_day01_a.py @@ -0,0 +1,22 @@ +import pytest + +from adventofcode2023.day01 import Day01PartA + + +class TestDay01PartA: + @pytest.mark.parametrize( + ("postfix", "expected_result"), + [ + ("test_1", 142), + ], + ) + def test_day01a_testdata(self, testdata_by_postfix, expected_result): + solution = Day01PartA() + result = solution.solve(testdata_by_postfix) + assert result == expected_result + + def test_day01a_data(self): + """Result we got when we did the real solution""" + solution = Day01PartA() + res = solution("day_01/day01.txt") + assert res == 56049 diff --git a/tests/adventofcode2023/test_day01_b.py b/tests/adventofcode2023/test_day01_b.py new file mode 100644 index 00000000..1f9f6ded --- /dev/null +++ b/tests/adventofcode2023/test_day01_b.py @@ -0,0 +1,25 @@ +import pytest + +from adventofcode2023.day01 import Day01PartB + + +class TestDay01PartB: + @pytest.mark.parametrize( + ("postfix", "expected_result"), + [ + ("test_2", 281), + ], + ) + def test_day01a_testdata(self, testdata_by_postfix, expected_result): + solution = Day01PartB() + result = solution.solve(testdata_by_postfix) + assert result == expected_result + + def test_day01b_data(self): + """Result we got when we did the real solution""" + solution = Day01PartB() + res = solution("day_01/day01.txt") + assert res != 53951 + assert res != 54539 + assert res != 50018 + assert res == 54530 diff --git a/tests/adventofcode2023/test_day02_a.py b/tests/adventofcode2023/test_day02_a.py new file mode 100644 index 00000000..6abac6d3 --- /dev/null +++ b/tests/adventofcode2023/test_day02_a.py @@ -0,0 +1,14 @@ +from adventofcode2023.day02 import Day02PartA + + +class TestDay02PartA: + def test_day02a_testdata(self, testdata): + solution = Day02PartA() + result = solution.solve(testdata) + assert result == 8 + + def test_day02a_data(self): + """Result we got when we did the real solution""" + solution = Day02PartA() + res = solution("day_02/day02.txt") + assert res == 2085 diff --git a/tests/adventofcode2023/test_day02_b.py b/tests/adventofcode2023/test_day02_b.py new file mode 100644 index 00000000..c53b3a34 --- /dev/null +++ b/tests/adventofcode2023/test_day02_b.py @@ -0,0 +1,14 @@ +from adventofcode2023.day02 import Day02PartB + + +class TestDay02PartB: + def test_day02b_testdata(self, testdata): + solution = Day02PartB() + result = solution.solve(testdata) + assert result == 2286 + + def test_day02b_data(self): + """Result we got when we did the real solution""" + solution = Day02PartB() + res = solution("day_02/day02.txt") + assert res == 79315 diff --git a/tests/adventofcode2023/test_day03_a.py b/tests/adventofcode2023/test_day03_a.py new file mode 100644 index 00000000..1d75fc3a --- /dev/null +++ b/tests/adventofcode2023/test_day03_a.py @@ -0,0 +1,17 @@ +from adventofcode2023.day03 import Day03PartA + + +class TestDay03PartA: + def test_day03a_testdata(self, testdata): + solution = Day03PartA() + result = solution.solve(testdata) + assert result == 4361 + + def test_day03a_data(self): + """Result we got when we did the real solution""" + solution = Day03PartA() + res = solution("day_03/day03.txt") + assert res <= 552_575 + assert res >= 339_949 + assert res != 414_148 + assert res == 551094 diff --git a/tests/adventofcode2023/test_day03_b.py b/tests/adventofcode2023/test_day03_b.py new file mode 100644 index 00000000..8010de1b --- /dev/null +++ b/tests/adventofcode2023/test_day03_b.py @@ -0,0 +1,14 @@ +from adventofcode2023.day03 import Day03PartB + + +class TestDay03PartB: + def test_day03b_testdata(self, testdata): + solution = Day03PartB() + result = solution.solve(testdata) + assert result == 467835 + + def test_day03b_data(self): + """Result we got when we did the real solution""" + solution = Day03PartB() + res = solution("day_03/day03.txt") + assert res == 80179647 diff --git a/tests/adventofcode2023/test_day04_a.py b/tests/adventofcode2023/test_day04_a.py new file mode 100644 index 00000000..e390664e --- /dev/null +++ b/tests/adventofcode2023/test_day04_a.py @@ -0,0 +1,19 @@ +import pytest + +from adventofcode2023.day04 import Day04PartA + + +class TestDay04PartA: + def test_day04a_testdata(self, testdata): + solution = Day04PartA() + result = solution.solve(testdata) + assert result == 13 + + @pytest.mark.xfail(reason="Not yet implemented", raises=NotImplementedError) + def test_day04a_data(self): + """Result we got when we did the real solution""" + solution = Day04PartA() + res = solution("day_04/day04.txt") + assert res != 820 + assert res != 1050 + assert res == 25174 diff --git a/tests/adventofcode2023/test_day04_b.py b/tests/adventofcode2023/test_day04_b.py new file mode 100644 index 00000000..7b7d49ca --- /dev/null +++ b/tests/adventofcode2023/test_day04_b.py @@ -0,0 +1,14 @@ +from adventofcode2023.day04 import Day04PartB + + +class TestDay04PartB: + def test_day04b_testdata(self, testdata): + solution = Day04PartB() + result = solution.solve(testdata) + assert result == 30 + + def test_day04b_data(self): + """Result we got when we did the real solution""" + solution = Day04PartB() + res = solution("day_04/day04.txt") + assert res == 6420979 diff --git a/tests/adventofcode2023/test_day06_a.py b/tests/adventofcode2023/test_day06_a.py new file mode 100644 index 00000000..e1256449 --- /dev/null +++ b/tests/adventofcode2023/test_day06_a.py @@ -0,0 +1,14 @@ +from adventofcode2023.day06 import Day06PartA + + +class TestDay06PartA: + def test_day06a_testdata(self, testdata): + solution = Day06PartA() + result = solution.solve(testdata) + assert result == 288 + + def test_day06a_data(self): + """Result we got when we did the real solution""" + solution = Day06PartA() + res = solution("day_06/day06.txt") + assert res == 6209190 diff --git a/tests/adventofcode2023/test_day06_b.py b/tests/adventofcode2023/test_day06_b.py new file mode 100644 index 00000000..38e3bcbb --- /dev/null +++ b/tests/adventofcode2023/test_day06_b.py @@ -0,0 +1,14 @@ +from adventofcode2023.day06 import Day06PartB + + +class TestDay06PartB: + def test_day06b_testdata(self, testdata): + solution = Day06PartB() + result = solution.solve(testdata) + assert result == 71503 + + def test_day06b_data(self): + """Result we got when we did the real solution""" + solution = Day06PartB() + res = solution("day_06/day06.txt") + assert res == 28545089 diff --git a/tests/adventofcode2023/test_day07_a.py b/tests/adventofcode2023/test_day07_a.py new file mode 100644 index 00000000..e966b171 --- /dev/null +++ b/tests/adventofcode2023/test_day07_a.py @@ -0,0 +1,53 @@ +import pytest + +from adventofcode2023.day07 import Day07PartA, Hand, Score + + +class TestDay07PartA: + @pytest.mark.parametrize( + ("card1", "card2", "lt", "eq"), + [ + ("AAAAA", "AAAAA", False, True), + ("33333", "22222", False, False), + ("33332", "2AAAA", False, False), + ("77888", "77788", False, False), + ("22222", "33333", True, False), + ("KK677", "KTJJT", False, False), + ], + ) + def test_day07a_cards(self, card1, card2, lt, eq): + hand1 = Hand(card1, 100) + hand2 = Hand(card2, 100) + ltcompare = hand1 < hand2 + assert ltcompare == lt + + eqcompare = hand1 == hand2 + assert eqcompare == eq + + def test_day07a_testdata(self, testdata): + solution = Day07PartA() + result = solution.solve(testdata) + assert result == 6440 + + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ("AAAAA", Score.FIVE_OF_A_KIND), + ("AA8AA", Score.FOUR_OF_A_KIND), + ("23332", Score.FULL_HOUSE), + ("TTT98", Score.THREE_OF_A_KIND), + ("23432", Score.TWO_PAIR), + ("A23A4", Score.ONE_PAIR), + ("23456", Score.HIGH_CARD), + ], + ) + def test_day07a_test_hand_score(self, input_data, expected_result): + hand = Hand(input_data, 0) + assert hand.score == expected_result + + @pytest.mark.xfail(reason="Not yet implemented", raises=NotImplementedError) + def test_day07a_data(self): + """Result we got when we did the real solution""" + solution = Day07PartA() + res = solution("day_07/day07.txt") + assert res == 250946742 diff --git a/tests/adventofcode2023/test_day07_b.py b/tests/adventofcode2023/test_day07_b.py new file mode 100644 index 00000000..acc266ef --- /dev/null +++ b/tests/adventofcode2023/test_day07_b.py @@ -0,0 +1,32 @@ +import pytest + +from adventofcode2023.day07 import Day07PartB, JokerHand, Score + + +class TestDay07PartB: + @pytest.mark.parametrize( + ("input_data", "expected_result"), + [ + ("32T3K", Score.ONE_PAIR), + ("KK677", Score.TWO_PAIR), + ("T55J5", Score.FOUR_OF_A_KIND), + ("KTJJT", Score.FOUR_OF_A_KIND), + ("QQQJA", Score.FOUR_OF_A_KIND), + ("QJJQ2", Score.FOUR_OF_A_KIND), + ("8JJJ4", Score.FOUR_OF_A_KIND), + ], + ) + def test_day07a_test_hand_score(self, input_data, expected_result): + hand = JokerHand(input_data, 0) + assert hand.score == expected_result + + def test_day07b_testdata(self, testdata): + solution = Day07PartB() + result = solution.solve(testdata) + assert result == 5905 + + def test_day07b_data(self): + """Result we got when we did the real solution""" + solution = Day07PartB() + res = solution("day_07/day07.txt") + assert res == 251824095 diff --git a/tests/adventofcode2023/test_day08_a.py b/tests/adventofcode2023/test_day08_a.py new file mode 100644 index 00000000..299ca3a6 --- /dev/null +++ b/tests/adventofcode2023/test_day08_a.py @@ -0,0 +1,23 @@ +import pytest + +from adventofcode2023.day08 import Day08PartA + + +class TestDay08PartA: + @pytest.mark.parametrize( + ("postfix", "expected_result"), + [ + ("test_1", 2), + ("test_2", 6), + ], + ) + def test_extended(self, testdata_by_postfix, expected_result): + solution = Day08PartA() + result = solution.solve(testdata_by_postfix) + assert result == expected_result + + def test_day08a_data(self): + """Result we got when we did the real solution""" + solution = Day08PartA() + res = solution("day_08/day08.txt") + assert res == 11567 diff --git a/tests/adventofcode2023/test_day08_b.py b/tests/adventofcode2023/test_day08_b.py new file mode 100644 index 00000000..36e5ce5a --- /dev/null +++ b/tests/adventofcode2023/test_day08_b.py @@ -0,0 +1,17 @@ +import pytest + +from adventofcode2023.day08 import Day08PartB + + +class TestDay08PartB: + @pytest.mark.parametrize(("postfix", "expected_result"), [("test_3", 6)]) + def test_day08b_extended(self, testdata_by_postfix, expected_result): + solution = Day08PartB() + result = solution.solve(testdata_by_postfix) + assert result == expected_result + + def test_day08b_data(self): + """Result we got when we did the real solution""" + solution = Day08PartB() + res = solution("day_08/day08.txt") + assert res == 9858474970153 diff --git a/tests/adventofcode2023/test_day09_a.py b/tests/adventofcode2023/test_day09_a.py new file mode 100644 index 00000000..bdc0077c --- /dev/null +++ b/tests/adventofcode2023/test_day09_a.py @@ -0,0 +1,29 @@ +import pytest + +from adventofcode2023.day09 import Day09PartA + + +class TestDay09PartA: + @pytest.mark.parametrize( + ("line_nr", "expected_result"), + [ + (0, 18), + (1, 28), + (2, 68), + ], + ) + def test_daya09_lines(self, testdata, line_nr, expected_result): + line = testdata.splitlines()[line_nr] + result = Day09PartA().calculate_line(line) + assert result == expected_result + + def test_day09a_testdata(self, testdata): + solution = Day09PartA() + result = solution.solve(testdata) + assert result == 114 + + def test_day09a_data(self): + """Result we got when we did the real solution""" + solution = Day09PartA() + res = solution("day_09/day09.txt") + assert res == 1955513104 diff --git a/tests/adventofcode2023/test_day09_b.py b/tests/adventofcode2023/test_day09_b.py new file mode 100644 index 00000000..9ddd6ec5 --- /dev/null +++ b/tests/adventofcode2023/test_day09_b.py @@ -0,0 +1,14 @@ +from adventofcode2023.day09 import Day09PartB + + +class TestDay09PartB: + def test_day09b_testdata(self): + solution = Day09PartB() + result = solution.solve("10 13 16 21 30 45") + assert result == 5 + + def test_day09b_data(self): + """Result we got when we did the real solution""" + solution = Day09PartB() + res = solution("day_09/day09.txt") + assert res == 1131 diff --git a/tests/adventofcode2023/test_day10_a.py b/tests/adventofcode2023/test_day10_a.py new file mode 100644 index 00000000..42f16194 --- /dev/null +++ b/tests/adventofcode2023/test_day10_a.py @@ -0,0 +1,38 @@ +import pytest + +from adventofcode2023.day10 import Day10PartA, Tile + + +class TestDay10PartA: + @pytest.mark.parametrize( + ("tile", "north", "east", "south", "west"), + [ + (Tile.GG, False, False, False, False), + (Tile.NS, True, False, True, False), + (Tile.EW, False, True, False, True), + (Tile.SW, False, False, True, True), + ], + ) + def test_tiles(self, tile, north, east, south, west): + assert tile.has_north == north + assert tile.has_east == east + assert tile.has_south == south + assert tile.has_west == west + + @pytest.mark.parametrize( + ("postfix", "expected_result"), + [ + ("test_4", 4), + ("test_8", 8), + ], + ) + def test_day10a_testdata(self, testdata_by_postfix, expected_result): + solution = Day10PartA() + result = solution.solve(testdata_by_postfix) + assert result == expected_result + + def test_day10a_data(self): + """Result we got when we did the real solution""" + solution = Day10PartA() + res = solution("day_10/day10.txt") + assert res == 6806 diff --git a/tests/adventofcode2023/test_day10_b.py b/tests/adventofcode2023/test_day10_b.py new file mode 100644 index 00000000..52be1886 --- /dev/null +++ b/tests/adventofcode2023/test_day10_b.py @@ -0,0 +1,26 @@ +import pytest + +from adventofcode2023.day10 import Day10PartB + + +class TestDay10PartB: + @pytest.mark.parametrize( + ("postfix", "expected_result"), + [ + ("loop_4", 4), + ("loop_8", 8), + ("loop_10", 10), + ], + ) + def test_day10b_testdata(self, testdata_by_postfix, expected_result): + solution = Day10PartB() + result = solution.solve(testdata_by_postfix) + assert result == expected_result + + @pytest.mark.xfail(reason="Not yet implemented", raises=NotImplementedError) + def test_day10b_data(self): + """Result we got when we did the real solution""" + solution = Day10PartB() + res = solution("day_10/day10.txt") + assert res > 132 + assert res == 449 diff --git a/tests/adventofcode2023/test_day11_a.py b/tests/adventofcode2023/test_day11_a.py new file mode 100644 index 00000000..5432b942 --- /dev/null +++ b/tests/adventofcode2023/test_day11_a.py @@ -0,0 +1,60 @@ +from adventofcodeutils.point import XYNRPoint as Point + +from adventofcode2023.day11 import Day11PartA + + +class TestDay11PartA: + def test_day11a_parse(self, testdata): + solution = Day11PartA() + solution.parse(testdata) + assert len(solution.galaxy_points) == 9 + assert solution.galaxy_points[0] == Point(0, 3, 0) + assert solution.galaxy_points[-1] == Point(9, 4, 0) + + def test_day11a_expand(self, testdata): + solution = Day11PartA() + solution.parse(testdata) + solution.expand_universe() + # No extra galaxies created + assert len(solution.galaxy_points) == 9 + # First one moved on to the right + # Check if they are int the list, ordering may have been shuffled + point_1 = [p for p in solution.galaxy_points if p.nr == 1][0] + assert point_1.x == 0 + assert point_1.y == 4 + + # Find point should be on location (1, 9) + point_2 = [p for p in solution.galaxy_points if p.nr == 2][0] + assert point_2.x == 1 + assert point_2.y == 9 + + # Find point 9 + point_9 = [p for p in solution.galaxy_points if p.nr == 9][0] + assert point_9.x == 11 + assert point_9.y == 5 + + # After the expansion, the distance between 1 and 7 must be 15 + point_1 = [p for p in solution.galaxy_points if p.nr == 1][0] + point_7 = [p for p in solution.galaxy_points if p.nr == 7][0] + assert point_7.distance(point_1) == 15 + + # After the expansion, the distance between 3 and 6 must be 17 + point_3 = [p for p in solution.galaxy_points if p.nr == 3][0] + point_6 = [p for p in solution.galaxy_points if p.nr == 6][0] + assert point_3.distance(point_6) == 17 + + # After the expansion, the distance between 8 and 9 must be 5 + point_8 = [p for p in solution.galaxy_points if p.nr == 8][0] + point_9 = [p for p in solution.galaxy_points if p.nr == 9][0] + assert point_8.distance(point_9) == 5 + + def test_day11a_testdata(self, testdata): + solution = Day11PartA() + result = solution.solve(testdata) + assert result == 374 + + def test_day11a_data(self): + """Result we got when we did the real solution""" + solution = Day11PartA() + res = solution("day_11/day11.txt") + assert res == 9805264 diff --git a/tests/adventofcode2023/test_day11_b.py b/tests/adventofcode2023/test_day11_b.py new file mode 100644 index 00000000..c4728bea --- /dev/null +++ b/tests/adventofcode2023/test_day11_b.py @@ -0,0 +1,25 @@ +import pytest + +from adventofcode2023.day11 import Day11PartB + + +class TestDay11PartB: + @pytest.mark.parametrize( + ("factor", "expected_result"), + [ + (10, 1030), + (100, 8410), + ], + ) + def test_day11b_testdata(self, testdata, factor, expected_result): + solution = Day11PartB() + solution.parse(testdata) + solution.expand_universe(factor - 1) + solution.print_solution() + assert solution.compute_shortest_paths() == expected_result + + def test_day11b_data(self): + """Result we got when we did the real solution""" + solution = Day11PartB() + res = solution("day_11/day11.txt") + assert res == 779032247216 diff --git a/tests/adventofcode2016/conftest.py b/tests/conftest.py similarity index 53% rename from tests/adventofcode2016/conftest.py rename to tests/conftest.py index 24da9980..5490b49a 100644 --- a/tests/adventofcode2016/conftest.py +++ b/tests/conftest.py @@ -1,15 +1,15 @@ import pathlib +import re import pytest -def read_file(day: int, filename: str) -> str: +def read_file(year: int, day: int, filename: str) -> str: """Load data from a file in data directory.""" test_path = ( - pathlib.Path(__file__).parent.parent.parent + pathlib.Path(__file__).parent.parent / "src" - / "adventofcode2016" - / "solutions" + / f"adventofcode{year}" / "data" / f"day_{day:02}" / filename @@ -19,30 +19,36 @@ def read_file(day: int, filename: str) -> str: return test_data -def parse_classname(request) -> int: +def parse_classname(request) -> tuple[int, int]: # Parse the class name day = int("".join(x for x in request.keywords.parent.name if x.isdigit())) - return day + year = re.findall(r"adventofcode(\d{4})", repr(request.keywords.parent.cls)) + if not year: + raise ValueError("Path not found") + else: + year = int(year[0]) + + return year, day @pytest.fixture def testdata(request) -> str: """Load data from a testfile.""" - day = parse_classname(request) - return read_file(day, f"day{day:02}_test.txt") + year, day = parse_classname(request) + return read_file(year, day, f"day{day:02}_test.txt") @pytest.fixture def testdata_by_postfix(postfix, request) -> str: """Run with `testdata_by_postfix("test2")` to load `day03_test2.txt`""" """Load data from a testfile.""" - day = parse_classname(request) + year, day = parse_classname(request) filename = f"day{day:02}_{postfix}.txt" - return read_file(day, filename) + return read_file(year, day, filename) @pytest.fixture def solutiondata(request) -> str: """Load data from a solution file.""" - day = parse_classname(request) - return read_file(day, f"day{day:02}.txt") + year, day = parse_classname(request) + return read_file(year, day, f"day{day:02}.txt") diff --git a/tests/test_advent_utils.py b/tests/test_advent_utils.py new file mode 100644 index 00000000..eb14991f --- /dev/null +++ b/tests/test_advent_utils.py @@ -0,0 +1,53 @@ +import pytest + +from adventofcode.utils import parsing + + +def test_string_to_list_of_ints(): + input_data = "2,4,5, 300,-3,0" + result = parsing.string_to_list_of_ints(input_data) + + assert result == [2, 4, 5, 300, -3, 0] + + +def test_string_to_list_of_ints_with_dash(): + # Split on a -, does not support negative ints + input_data = "2-4-5-300-3-0" + result = parsing.string_to_list_of_ints(input_data, "-") + + assert result == [2, 4, 5, 300, 3, 0] + + +def test_invalid_list_to_list_of_ints(): + input_data = "these,are,not,the,ints,you're,looking,for" + with pytest.raises(ValueError): + parsing.string_to_list_of_ints(input_data) + + +def test_string_of_single_to_list_of_ints(): + input_data = "23272930" + result = parsing.string_of_single_to_list_of_ints(input_data) + + assert result == [2, 3, 2, 7, 2, 9, 3, 0] + + +def test_string_of_invalid_single_to_list_of_ints(): + input_data = "2327-2930" + with pytest.raises(ValueError): + parsing.string_of_single_to_list_of_ints(input_data) + + +@pytest.mark.parametrize( + ("input_string", "expected_list"), + [ + ("12", [12]), + ("1x2", [1, 2]), + ("foo42bar2", [42, 2]), + # A . is also found as a deliminator + ("3.1598", [3, 1598]), + # Leading zero's are skipped + ("3.0052", [3, 52]), + ], +) +def test_extract_digits_from_string(input_string, expected_list): + assert parsing.extract_digits_from_string(input_string) == expected_list diff --git a/tests/test_graph.py b/tests/test_graph.py new file mode 100644 index 00000000..58f306a4 --- /dev/null +++ b/tests/test_graph.py @@ -0,0 +1,20 @@ +from adventofcode.utils.graph import Edge, Graph + + +def test_graph(): + """Test the graph""" + g = Graph() + g.add_from_list( + [ + ("a", "b"), + ("b", "c"), + ("a", "d"), + ] + ) + assert repr(g) == "Graph with 4 nodes and 3 edges" + assert g.nodes == {"a", "b", "c", "d"} + assert Edge("a", "b") in list(g.edges) + + # Test the nodes reachable. From "a", we can connect to "b" and "d" + assert g.edges_from_node("a") == [Edge("a", "b"), Edge("a", "d")] + assert list(g.nodes_from_node("a")) == ["b", "d"] diff --git a/tests/test_node.py b/tests/test_node.py new file mode 100644 index 00000000..3ab08264 --- /dev/null +++ b/tests/test_node.py @@ -0,0 +1,13 @@ +from adventofcode.utils.node import Node + + +def test_node(): + n1 = Node("n1", None, cost=1, heuristic=0.5) + n2 = Node("n2", None, cost=3, heuristic=0.5) + + # test __lt__ < and > + assert n1 < n2 + assert n2 > n1 + + assert not n1 > n2 + assert not n2 < n1 diff --git a/tests/test_point.py b/tests/test_point.py new file mode 100644 index 00000000..a7e32a28 --- /dev/null +++ b/tests/test_point.py @@ -0,0 +1,60 @@ +import pytest + +from adventofcode.utils import point + + +def test_xyzpoint(): + p1 = point.XYZPoint(1, 2, 3) + assert p1.x == 1 + assert p1.y == 2 + assert p1.z == 3 + + assert repr(p1) == "XYZPoint(x=1, y=2, z=3)" + + p2 = point.XYZPoint(6, 7, 8) + + total = p1 + p2 + assert total.x == 7 + assert total.y == 9 + assert total.z == 11 + + p1_same = point.XYZPoint(1, 2, 3) + assert p1 == p1_same + assert p1 != p2 + + +def test_xyzdistance(): + p1 = point.XYZPoint(1105, -1205, 1229) + p2 = point.XYZPoint(-92, -2380, -20) + + assert p1.distance(p2) == 3621 + + +def test_xypoint(): + p1 = point.XYPoint(1, 2) + assert p1.x == 1 + assert p1.y == 2 + + assert repr(p1) == "XYPoint(x=1, y=2)" + + p2 = point.XYPoint(6, 7) + + total = p1 + p2 + assert total.x == 7 + assert total.y == 9 + + p1_same = point.XYPoint(1, 2) + assert p1 == p1_same + assert p1 != p2 + + +def test_invalid_together(): + xy = point.XYPoint(1, 2) + xyz = point.XYZPoint(6, 7, 8) + + with pytest.raises(ValueError): + xyz + xy + with pytest.raises(ValueError): + xy + xyz + + assert xy != xyz diff --git a/tests/test_priority_queue.py b/tests/test_priority_queue.py new file mode 100644 index 00000000..56e8e664 --- /dev/null +++ b/tests/test_priority_queue.py @@ -0,0 +1,32 @@ +import pytest + +from adventofcode.utils.priority_queue import PriorityQueue + + +def test_priorityqueue(): + q = PriorityQueue() + + assert q.empty + assert q.__repr__() == "[]" + + # Let's add some stuff. The priority is not in order. + q.push((1, "a")) + q.push((3, "c")) + q.push((2, "b")) + + assert not q.empty + assert len(q) == 3 + # Repr is based on the insert order (?) + assert q.__repr__() == "[(1, 'a'), (3, 'c'), (2, 'b')]" + + # Output is based on the priority + assert q.pop() == (1, "a") + assert q.pop() == (2, "b") + assert q.pop() == (3, "c") + + # And empty again + assert q.empty + assert len(q) == 0 + + with pytest.raises(IndexError): + q.pop() diff --git a/tests/test_queue.py b/tests/test_queue.py new file mode 100644 index 00000000..59f26373 --- /dev/null +++ b/tests/test_queue.py @@ -0,0 +1,31 @@ +import pytest + +from adventofcode.utils.queue import Queue + + +def test_queue(): + q = Queue() + + assert q.empty + assert q.__repr__() == "deque([])" + + # Let's add some stuff + q.push("a") + q.push("b") + q.push("c") + + assert not q.empty + assert len(q) == 3 + assert q.__repr__() == "deque(['a', 'b', 'c'])" + + # First in is First out + assert q.pop() == "a" + assert q.pop() == "b" + assert q.pop() == "c" + + # And empty again + assert q.empty + assert len(q) == 0 + + with pytest.raises(IndexError): + q.pop() diff --git a/tests/test_stack.py b/tests/test_stack.py new file mode 100644 index 00000000..9271992c --- /dev/null +++ b/tests/test_stack.py @@ -0,0 +1,39 @@ +import pytest + +from adventofcode.utils.stack import Stack + + +def test_stack(): + st = Stack() + + # Check if empty + assert st.empty + + # Popping empty should raise index error + with pytest.raises(IndexError): + st.pop() + + # Add some items + st.push(1) + st.push(2) + st.push(3) + + # We should have some data now + assert not st.empty + assert len(st) == 3 + + # Let's look at the data + assert repr(st) == repr([1, 2, 3]) + + # Stack, to the Last In, First Out. + assert st.pop() == 3 + assert st.pop() == 2 + assert st.pop() == 1 + + # Should be empty again + assert st.empty + assert len(st) == 0 + assert repr(st) == repr([]) + + with pytest.raises(IndexError): + st.pop() diff --git a/tox.ini b/tox.ini index dae5d684..1de75722 100644 --- a/tox.ini +++ b/tox.ini @@ -5,10 +5,12 @@ envlist = [pytest] # Makes all warnings be fatal -filterwarnings = error +# Disabled due to tqdm incompatibility to python 3.12 : +# https://github.com/tqdm/tqdm/issues/1517 +# filterwarnings = error junit_family = xunit1 testpaths = tests -addopts = --cov --cov-report=term --cov-report=html --cov-report=xml +addopts = --cov --cov-report=term --cov-report=html --cov-report=xml --import-mode=importlib --ignore=template [flake8] max-complexity = 16 @@ -40,8 +42,14 @@ omit = */__init__.py source = + adventofcode adventofcode2016 + adventofcode2018 adventofcode2019 + adventofcode2020 + adventofcode2021 + adventofcode2022 + adventofcode2023 tests [coverage:report] @@ -101,6 +109,13 @@ deps = isort commands = isort --check-only src/ tests/ +[testenv:bandit] +skip_install = true +description = Find common security issues in Python code +deps = bandit +commands = + bandit -c pyproject.toml -r src/ tests/ + # Combines all linters in one, fast, env [testenv:linters] skip_install = true @@ -108,9 +123,11 @@ deps = {[testenv:black]deps} {[testenv:flake8]deps} {[testenv:isort]deps} - {[testenv:mypy]deps} + {[testenv:bandit]deps} + #{[testenv:mypy]deps} commands = {[testenv:black]commands} {[testenv:flake8]commands} {[testenv:isort]commands} - {[testenv:mypy]commands} + {[testenv:bandit]commands} + #{[testenv:mypy]commands}