Move 2022 and 2021 into place
This commit is contained in:
parent
713c681a22
commit
2c8e8eecb8
174
.gitignore
vendored
Normal file
174
.gitignore
vendored
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
# Created by https://www.toptal.com/developers/gitignore/api/python
|
||||||
|
# Edit at https://www.toptal.com/developers/gitignore?templates=python
|
||||||
|
|
||||||
|
### Python ###
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
share/python-wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
MANIFEST
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.nox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*.cover
|
||||||
|
*.py,cover
|
||||||
|
.hypothesis/
|
||||||
|
.pytest_cache/
|
||||||
|
cover/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
db.sqlite3
|
||||||
|
db.sqlite3-journal
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
.pybuilder/
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# IPython
|
||||||
|
profile_default/
|
||||||
|
ipython_config.py
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
# For a library or package, you might want to ignore these files since the code is
|
||||||
|
# intended to run in multiple environments; otherwise, check them in:
|
||||||
|
# .python-version
|
||||||
|
|
||||||
|
# pipenv
|
||||||
|
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||||
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||||
|
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||||
|
# install all needed dependencies.
|
||||||
|
#Pipfile.lock
|
||||||
|
|
||||||
|
# poetry
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||||
|
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||||
|
# commonly ignored for libraries.
|
||||||
|
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||||
|
#poetry.lock
|
||||||
|
|
||||||
|
# pdm
|
||||||
|
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||||
|
#pdm.lock
|
||||||
|
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||||
|
# in version control.
|
||||||
|
# https://pdm.fming.dev/#use-with-ide
|
||||||
|
.pdm.toml
|
||||||
|
|
||||||
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||||
|
__pypackages__/
|
||||||
|
|
||||||
|
# Celery stuff
|
||||||
|
celerybeat-schedule
|
||||||
|
celerybeat.pid
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
.env
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak/
|
||||||
|
venv.bak/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
/site
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
||||||
|
.dmypy.json
|
||||||
|
dmypy.json
|
||||||
|
|
||||||
|
# Pyre type checker
|
||||||
|
.pyre/
|
||||||
|
|
||||||
|
# pytype static type analyzer
|
||||||
|
.pytype/
|
||||||
|
|
||||||
|
# Cython debug symbols
|
||||||
|
cython_debug/
|
||||||
|
|
||||||
|
# PyCharm
|
||||||
|
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||||
|
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||||
|
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||||
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
|
#.idea/
|
||||||
|
|
||||||
|
### Python Patch ###
|
||||||
|
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
|
||||||
|
poetry.toml
|
||||||
|
|
||||||
|
|
||||||
|
# End of https://www.toptal.com/developers/gitignore/api/python
|
||||||
|
|
||||||
|
|
||||||
|
tags
|
24
2021/README.md
Normal file
24
2021/README.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
Advent of Code 2021
|
||||||
|
|
||||||
|
to run any day:
|
||||||
|
|
||||||
|
- make a virualenv `python3 -m venv env`
|
||||||
|
- source it `souce env/bin/activate`
|
||||||
|
- install deps `pip install -r requirements.txt`
|
||||||
|
- run the day `python day01.py`
|
||||||
|
- to run sample code pass `--sample` as the argument. `python day01.py --sample`, (nothing special just checks sys.argv[-1])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
python day01.py --sample
|
||||||
|
python day02.py --sample
|
||||||
|
python day03.py --sample
|
||||||
|
python day04.py --sample
|
||||||
|
python day05.py --sample
|
||||||
|
python day06.py --sample
|
||||||
|
python day07.py --sample
|
||||||
|
python day08.py --sample
|
||||||
|
python day09.py --sample
|
||||||
|
python day10.py --sample
|
2000
2021/full/day01.txt
Normal file
2000
2021/full/day01.txt
Normal file
File diff suppressed because it is too large
Load Diff
1000
2021/full/day02.txt
Normal file
1000
2021/full/day02.txt
Normal file
File diff suppressed because it is too large
Load Diff
1000
2021/full/day03.txt
Normal file
1000
2021/full/day03.txt
Normal file
File diff suppressed because it is too large
Load Diff
601
2021/full/day04.txt
Normal file
601
2021/full/day04.txt
Normal file
@ -0,0 +1,601 @@
|
|||||||
|
6,69,28,50,36,84,49,13,48,90,1,33,71,0,94,59,53,58,60,96,30,34,29,91,11,41,77,95,17,80,85,93,7,9,74,89,18,25,26,8,87,38,68,5,12,43,27,46,62,73,16,55,22,4,65,76,54,52,83,10,21,67,15,47,45,40,35,66,79,51,75,39,64,24,37,72,3,44,82,32,78,63,57,2,86,31,19,92,14,97,20,56,88,81,70,61,42,99,23,98
|
||||||
|
|
||||||
|
22 59 7 10 6
|
||||||
|
33 36 96 55 23
|
||||||
|
13 85 18 29 28
|
||||||
|
75 46 83 73 58
|
||||||
|
34 40 87 56 98
|
||||||
|
|
||||||
|
73 96 47 14 10
|
||||||
|
28 11 79 84 20
|
||||||
|
74 30 0 59 71
|
||||||
|
80 93 42 22 17
|
||||||
|
44 2 81 29 15
|
||||||
|
|
||||||
|
73 32 37 93 39
|
||||||
|
2 87 38 99 97
|
||||||
|
15 12 42 49 33
|
||||||
|
9 23 25 94 19
|
||||||
|
57 4 18 70 79
|
||||||
|
|
||||||
|
43 79 59 71 78
|
||||||
|
51 97 37 28 26
|
||||||
|
46 21 84 8 86
|
||||||
|
96 30 17 34 49
|
||||||
|
55 90 99 75 61
|
||||||
|
|
||||||
|
43 86 35 51 24
|
||||||
|
16 25 29 21 3
|
||||||
|
2 13 4 36 54
|
||||||
|
89 27 8 85 34
|
||||||
|
96 59 65 14 56
|
||||||
|
|
||||||
|
5 57 43 4 1
|
||||||
|
86 80 67 30 20
|
||||||
|
22 16 99 0 14
|
||||||
|
40 25 59 91 54
|
||||||
|
82 95 96 37 24
|
||||||
|
|
||||||
|
97 20 87 66 21
|
||||||
|
25 40 9 78 89
|
||||||
|
52 75 95 63 62
|
||||||
|
32 43 13 47 69
|
||||||
|
53 48 56 29 4
|
||||||
|
|
||||||
|
24 4 65 12 8
|
||||||
|
76 3 81 99 49
|
||||||
|
45 33 31 66 34
|
||||||
|
17 94 75 35 88
|
||||||
|
64 10 7 93 95
|
||||||
|
|
||||||
|
88 20 99 15 83
|
||||||
|
81 40 5 6 98
|
||||||
|
49 74 18 27 9
|
||||||
|
43 69 28 37 71
|
||||||
|
87 82 90 14 47
|
||||||
|
|
||||||
|
21 97 92 42 60
|
||||||
|
11 65 98 95 29
|
||||||
|
2 49 75 20 74
|
||||||
|
56 40 78 66 81
|
||||||
|
68 4 46 77 61
|
||||||
|
|
||||||
|
26 14 39 76 11
|
||||||
|
41 74 34 91 4
|
||||||
|
51 9 97 29 75
|
||||||
|
83 86 23 35 77
|
||||||
|
90 2 49 30 89
|
||||||
|
|
||||||
|
34 97 0 22 15
|
||||||
|
65 60 82 66 47
|
||||||
|
30 9 49 95 48
|
||||||
|
54 73 67 17 78
|
||||||
|
33 96 44 1 32
|
||||||
|
|
||||||
|
90 29 10 49 63
|
||||||
|
8 26 95 61 0
|
||||||
|
54 13 51 12 44
|
||||||
|
32 48 16 47 84
|
||||||
|
55 46 93 14 3
|
||||||
|
|
||||||
|
68 55 46 16 54
|
||||||
|
97 59 49 6 21
|
||||||
|
52 32 15 96 70
|
||||||
|
57 56 61 51 0
|
||||||
|
40 31 62 24 48
|
||||||
|
|
||||||
|
75 56 70 42 14
|
||||||
|
77 9 23 62 25
|
||||||
|
29 27 54 17 2
|
||||||
|
55 72 43 15 96
|
||||||
|
45 30 88 86 1
|
||||||
|
|
||||||
|
65 12 22 6 51
|
||||||
|
77 81 15 91 19
|
||||||
|
80 71 27 89 52
|
||||||
|
75 92 41 83 57
|
||||||
|
40 44 66 84 98
|
||||||
|
|
||||||
|
89 80 73 59 18
|
||||||
|
74 55 67 71 10
|
||||||
|
78 27 37 57 3
|
||||||
|
92 26 17 5 72
|
||||||
|
52 83 28 76 51
|
||||||
|
|
||||||
|
64 0 87 4 13
|
||||||
|
14 43 42 62 31
|
||||||
|
17 84 72 91 83
|
||||||
|
53 80 59 61 74
|
||||||
|
47 22 38 28 77
|
||||||
|
|
||||||
|
65 49 91 94 19
|
||||||
|
25 81 64 57 9
|
||||||
|
50 95 82 12 66
|
||||||
|
53 54 85 36 11
|
||||||
|
31 56 83 18 60
|
||||||
|
|
||||||
|
6 12 76 37 33
|
||||||
|
14 96 16 31 40
|
||||||
|
17 82 27 94 83
|
||||||
|
1 50 49 9 54
|
||||||
|
29 70 59 91 77
|
||||||
|
|
||||||
|
85 0 33 41 16
|
||||||
|
7 86 80 53 65
|
||||||
|
94 19 28 35 32
|
||||||
|
4 55 93 97 63
|
||||||
|
83 22 67 56 36
|
||||||
|
|
||||||
|
28 70 65 17 19
|
||||||
|
88 51 15 73 12
|
||||||
|
11 49 80 23 42
|
||||||
|
26 54 90 75 29
|
||||||
|
74 77 91 86 66
|
||||||
|
|
||||||
|
88 22 83 10 43
|
||||||
|
57 34 15 23 8
|
||||||
|
94 42 68 67 37
|
||||||
|
84 3 6 71 62
|
||||||
|
89 45 72 55 38
|
||||||
|
|
||||||
|
68 27 93 7 15
|
||||||
|
85 96 1 56 6
|
||||||
|
32 2 30 55 17
|
||||||
|
99 90 37 80 50
|
||||||
|
77 78 58 98 57
|
||||||
|
|
||||||
|
5 95 22 13 97
|
||||||
|
19 2 52 92 20
|
||||||
|
75 49 86 31 41
|
||||||
|
51 63 56 33 10
|
||||||
|
82 27 79 94 57
|
||||||
|
|
||||||
|
15 44 91 26 4
|
||||||
|
41 78 53 95 86
|
||||||
|
90 92 46 56 33
|
||||||
|
80 93 68 66 70
|
||||||
|
36 10 38 0 6
|
||||||
|
|
||||||
|
11 47 52 64 17
|
||||||
|
16 60 39 55 78
|
||||||
|
46 18 33 83 35
|
||||||
|
13 92 4 23 50
|
||||||
|
40 5 29 6 90
|
||||||
|
|
||||||
|
20 60 2 23 74
|
||||||
|
43 39 91 75 12
|
||||||
|
58 67 50 29 79
|
||||||
|
10 40 92 95 25
|
||||||
|
13 24 53 72 36
|
||||||
|
|
||||||
|
69 64 15 53 86
|
||||||
|
61 11 48 71 27
|
||||||
|
26 93 38 70 73
|
||||||
|
96 29 30 98 45
|
||||||
|
13 7 31 59 84
|
||||||
|
|
||||||
|
13 55 50 54 57
|
||||||
|
32 24 45 5 77
|
||||||
|
82 86 0 4 99
|
||||||
|
75 72 14 40 56
|
||||||
|
76 94 89 17 30
|
||||||
|
|
||||||
|
66 71 86 41 0
|
||||||
|
80 64 3 29 78
|
||||||
|
23 21 42 99 87
|
||||||
|
96 60 75 61 49
|
||||||
|
2 83 85 12 1
|
||||||
|
|
||||||
|
78 96 4 82 6
|
||||||
|
73 36 57 99 8
|
||||||
|
11 83 15 35 30
|
||||||
|
85 87 25 22 66
|
||||||
|
32 64 16 50 43
|
||||||
|
|
||||||
|
6 39 55 2 4
|
||||||
|
1 61 99 71 80
|
||||||
|
46 88 22 31 60
|
||||||
|
62 66 37 97 76
|
||||||
|
74 34 10 52 24
|
||||||
|
|
||||||
|
42 38 13 65 12
|
||||||
|
4 39 60 62 21
|
||||||
|
81 99 1 69 40
|
||||||
|
59 15 11 95 53
|
||||||
|
91 78 72 30 73
|
||||||
|
|
||||||
|
43 68 82 72 2
|
||||||
|
34 92 33 97 89
|
||||||
|
63 70 9 0 45
|
||||||
|
69 10 12 65 21
|
||||||
|
40 20 55 57 49
|
||||||
|
|
||||||
|
41 22 8 16 49
|
||||||
|
71 64 19 65 92
|
||||||
|
17 10 26 36 29
|
||||||
|
30 88 7 54 11
|
||||||
|
77 55 70 72 47
|
||||||
|
|
||||||
|
15 94 90 6 39
|
||||||
|
99 55 16 54 91
|
||||||
|
18 7 82 44 51
|
||||||
|
25 34 83 14 12
|
||||||
|
30 2 77 27 66
|
||||||
|
|
||||||
|
44 50 74 97 58
|
||||||
|
87 42 56 92 28
|
||||||
|
49 82 52 17 78
|
||||||
|
54 89 63 77 27
|
||||||
|
83 14 24 16 84
|
||||||
|
|
||||||
|
47 32 8 55 22
|
||||||
|
19 14 24 82 4
|
||||||
|
76 73 9 10 64
|
||||||
|
40 6 92 67 17
|
||||||
|
68 44 43 3 54
|
||||||
|
|
||||||
|
26 10 9 92 81
|
||||||
|
46 98 13 0 14
|
||||||
|
68 99 35 18 72
|
||||||
|
74 33 22 61 93
|
||||||
|
80 38 71 6 75
|
||||||
|
|
||||||
|
17 23 54 55 22
|
||||||
|
10 8 60 76 24
|
||||||
|
71 28 16 62 82
|
||||||
|
13 12 21 78 39
|
||||||
|
26 66 89 64 79
|
||||||
|
|
||||||
|
72 12 91 79 99
|
||||||
|
84 18 37 98 41
|
||||||
|
10 71 88 23 24
|
||||||
|
11 34 26 83 74
|
||||||
|
58 27 77 5 8
|
||||||
|
|
||||||
|
9 90 13 0 46
|
||||||
|
6 58 74 92 8
|
||||||
|
75 77 56 76 80
|
||||||
|
55 60 44 68 91
|
||||||
|
67 28 96 66 18
|
||||||
|
|
||||||
|
14 26 54 21 35
|
||||||
|
69 67 16 76 62
|
||||||
|
78 45 87 44 94
|
||||||
|
27 89 39 85 28
|
||||||
|
3 81 93 64 74
|
||||||
|
|
||||||
|
10 28 35 84 76
|
||||||
|
40 11 95 59 57
|
||||||
|
53 4 24 50 45
|
||||||
|
7 43 78 17 81
|
||||||
|
1 74 82 16 27
|
||||||
|
|
||||||
|
6 26 72 53 52
|
||||||
|
51 91 80 11 18
|
||||||
|
20 63 74 25 33
|
||||||
|
79 4 8 59 67
|
||||||
|
3 13 55 81 83
|
||||||
|
|
||||||
|
98 85 27 84 42
|
||||||
|
90 15 17 61 34
|
||||||
|
40 64 86 96 45
|
||||||
|
59 47 53 5 35
|
||||||
|
11 7 41 80 13
|
||||||
|
|
||||||
|
47 48 54 31 76
|
||||||
|
99 32 98 20 15
|
||||||
|
61 41 30 94 37
|
||||||
|
34 59 86 55 45
|
||||||
|
9 83 92 53 3
|
||||||
|
|
||||||
|
3 80 24 94 25
|
||||||
|
17 23 64 76 71
|
||||||
|
20 97 0 56 72
|
||||||
|
95 73 28 59 21
|
||||||
|
14 81 46 67 88
|
||||||
|
|
||||||
|
2 95 5 38 90
|
||||||
|
63 62 11 24 34
|
||||||
|
19 31 57 84 80
|
||||||
|
47 86 36 85 74
|
||||||
|
13 39 73 94 42
|
||||||
|
|
||||||
|
28 6 60 34 15
|
||||||
|
63 36 51 30 92
|
||||||
|
43 10 7 88 49
|
||||||
|
78 76 31 19 66
|
||||||
|
22 20 35 45 79
|
||||||
|
|
||||||
|
19 42 49 57 73
|
||||||
|
99 50 97 93 43
|
||||||
|
67 52 40 16 33
|
||||||
|
2 55 0 71 46
|
||||||
|
21 75 59 66 83
|
||||||
|
|
||||||
|
19 86 30 25 3
|
||||||
|
32 39 65 54 29
|
||||||
|
38 6 85 52 13
|
||||||
|
43 95 18 44 15
|
||||||
|
53 70 16 31 71
|
||||||
|
|
||||||
|
68 73 74 83 70
|
||||||
|
56 15 12 78 4
|
||||||
|
43 87 63 90 86
|
||||||
|
41 16 23 17 77
|
||||||
|
80 14 61 30 50
|
||||||
|
|
||||||
|
88 28 45 80 65
|
||||||
|
64 11 68 33 27
|
||||||
|
29 70 44 82 37
|
||||||
|
42 66 9 32 87
|
||||||
|
10 24 15 3 46
|
||||||
|
|
||||||
|
99 81 5 62 97
|
||||||
|
4 36 23 38 35
|
||||||
|
42 16 37 98 54
|
||||||
|
34 41 25 30 48
|
||||||
|
8 60 63 89 72
|
||||||
|
|
||||||
|
25 33 94 23 14
|
||||||
|
45 10 79 30 3
|
||||||
|
22 28 95 27 11
|
||||||
|
74 13 39 84 83
|
||||||
|
72 88 56 53 97
|
||||||
|
|
||||||
|
31 92 91 84 71
|
||||||
|
54 90 89 80 0
|
||||||
|
98 96 65 66 68
|
||||||
|
35 39 70 11 82
|
||||||
|
15 34 42 52 2
|
||||||
|
|
||||||
|
68 71 86 82 37
|
||||||
|
28 48 12 34 54
|
||||||
|
62 55 10 25 89
|
||||||
|
60 4 50 21 22
|
||||||
|
3 2 18 40 84
|
||||||
|
|
||||||
|
18 96 95 47 45
|
||||||
|
14 51 2 88 43
|
||||||
|
94 56 19 15 8
|
||||||
|
48 65 62 6 75
|
||||||
|
35 28 25 72 30
|
||||||
|
|
||||||
|
43 85 69 92 26
|
||||||
|
61 75 5 73 66
|
||||||
|
16 87 4 99 48
|
||||||
|
18 19 79 23 83
|
||||||
|
37 88 31 38 40
|
||||||
|
|
||||||
|
23 10 89 84 76
|
||||||
|
45 39 62 55 66
|
||||||
|
25 73 79 43 60
|
||||||
|
12 69 36 93 71
|
||||||
|
9 77 14 58 49
|
||||||
|
|
||||||
|
9 24 26 53 79
|
||||||
|
99 15 30 50 16
|
||||||
|
14 95 12 25 33
|
||||||
|
54 40 58 46 66
|
||||||
|
5 23 39 29 48
|
||||||
|
|
||||||
|
64 67 11 10 92
|
||||||
|
59 99 80 97 66
|
||||||
|
45 51 88 47 82
|
||||||
|
35 27 72 85 16
|
||||||
|
54 58 2 1 52
|
||||||
|
|
||||||
|
10 97 27 54 66
|
||||||
|
89 85 39 99 98
|
||||||
|
8 68 95 51 19
|
||||||
|
4 17 79 87 3
|
||||||
|
72 43 76 58 33
|
||||||
|
|
||||||
|
95 72 0 18 17
|
||||||
|
3 42 24 86 34
|
||||||
|
52 79 46 58 98
|
||||||
|
76 77 78 19 10
|
||||||
|
81 61 88 85 54
|
||||||
|
|
||||||
|
74 70 15 80 72
|
||||||
|
77 89 11 19 22
|
||||||
|
34 59 56 65 91
|
||||||
|
58 6 50 40 16
|
||||||
|
93 30 95 26 85
|
||||||
|
|
||||||
|
47 62 57 6 25
|
||||||
|
40 79 22 95 29
|
||||||
|
42 11 70 10 92
|
||||||
|
60 53 84 96 17
|
||||||
|
75 86 74 89 18
|
||||||
|
|
||||||
|
30 42 4 19 92
|
||||||
|
40 58 72 7 70
|
||||||
|
17 98 45 76 50
|
||||||
|
93 57 65 79 2
|
||||||
|
56 94 73 84 62
|
||||||
|
|
||||||
|
51 0 14 7 53
|
||||||
|
63 36 48 81 84
|
||||||
|
50 22 11 88 6
|
||||||
|
83 99 21 31 91
|
||||||
|
86 17 72 42 94
|
||||||
|
|
||||||
|
83 0 20 26 7
|
||||||
|
42 24 37 86 65
|
||||||
|
73 82 63 21 27
|
||||||
|
30 35 9 47 80
|
||||||
|
79 53 3 14 84
|
||||||
|
|
||||||
|
50 99 83 86 42
|
||||||
|
81 36 24 4 76
|
||||||
|
0 71 66 41 57
|
||||||
|
7 54 94 78 97
|
||||||
|
12 8 82 45 31
|
||||||
|
|
||||||
|
4 91 57 50 37
|
||||||
|
22 46 86 24 26
|
||||||
|
39 54 48 7 42
|
||||||
|
2 45 95 29 12
|
||||||
|
38 25 52 0 72
|
||||||
|
|
||||||
|
51 94 46 44 62
|
||||||
|
95 60 0 48 61
|
||||||
|
38 13 85 32 8
|
||||||
|
22 56 53 30 80
|
||||||
|
43 65 58 68 88
|
||||||
|
|
||||||
|
49 76 41 43 51
|
||||||
|
57 46 45 82 90
|
||||||
|
48 33 36 5 23
|
||||||
|
81 30 3 61 75
|
||||||
|
56 70 29 91 59
|
||||||
|
|
||||||
|
58 74 50 47 84
|
||||||
|
2 1 62 36 60
|
||||||
|
32 16 95 43 27
|
||||||
|
79 12 39 56 11
|
||||||
|
9 33 4 25 61
|
||||||
|
|
||||||
|
23 84 16 51 39
|
||||||
|
72 19 53 64 43
|
||||||
|
9 44 10 52 26
|
||||||
|
45 68 29 56 74
|
||||||
|
62 42 46 95 0
|
||||||
|
|
||||||
|
16 83 27 85 56
|
||||||
|
13 41 49 79 53
|
||||||
|
18 63 7 60 3
|
||||||
|
45 15 48 69 29
|
||||||
|
46 86 35 34 32
|
||||||
|
|
||||||
|
85 2 96 15 43
|
||||||
|
33 30 29 53 98
|
||||||
|
21 55 61 73 40
|
||||||
|
31 4 66 75 59
|
||||||
|
26 32 91 38 80
|
||||||
|
|
||||||
|
69 81 65 30 77
|
||||||
|
82 22 83 0 38
|
||||||
|
2 3 29 47 94
|
||||||
|
42 55 9 18 97
|
||||||
|
53 45 90 31 44
|
||||||
|
|
||||||
|
23 86 0 35 84
|
||||||
|
27 80 3 64 12
|
||||||
|
1 96 48 93 85
|
||||||
|
69 24 61 15 22
|
||||||
|
91 72 62 13 76
|
||||||
|
|
||||||
|
81 51 67 60 16
|
||||||
|
65 48 86 39 97
|
||||||
|
92 93 49 77 59
|
||||||
|
15 94 88 52 19
|
||||||
|
80 83 23 61 4
|
||||||
|
|
||||||
|
47 84 46 79 55
|
||||||
|
92 38 65 42 76
|
||||||
|
9 58 26 95 86
|
||||||
|
30 49 56 69 59
|
||||||
|
94 4 25 89 44
|
||||||
|
|
||||||
|
73 10 29 0 48
|
||||||
|
56 40 19 84 61
|
||||||
|
52 31 25 86 21
|
||||||
|
79 55 53 51 5
|
||||||
|
81 9 35 72 15
|
||||||
|
|
||||||
|
41 95 30 58 73
|
||||||
|
26 80 4 21 96
|
||||||
|
61 92 76 93 74
|
||||||
|
2 69 60 8 20
|
||||||
|
46 98 70 72 83
|
||||||
|
|
||||||
|
1 99 31 4 86
|
||||||
|
93 64 8 43 61
|
||||||
|
33 36 75 90 50
|
||||||
|
52 13 3 42 34
|
||||||
|
22 65 60 18 76
|
||||||
|
|
||||||
|
17 63 6 66 92
|
||||||
|
51 67 86 88 18
|
||||||
|
82 83 32 74 30
|
||||||
|
5 33 9 28 61
|
||||||
|
72 75 25 23 60
|
||||||
|
|
||||||
|
43 28 40 53 52
|
||||||
|
54 12 77 10 83
|
||||||
|
21 44 63 0 1
|
||||||
|
15 22 33 49 2
|
||||||
|
80 41 3 46 55
|
||||||
|
|
||||||
|
1 97 75 37 4
|
||||||
|
47 33 13 21 40
|
||||||
|
27 62 15 90 30
|
||||||
|
11 83 63 36 35
|
||||||
|
0 12 60 91 42
|
||||||
|
|
||||||
|
0 45 17 88 18
|
||||||
|
66 10 63 62 8
|
||||||
|
36 5 47 39 67
|
||||||
|
21 3 61 29 19
|
||||||
|
82 58 33 6 59
|
||||||
|
|
||||||
|
37 92 69 56 52
|
||||||
|
46 66 20 78 13
|
||||||
|
83 99 16 31 0
|
||||||
|
36 35 2 68 9
|
||||||
|
70 82 94 96 29
|
||||||
|
|
||||||
|
62 65 85 37 3
|
||||||
|
74 95 34 96 58
|
||||||
|
15 33 49 21 93
|
||||||
|
19 83 66 6 25
|
||||||
|
81 84 23 0 76
|
||||||
|
|
||||||
|
95 84 71 92 52
|
||||||
|
54 36 66 59 82
|
||||||
|
0 76 32 45 83
|
||||||
|
69 27 25 88 38
|
||||||
|
81 96 63 4 61
|
||||||
|
|
||||||
|
73 51 28 48 40
|
||||||
|
3 38 11 14 35
|
||||||
|
66 91 86 20 81
|
||||||
|
53 39 46 71 1
|
||||||
|
97 60 21 93 23
|
||||||
|
|
||||||
|
92 70 4 60 95
|
||||||
|
58 49 20 15 25
|
||||||
|
55 68 21 84 80
|
||||||
|
56 41 82 23 19
|
||||||
|
30 74 65 27 29
|
||||||
|
|
||||||
|
81 97 68 46 75
|
||||||
|
62 73 63 36 41
|
||||||
|
1 5 91 84 37
|
||||||
|
45 92 20 49 7
|
||||||
|
25 26 3 88 56
|
||||||
|
|
||||||
|
25 9 94 37 26
|
||||||
|
44 58 84 91 38
|
||||||
|
39 46 57 98 50
|
||||||
|
96 42 73 24 70
|
||||||
|
71 32 53 48 13
|
||||||
|
|
||||||
|
98 72 25 96 77
|
||||||
|
80 64 88 53 23
|
||||||
|
21 37 45 24 18
|
||||||
|
41 86 59 68 5
|
||||||
|
76 50 36 26 12
|
||||||
|
|
||||||
|
77 79 88 74 12
|
||||||
|
21 9 85 26 68
|
||||||
|
11 62 64 4 5
|
||||||
|
47 33 76 63 87
|
||||||
|
55 19 2 60 95
|
||||||
|
|
||||||
|
74 79 30 14 35
|
||||||
|
90 52 17 29 63
|
||||||
|
18 69 78 34 26
|
||||||
|
92 42 85 71 56
|
||||||
|
12 2 5 0 98
|
500
2021/full/day05.txt
Normal file
500
2021/full/day05.txt
Normal file
@ -0,0 +1,500 @@
|
|||||||
|
456,846 -> 221,846
|
||||||
|
980,926 -> 73,19
|
||||||
|
682,930 -> 562,930
|
||||||
|
766,592 -> 274,100
|
||||||
|
247,685 -> 247,21
|
||||||
|
106,800 -> 635,800
|
||||||
|
953,340 -> 135,340
|
||||||
|
293,223 -> 293,12
|
||||||
|
454,196 -> 454,463
|
||||||
|
886,766 -> 164,766
|
||||||
|
592,590 -> 192,590
|
||||||
|
436,982 -> 436,545
|
||||||
|
731,571 -> 420,260
|
||||||
|
741,11 -> 466,11
|
||||||
|
727,541 -> 579,541
|
||||||
|
341,553 -> 25,553
|
||||||
|
942,470 -> 942,196
|
||||||
|
203,600 -> 203,647
|
||||||
|
965,595 -> 949,611
|
||||||
|
554,306 -> 554,401
|
||||||
|
902,438 -> 902,728
|
||||||
|
864,609 -> 525,270
|
||||||
|
187,790 -> 187,323
|
||||||
|
956,950 -> 427,950
|
||||||
|
847,554 -> 422,554
|
||||||
|
935,900 -> 701,900
|
||||||
|
192,854 -> 866,180
|
||||||
|
512,946 -> 543,915
|
||||||
|
978,979 -> 491,979
|
||||||
|
708,61 -> 708,878
|
||||||
|
738,508 -> 282,52
|
||||||
|
23,25 -> 841,843
|
||||||
|
204,750 -> 204,797
|
||||||
|
703,500 -> 703,419
|
||||||
|
14,311 -> 694,311
|
||||||
|
646,301 -> 785,301
|
||||||
|
397,168 -> 439,168
|
||||||
|
680,931 -> 561,812
|
||||||
|
540,448 -> 90,448
|
||||||
|
706,668 -> 91,53
|
||||||
|
848,319 -> 318,319
|
||||||
|
198,948 -> 198,307
|
||||||
|
686,58 -> 686,541
|
||||||
|
867,234 -> 867,498
|
||||||
|
134,125 -> 134,688
|
||||||
|
824,566 -> 53,566
|
||||||
|
437,167 -> 276,167
|
||||||
|
94,65 -> 638,609
|
||||||
|
36,971 -> 971,36
|
||||||
|
494,330 -> 494,197
|
||||||
|
920,438 -> 920,364
|
||||||
|
698,84 -> 49,733
|
||||||
|
59,842 -> 59,876
|
||||||
|
328,577 -> 328,677
|
||||||
|
757,701 -> 134,78
|
||||||
|
466,274 -> 135,605
|
||||||
|
81,925 -> 988,18
|
||||||
|
40,142 -> 882,984
|
||||||
|
50,96 -> 882,928
|
||||||
|
782,47 -> 782,427
|
||||||
|
247,599 -> 24,599
|
||||||
|
112,812 -> 191,733
|
||||||
|
487,198 -> 144,198
|
||||||
|
327,663 -> 327,756
|
||||||
|
117,76 -> 688,76
|
||||||
|
530,71 -> 530,958
|
||||||
|
558,602 -> 671,489
|
||||||
|
677,830 -> 677,556
|
||||||
|
529,669 -> 349,669
|
||||||
|
336,966 -> 341,971
|
||||||
|
20,31 -> 851,862
|
||||||
|
423,880 -> 423,573
|
||||||
|
521,657 -> 552,657
|
||||||
|
412,822 -> 18,428
|
||||||
|
423,311 -> 423,105
|
||||||
|
381,614 -> 705,614
|
||||||
|
521,248 -> 394,121
|
||||||
|
286,47 -> 286,403
|
||||||
|
286,27 -> 711,452
|
||||||
|
347,61 -> 489,61
|
||||||
|
760,454 -> 760,954
|
||||||
|
746,573 -> 911,573
|
||||||
|
839,933 -> 839,776
|
||||||
|
124,815 -> 290,649
|
||||||
|
577,848 -> 419,848
|
||||||
|
393,206 -> 410,206
|
||||||
|
364,755 -> 881,755
|
||||||
|
788,68 -> 788,215
|
||||||
|
94,798 -> 192,798
|
||||||
|
292,250 -> 453,250
|
||||||
|
601,545 -> 293,237
|
||||||
|
438,923 -> 438,655
|
||||||
|
70,757 -> 887,757
|
||||||
|
184,402 -> 818,402
|
||||||
|
586,49 -> 103,49
|
||||||
|
202,315 -> 735,315
|
||||||
|
534,504 -> 534,523
|
||||||
|
367,236 -> 367,736
|
||||||
|
24,163 -> 24,240
|
||||||
|
185,426 -> 634,875
|
||||||
|
485,189 -> 39,189
|
||||||
|
556,30 -> 374,30
|
||||||
|
969,821 -> 676,528
|
||||||
|
254,435 -> 254,43
|
||||||
|
290,615 -> 741,164
|
||||||
|
345,601 -> 120,826
|
||||||
|
224,641 -> 887,641
|
||||||
|
190,716 -> 581,325
|
||||||
|
552,646 -> 552,393
|
||||||
|
413,177 -> 413,103
|
||||||
|
397,900 -> 360,900
|
||||||
|
138,980 -> 138,55
|
||||||
|
909,891 -> 909,593
|
||||||
|
926,986 -> 79,139
|
||||||
|
954,67 -> 53,968
|
||||||
|
180,30 -> 595,30
|
||||||
|
823,165 -> 823,660
|
||||||
|
285,176 -> 375,176
|
||||||
|
915,826 -> 184,95
|
||||||
|
735,230 -> 667,230
|
||||||
|
934,865 -> 917,865
|
||||||
|
48,602 -> 737,602
|
||||||
|
477,319 -> 385,411
|
||||||
|
981,17 -> 11,987
|
||||||
|
458,401 -> 24,401
|
||||||
|
118,415 -> 849,415
|
||||||
|
176,678 -> 176,852
|
||||||
|
567,753 -> 567,37
|
||||||
|
285,868 -> 830,323
|
||||||
|
555,623 -> 822,623
|
||||||
|
522,546 -> 674,546
|
||||||
|
880,21 -> 23,878
|
||||||
|
591,103 -> 591,407
|
||||||
|
434,64 -> 434,401
|
||||||
|
245,968 -> 275,968
|
||||||
|
726,510 -> 450,786
|
||||||
|
768,366 -> 768,738
|
||||||
|
488,745 -> 488,94
|
||||||
|
675,674 -> 675,705
|
||||||
|
618,237 -> 265,237
|
||||||
|
802,709 -> 802,59
|
||||||
|
144,696 -> 144,542
|
||||||
|
547,381 -> 547,799
|
||||||
|
78,667 -> 78,916
|
||||||
|
409,271 -> 302,271
|
||||||
|
294,694 -> 938,50
|
||||||
|
140,571 -> 97,571
|
||||||
|
682,875 -> 682,534
|
||||||
|
748,816 -> 748,183
|
||||||
|
84,622 -> 84,258
|
||||||
|
485,696 -> 582,599
|
||||||
|
909,233 -> 954,233
|
||||||
|
203,711 -> 203,350
|
||||||
|
335,904 -> 455,904
|
||||||
|
578,778 -> 578,21
|
||||||
|
830,954 -> 902,954
|
||||||
|
78,252 -> 78,682
|
||||||
|
920,220 -> 684,220
|
||||||
|
309,301 -> 104,301
|
||||||
|
270,795 -> 270,919
|
||||||
|
906,479 -> 304,479
|
||||||
|
627,164 -> 627,986
|
||||||
|
122,960 -> 915,167
|
||||||
|
664,916 -> 770,810
|
||||||
|
692,810 -> 826,810
|
||||||
|
981,951 -> 192,162
|
||||||
|
183,423 -> 809,423
|
||||||
|
632,464 -> 567,464
|
||||||
|
94,266 -> 94,587
|
||||||
|
261,770 -> 569,770
|
||||||
|
51,403 -> 466,818
|
||||||
|
631,645 -> 187,645
|
||||||
|
141,238 -> 141,145
|
||||||
|
357,21 -> 173,21
|
||||||
|
138,248 -> 839,949
|
||||||
|
889,957 -> 807,957
|
||||||
|
399,431 -> 105,725
|
||||||
|
548,331 -> 548,821
|
||||||
|
790,844 -> 43,97
|
||||||
|
675,671 -> 221,671
|
||||||
|
874,143 -> 620,397
|
||||||
|
205,435 -> 205,546
|
||||||
|
521,434 -> 822,133
|
||||||
|
141,86 -> 257,86
|
||||||
|
427,28 -> 290,165
|
||||||
|
49,694 -> 567,694
|
||||||
|
846,344 -> 266,924
|
||||||
|
425,910 -> 433,918
|
||||||
|
956,498 -> 485,27
|
||||||
|
798,498 -> 798,634
|
||||||
|
879,13 -> 766,126
|
||||||
|
737,475 -> 737,425
|
||||||
|
338,473 -> 425,386
|
||||||
|
510,615 -> 214,319
|
||||||
|
758,415 -> 758,490
|
||||||
|
969,208 -> 239,938
|
||||||
|
917,188 -> 917,528
|
||||||
|
34,820 -> 806,820
|
||||||
|
85,633 -> 857,633
|
||||||
|
262,355 -> 262,748
|
||||||
|
373,784 -> 971,186
|
||||||
|
146,577 -> 60,663
|
||||||
|
613,570 -> 613,199
|
||||||
|
300,319 -> 300,108
|
||||||
|
764,171 -> 764,17
|
||||||
|
555,921 -> 555,825
|
||||||
|
241,197 -> 770,197
|
||||||
|
600,832 -> 600,807
|
||||||
|
934,987 -> 20,73
|
||||||
|
960,730 -> 837,730
|
||||||
|
976,50 -> 46,980
|
||||||
|
829,834 -> 153,158
|
||||||
|
785,835 -> 785,58
|
||||||
|
586,633 -> 689,736
|
||||||
|
804,250 -> 348,706
|
||||||
|
226,539 -> 16,539
|
||||||
|
411,940 -> 98,940
|
||||||
|
289,589 -> 893,589
|
||||||
|
738,616 -> 738,55
|
||||||
|
225,54 -> 542,54
|
||||||
|
793,246 -> 303,736
|
||||||
|
332,752 -> 984,100
|
||||||
|
413,18 -> 839,444
|
||||||
|
840,122 -> 840,233
|
||||||
|
989,970 -> 215,196
|
||||||
|
329,361 -> 573,605
|
||||||
|
242,537 -> 242,619
|
||||||
|
943,898 -> 943,535
|
||||||
|
469,865 -> 501,833
|
||||||
|
226,717 -> 196,687
|
||||||
|
819,803 -> 712,803
|
||||||
|
532,663 -> 532,672
|
||||||
|
61,931 -> 940,52
|
||||||
|
623,218 -> 274,567
|
||||||
|
281,326 -> 281,790
|
||||||
|
815,176 -> 679,176
|
||||||
|
790,862 -> 942,710
|
||||||
|
18,771 -> 18,514
|
||||||
|
479,377 -> 309,377
|
||||||
|
704,402 -> 704,150
|
||||||
|
961,335 -> 492,335
|
||||||
|
745,829 -> 745,477
|
||||||
|
556,543 -> 771,543
|
||||||
|
832,336 -> 917,251
|
||||||
|
742,755 -> 742,174
|
||||||
|
206,735 -> 493,735
|
||||||
|
151,216 -> 312,55
|
||||||
|
445,157 -> 615,157
|
||||||
|
781,143 -> 781,76
|
||||||
|
833,717 -> 514,398
|
||||||
|
357,14 -> 357,36
|
||||||
|
771,405 -> 771,422
|
||||||
|
662,886 -> 169,886
|
||||||
|
689,990 -> 22,990
|
||||||
|
680,445 -> 379,445
|
||||||
|
92,369 -> 502,779
|
||||||
|
64,948 -> 64,363
|
||||||
|
295,957 -> 976,276
|
||||||
|
113,920 -> 634,399
|
||||||
|
542,662 -> 305,899
|
||||||
|
566,514 -> 566,645
|
||||||
|
528,106 -> 549,106
|
||||||
|
205,367 -> 821,367
|
||||||
|
313,105 -> 313,928
|
||||||
|
532,177 -> 532,664
|
||||||
|
862,773 -> 905,816
|
||||||
|
800,796 -> 911,796
|
||||||
|
870,80 -> 11,939
|
||||||
|
188,900 -> 154,900
|
||||||
|
420,509 -> 520,609
|
||||||
|
540,863 -> 28,863
|
||||||
|
31,72 -> 78,72
|
||||||
|
823,648 -> 503,648
|
||||||
|
879,252 -> 606,252
|
||||||
|
677,117 -> 677,507
|
||||||
|
743,303 -> 196,850
|
||||||
|
220,491 -> 220,891
|
||||||
|
216,815 -> 577,815
|
||||||
|
540,819 -> 745,819
|
||||||
|
152,721 -> 382,721
|
||||||
|
280,745 -> 985,745
|
||||||
|
479,367 -> 358,488
|
||||||
|
913,413 -> 649,413
|
||||||
|
40,678 -> 817,678
|
||||||
|
467,533 -> 467,214
|
||||||
|
132,68 -> 843,779
|
||||||
|
519,109 -> 669,259
|
||||||
|
619,791 -> 221,791
|
||||||
|
114,622 -> 628,622
|
||||||
|
951,636 -> 866,636
|
||||||
|
172,569 -> 775,569
|
||||||
|
244,972 -> 173,972
|
||||||
|
283,64 -> 739,520
|
||||||
|
68,604 -> 68,156
|
||||||
|
529,30 -> 529,925
|
||||||
|
813,883 -> 137,883
|
||||||
|
893,231 -> 629,231
|
||||||
|
673,658 -> 673,389
|
||||||
|
725,899 -> 218,899
|
||||||
|
317,318 -> 105,318
|
||||||
|
82,706 -> 100,688
|
||||||
|
222,227 -> 440,227
|
||||||
|
810,371 -> 810,985
|
||||||
|
414,321 -> 289,446
|
||||||
|
901,158 -> 260,799
|
||||||
|
198,967 -> 717,448
|
||||||
|
928,454 -> 875,454
|
||||||
|
974,437 -> 974,764
|
||||||
|
657,13 -> 760,13
|
||||||
|
498,966 -> 976,966
|
||||||
|
66,104 -> 66,15
|
||||||
|
773,569 -> 980,362
|
||||||
|
420,496 -> 403,513
|
||||||
|
57,920 -> 85,920
|
||||||
|
879,551 -> 879,662
|
||||||
|
98,395 -> 98,398
|
||||||
|
483,685 -> 483,55
|
||||||
|
222,935 -> 586,935
|
||||||
|
89,926 -> 807,208
|
||||||
|
744,160 -> 744,462
|
||||||
|
588,973 -> 588,548
|
||||||
|
312,572 -> 38,298
|
||||||
|
27,131 -> 552,656
|
||||||
|
591,935 -> 591,86
|
||||||
|
907,478 -> 907,279
|
||||||
|
981,75 -> 981,972
|
||||||
|
316,947 -> 935,947
|
||||||
|
906,38 -> 906,216
|
||||||
|
374,521 -> 345,550
|
||||||
|
579,29 -> 579,107
|
||||||
|
444,636 -> 444,557
|
||||||
|
458,608 -> 830,980
|
||||||
|
479,839 -> 155,515
|
||||||
|
766,600 -> 766,71
|
||||||
|
976,965 -> 31,20
|
||||||
|
928,49 -> 269,708
|
||||||
|
787,238 -> 787,983
|
||||||
|
583,742 -> 112,742
|
||||||
|
966,268 -> 554,680
|
||||||
|
671,354 -> 671,966
|
||||||
|
274,340 -> 274,894
|
||||||
|
673,185 -> 607,185
|
||||||
|
73,171 -> 874,171
|
||||||
|
861,526 -> 861,410
|
||||||
|
739,591 -> 739,138
|
||||||
|
209,355 -> 209,146
|
||||||
|
286,501 -> 887,501
|
||||||
|
495,902 -> 700,902
|
||||||
|
192,889 -> 821,260
|
||||||
|
400,21 -> 154,21
|
||||||
|
861,301 -> 325,301
|
||||||
|
552,990 -> 511,990
|
||||||
|
908,21 -> 11,918
|
||||||
|
127,724 -> 821,30
|
||||||
|
935,46 -> 170,811
|
||||||
|
947,91 -> 374,91
|
||||||
|
625,420 -> 265,60
|
||||||
|
214,228 -> 546,228
|
||||||
|
375,547 -> 715,887
|
||||||
|
516,350 -> 870,350
|
||||||
|
610,138 -> 665,193
|
||||||
|
214,621 -> 678,621
|
||||||
|
497,248 -> 600,145
|
||||||
|
549,558 -> 576,558
|
||||||
|
364,537 -> 364,312
|
||||||
|
840,324 -> 310,854
|
||||||
|
441,945 -> 441,458
|
||||||
|
459,531 -> 459,100
|
||||||
|
937,113 -> 150,900
|
||||||
|
277,405 -> 259,405
|
||||||
|
409,527 -> 409,359
|
||||||
|
534,766 -> 534,740
|
||||||
|
534,934 -> 681,934
|
||||||
|
456,419 -> 83,419
|
||||||
|
871,986 -> 873,986
|
||||||
|
14,59 -> 916,961
|
||||||
|
911,963 -> 971,963
|
||||||
|
25,325 -> 139,211
|
||||||
|
937,184 -> 354,767
|
||||||
|
460,416 -> 289,245
|
||||||
|
193,171 -> 861,839
|
||||||
|
840,299 -> 840,911
|
||||||
|
531,45 -> 531,619
|
||||||
|
599,315 -> 455,315
|
||||||
|
455,97 -> 455,811
|
||||||
|
38,748 -> 392,748
|
||||||
|
841,79 -> 841,88
|
||||||
|
105,571 -> 105,545
|
||||||
|
801,458 -> 344,458
|
||||||
|
491,535 -> 558,535
|
||||||
|
835,814 -> 223,202
|
||||||
|
563,85 -> 405,85
|
||||||
|
410,396 -> 600,396
|
||||||
|
273,670 -> 818,125
|
||||||
|
671,647 -> 817,647
|
||||||
|
46,892 -> 678,260
|
||||||
|
456,736 -> 110,736
|
||||||
|
962,941 -> 619,598
|
||||||
|
388,406 -> 53,71
|
||||||
|
558,895 -> 227,564
|
||||||
|
944,182 -> 807,319
|
||||||
|
484,898 -> 59,473
|
||||||
|
808,214 -> 488,534
|
||||||
|
451,679 -> 155,383
|
||||||
|
858,931 -> 381,931
|
||||||
|
723,377 -> 723,281
|
||||||
|
694,283 -> 182,795
|
||||||
|
385,191 -> 320,256
|
||||||
|
33,380 -> 584,931
|
||||||
|
480,91 -> 817,91
|
||||||
|
677,91 -> 677,126
|
||||||
|
291,651 -> 760,182
|
||||||
|
832,962 -> 153,283
|
||||||
|
38,60 -> 479,501
|
||||||
|
249,350 -> 789,350
|
||||||
|
603,341 -> 266,678
|
||||||
|
52,303 -> 52,102
|
||||||
|
911,201 -> 559,201
|
||||||
|
46,210 -> 46,275
|
||||||
|
960,212 -> 554,212
|
||||||
|
375,374 -> 169,580
|
||||||
|
10,10 -> 989,989
|
||||||
|
844,140 -> 40,944
|
||||||
|
916,408 -> 916,815
|
||||||
|
834,401 -> 834,169
|
||||||
|
553,479 -> 784,248
|
||||||
|
543,452 -> 543,848
|
||||||
|
854,910 -> 334,390
|
||||||
|
685,491 -> 793,491
|
||||||
|
552,943 -> 709,943
|
||||||
|
723,367 -> 124,367
|
||||||
|
95,55 -> 881,841
|
||||||
|
155,267 -> 573,267
|
||||||
|
59,357 -> 84,357
|
||||||
|
218,435 -> 218,344
|
||||||
|
491,584 -> 491,649
|
||||||
|
676,445 -> 676,333
|
||||||
|
361,618 -> 783,618
|
||||||
|
220,295 -> 220,267
|
||||||
|
668,758 -> 299,389
|
||||||
|
965,845 -> 674,845
|
||||||
|
285,603 -> 47,603
|
||||||
|
853,417 -> 853,757
|
||||||
|
859,906 -> 856,906
|
||||||
|
55,364 -> 753,364
|
||||||
|
893,474 -> 978,474
|
||||||
|
602,32 -> 58,576
|
||||||
|
171,445 -> 96,370
|
||||||
|
214,592 -> 214,286
|
||||||
|
400,946 -> 745,946
|
||||||
|
559,37 -> 112,484
|
||||||
|
624,510 -> 90,510
|
||||||
|
329,714 -> 329,850
|
||||||
|
458,287 -> 657,287
|
||||||
|
99,385 -> 99,949
|
||||||
|
50,736 -> 719,67
|
||||||
|
273,195 -> 273,306
|
||||||
|
490,902 -> 490,798
|
||||||
|
619,131 -> 921,131
|
||||||
|
266,652 -> 266,730
|
||||||
|
745,661 -> 745,555
|
||||||
|
311,878 -> 311,679
|
||||||
|
491,982 -> 643,830
|
||||||
|
735,875 -> 816,875
|
||||||
|
936,353 -> 936,529
|
||||||
|
792,467 -> 565,467
|
||||||
|
141,140 -> 141,988
|
||||||
|
98,171 -> 414,487
|
||||||
|
257,259 -> 257,484
|
||||||
|
24,41 -> 969,986
|
||||||
|
302,453 -> 223,453
|
||||||
|
807,363 -> 492,678
|
||||||
|
823,22 -> 835,10
|
||||||
|
301,94 -> 399,94
|
||||||
|
946,110 -> 248,808
|
||||||
|
983,985 -> 21,23
|
||||||
|
510,145 -> 510,58
|
||||||
|
13,661 -> 13,639
|
||||||
|
218,260 -> 218,54
|
||||||
|
475,846 -> 475,770
|
||||||
|
458,644 -> 458,529
|
||||||
|
912,934 -> 912,136
|
||||||
|
152,823 -> 550,823
|
||||||
|
136,470 -> 443,470
|
||||||
|
253,871 -> 905,219
|
||||||
|
765,212 -> 793,240
|
||||||
|
11,402 -> 11,42
|
||||||
|
348,813 -> 348,768
|
||||||
|
368,321 -> 823,776
|
||||||
|
343,495 -> 343,809
|
||||||
|
117,616 -> 117,273
|
||||||
|
92,92 -> 732,92
|
||||||
|
914,31 -> 28,917
|
||||||
|
259,944 -> 214,944
|
||||||
|
630,759 -> 462,759
|
||||||
|
134,653 -> 134,610
|
||||||
|
14,989 -> 988,15
|
||||||
|
139,181 -> 139,451
|
||||||
|
598,636 -> 598,442
|
||||||
|
263,42 -> 686,465
|
1
2021/full/day06.txt
Normal file
1
2021/full/day06.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
3,1,4,2,1,1,1,1,1,1,1,4,1,4,1,2,1,1,2,1,3,4,5,1,1,4,1,3,3,1,1,1,1,3,3,1,3,3,1,5,5,1,1,3,1,1,2,1,1,1,3,1,4,3,2,1,4,3,3,1,1,1,1,5,1,4,1,1,1,4,1,4,4,1,5,1,1,4,5,1,1,2,1,1,1,4,1,2,1,1,1,1,1,1,5,1,3,1,1,4,4,1,1,5,1,2,1,1,1,1,5,1,3,1,1,1,2,2,1,4,1,3,1,4,1,2,1,1,1,1,1,3,2,5,4,4,1,3,2,1,4,1,3,1,1,1,2,1,1,5,1,2,1,1,1,2,1,4,3,1,1,1,4,1,1,1,1,1,2,2,1,1,5,1,1,3,1,2,5,5,1,4,1,1,1,1,1,2,1,1,1,1,4,5,1,1,1,1,1,1,1,1,1,3,4,4,1,1,4,1,3,4,1,5,4,2,5,1,2,1,1,1,1,1,1,4,3,2,1,1,3,2,5,2,5,5,1,3,1,2,1,1,1,1,1,1,1,1,1,3,1,1,1,3,1,4,1,4,2,1,3,4,1,1,1,2,3,1,1,1,4,1,2,5,1,2,1,5,1,1,2,1,2,1,1,1,1,4,3,4,1,5,5,4,1,1,5,2,1,3
|
1
2021/full/day07.txt
Normal file
1
2021/full/day07.txt
Normal file
@ -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,82,1266,26,290,428,9,676,880,16,340,1578,839,23,32,721,88,837,118,543,198,836,870,105,44,214,184,52,330,213,1224,1211,481,1707,409,78,1096,995,420,808,50,65,635,1186,228,5,359,290,1241,757,323,11,447,522,8,170,265,632,321,9,1707,1005,1194,466,137,982,905,373,158,601,247,373,202,432,168,694,785,568,144,576,1006,143,1506,298,1790,146,182,535,895,42,296,278,469,118,292,1375,206,235,1545,63,81,49,1405,660,41,1009,226,133,324,1250,113,10,687,223,78,10,745,21,55,1041,149,519,57,589,123,901,416,200,112,35,6,873,353,539,665,75,207,80,787,322,1026,178,19,630,12,263,1136,71,220,143,688,101,88,1600,16,141,55,64,436,19,889,267,470,884,31,546,846,601,15,84,399,83,1054,4,1417,766,525,162,640,73,2,110,189,494,85,44,263,618,583,263,591,1139,21,1593,187,115,520,142,887,3,12,565,78,88,114,803,157,307,1007,1365,1063,1481,431,410,125,19,1123,3,433,73,273,25,438,314,111,369,1188,526,516,509,1,186,143,1335,689,436,1002,260,791,12,36,380,80,306,173,45,24,856,1892,255,11,12,1221,422,8,1214,327,851,85,375,115,325,213,725,720,669,465,577,1,28,331,123,297,267,1586,478,259,572,204,365,461,618,364,5,630,377,26,259,331,956,164,89,115,1328,823,48,625,922,236,577,1113,251,156,846,261,500,73,1607,281,267,64,2,392,115,682,1833,861,1093,1165,52,1643,59,180,787,298,274,304,381,196,511,352,793,1043,984,30,85,190,109,276,303,251,1601,939,726,5,213,915,235,780,43,1212,1466,353,364,507,129,1109,1307,113,109,342,756,898,1015,63,949,127,887,175,91,409,1069,88,600,101,434,1021,477,1073,22,549,145,712,730,160,7,123,27,566,689,172,1496,543,154,345,442,3,860,47,69,319,487,17,1086,1305,329,788,738,688,421,139,1629,499,824,276,13,1033,885,522,140,328,113,311,297,252,33,168,1059,94,469,1816,2,107,149,652,350,200,173,367,100,229,219,400,43,283,1551,752,278,99,648,190,190,337,44,191,462,454,544,261,142,1204,231,924,209,858,768,211,223,186,1452,687,320,343,444,94,1231,285,324,431,36,309,705,672,69,1082,83,269,515,369,117,951,489,117,249,47,350,1408,93,203,800,1151,526,785,721,240,74,605,501,533,512,337,12,720,787,1521,894,112,187,170,1020,339,77,565,691,1141,129,1020,60,505,1383,178,1262,1302,750,743,1108,43,634,135,738,810,628,1807,938,530,61,1384,42,79,276,336,1434,1286,393,145,9,94,945,113,76,88,856,78,1750,499,994,527,1102,266,1164,796,143,726,480,357,577,910,460,448,379,402,1576,1353,257,1044,651,1206,44,126,353,1099,934,892,379,710,988,1041,367,116,377,546,1222,830,259,10,6,385,856,343,793,490,165,367,1022,1065,95,135,426,184,270,227,456,673,90,1363,1127,387,93,138,202,184,1071,134,15,813,134,200,80,144,128,1502,574,868,487,118,42,48,1135,1107,57,418,1093,1508,229,26,154,652,94,1254,171,502,407,276,1098,18,1000,345,150,123,211,1517,1005,590,1413,63,80,510,502,76,476,47,405,186,143,344,286,1277,934,64,512,12,1026,264,68,1420,10,245,10,352,6,585,567,48,428,816,1525,180,346,350,34,100,42,1354,699,265,445,1719,425,8,604,129,111,71,110,1170,703,36,317,198,104,655,95,1046,327,161,853,400,224,797,1221,794,684,321,1279,1,95,1253,671,203,43,220,55,90,1606,359,52,775,76,422,403,305,614,196,244,102,519,122,451,1610,79,709,336,1374,735,478,1123,658,906,615,688,561,518,39,1084,608,54,739,416,1648,1838,1280,1039,35,552,299,142,56,1217,1356,30,12,102,731,1343,224,452,304,1808,546,583,710,33,149,1126,565,314,745,22,115,263,813,113,52,308,944,981,441,544,129,1258,299,885,717,536,253,3,612,29,130,1099,1455,38,501,578,13,347,729,166,772,230,518,488,430,1093,140,16,120,1603,794,174,1361,1657,825,444,176,815,1353,469,264,191,988,12,104,11,1518,1096,347,606,350,18,1376,430,182,1229,131,111,731,174,111,304,715,35,410,701,78,46,390,291,1008,1779,620,2,1378,199,331,334,708,446,1141,773,159,702,716,13,582,161,259,90,180,607,539,611,312,622,151,522,921,150,522,273,421,842,111,21,159,148
|
200
2021/full/day08.txt
Normal file
200
2021/full/day08.txt
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
fdeba beagfd gbafe dagb dbf ecfad bd dgcaefb fbecgd abfecg | dgba dfb ecadf bdf
|
||||||
|
dgfc egdbaf afgcbe eafdbcg bcgad bdg fdbacg gd ecabd bafgc | gd gbd dg febgac
|
||||||
|
dfebc bceadf ebacf gdceb fd dfea cdgfba afbgec dfb fdaecbg | cgafbde efbagc faed gecdb
|
||||||
|
dbaef fabgd fcaedb cgadf aefbgd cabefg gfb bceagdf bg ebdg | gdbfae geafdbc bafgdce dbgfa
|
||||||
|
aebgd adg dg dgcabef facedg cfaebd dfbega begca bfgd dbafe | abdecf eafbd fdgb ebdfgca
|
||||||
|
bae febac abcgf eabfgd cbagfd gefcba abedfcg efcda eb becg | fcgab gafbed aedcfbg eb
|
||||||
|
edbcg ba afcdeg gbaedf gcabdf eabf bagde bga deabgcf edfga | aebf ab bdfecag abfe
|
||||||
|
dbae dgfec egfbd fbgaed feb fcabdg be bfgda facebgd baefcg | bagecf efb eb fbcgad
|
||||||
|
cdagbef cd bdgcf efcbg adbgf cdga egdabf acbdfg cdf caebfd | fbdga fcd fcd adcg
|
||||||
|
abceg dbgca acfd ebagfdc dbecfg gdfbea dc dcg abfdcg gfbad | cdg dbcagf acdf gbcdef
|
||||||
|
bcdag acdgbef ebcdag facd dfgbe cfg bfagdc fc fbcgd bgfaec | fc dafbcg fc cbdgae
|
||||||
|
ca feacgb cedfgb bgaed gbaec acefdgb bfcge eafgcd acg fbac | ca cag gac becga
|
||||||
|
gbdcfa afdcb cebd fadce cbgfdea aec cdebfa ce caegfb daegf | aedfbgc eca eca cebd
|
||||||
|
cb dcb fdbegc bgaed fcba dacgfe efcadb dceaf eacgfbd dbaec | cbd cb bagde dcb
|
||||||
|
debgf gaecdfb gcbef cbgaf fbecag bce bgfcda ce aefc ebdgca | ebcfgad ec gefcba bec
|
||||||
|
cdbfega ae cedaf bedgcf ebac efadbg afcedb afe fgadc cdfbe | fabedcg cafbed efa badgcef
|
||||||
|
aceg bcafgde deacgb fdcgab dacgb eafbcd dgcbe bdfge bce ce | dbfge bdcafg fbdcga ebdfg
|
||||||
|
efcbda fcgbe efdgc efgdcab cagbe cbf bagf ecagdb bacefg fb | fgab aecgb acfgbe agecfbd
|
||||||
|
bcgd egafb adgbcf cafged cegadfb gd dgf dbfag dfeacb dcabf | adbcf dg gd dgf
|
||||||
|
bgeca fgcbe fcgd egfbd bcgdfe fc agbdef ecf dafgecb bdafec | fc febdag cgfd dfcbgae
|
||||||
|
agb dbfa gbafcde afgcbe edfgb bagde cfdegb gbdefa ba caged | bdfa bafd cfdgeba agb
|
||||||
|
bdf baefcdg df cafbgd bdcgef bcdeag bcgad cadf gfbad fbeag | ebacfgd facd cdgfbe df
|
||||||
|
edagc egbcfad bcfdge agbdcf fbdage dcabg bga bgfdc fbca ba | cebgfda gdcfabe gfcdba bag
|
||||||
|
bgaf af bcdfge ecfagd fgcdb beacd gdecbfa bcafd fac bfdgac | bagcedf fbedgc ebfgdc gbfa
|
||||||
|
fagbdc fagdeb cebgf cbd ecagdb cade dagcebf dc becdg geabd | gfbadec cdae dbc bcefg
|
||||||
|
dgfbeac abfge dcefag cga cgbd baced gc adfebc ecbag aedgbc | bfcaged gac gebaf egdafc
|
||||||
|
cfdbe afge fa gdfbeca agfcbd abedgc fac cafbe ecfgab acgeb | adcfgeb bcadfg ebfac cfa
|
||||||
|
gebdcf cdbga eag ae dagecbf bgdfe ebgfad gabed dagfec feab | fadgecb fgbced dgcab ega
|
||||||
|
gf gcbaf gfdc agf eafcb cadebfg cgfabd dbagc agdcbe egfbda | gf beafc fga fcgd
|
||||||
|
cbed ebgad gadbfe bc bcfgea gebacd gceadfb cgfad cbg abcgd | bacdg afbegdc bgc bcagdfe
|
||||||
|
fdg dg acgfdbe gafdec cfbdg ebfgc gdeb bdcgef fbegca fbdca | fdg edbg edbg cgfbe
|
||||||
|
gfcbaed gfceda cadbg gafdb ca adc fbca dfcabg cedbg aegfdb | ca becadfg dcefga ca
|
||||||
|
agfcbd edcabg cdf cdgfabe debgcf fdgca bfac gdcab cf gedaf | fc cdf cf bcagdef
|
||||||
|
cdagb bae ea cdfebg febacd egdfb gdacfbe feag aedfbg gdabe | ea gefa agbde afge
|
||||||
|
dab cgaedb cafbg faced bdfe bd gfdeca dafgbec fcbda cadbef | db edfb bd dcafe
|
||||||
|
bde cbaed dcbf ecbag fcbdae acgfde dgafebc db fbdgea dacfe | cadbe bcdf afebdg dcgfea
|
||||||
|
ag fgaecd egcbdaf ebacd gad dagbfe cfga fcegd dcbgfe gaced | dag ag gda gacf
|
||||||
|
fdaegb dcgefa bfdec geca ge fge cdbafg decbgaf ecdfg cagdf | gdefc cgea dfacgb gedbaf
|
||||||
|
ecgfab cgbdea dgabf dcfb bd dgcabf fgdeacb dba efagd cfabg | dab adb bfdc fcdbag
|
||||||
|
dfcae cfegbd ade cdeabg egacdf gcfde da becfadg agfd efcba | ade aed dfga ade
|
||||||
|
fdgeab adcbgfe edfca cebad gdbace dgcb beafgc bac cb gdeba | bdcea bgdc dagcfeb abc
|
||||||
|
cabdge fdgae fbgc fedgcb gfebacd dfbeg bf bdf ecgbd adecfb | fb aegfbcd bdf fbacged
|
||||||
|
dfbgec feacgdb ca adgec cda ecba gdaef degbc abfdgc gdceab | ca dabfegc ca acdeg
|
||||||
|
abd fbagec gfdbea dagc ad fcdbega bafcdg facbg ecbdf fbcad | edfagb bcedf dba fbdcag
|
||||||
|
abf ebfdcg fgcdbae faegc bdgacf bfdec bade ceafdb ba eacbf | fab fbdaecg dcabfg ba
|
||||||
|
ebcgf aedcb gbaecfd gd cgdeb cadfeb edga bdfgca cbgead cdg | adge fgbec cgd dgbcfa
|
||||||
|
gdcaef dcgbe fbcdage bacge aec ea bfea bcafg aegbcf cfdgab | bfea gfecadb gbafc gedafcb
|
||||||
|
facg aebfg ecfba bfaecd fbdge badcfeg cfgeba ega cadebg ag | fgca bdgef gafc acgf
|
||||||
|
dacefg eb bdecf acbfge ecb bfcda decgf cgdebaf cbfgde gbde | bdge ecbfgd feacbgd efdabcg
|
||||||
|
bd fbd bfcgde egbaf dafgceb cefgda fcbdae dfgeb gcdb cgfde | dfbceag bd fgbdec gdbfec
|
||||||
|
gbdacf dacebf adgfbe aedfb acgbedf eacf ca dac aedcb bedgc | ca cad fcbdaeg bdagcf
|
||||||
|
cbd egdba ebfdga efadc gcdfabe bc decbga dbaec gfbecd bcag | cdb egdba acbg acgb
|
||||||
|
eacb fdeab fgcade cbdaf dea cfebgda ae bdegf cebdaf fgdcab | ae facbdg bdfecga baec
|
||||||
|
cfd adbce cf bcdafg fcedb cbedfag fdgbe faegdb fceg gdcbef | fegc cf gfdabe adbcgf
|
||||||
|
gfbdeac efdgac gcfb edbagf cebda cafeb abf cgfeab bf gacfe | abfce cadefgb abf abfce
|
||||||
|
dcfge fabgec beg abdg gbaedcf gcdbe bg ebcad cfdaeb ebagcd | bgdaec gbe gb gb
|
||||||
|
aecb daefbg ebdfc aedfcg efbad cdgabfe cfgdb fdbeca ce cfe | fce ce aceb ec
|
||||||
|
gadebf fg fga acbgfe agbcd deabf bdagf cedbfa dbafceg dfeg | fg afg gaf fg
|
||||||
|
afed cdbge dag gabfe fagbde gadbcf adebg ad agfecb gedfabc | da geabf fgcbad gad
|
||||||
|
de gcdeaf agbcedf efacg gdcea efgacb edc fegd adcgb daecbf | edc ecd de dgceaf
|
||||||
|
becadgf edagfc fcg edbagf cg adfgcb dfega acgfe gecd bfeca | cgf cg gcde cg
|
||||||
|
cfaed agcedf db dfcbe bcd dbefca dcbgfa gbecf dcaegfb bdea | dagbcef bcd fegcb eabd
|
||||||
|
fcdagb ca aedfcgb fca gafbd abegfd afbcg fbgce aefcbd acdg | acf adcg efbgc ca
|
||||||
|
da dcefgba cdgef egcabf baed fagbcd fadbge dag faebg agedf | fcegab abde gad dbgfae
|
||||||
|
fbdec cdaeb dac dbage egca ecbdgaf debcga ca abdgfe dagcbf | efbcd adgefbc gbefacd ca
|
||||||
|
bfdecg dbaecg fcd bedaf fc dcbafg cegf fcdeb cbdfage bcdeg | egcf fbade cfd dbafgec
|
||||||
|
cg cadegb badfce gfdc agfbc cadbf egafb dbecfag cbg dagcbf | bagdcf fgcbda cbg dgcf
|
||||||
|
acgbf afbged fcadgb dcefg gebcaf ad adcb acdefbg cdgfa daf | dgcefab egbfacd gabefc cdab
|
||||||
|
dgb ecfbd fbgcd aegdbcf adcfg gfba gbaced acfgde fcabgd bg | dbg gb efdcb dbgcae
|
||||||
|
febg bcfaed efagdc fba ebafgc aecbgdf fegca bcgad bf acfbg | febgacd bfeg afb fb
|
||||||
|
adc ebdfacg ad badec efbdcg fade bcgdaf faedbc baecg cbfde | da edgbcf da edfa
|
||||||
|
afbgd agdcef dc cda bedcag cgaefb fdec cgfae fgadc deabgfc | cd cfage cedf fecd
|
||||||
|
facbe edcbf ebdgac fa dfgeac gaebc acf cfaegb dcfegba bfag | ebfac gcebad fac fa
|
||||||
|
cfebdag daecfb bg gecbdf ebagc ecagd gbe abfgec gabf ebfac | gbe afcbe gecdabf gb
|
||||||
|
bgefdca fecbgd ec bce cedab ecaf bdeafg cgbda dbaef bcfdae | bfecgd cefa fdeabc ce
|
||||||
|
gedbac cbade edfgbac gabfe cfaeb caf fc dcbf cdfbea cdefga | acf dafcbe cdfb dfabceg
|
||||||
|
cfgaed cbda abgfde cea abcdfeg adcgbe ac fcbge egdab eagbc | bcda ac ac ac
|
||||||
|
cbfaged afdgec ed fdea edcfg dce fdgac bfdagc fecbg ebcdga | fcabgd bfegc fcedag gfdabc
|
||||||
|
gafec afegb bgafed bafd fb egbda edbgac cedgfb ebf bedgfca | cgefbd bef edcgfb fb
|
||||||
|
cf gfc fecgd cebf dgecbaf faedgb afbgcd dcaeg efbdg dbcefg | fecb edfgcb ebgafd bfadgc
|
||||||
|
ea gafecd fbgac fcedb defcab fbeca bfdcge baed dabfceg fae | gbefcd ebda beda fae
|
||||||
|
afdgb acg aefdgc cebgd ac begdfac dacbfg gbcad abgfde cfab | abgdc abcf bacf ca
|
||||||
|
cdbga acedbg gefcd abdf fac af bfgaec ecfagdb gfdac bcdfag | caf bfad fa caf
|
||||||
|
edcagf feadg dab adgeb gceab dgfabc fdbe befcadg fagbed bd | dab dgabef dgebcaf bd
|
||||||
|
bga baedg abdc ab gefdb gadceb gcdae aedgcbf gcebaf cfdega | gab cdab dagcfeb dafebgc
|
||||||
|
afb eabdgf eafgcb gcdabe ecfa edbgfac fbdgc fa bacfg ceagb | cefa fab baf aebcgfd
|
||||||
|
da gdbcef facdeg dafbc efdcb adc edba gbcfa acdbef deafcbg | da ad defbgc ad
|
||||||
|
acbg ecbdg ecbgfda gdabec bg daefbc cefgd dceba dgb afebdg | bg edfcg gb efcgdab
|
||||||
|
dgbeca befcd gcfaed edgac agefcbd ceadb ba abe gcba daebgf | aeb acbg efgadc becgda
|
||||||
|
cgbafde ed bdce gde bdaegc eagbfd cgbad eadgc facbgd cgfae | gfdacbe fdegacb de deg
|
||||||
|
deacfbg afc dfcea cgaed gdbcea cf dcfg fbeacg gdfcae baedf | dbcaefg fdcg acgdebf gdfc
|
||||||
|
gca fagdbe cedbgaf dgbc gdaec badeg edafc gc abedcg afbgec | gac dgbae gdcb bgdc
|
||||||
|
cdfeab dbcfa bdg bg fgbc adcgb gdfeab ecgbdfa gdeca cfadgb | bedgacf acbdfg gdb bg
|
||||||
|
gbfec bgfde gacedb fcgea cb cgeafd bcg aebgcf gdaebcf afbc | cafbge abfc adbgfec bcg
|
||||||
|
edgf bcgef edcgfb gfcabd fbdcae ef efc acebg gcbdfea fgcdb | fdge fe dabcfg aefdcb
|
||||||
|
cdbafge agdebc bcg dfbgac cged ebagd degafb bfcea gc caegb | bcg edbga fcgdab debga
|
||||||
|
ea dagfbe fae fcdgbe gfaecbd decfb dacbfe abec gdafc caedf | defcba ebgdafc ceab gbcafde
|
||||||
|
dg cefga bfaed fdecgb bdag bdaecfg fgedab edg adfecb efdag | dgab gfcae bedgfc cgfdeab
|
||||||
|
degcfb bdcfg edgb cdfab bcadgef fgcdea gdf becfg dg egfbca | gd ceabgfd efcbagd bedg
|
||||||
|
dfbg bcgeda faecdg dab bfaec dbegacf geafd eabfd agbfde db | dab adfegbc db bd
|
||||||
|
ecfagdb db gadecb dagfb caefgb gbd fbeag facgd bdfe efadgb | bfedagc db dgb cagfd
|
||||||
|
edbcga fcdgbe ebcdg bcfage fb bfcgd bgf gcdaf bgfcdea fbde | dgcbf fbg gbf fdgcb
|
||||||
|
efagd eb dafcgb ebfad eabdgcf cbed aecfbd egbcfa feb adcbf | be eb eb bfe
|
||||||
|
bdge fdabce begfcd gcbdf bd ebfgc fadcg dagecbf dfb bcafge | gfacd dbf bgcaedf dgfca
|
||||||
|
geacf cfb gbfcde dfbga bc fbadgce fgdcba cabgf fdaegb dacb | dfagcb cafdebg acfbdg fcdgeba
|
||||||
|
fecdbg gbcaf ebgacfd acgfed gbad gb fbaec afcgd bafdcg fgb | gcbefd egfdbc fgb fgb
|
||||||
|
fdce ebagf fdcegb fgacbd dcbeg geadbc cf gebcf gabefdc cbf | edfc cfdgab decbg fc
|
||||||
|
adcfeg cfgad efgcdba fecda fec gabcdf ef bacde bfdceg gefa | ef edafc ef fgcdab
|
||||||
|
afeb fbegd daefg agdbcfe agdcf ega adbegc dbgafe efcdbg ae | abedcg efbgcd fgcad cdegba
|
||||||
|
fdegbca gefbda egbf dbagc gfd bgdaf adgfec fg bfead dfceab | fdg abcdegf gadebf decfgba
|
||||||
|
dbcaef debfgc gfebdca bcaed ad baceg dca deaf edfbc dagcfb | acd dafe fbdecg adef
|
||||||
|
beadc fc faedc dbafeg gdfea gafc fegcad cgebadf dfgbec fcd | cdf deacgf gefda cf
|
||||||
|
fdaceg edgacb dbcg cda cd ebfad acbeg gdfbace dbaec bcfeag | deabf bcgd cdgb defgca
|
||||||
|
fgcebd dgbcae bfcgad ga bga bfcgd gbfda acfg dbafe fbcgead | bedcgf dbfgc gfac acfbgd
|
||||||
|
cfaebdg dcg gedbfc gefdba egafcd dc cbde bedfg bcgdf cabgf | dbacfeg feadgb dcbgf fbgdae
|
||||||
|
fagcbd fedbg fcabge ebgad cbfdg cfedgab feb fdce dfcgeb ef | cfde fgedb bdgecf ef
|
||||||
|
becgdf efcbda cgbd gdcfe gc gaedf efbcd cfg fbegcad gbfcae | fcg cdefbg gafed efadg
|
||||||
|
da adbcgef dacf eadfcb bfcage eafbc ceabd begfda bdceg bda | da da acbedf bagcfe
|
||||||
|
agebf adfb fabedg cgafde dga beadfcg cdbeg egbad cfabeg da | dfegba dafgbce egdbc fecbdga
|
||||||
|
eac fcdabeg gdabc ebadc bcge gfecad deafb bdgfac dgaecb ce | cea ec cegabdf gadcb
|
||||||
|
gfedbc gcdfb ecdfga df cfegba defb dbcga gdf cgfbead ecgbf | facbged dfg bfed cfbedag
|
||||||
|
agbde bgdfca deacgb agbef aebcgdf afg fbecg aedbfg afed af | daef fga fga gdefab
|
||||||
|
gfbac gaecdb baefc fdebgca fgbadc ec adbef efgc fabegc cea | cae eac gfdcbea fceg
|
||||||
|
ec dagbc cagfbd adbecg bfdge gebcdaf ced gdebc fagced bcea | gdbeca dec agcdb aebc
|
||||||
|
geab ebgdfa eafbd dafbc efdgb aed ae bgcaefd dcegfb aegdcf | ebga ade ebfdg dgafceb
|
||||||
|
bdaeg aebcd cgebad dbc cb fecbgd dafce bcgfdea gcab gfdbae | cbga cbag cdb bagc
|
||||||
|
dfb egfbdc ceabdfg cfbae fgbade fdbec bd gedfc deafgc cbdg | ebfgdca fdgbec caebdgf db
|
||||||
|
dfcaeg bagcefd fceab ad dae faedb fcabed ebfgd fcabeg adcb | dea ad ebgfd da
|
||||||
|
afgcd acgebf da agbdfc cad gcdfe dagb dafbec dagbefc abcgf | fgcde beagcfd cebafg da
|
||||||
|
cabd bce cb cfbdea adbef agcfbe aebcdfg fabdeg dgcfe fbdec | ebc gfcabe egcfd fedab
|
||||||
|
efcbga cgfbaed bcfga ecgbf egdbc deabfc fdgcba fage fce ef | ecgbdaf gdecabf bdceg febcga
|
||||||
|
gbcda ad gacfb dba gfacbd fbgdeca aecbfg fdac gfabde bdgce | dab bdgafce bcegd abegdfc
|
||||||
|
fcaegb baegdf gfaced gedfa dcebg dbgea agedcbf abdf bga ba | bag fabd bgfcea bga
|
||||||
|
ebafg gdebafc gedacb gcdefb agbdfc cf gebcd gcf cfde cgbfe | fdgaecb dfbcega cfg fc
|
||||||
|
fce cbaedf cgbaedf ec bfega dcea agbdfc bfdegc dacbf cefab | ce efabg faebcd gdecbaf
|
||||||
|
dcfbg fd egcdba efcgb bfad cefagd abegdfc gcafdb cabgd fdg | bafd egfbc cdgabf gfebc
|
||||||
|
abfegc gecdabf cedb bdg dgcbf gaebdf db fgacd ecfgb egcfdb | bdegaf gfaebd gcefb cdbe
|
||||||
|
bafeg febdac ged bfcedg gd cbafedg edcaf gafdce cagd fadge | fgcdae daebgcf dagc fadeg
|
||||||
|
cfdegb efdc gcadbe gdbaf ebadgfc fc gdebc dfcgb fgc egcbaf | fc cf cfed cf
|
||||||
|
aecfgd efgab bdagfc cedf cge agfce afcdg cdeabg dgbaefc ec | gce gce ec cegfadb
|
||||||
|
eagdbc ga fecbda ecdaf fdgbc abgdcef afdcg fega cag eafgdc | cga ag ag ag
|
||||||
|
fabedg cedg cbefga dga gacedf gd fdcga afecg bfdac gabfedc | fgeca gdec fdacg gda
|
||||||
|
begadc gcfeab dgcba defbac gc fbdag agdebcf degc cag abecd | gcde gca cdge cg
|
||||||
|
fd dcgba gdbfca afedcgb gbadef cagfe fad dfcb acgfd dacgeb | cbgdea fd cfdb afegbdc
|
||||||
|
fb fceab fdeb bgfaced acdfbe gbcafd cdabe abf agcef baecdg | bf fb gdebac bf
|
||||||
|
df fdb egcbd gfed bcaegd abcfg ceadbf egcdbf aegfdcb dbgfc | begdac fdb acefbd dgbec
|
||||||
|
bgedfa dg bdcgeaf cbfad decg efcdga aecgfb aegcf cgdfa gad | egfac dg gedc dga
|
||||||
|
gadfe cfgead cdgbae cfage de dbceagf ecgafb cfed dea fgbad | ade fecag aefgc fcagbed
|
||||||
|
dfab gaecbd degfc bcegfa dgebfa edb ebdfg dbceagf gafeb bd | gbaef bafd agcfbe bfcadeg
|
||||||
|
edcbg dgbfc bdfecag cfegbd eg gebfda dcaeb afcdgb cgef ebg | fceabdg gdfbec beg fdbgc
|
||||||
|
ba gfbdec gacfd bfcdae caeb egbfacd cbedf edabgf bad cadbf | becfdg aecb bad efgcdb
|
||||||
|
gba dabgfec ga fbadc dafgcb fdabg dbecaf agfceb cdag bfegd | dfeabc gab gfabd abg
|
||||||
|
abgdf gcabfd cgabde agedfcb ab cegfda dbfeg afcgd acfb gba | bcfa dgefca dfcagb ba
|
||||||
|
bdecf dgebfc bgcd fdgae gec cg gbacef bacefd cgedf afbecgd | abegfc egfcd cg gbedafc
|
||||||
|
gdecbfa cd bfcagd fagec dfcae dcf adgcfe eabfd cdge gcbeaf | cd dfc dcf gcfbae
|
||||||
|
fdecb adfce bc ecagbd bdc facgedb bfac fbged egdacf fcadbe | daefc efcgda bcd dagcfeb
|
||||||
|
fgdba fbae bcafedg dfgebc fag cbgad gedacf gdfeb fbdage fa | dbfag fdbeacg bgedaf bfae
|
||||||
|
dafbg abfed fe eaf degbca fegabc bafdec dcef aedbc afdcegb | fe fe ebfcag dacgefb
|
||||||
|
adcegb cf dceab caef ebgadfc dcabfe cbdfe fbc degbf gbdfca | cf afce aecgdb cf
|
||||||
|
cebdfag acfgbd gcbef bcf dfegc bf egacfd bfde gbfdec abceg | dbef cbf cfgde cbf
|
||||||
|
bgfaedc gcdfb cadbge fdac bgfdac cf eabfgc bfc acdbg fgbed | cafd fbdagc bdgac cf
|
||||||
|
fgdc fgceab edf feadg beadfc bdgae egdcfba efagc fd cdagef | fed gfdcaeb cgaef fedgca
|
||||||
|
bfg ecabg cabdgfe fdgc fgbac dafbge gf fcdbag fadcbe fdcab | bdagecf fgbdaec fdcgeab fg
|
||||||
|
aefdgb agcfe dfeca dgecfa feg deabgfc ge gacfb defabc dceg | efg edfca egf aefcdg
|
||||||
|
afbeg fagd adgfbe abefcdg bdefca ga gab ecdgab abefd bgfce | fgad fdag dgcbeaf ga
|
||||||
|
fbgea ebfgdca badegc bac cb gceba eadcgf daegc gcdafb bedc | cgbdefa bc bc dabecgf
|
||||||
|
cfbega dgba gb fbegd gdeabf bfcadeg egdcf fgb badef fdbaec | gadb facbdge cfgdbae eadbf
|
||||||
|
gdecaf fabed bdgcae dcgfba ce bdfegca dcaeb gbcda cae ebgc | afdgce dcbegfa egdcfba bgfcad
|
||||||
|
bcgdfa cda agecfdb cedba cafdeb caefbg abfec edcf debag cd | cda cda dc ecabd
|
||||||
|
fdbagce abfc cageb cagfe eba gadefc dgcbe adebgf geafbc ab | ab edbagf afbc facb
|
||||||
|
gcdfa cadeg dcaeb adcegf gfcdba fcabgde ge gfed gea gfeacb | cadgf gae dagfbc gfed
|
||||||
|
bfegdac gcabf fdg adgfb gefdcb gd abfed gdae dfgbae befacd | dega bfgdec dfg daefbg
|
||||||
|
acebgd ceg gcabd afcbgde ebcd afbdcg cbgea ec gbfae gdfeac | gce afbeg adcgb abedcgf
|
||||||
|
degfab fbade ac acdf feacb dgcbea cfbge abc dgfaecb bdecfa | adfc cdaebg ca acb
|
||||||
|
adegcfb gf acfdbe ecfdb dgceaf dgfbe dgbae feg fcbg dfcbge | gf fg fg gf
|
||||||
|
fbacde gfacbe eg dcge fdbga beg bedgcf dcbef fcbaedg bgfde | cged edcg bgedf ge
|
||||||
|
dgafc dfbegc fagbed cfba adfbcg cfg cf dabfg gafcdbe dgaec | dgbface fcgad cfg fadgc
|
||||||
|
defcga gdfc afc cadebf bceag degaf fc gaedfb dabcgfe eagfc | adfge dgfc edcfab fgcd
|
||||||
|
dcefb feb gcdeb efdg fcagbe becgad bfcda gabfdec fe ebfdgc | ecbagf ef dfge decbf
|
||||||
|
fgebac faegb gcebfad fb fecga bgf ecbf abged gcefad fbgacd | fb fbeag fbega bfg
|
||||||
|
cbdgfae fbe gdfbce egbda abedf cdfea badcge agfb edbafg fb | ebfad afbg edafbg efb
|
||||||
|
gbdc gb cfdegba bdgae gab gcafbe fadeb ecfgda gbdace cgaed | abg dbgc dcbg gb
|
||||||
|
db dgefb eafdbgc ecfbg bcegdf bdg fbcd gefad ecfbag adbgce | db cabedgf dbg fgead
|
||||||
|
ab bcfa bacfed dba befad fadeg bcdaeg abcgdfe bdecfg bcfde | ba debacfg fdcbe abd
|
||||||
|
baecfg edgba cdgae fced cd egfdca cgd acedfgb dbfgca feagc | adceg dcaeg efdc dc
|
||||||
|
cdb bgfeda acdeb becfda fedba dfca gbeca dbgecf dc aedcfbg | bdc egabfd cd eadbc
|
||||||
|
efgcadb dgebf baedf gcedfa bfg gb eacgbf dgefc bdcg cgbfde | dfgbe gb gbdefca dbcg
|
||||||
|
afebdgc gbfdc gbca defgb cdb bc bcfagd bcdfae edfgca fdacg | cbd cgab dfbgc cb
|
||||||
|
bgfade cdgabef cfebd ce febad dgafce dce abce cgbdf edcafb | bfeadg gdfbea cabe ce
|
||||||
|
gefbcd de dgfce gfdaecb gafec bfdcg bdge abdfgc edf dfbcea | ed fcdgab dfe edgb
|
||||||
|
cgafeb egadbc bagce gedcafb afcbd fgae bfeac fdegbc feb fe | egcba bfe bef bcdaf
|
||||||
|
bcdea dgbfc gdae dabcg ecdfab gca ag dcebgaf gadecb beafcg | eagd eadg bfgcd gac
|
||||||
|
gafcb eba acbfeg cagbfd ecaf fcbedag bdcge ea cagbe fdeabg | bea aeb ae eab
|
||||||
|
cdegfb cdagef bgf dfgcaeb eadgb fegac febga bf bfcaeg cfba | caefdgb gfb fb ebafgcd
|
||||||
|
bgedfa dfbca ebdgcf fbgcd dfcega cgf gfbcead degfb ecbg gc | gecb cfg cg aegdfb
|
||||||
|
agebd bcegda aeg fedabc bdgafce acgd fbgde ag caegbf cbdae | agcd egabfc dacg dgca
|
||||||
|
cbdfe feacd geacfd dbaefg cbgfd aedfbc ceba eb bde egacfdb | bed ceba adbefgc ebd
|
||||||
|
egd ge afcbedg bfgeda bdgefc gbce bcgdf fdacbg aecfd dcgfe | cefgbd afcbgd ge cebg
|
||||||
|
bg gacbe cefgad cbgf cbead gba fcedagb ebdafg gcfbae gacfe | gabec cedfgab acgefb dgecabf
|
||||||
|
afedg edabg fcdg bfcega ebfdca decaf gf gfa acegfbd afedcg | dgcf efacgdb dcgf ebdfcag
|
100
2021/full/day09.txt
Normal file
100
2021/full/day09.txt
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
3498899019878754677899876434987898910234679986778932468999412767899921249978987543456799987899987876
|
||||||
|
4597678929765833445943989759976567891465798765869893459997323459999890198767898792347899876999876645
|
||||||
|
9986567898654421237891094998765347976587987663656789598986537568998789397646999989499998765899865434
|
||||||
|
8763456799543210948942123999654236897799876542345699987987656789987658989534789879987899986789996323
|
||||||
|
9852165987654399899653439899954345679899988651234799895698967899896547678965698767996789498896987534
|
||||||
|
7541034598765989789864598789865466789998798742398986744569878998765432567896789459875489699954598976
|
||||||
|
5432123459879875678975798677976567997897659876567895432979999549898543456789992359876578976543239987
|
||||||
|
6543334599989954567896987556988678956798543987678986759898989921987676567893210123987799989876136799
|
||||||
|
8654456789999843456789875445999989239987562398989099898787678899898797688954321254599893498964345689
|
||||||
|
9875598899988732347898654333878992198765421239699124987685457789759899789875434675679901987895496793
|
||||||
|
2986789999876521456987543212668943019843210134568949986545345697545999899986545786789929876789989932
|
||||||
|
1987998798765435587896432101457892198767521235679998697632158789434589999987656799999899965396879321
|
||||||
|
0299899659876656678987545232345793899899432349789876598794377895323478998798867988989789654245568910
|
||||||
|
1298778943987887889998654353476965789976545498990997469876456789212567896569879877875678965123457891
|
||||||
|
2979667892398999998998765467987899896989769987991984367989767994346789965456998766434789996534968932
|
||||||
|
9867458943489023457899976699798999935799898956789875457999879976557898654356789954321246789649899543
|
||||||
|
7654347895678934668901989789559789424589987645698989598989991397968997655246699865310137898659797665
|
||||||
|
9765236896789549789542999896445696537679896435787897699678992989899876442123469954323245998798679789
|
||||||
|
9896144589899998997659898991234589648998765323676798789567989878789989321012398767454356899897598999
|
||||||
|
6941023478999867898798787889945678959899994212545699895429876767679998992534569898768769986996456789
|
||||||
|
5432124567989756789898656667896789998789789301234589997698765654598977989645678999899978975987867899
|
||||||
|
6553734679876545899997543556789893987674679912547678998987654423987865678959889996945989964598998998
|
||||||
|
7696545989997656789987632345899932398543467894758989899876543319876434567896999985436799893239989987
|
||||||
|
8987656899998967893098641012799541987656878976769998767987432109965323458945678977321298789549878966
|
||||||
|
9399897978999878932159892323678992399787989497878999654597644298764212969434767965410989678959769345
|
||||||
|
1298969459986989543246993934568989459898991298989899543459756789872101894325457894329877567897657239
|
||||||
|
2987654349895498754347989896679678967999432989796798432349897999989237789212399965698765435689642128
|
||||||
|
9899765459679999899499876789894569999998999876655987321234998999994345678924987897987654323899951037
|
||||||
|
9765989998567899998989924678943456987897978965434595210123489998765456789434976789999766445999872156
|
||||||
|
9834599887456789887978913459652349876566467899323984321235678999876867896559875689999878576789653245
|
||||||
|
8945798765387898765459904589101259865454348678919876533546789999998978997997654677895989687999877656
|
||||||
|
7896999643228999876246895678912346965321234589323989854689899987799989989876543456964598798934988767
|
||||||
|
6989898954019987542134989789924956987540455695456798765789999875689997878987651348976799899127699978
|
||||||
|
5876797892123498431013778999875789998432567897978899979897899954578986768998910256899987977934569989
|
||||||
|
4345676889234599545124567898976990976545778989899999989956598768678965456789321345698786556899698792
|
||||||
|
3257345678945987656234579976999891987657889679789998797643459879789874345895432566987675345998976543
|
||||||
|
2101234689656998764346889345789799998768996598699987698764769998999985456976543456989554234767897794
|
||||||
|
3212345699987899885456793219897678899889865487589997569879898987999876869899676579975433123456789999
|
||||||
|
5333459999898989876567899398923456789999654396467895456989987986789989998798987898754321012345998798
|
||||||
|
7569998789799876989688998987934567994598763212356789347597896565678998987677898989865432124456789697
|
||||||
|
8698889676689999898799987756895678979999854323767892123456998424799986976545799979879753234578994556
|
||||||
|
9987674565578998769899976548789789459889876434789943254569876534999875568925689769998764345699543434
|
||||||
|
9876543234467899656998767434678999398768976545678954565879987695789954321014578957889885456989432323
|
||||||
|
1987652102345678943239654323489988999544987796789765776989698986898766535123489945679976769978921012
|
||||||
|
0199863243458999453198765464599767898432098989899879887993569997909877645234567896798989998767892523
|
||||||
|
9239954867567954321099986765678956987643129878901991998921345998912998784345678989987698765452679434
|
||||||
|
8998767898689765692987987876789545698754298767899892359210167899439999895567899778996579876321567999
|
||||||
|
7899878998799876989875598999899959798767987656789789459321379997698987987678965656889456985432345678
|
||||||
|
6895989469902997976753459899999898999879876545345678998932998999987696799889654345678999976569496789
|
||||||
|
5694398979899889765442356789398787899996999631234789877899887899876565679998767976789988997998989994
|
||||||
|
3789457898798678954321467892197676789975698742649895756798796796543434568999898987899967989987879893
|
||||||
|
4567967987656567965435698989986545678954987653458954247986545965432123457998989298989855679875658789
|
||||||
|
7689878998943456896546789679876434589543398954567932123965437896543437689986679019876744598654345696
|
||||||
|
8789989999732345989687894598764323678932198768799899439876545987859549898775568999865432987643256795
|
||||||
|
9991099987621265778998943569843212367893349879898798945987687899998956798654348789886540198732134894
|
||||||
|
9989129876540124567979964579976301456789459989989667896798789945987897899886234598765431469543456902
|
||||||
|
9878939986521569879769875798765412348996598998976456789899893239896689998765495679986562359876587893
|
||||||
|
8769898765432478989654986969876523657899987697654367896934991098765568999886788797987679767989698954
|
||||||
|
7659769876546599697923999853987798769998765498765478945795989139954457899997899896598899898999899995
|
||||||
|
7649853987658943466899899764799899878909964349876567899979878998732356789998945997439934959789996986
|
||||||
|
6534954599767892355998798765679934989219875656987978998968967789540245699999659986321012345698785497
|
||||||
|
5429765679878910234597659878794325299924998787898989997956545678954357999898798765432129596987654329
|
||||||
|
3212987794989321296789543989943210199895989899959799976844234569765456789789999976573298989898843212
|
||||||
|
3101498943495433387997642396794321989789875935345679865432143568976789997657989899954987879789943209
|
||||||
|
4212349932398544499896521345689439778678954321236789987545012379899899754349879767899896768678999998
|
||||||
|
4363457893987659598789432467896598653578965432447892399653123456792998965598765456789765454579988787
|
||||||
|
9456789954598998987679943598987989432345696643456890198764334569891987897899894323898754323459879656
|
||||||
|
8769899866789997656567894789998976545456789754567899239895456678999865679999989219989843212398765545
|
||||||
|
9997998988999876543456789898789998666567999765679978945976578989987654567979678998765432101987654234
|
||||||
|
9886797999498765432326678987678899898678978976789669957897689999876543568964569999986954312398765101
|
||||||
|
9765656789319854321014567896566789979989767897893459898998797999998662789543467892199875429459893212
|
||||||
|
7654545678998765432123459975445698654393456789912399789019896798987653497651498993246976598999954343
|
||||||
|
8943234567929876543275678954323459543212767893201988689323987987798765689320239789345987976789876458
|
||||||
|
9895395678912989654586789995445668986543468954329876578939999876549876795432445678967899875345987967
|
||||||
|
8796989989101292986797899987856899997854578965934985467898898765432998997544556789878986543234599898
|
||||||
|
7679979893212391097898968998967899998765678979899876328246789986521019789678967898999598632123498799
|
||||||
|
6598767789324989998929459999998999879876899998798765410135690198745123678989878967965439643245987689
|
||||||
|
5432545689939878899102399898789998965987999987659876721248791987656234567899989656896019865459976578
|
||||||
|
4321234567899767789293989765698987894299689998743987533367989998754345678999991347992139876798765469
|
||||||
|
3210355879999645678989978974987876989103569879651987544569878999876556799778930456789246998999864345
|
||||||
|
4323796789878924567977567895986645879212398765510198656789969899987667894569321367894356979987543234
|
||||||
|
6435697896567895979865457989995434567923999864323498767899656789798798923498936568965469865698965676
|
||||||
|
9876789923456896893974345678976312459899898765434569898998767896679899014567899689876598754349876789
|
||||||
|
9987895312345797954985657789875401346789799877555678999439898934599984323678998796998789743210989896
|
||||||
|
7899986453456998969876767893986212468998678988669899878924999623459876544567929965349899655439898965
|
||||||
|
6432097568967899978987889901297326579765459599778965767895989510569998697678909893234987996598767464
|
||||||
|
6593198789898945899899997892398438989899679499989954655689879431458798789789998789399656789679955353
|
||||||
|
9989349999769236798789486899459549992998792987699893244588968942345679899899857678988745898798843212
|
||||||
|
8878959898954126797678365678998757891369990996548789123467957793459798910998743569976324999987654523
|
||||||
|
7967899767893235986543234769999898990156789875437678965678945689598987892987632457895436789998787634
|
||||||
|
5456998656994467897652123456893969789245698765323569896789234579987696789765421346789597899869898745
|
||||||
|
4349876545989578999653245767892345679367899972103456789892124569876554998653210145699989997654949856
|
||||||
|
3234987439878989398769356978901956789878999864212389899943434598765432359986321234899878976543234987
|
||||||
|
2136796545967893219898967899899897991989789974363478999854545998654321239875434345998767975432124598
|
||||||
|
6545987659878999423987998999776799890195698765455569298765669899766510129876589456789656896594234599
|
||||||
|
7659899867999988939876789988645698799234589876566689129879898769854321234987676567899545699989995678
|
||||||
|
9998654978989877898765899876434789678945678987679791012989987655987642345698987899998732488979789789
|
||||||
|
9876543989876865789996999995321234567896889798789895423497896543499873486789999978987521267965678990
|
||||||
|
2995432598765934456789398765452345689997897659892986434986987632198764678999876569876410149894569521
|
||||||
|
1986543497654321345891239976563456893198976543901296549765498743459876789101983469865321235789789433
|
98
2021/full/day10.txt
Normal file
98
2021/full/day10.txt
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
[[{[<{{<<{<[<{<>[]}([][])>{{<>()}<()>}](({{}<>}[[]<>])<([]<>){[]()}>)>[<{{<>}<[]()>}[{[][]}<{}{}>]><{<
|
||||||
|
{[<[({([[(<<(([]{}))<[{}()]>>>)]])<([<{[{({}{})[[]()]}[(()[])<{}()]]]{{[[][]]<<>[]>}}}{([([
|
||||||
|
{<{<{(({[[([{<<><>>([]())}[{()[]}({}())]}<{{{}}{[]<>}}({<>{}})>){<(([]())([]<>))(<<>[]><[]<>>)>({[[]
|
||||||
|
{[([<{<([{{(({()<>}({}<>)))(<{<>{}}](<<>[]><()()>))}{[{{[]()}(<>[])}{{[][]}{<>{}}}]}}{[{{{{}[]}<<>()>}}<{([]
|
||||||
|
[({[{[(<<<[((<{}<>><{}{}>)({[]<>}((){}))){{[{}<>]{{}<>}}})[<[<<>>[<>{}]]{{<>[]}}>]>>[[([<{<><>}
|
||||||
|
<[{[{[[<{[[{<<[]()>[{}<>]>}]<([{{}}({}{})])>]{<[[<<><>><()[]>]([[]<>]{[]<>})]{(([][]){()[]})
|
||||||
|
((<(<(<[(<([(<{}<>>(()()))](<{{}[]}{()[]}>))<<<(<>[]){()()}>([<>{}]{{}})>({{[][]}(()())}(<
|
||||||
|
{{([(<{<([([[[<><>][()<>]]{(()[])}])]({<[<<>>[()<>]]({()[]}[{}()])>]))>({<<[<{[]()}<<>[]>>{<[]
|
||||||
|
([<{{((<({<[<({}<>)[[]()]>]([(<>)<(){}>](([][]){{}{}}))>{(({<>[]}<()()>){(()[])})[{{[][]}((){})}[([]<>)({}{})
|
||||||
|
<<<{<{<([<[((<()<>]<[]()>)[(<>[])[{}<>]])]><[<[(()())[()()]]{[{}{}][()()]}>]{<<(<>())[<>[]]>>[<(()())<[]
|
||||||
|
{<[[({<[{[{[({{}<>}<<>{}>){<{}[]><{}{}>}]{{<<>>}<(<>()){()<>}>}}]}{{<[({{}()})([()<>]{[]})
|
||||||
|
(((([[(((<(<<(<>())[(){}]>([[][]]{()()})>{<[<>[]][()<>]>(([]{})[<>{}])})[({{()<>}({}())})]>([[[(()<>)][[<>()
|
||||||
|
[<({([[[<<([<<<>()>>{[<>()](<>{})}]){<[[{}<>]]<{{}<>}([]{})>>}>[<<<{{}()}>>[[([][])<<><>>]({<>
|
||||||
|
{<(<<{{<<[({{({}<>)[[][]]}(<()[]>[<>])}<{<()>{{}()}}>){{<[(){}][(){}>><{{}<>}[[]{}]>}}]<{<{
|
||||||
|
{(<{<[<(<<(<[([][])<[]{}>]><{([]())(<>{})}{<(){}><[][]>}>><({({}[]){<>()}}{<{}>(())})>>{({{(<><>)[{}()]}
|
||||||
|
[(<{[<<[{((({[{}<>][[]<>]}){(<{}<>>({}<>))<(<><>)[<>]>})<({{<>[]}}}>)}]>([{{<<{{[][]}(<>())}<{{}
|
||||||
|
<<<[[{[<<{[{<(()[])<[]()>>}[(({}[]))(({}<>){<>})]](([{(){}}[<>]]<[{}{}]<{}<>>>))}>{{[(((()[]){(){}})(<(){}>{
|
||||||
|
[{{<<([[[[<<[{(){}}{(){}}]{<{}()>(()())}>{{<{}()>}<[<><>][()()]>)>([{{()<>}<()[]>}[[<><>]{[]<>}]]{[{
|
||||||
|
<[[{[{<[(({({[<>{}]}([<>[]]))<<[<><>]([]<>)>([{}()][()()))>}[((<{}>{[]{}}))[[{{}}[<><>]]]])(([{{[]()}<[]
|
||||||
|
{{{<{([[[<[<{{(){}}({}{})}>[[{()[]}<[]{}>]<<()<>>[()[]]>]}<{[[[]()]<<><>>]({<><>}<[][]>)}{(<[]()><{}<>>)}>>
|
||||||
|
([<<[(([{{[([{<>{}}])<[(()){<>{}}]>](<{([][])[<>()]}<{{}()}>>)}>{[{{(<()()>[<><>])((<><>){()()})}{([[][]])[[{
|
||||||
|
[{((({<([{(<{(<>)[[]()]}({{}<>}<[]<>>)>)}(<<[({}{})]{({}<>)[<>()]}>>[<[[()<>]{<>()}][<[][]><<>{}>]>[<([][])[(
|
||||||
|
(<[{<[<((<{<[{<>[]}{{}<>}]([[][]]{{}[]})>[<[(){}]{[]()}>({<>}{<><>}}]}>[[(<{()[]}<()[]>>[{{}()}<<>[]>
|
||||||
|
({{<([{<<<<<{{()}({}())}<[()]{[]{}}>>[([()<>]([][]))<{()<>}>]>>>>}<{[[[<<<<>()>{[]{}}>[({}()){(){}}]
|
||||||
|
<[{([<<(<(<[(({}()){[][]})[[(){}][[]()]]][<[{}]([][])>]>}>(<{[({[]<>}{(){}})<(<>)({}())>]<[({}<>)<{
|
||||||
|
(({[{<({<<[<{{[]<>}[<><>]}{{{}}<()[]>}>]<<<{()()}{{}<>}>([[]()][<>()])>>><[([(<><>)<()[]>]
|
||||||
|
{([<<[{[(({[{{()<>}({}{})}<[{}[]]<(){}>>]<{<[]<>>}<[()()][()()]>>}<<[[(){}](<><>)]><(<{}[]>
|
||||||
|
{([<{<([(<(<(<[]{}>{<>()}){{<>{}}}>({<[][]>(<>{})}))<[<[{}{}]<{}{}>>{(<>[])(<>())}][<{{}<>}(()[]
|
||||||
|
[{[(<(({{(<{(<[][]>){[<>{}]}}{<{(){}}{<><>}>({[]{}}{[]{}})}>)(<[(([]<>))[[[]()]<[]<>>]]<{({}[])<{}<>>}[
|
||||||
|
[{<{({((<{[{[<<>{}>[[]]]{<{}()>[<>]}>]}>[{([(<[][]>{[]()}){<(){}>[<>[]]}][[([]<>)<[]{}>]{{{}}[{}]}])([
|
||||||
|
{<(<({[{[(({((<>[])<{}{}>)({[]<>>[{}[]])}([{(){}}([])]{<<>[]>[{}()]}))[[<[<><>]<<><>>>{[()()]<
|
||||||
|
{{{<[<<{(<(([({}<>)<()>]{<()()><[]<>>})(<[()[]]{[]{}}>{{{}{}}(<>())}))({([[]()]{()[]}){{{}<>}[
|
||||||
|
(<({{[{<{[<[[{[]()}]([[]()][<>{}])][[[<>]{<>}]<([]{})<{}[]>>]>{[{{<><>}[[][]]}<{[]{}}({}())>](<[[]()]({
|
||||||
|
<<[{[<{<[[(<[<(){}>(<>)](<[]<>>[[]()])>{<<{}[]><{}()>>[(()[])(<>{})]})({({{}<>}[<>{}])}{({[][]}<<><>>)})]({<[
|
||||||
|
[[([<{{(<({[{([][])(()<>)}]{{{[]<>}[()()]}[({}{})[()[]]]}}>><[[{{[()()]({}())}}({(()[])[[]()]}{
|
||||||
|
<<{(<(([{((<([()()]){{[]<>}{{}()}}>)<<<({}<>)[<>{}]><({}[])<[]<>>>>(<[[]]{(){}}>(([][])([])))>)[{[{([]<>)[<>{
|
||||||
|
[(<(<<{{[([[[({}{})<()())]({[]}{{}[]})]({[()()]([]{})}{({}[])[[]()]})]<[[{<><>}<[][]>][[[]()]{(){}}]]>){(([<(
|
||||||
|
[[<[<{<[{({{{{<>{}}<[]()>}<<(){}>>}<{{{}{}}{()<>}}[([]{}){<>{}})>})[[((<<><>>[{}[]])<{()<>}<()
|
||||||
|
((<(<<[[{{{(<<{}()>[()()]><((){})>)[[[[][]][()[]]][{[]<>}<{}{}>]])((([[]{}]<[]{}>))([{<>{}}(<
|
||||||
|
{{(({[{[({({<<<>[]><<>[]>>{{()[]}[{}()]}})[{(<{}<>><[]>)(({}[]){{}[]})}<<<[]()><[]{}>><{<><>}<()<>>>>]})
|
||||||
|
[(<[{[<({{[{<[<>()]([]{})><{(){})[()[]]>}<(<()()>(()()))(<{}[]>({}[]))>]([([[]()]({}{}))({(){}}([](
|
||||||
|
{({(({[<{<[<<{<><>}(<>[])>[<{}{}><[]<>>]><<{<>}>>](<<<()<>>(()<>)>{<{}[]>([]<>)>>)>}<{<{{<<
|
||||||
|
<([[[(({[{<(({<>[]}<<>[]>){<{}[]>([]()))){<({}<>)<[][]>>{<{}{}>{()[]}}}>{((({}{})[{}[]]))({[<><>]}<<<>{}
|
||||||
|
[{[[[{<<(({[({[][]}<[]<>>)<{{}()}{{}}>]{({[]}[<>{}]){<[][]>[{}{}]}}})[[([<<>()>(<>[])]<<<>
|
||||||
|
<({<<[(({[([{[()[]]({}{})}{{()[]}[()[]]}])[([((){}){<><>}]{<()[]>{{}{}}})]][[{<[()()]({}<>
|
||||||
|
[{<([<({{<<[((<>[])(<><>))((()[])([][]))][(([][])<<>()>)]>[<<{()<>}<{}<>>><<{}<>>{()<>}]><{[()[
|
||||||
|
[<{[<([{((({<<[]{}><{}{}>>([{}<>]<<><>>)})[[(<{}<>>([]<>))<<{}()>{{}<>}>]{[<[]<>>][[{}<>]<{}[
|
||||||
|
({<{<[<({([<{<()()>{{}[]}}({<>{}})><{[[]<>]<[]()>}<[{}()]{{}[]}>>])}([<<[{[]<>}<<><>>][<[]{
|
||||||
|
{[({<[[<<<(<{<{}<>>(()())}[{()}{()<>}]>)[<{{(){}}(()<>)}>{[([]{})(()<>)]{[(){}]{()[]}}}]>{{[<<[]()><()<>>>{
|
||||||
|
<[{{({({(<<{[(()<>){[]()}][<[]>(()())]}{<(<><>}{()[]}>}>(<<{{}()}<[][]>>[{()<>}{{}{}}]>)>)}<[(<((<(
|
||||||
|
[<{[<[{[[[([<(<>{}){{}<>}>(<<>{}>{{}{}})]{({<>[]}<{}()>)<({}<>)<{}{}>>}){<[[[]{}]{{}{}}]<<[]<>>(()[])>
|
||||||
|
{[{((<(<[(((<({}[]){[]()}>)))]([{<(<<>{}>[[]])<[[][]][(){}]>>[{[{}<>]{[]<>}}{(<>())(())}]}[{<{{}()}<<>[]>>}[[
|
||||||
|
[[[{{(<<<<((<((){}){[]<>}><<(){}><()<>>>){[<[][]>({}[])](({}{})<[][]>)})[[{(<>>}([{}()][{}()])]]>>>((<{[
|
||||||
|
[[({<[[<([<[((<>{})({}<>))({{}{}}(()[]))]<<((){})<()()>>[<[][]><{}{}>]>>({[<()()>[[][]]]})])>
|
||||||
|
([<(<{(<<[<{{([]<>)[<>[]]}<<()()>[(){}]>}><([[<>[]]](({}[])))({(()())<(){}>}<[<>>[()()]>)>]>>)
|
||||||
|
{(({([{[{(<[[((){})(<>{})]<(()())(()[]>>]{([{}]{[][]})}>)<((((()<>)[<><>])<((){})[()()]>)[[<()<>>][<{}
|
||||||
|
{{([{{<<({{<<<[]()><()[]>}{{()<>}}>[<{()<>}<[]{}>><{{}[]}[{}[]]>]}})({{({[<>{}]<(){}>}(<<>>(()<>)))(<
|
||||||
|
<[[{<(<{{<[<{({}())}({[][]}{<><>})>{[<<>{}><()[]>]<[<>[]]<<>[]]>}]>(({[{[]()}<[]<>>]{<<>><<>[]>}}))}([[<
|
||||||
|
([{<[{<({{[((<{}<>>[(){}])({()<>})){{<<>{}>}[<{}()>{()[]}]}]}[{(({()[]}(<><>))[<{}()>(<>[])])<[{()[]}[
|
||||||
|
{<[{({<((<({[{[][]}{{}[]}]{[<>()][<>{}]}}((({}())([]()))<([][])[[][]]>)}({[[[][]]({}())]}{({{}}){(<>[])
|
||||||
|
{{[{{({(<(<[[[[]{}](<><>)]([[]{}]{<>[]})]>({{{()[]}([])}[{[][]}(<><>)]](({[]}<<>[]>))))>)}({{[{{(([])
|
||||||
|
[<[{[{<<({{[{[<>{}]<(){}>}]}<{(({}()){{}<>})(<{}()>{[]<>})}{<[[]{}]>}>}[<[[([][])[[]]]]{{([]())[{}<>]}<({
|
||||||
|
([<({{[((<({(([]<>){[]<>))[({}())([]<>)]})[{{{{}<>}{{}[]}}}<<([]{})({}[])>[<()[]>]>]><([[[{}<>]<()>]([<>{}
|
||||||
|
<[<{[[[<{{[[([[]<>]{(){}))[[{}<>][[][]]]](([<>[]]<<>[]>)[(()<>){()<>}])]}[<<((())(<>{}))<{[]()}<[
|
||||||
|
[{[[{[[(<<(<({{}[])[<>()])><[[[]()](<>())]<{[]<>}({}())>>){[<{<>{}}[[]<>]>]}>{{<[<<>()>[()[]]
|
||||||
|
[(([{(([{<[<[<{}[]>[<><>]]>({[{}{}]{[]{}}})]>}{{[[<[{}{})<()()>>{{<>}{{}[]}}]{{([][])[<>{}]}{
|
||||||
|
(((<<<<[(<[<{{()()}<[]{}>}<{[][]}{<>[]}>>[[[()()]{{}{}}]]]({[<()()><[]{}>]{{[]{}}([]())}}<{<()<>>[<>]}<<{}
|
||||||
|
<([<[[<<[(({(({}())<{}>)<(()[])[{}[]]>})<<({{}}[[]{}])[({}{})((){})]><<{{}()}{[][]}>>>)]>[[(
|
||||||
|
<<<{(<{{(([{<{()[]}><<[]{}>{{}[]}>}{(<[][]>[[]<>])[{()<>}]}](<[[<><>][<>[]]]([()[]]<{}()>)>))<(
|
||||||
|
{[[([<<[[(<((<()()>(<><>))[[{}()]<()<>>]){[((){}){[]{}}][[{}[]]]}>([<((){}){(){}}>[([]{}){()[]}]]))]<[<<{<<><
|
||||||
|
([{[{([<{{{[<(()[])({}())>{[<>{}]{{}<>}}]{(([]<>){<>}){[()<>]<()[]>}}}(<<[{}<>](()[])>{[[]()]
|
||||||
|
[<((<<<[{[((([<>{}]){[(){}]})<<{<>{}}({}[])>[[[]{}]<()[]>]>){<(<<>()>(<>[]))[(()[]){[]<>}]>
|
||||||
|
<(([({[[[[<<[[[]()]]<<()[]>>>>{{<[()[]]{{}{}}>{<[]()>{()[]}}}<[({}<>)[()<>]]>}]([([[()()]<<>{}>])<{<{
|
||||||
|
<{([([((<{{[([()[]]{{}()})][(<<><>>){{{}[]}[[]<>]}]}}>[((<(<<>>[[]<>])[(()[]){()<>]]><<{{}
|
||||||
|
{<[[({{<<[<<<{()[]}<<>{}>>([[]<>]((){}))>[{[<>()]{{}<>}}[({}())]]>{[{{[]()}({}())>]({{(){}}<()<>>}{<(){}>{
|
||||||
|
{(<[{[{{[<(<({(){}}<[]()>)(<<>[]>{<>{}})>)>]({[{[({}()){<><>}]<[[]<>]{<>{}}>}(<<{}{}>([]<>)>(({}{}){(
|
||||||
|
((<((((<<({[{{{}[]}(()())}{<()()>}]<[[<>[]][(){}]][{()[]}]>}(([<[][]>][<[]()>({}[])])[<<[]()>[{}<>
|
||||||
|
[[{<[(<{{<{<[{<>()}[[]]]({{}<>})>{{{()[]}<{}<>>}}}<({{()[]}}[[<>()](()[])])<[([]<>)[{}<>]][([][]
|
||||||
|
<{{[{[{(<<({{{{}[]}{[]<>}}<[[]{}]{{}[]}>}[({{}{}}<[]()>){[[]<>]}])((<{()()}[[]{}]>({()<>}<
|
||||||
|
({{{<({{<<[<[{()<>}[[]<>]]<[{}{}][<>[]]>>({[{}()]<<>>}[(<><>)({}())])][([{<>()}{<>{}}]{(<>()){()[]
|
||||||
|
[((<({(<<({[<(<>{})<[]<>>>[([])[(){}]]][{{()<>}(<><>)]<[{}{}][{}<>]>]}{<{(<><>)[{}[]]}(([])[[]{
|
||||||
|
(([{<[<{<<{{({()[]}{<>{}})[[[]<>]<[][]>]}<{<()<>>[()()]}{<<>><()<>>}>}>>[<[[<[{}<>]{[]{}}><(<
|
||||||
|
(<<<[<<<(([{{<()<>>[<>[]]}{<()[]>([][])}}])(([{{{}{}}[<>()]}({<>()}{[]{}})]<[<<>[]>]{({}<>){[]<>}
|
||||||
|
{<<[<([[({({{<{}[]>([]{})}[<()<>>[(){}]]}{[(()<>)]{<()[]>({}[])}}){<([{}[]]({}<>))(({}{})(()<>))><([(){}]<{}
|
||||||
|
{{[[<(<({<([[{[]{}}(()[])]<(<>[])>])({[[{}[]]({}<>)]})>[(<<[{}{}]<[]<>>>>{{{[]<>}[{}()]}({<><>}<<>()])}){([<
|
||||||
|
{[[{{<(({(([[<()>{()<>}]([[]()]([][]))]<<({}[]){[][]}>([<><>]{()()})>)((<[<><>]{[]<>}>[[[][])[[]<>]
|
||||||
|
[[<<{[[{([<{({[]()}({}())){{{}<>}<()()>}}([{{}()}<{}()>][{<>}[()<>]])><{{{{}[]}(<><>)}{[[]<>]<[]<>>}}>])}
|
||||||
|
({(({(<({[{((<{}><{}>){<{}()>[{}[]]})}]{[<({<><>}({}()))>{{({}<>)(()<>)}{<{}{}>{<>[]}}}]}}({[{([[]{}])[<()
|
||||||
|
({[{<<[<<[{{{{[][]}[()[]]}<<{}()>{{}()}>}{({<><>}([]))[<{}<>>(<>{})]}}{[([<>{}][()<>])([()[]])]}]<{[(<<><>
|
||||||
|
{<{<(({[[{(({{()<>}[[]<>]}[[()<>][()()]])(<((){})[<><>]>{[[]<>][()<>}}))}<[<{{{}}[{}[]]}<(
|
||||||
|
{{<[[(<[{<<((<{}<>>{(){}}))((<[]<>><{}{}>)({<>()}<()<>>))>>({[{(()[])<{}<>}}(<()()>)][<[<>{}]{<>
|
||||||
|
<[<{((([<(<<((<>())<<>()>)>(<{<>()}{[]<>]>)>)[[{{{()[]}(()())}{({}())({}<>)}}](<[{()()}<()()>]((()){<>[]})><[
|
||||||
|
(<([{[[[[[(<(<<>{}>)<{{}{}}>>(<<[]()><[]()>>(<(){}]{()()})))]]]({(<{(<()>([]{}))[{()<>}{[][]}]}([<
|
||||||
|
(([({{{<(<{[<[<>[]](<>())>(<{}{}>)]<(([]<>>(()[]))(<()()>(<>{}))>}>({{[{[][]}][{[]<>}([]{})]}(<(()
|
||||||
|
({({<{[{{([(<(()())><{[]{}}(<>())>)(<[()()]{()()}>[[[]()](<><>)])]{<<[[]<>](<>())>(({}{})<<><>>)>
|
||||||
|
((([[{[<[{(<[{<><>}{{}<>})>{<[<>{}](<>)>[<[][]><[]{}>]}){[{{()[]}<<><>>}<(<><>)({}{})>]{<{(
|
||||||
|
[[<({([{{[<{<(()())<[]<>>>{[[]{}]}}(<[{}<>]<<>()>><(()<>)[()()]>)>>{<{<[[]<>]{[]()}>{<[]<>>{[
|
||||||
|
(({[[(([[<{([[{}<>]{()()}][[{}[]]{[]{}}]){[[()[]]<[][]>][<{}{}><{}{}>]}}[{[({}())[[]<>]]}{[({})<<>>]<{<>[]}
|
10
2021/full/day11.txt
Normal file
10
2021/full/day11.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
6111821767
|
||||||
|
1763611615
|
||||||
|
3512683131
|
||||||
|
8582771473
|
||||||
|
8214813874
|
||||||
|
2325823217
|
||||||
|
2222482823
|
||||||
|
5471356782
|
||||||
|
3738671287
|
||||||
|
8675226574
|
22
2021/full/day12.txt
Normal file
22
2021/full/day12.txt
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
FK-gc
|
||||||
|
gc-start
|
||||||
|
gc-dw
|
||||||
|
sp-FN
|
||||||
|
dw-end
|
||||||
|
FK-start
|
||||||
|
dw-gn
|
||||||
|
AN-gn
|
||||||
|
yh-gn
|
||||||
|
yh-start
|
||||||
|
sp-AN
|
||||||
|
ik-dw
|
||||||
|
FK-dw
|
||||||
|
end-sp
|
||||||
|
yh-FK
|
||||||
|
gc-gn
|
||||||
|
AN-end
|
||||||
|
dw-AN
|
||||||
|
gn-sp
|
||||||
|
gn-FK
|
||||||
|
sp-FK
|
||||||
|
yh-gc
|
807
2021/full/day13.txt
Normal file
807
2021/full/day13.txt
Normal file
@ -0,0 +1,807 @@
|
|||||||
|
1094,19
|
||||||
|
751,827
|
||||||
|
323,890
|
||||||
|
969,603
|
||||||
|
301,10
|
||||||
|
291,483
|
||||||
|
1173,92
|
||||||
|
1034,570
|
||||||
|
460,732
|
||||||
|
1222,191
|
||||||
|
986,756
|
||||||
|
430,480
|
||||||
|
1057,129
|
||||||
|
659,687
|
||||||
|
514,803
|
||||||
|
669,603
|
||||||
|
234,133
|
||||||
|
421,857
|
||||||
|
343,725
|
||||||
|
987,568
|
||||||
|
232,735
|
||||||
|
708,165
|
||||||
|
421,737
|
||||||
|
776,389
|
||||||
|
1307,655
|
||||||
|
1006,91
|
||||||
|
259,350
|
||||||
|
907,198
|
||||||
|
651,80
|
||||||
|
23,752
|
||||||
|
629,519
|
||||||
|
492,858
|
||||||
|
905,110
|
||||||
|
750,716
|
||||||
|
184,821
|
||||||
|
1103,171
|
||||||
|
1307,351
|
||||||
|
559,645
|
||||||
|
85,485
|
||||||
|
6,759
|
||||||
|
459,91
|
||||||
|
227,110
|
||||||
|
977,835
|
||||||
|
363,163
|
||||||
|
437,12
|
||||||
|
447,171
|
||||||
|
552,417
|
||||||
|
1094,215
|
||||||
|
822,28
|
||||||
|
1019,843
|
||||||
|
621,100
|
||||||
|
430,184
|
||||||
|
385,571
|
||||||
|
671,745
|
||||||
|
1046,802
|
||||||
|
16,175
|
||||||
|
659,782
|
||||||
|
907,288
|
||||||
|
1083,784
|
||||||
|
232,376
|
||||||
|
269,228
|
||||||
|
1068,82
|
||||||
|
556,572
|
||||||
|
870,403
|
||||||
|
321,59
|
||||||
|
987,288
|
||||||
|
1007,702
|
||||||
|
1062,705
|
||||||
|
661,619
|
||||||
|
1293,845
|
||||||
|
257,77
|
||||||
|
33,794
|
||||||
|
684,299
|
||||||
|
356,634
|
||||||
|
18,592
|
||||||
|
949,166
|
||||||
|
1128,893
|
||||||
|
1078,70
|
||||||
|
490,624
|
||||||
|
57,123
|
||||||
|
202,133
|
||||||
|
649,499
|
||||||
|
22,355
|
||||||
|
990,849
|
||||||
|
701,842
|
||||||
|
1077,381
|
||||||
|
649,619
|
||||||
|
758,480
|
||||||
|
997,47
|
||||||
|
363,178
|
||||||
|
972,754
|
||||||
|
370,201
|
||||||
|
171,224
|
||||||
|
328,512
|
||||||
|
298,428
|
||||||
|
8,515
|
||||||
|
1041,584
|
||||||
|
313,159
|
||||||
|
303,779
|
||||||
|
800,1
|
||||||
|
1288,539
|
||||||
|
273,588
|
||||||
|
498,135
|
||||||
|
796,803
|
||||||
|
889,157
|
||||||
|
884,546
|
||||||
|
698,123
|
||||||
|
1058,213
|
||||||
|
1299,717
|
||||||
|
648,583
|
||||||
|
691,275
|
||||||
|
425,466
|
||||||
|
815,606
|
||||||
|
144,1
|
||||||
|
1216,600
|
||||||
|
858,581
|
||||||
|
1019,483
|
||||||
|
950,5
|
||||||
|
659,344
|
||||||
|
888,742
|
||||||
|
8,360
|
||||||
|
1303,502
|
||||||
|
380,10
|
||||||
|
1121,731
|
||||||
|
25,835
|
||||||
|
291,850
|
||||||
|
1052,126
|
||||||
|
326,64
|
||||||
|
669,791
|
||||||
|
1091,709
|
||||||
|
825,100
|
||||||
|
627,255
|
||||||
|
1108,514
|
||||||
|
1062,581
|
||||||
|
671,149
|
||||||
|
273,59
|
||||||
|
258,126
|
||||||
|
291,716
|
||||||
|
1242,574
|
||||||
|
908,255
|
||||||
|
70,441
|
||||||
|
1253,571
|
||||||
|
626,695
|
||||||
|
703,835
|
||||||
|
982,74
|
||||||
|
460,221
|
||||||
|
1108,380
|
||||||
|
976,311
|
||||||
|
546,236
|
||||||
|
406,761
|
||||||
|
1190,389
|
||||||
|
651,687
|
||||||
|
1190,133
|
||||||
|
224,81
|
||||||
|
975,616
|
||||||
|
969,403
|
||||||
|
1017,166
|
||||||
|
351,219
|
||||||
|
730,255
|
||||||
|
412,812
|
||||||
|
1237,801
|
||||||
|
169,420
|
||||||
|
1077,749
|
||||||
|
1173,163
|
||||||
|
303,491
|
||||||
|
351,80
|
||||||
|
484,759
|
||||||
|
219,633
|
||||||
|
652,285
|
||||||
|
914,248
|
||||||
|
1253,123
|
||||||
|
16,623
|
||||||
|
889,737
|
||||||
|
107,204
|
||||||
|
818,624
|
||||||
|
728,235
|
||||||
|
681,375
|
||||||
|
1161,847
|
||||||
|
233,749
|
||||||
|
597,571
|
||||||
|
85,37
|
||||||
|
380,523
|
||||||
|
276,162
|
||||||
|
913,378
|
||||||
|
639,337
|
||||||
|
271,876
|
||||||
|
1295,725
|
||||||
|
291,411
|
||||||
|
1222,703
|
||||||
|
517,7
|
||||||
|
396,752
|
||||||
|
989,507
|
||||||
|
333,835
|
||||||
|
150,268
|
||||||
|
708,298
|
||||||
|
729,353
|
||||||
|
303,627
|
||||||
|
708,10
|
||||||
|
658,138
|
||||||
|
959,142
|
||||||
|
780,761
|
||||||
|
1303,54
|
||||||
|
131,635
|
||||||
|
179,333
|
||||||
|
1186,380
|
||||||
|
889,705
|
||||||
|
1305,80
|
||||||
|
547,409
|
||||||
|
577,848
|
||||||
|
94,406
|
||||||
|
636,337
|
||||||
|
969,495
|
||||||
|
674,302
|
||||||
|
455,843
|
||||||
|
582,393
|
||||||
|
619,275
|
||||||
|
1275,611
|
||||||
|
938,121
|
||||||
|
938,773
|
||||||
|
233,145
|
||||||
|
313,291
|
||||||
|
552,238
|
||||||
|
28,199
|
||||||
|
671,109
|
||||||
|
746,870
|
||||||
|
1053,77
|
||||||
|
966,847
|
||||||
|
612,123
|
||||||
|
1071,390
|
||||||
|
293,113
|
||||||
|
1298,44
|
||||||
|
233,189
|
||||||
|
1031,278
|
||||||
|
78,873
|
||||||
|
276,732
|
||||||
|
190,572
|
||||||
|
1232,425
|
||||||
|
1146,624
|
||||||
|
490,176
|
||||||
|
228,796
|
||||||
|
1091,359
|
||||||
|
487,8
|
||||||
|
754,572
|
||||||
|
1267,470
|
||||||
|
679,192
|
||||||
|
7,278
|
||||||
|
1120,572
|
||||||
|
1200,439
|
||||||
|
629,234
|
||||||
|
298,634
|
||||||
|
315,493
|
||||||
|
1178,513
|
||||||
|
1019,402
|
||||||
|
159,606
|
||||||
|
6,79
|
||||||
|
460,834
|
||||||
|
897,894
|
||||||
|
997,495
|
||||||
|
55,87
|
||||||
|
492,624
|
||||||
|
880,529
|
||||||
|
641,739
|
||||||
|
31,707
|
||||||
|
673,397
|
||||||
|
800,753
|
||||||
|
1245,297
|
||||||
|
463,205
|
||||||
|
1012,242
|
||||||
|
631,432
|
||||||
|
1275,731
|
||||||
|
77,590
|
||||||
|
157,786
|
||||||
|
855,626
|
||||||
|
826,759
|
||||||
|
855,519
|
||||||
|
492,270
|
||||||
|
1200,455
|
||||||
|
1154,31
|
||||||
|
1268,469
|
||||||
|
947,178
|
||||||
|
564,870
|
||||||
|
748,21
|
||||||
|
199,71
|
||||||
|
771,284
|
||||||
|
1158,92
|
||||||
|
50,194
|
||||||
|
455,499
|
||||||
|
672,623
|
||||||
|
484,31
|
||||||
|
218,695
|
||||||
|
581,541
|
||||||
|
251,59
|
||||||
|
952,834
|
||||||
|
1258,884
|
||||||
|
885,428
|
||||||
|
351,715
|
||||||
|
1181,501
|
||||||
|
455,338
|
||||||
|
192,800
|
||||||
|
497,100
|
||||||
|
400,758
|
||||||
|
1061,494
|
||||||
|
1260,588
|
||||||
|
1198,571
|
||||||
|
986,285
|
||||||
|
947,316
|
||||||
|
1007,779
|
||||||
|
426,572
|
||||||
|
1151,606
|
||||||
|
725,301
|
||||||
|
144,753
|
||||||
|
323,550
|
||||||
|
663,54
|
||||||
|
258,768
|
||||||
|
324,609
|
||||||
|
793,92
|
||||||
|
870,732
|
||||||
|
189,491
|
||||||
|
586,198
|
||||||
|
236,254
|
||||||
|
1168,521
|
||||||
|
708,212
|
||||||
|
8,86
|
||||||
|
676,32
|
||||||
|
1292,592
|
||||||
|
102,208
|
||||||
|
1156,645
|
||||||
|
137,851
|
||||||
|
403,288
|
||||||
|
137,802
|
||||||
|
3,799
|
||||||
|
683,255
|
||||||
|
50,28
|
||||||
|
232,824
|
||||||
|
647,54
|
||||||
|
669,644
|
||||||
|
1082,796
|
||||||
|
602,212
|
||||||
|
1275,578
|
||||||
|
846,572
|
||||||
|
517,92
|
||||||
|
199,556
|
||||||
|
137,887
|
||||||
|
117,362
|
||||||
|
170,535
|
||||||
|
323,127
|
||||||
|
363,642
|
||||||
|
826,863
|
||||||
|
398,201
|
||||||
|
1200,389
|
||||||
|
813,49
|
||||||
|
440,43
|
||||||
|
800,893
|
||||||
|
1238,235
|
||||||
|
855,44
|
||||||
|
909,801
|
||||||
|
647,840
|
||||||
|
641,644
|
||||||
|
504,268
|
||||||
|
607,835
|
||||||
|
1275,316
|
||||||
|
126,462
|
||||||
|
383,652
|
||||||
|
1004,696
|
||||||
|
647,168
|
||||||
|
28,746
|
||||||
|
321,835
|
||||||
|
251,835
|
||||||
|
972,140
|
||||||
|
987,550
|
||||||
|
120,581
|
||||||
|
623,259
|
||||||
|
1160,122
|
||||||
|
1290,696
|
||||||
|
1026,201
|
||||||
|
857,712
|
||||||
|
488,28
|
||||||
|
488,789
|
||||||
|
922,822
|
||||||
|
175,605
|
||||||
|
484,135
|
||||||
|
78,425
|
||||||
|
512,221
|
||||||
|
241,894
|
||||||
|
422,152
|
||||||
|
932,794
|
||||||
|
584,474
|
||||||
|
1277,794
|
||||||
|
1009,522
|
||||||
|
117,138
|
||||||
|
227,784
|
||||||
|
534,389
|
||||||
|
1275,163
|
||||||
|
1150,77
|
||||||
|
741,448
|
||||||
|
1091,466
|
||||||
|
1178,289
|
||||||
|
253,801
|
||||||
|
681,234
|
||||||
|
1238,841
|
||||||
|
174,719
|
||||||
|
1300,425
|
||||||
|
661,275
|
||||||
|
232,294
|
||||||
|
884,348
|
||||||
|
1275,44
|
||||||
|
331,442
|
||||||
|
619,163
|
||||||
|
542,284
|
||||||
|
189,403
|
||||||
|
258,63
|
||||||
|
326,830
|
||||||
|
1176,298
|
||||||
|
1263,840
|
||||||
|
1260,28
|
||||||
|
28,148
|
||||||
|
930,10
|
||||||
|
654,288
|
||||||
|
256,411
|
||||||
|
363,578
|
||||||
|
109,56
|
||||||
|
1297,644
|
||||||
|
363,716
|
||||||
|
65,752
|
||||||
|
910,136
|
||||||
|
1082,348
|
||||||
|
464,572
|
||||||
|
440,267
|
||||||
|
967,725
|
||||||
|
182,1
|
||||||
|
199,395
|
||||||
|
1004,449
|
||||||
|
982,512
|
||||||
|
1011,31
|
||||||
|
962,248
|
||||||
|
1019,716
|
||||||
|
35,44
|
||||||
|
497,794
|
||||||
|
94,152
|
||||||
|
253,577
|
||||||
|
542,323
|
||||||
|
281,836
|
||||||
|
452,581
|
||||||
|
1215,439
|
||||||
|
319,278
|
||||||
|
1118,800
|
||||||
|
557,204
|
||||||
|
564,864
|
||||||
|
576,530
|
||||||
|
1116,221
|
||||||
|
239,390
|
||||||
|
1215,455
|
||||||
|
313,495
|
||||||
|
1288,355
|
||||||
|
564,248
|
||||||
|
1263,507
|
||||||
|
338,754
|
||||||
|
768,571
|
||||||
|
651,799
|
||||||
|
1307,799
|
||||||
|
125,182
|
||||||
|
662,45
|
||||||
|
644,364
|
||||||
|
226,130
|
||||||
|
1009,372
|
||||||
|
197,112
|
||||||
|
154,645
|
||||||
|
88,703
|
||||||
|
401,838
|
||||||
|
505,663
|
||||||
|
1019,411
|
||||||
|
684,148
|
||||||
|
806,122
|
||||||
|
785,393
|
||||||
|
438,837
|
||||||
|
914,768
|
||||||
|
1218,40
|
||||||
|
465,611
|
||||||
|
78,537
|
||||||
|
363,130
|
||||||
|
750,178
|
||||||
|
1258,212
|
||||||
|
1304,583
|
||||||
|
264,473
|
||||||
|
1176,596
|
||||||
|
888,70
|
||||||
|
1019,178
|
||||||
|
1153,786
|
||||||
|
577,366
|
||||||
|
917,466
|
||||||
|
1004,445
|
||||||
|
1153,794
|
||||||
|
254,192
|
||||||
|
170,359
|
||||||
|
888,152
|
||||||
|
950,889
|
||||||
|
1241,369
|
||||||
|
870,715
|
||||||
|
318,85
|
||||||
|
855,395
|
||||||
|
768,324
|
||||||
|
720,572
|
||||||
|
858,761
|
||||||
|
248,581
|
||||||
|
733,366
|
||||||
|
930,371
|
||||||
|
5,338
|
||||||
|
341,119
|
||||||
|
796,91
|
||||||
|
264,802
|
||||||
|
315,45
|
||||||
|
954,260
|
||||||
|
234,761
|
||||||
|
348,646
|
||||||
|
997,26
|
||||||
|
688,889
|
||||||
|
418,198
|
||||||
|
691,619
|
||||||
|
713,310
|
||||||
|
1078,600
|
||||||
|
504,570
|
||||||
|
95,455
|
||||||
|
125,712
|
||||||
|
1068,530
|
||||||
|
1113,336
|
||||||
|
149,159
|
||||||
|
94,600
|
||||||
|
1014,386
|
||||||
|
880,365
|
||||||
|
947,700
|
||||||
|
78,672
|
||||||
|
405,110
|
||||||
|
137,731
|
||||||
|
577,304
|
||||||
|
733,528
|
||||||
|
962,646
|
||||||
|
1057,765
|
||||||
|
397,378
|
||||||
|
959,640
|
||||||
|
813,548
|
||||||
|
554,354
|
||||||
|
858,514
|
||||||
|
1215,827
|
||||||
|
669,103
|
||||||
|
1009,884
|
||||||
|
258,831
|
||||||
|
52,212
|
||||||
|
465,663
|
||||||
|
233,516
|
||||||
|
72,659
|
||||||
|
992,361
|
||||||
|
1175,689
|
||||||
|
1232,537
|
||||||
|
159,288
|
||||||
|
50,588
|
||||||
|
338,140
|
||||||
|
725,605
|
||||||
|
495,606
|
||||||
|
788,157
|
||||||
|
5,556
|
||||||
|
301,884
|
||||||
|
259,823
|
||||||
|
363,194
|
||||||
|
858,313
|
||||||
|
306,445
|
||||||
|
291,642
|
||||||
|
1063,341
|
||||||
|
858,133
|
||||||
|
430,414
|
||||||
|
952,60
|
||||||
|
445,586
|
||||||
|
585,605
|
||||||
|
1019,611
|
||||||
|
909,56
|
||||||
|
662,583
|
||||||
|
120,133
|
||||||
|
651,95
|
||||||
|
74,885
|
||||||
|
35,731
|
||||||
|
905,46
|
||||||
|
1016,5
|
||||||
|
248,189
|
||||||
|
850,732
|
||||||
|
915,350
|
||||||
|
649,570
|
||||||
|
544,10
|
||||||
|
157,868
|
||||||
|
1185,182
|
||||||
|
1057,577
|
||||||
|
388,822
|
||||||
|
224,32
|
||||||
|
393,466
|
||||||
|
658,285
|
||||||
|
321,387
|
||||||
|
50,476
|
||||||
|
706,570
|
||||||
|
460,225
|
||||||
|
1242,198
|
||||||
|
636,302
|
||||||
|
1081,128
|
||||||
|
421,378
|
||||||
|
905,784
|
||||||
|
535,694
|
||||||
|
582,640
|
||||||
|
602,596
|
||||||
|
189,439
|
||||||
|
372,121
|
||||||
|
266,865
|
||||||
|
499,549
|
||||||
|
47,840
|
||||||
|
1140,863
|
||||||
|
94,534
|
||||||
|
797,399
|
||||||
|
1307,80
|
||||||
|
167,575
|
||||||
|
542,324
|
||||||
|
413,894
|
||||||
|
1007,403
|
||||||
|
969,851
|
||||||
|
982,522
|
||||||
|
331,452
|
||||||
|
698,581
|
||||||
|
323,568
|
||||||
|
413,521
|
||||||
|
318,361
|
||||||
|
170,493
|
||||||
|
396,696
|
||||||
|
750,86
|
||||||
|
602,165
|
||||||
|
651,782
|
||||||
|
338,469
|
||||||
|
1304,759
|
||||||
|
666,364
|
||||||
|
170,759
|
||||||
|
1153,845
|
||||||
|
170,863
|
||||||
|
1238,53
|
||||||
|
884,572
|
||||||
|
940,201
|
||||||
|
661,324
|
||||||
|
641,103
|
||||||
|
1295,128
|
||||||
|
855,338
|
||||||
|
1220,248
|
||||||
|
199,268
|
||||||
|
303,563
|
||||||
|
1121,491
|
||||||
|
1069,894
|
||||||
|
504,122
|
||||||
|
741,409
|
||||||
|
435,359
|
||||||
|
889,378
|
||||||
|
552,865
|
||||||
|
542,603
|
||||||
|
865,586
|
||||||
|
402,639
|
||||||
|
460,673
|
||||||
|
1253,758
|
||||||
|
1268,771
|
||||||
|
947,163
|
||||||
|
1044,29
|
||||||
|
1078,626
|
||||||
|
820,176
|
||||||
|
330,285
|
||||||
|
663,278
|
||||||
|
709,835
|
||||||
|
975,726
|
||||||
|
72,841
|
||||||
|
109,838
|
||||||
|
1153,868
|
||||||
|
1303,392
|
||||||
|
995,493
|
||||||
|
980,609
|
||||||
|
1295,169
|
||||||
|
912,5
|
||||||
|
626,746
|
||||||
|
398,693
|
||||||
|
1153,627
|
||||||
|
847,689
|
||||||
|
959,219
|
||||||
|
1007,627
|
||||||
|
383,18
|
||||||
|
7,616
|
||||||
|
157,794
|
||||||
|
1237,93
|
||||||
|
1279,187
|
||||||
|
982,382
|
||||||
|
1007,675
|
||||||
|
135,689
|
||||||
|
1101,756
|
||||||
|
262,572
|
||||||
|
662,849
|
||||||
|
455,395
|
||||||
|
547,485
|
||||||
|
363,252
|
||||||
|
547,466
|
||||||
|
641,791
|
||||||
|
294,5
|
||||||
|
908,191
|
||||||
|
432,523
|
||||||
|
107,485
|
||||||
|
95,7
|
||||||
|
464,322
|
||||||
|
1146,36
|
||||||
|
875,466
|
||||||
|
1131,333
|
||||||
|
440,162
|
||||||
|
642,716
|
||||||
|
306,198
|
||||||
|
284,469
|
||||||
|
969,291
|
||||||
|
724,544
|
||||||
|
232,268
|
||||||
|
1128,1
|
||||||
|
483,670
|
||||||
|
422,600
|
||||||
|
68,198
|
||||||
|
1282,199
|
||||||
|
120,761
|
||||||
|
112,571
|
||||||
|
258,696
|
||||||
|
805,159
|
||||||
|
741,37
|
||||||
|
1307,528
|
||||||
|
698,805
|
||||||
|
1074,472
|
||||||
|
1111,395
|
||||||
|
1227,117
|
||||||
|
663,168
|
||||||
|
31,187
|
||||||
|
406,581
|
||||||
|
995,849
|
||||||
|
639,745
|
||||||
|
1084,764
|
||||||
|
12,850
|
||||||
|
1253,584
|
||||||
|
1297,287
|
||||||
|
328,74
|
||||||
|
42,805
|
||||||
|
979,792
|
||||||
|
878,523
|
||||||
|
734,805
|
||||||
|
947,252
|
||||||
|
703,333
|
||||||
|
1297,159
|
||||||
|
723,96
|
||||||
|
560,178
|
||||||
|
1279,707
|
||||||
|
13,71
|
||||||
|
124,380
|
||||||
|
1166,753
|
||||||
|
813,267
|
||||||
|
403,507
|
||||||
|
651,344
|
||||||
|
1307,560
|
||||||
|
95,887
|
||||||
|
370,649
|
||||||
|
530,828
|
||||||
|
1077,378
|
||||||
|
838,109
|
||||||
|
162,596
|
||||||
|
197,838
|
||||||
|
334,364
|
||||||
|
818,270
|
||||||
|
510,305
|
||||||
|
729,541
|
||||||
|
845,611
|
||||||
|
671,337
|
||||||
|
783,71
|
||||||
|
323,351
|
||||||
|
1193,362
|
||||||
|
1258,682
|
||||||
|
351,752
|
||||||
|
490,718
|
||||||
|
261,466
|
||||||
|
875,709
|
||||||
|
89,166
|
||||||
|
457,56
|
||||||
|
69,525
|
||||||
|
372,773
|
||||||
|
363,499
|
||||||
|
430,870
|
||||||
|
589,590
|
||||||
|
889,513
|
||||||
|
914,70
|
||||||
|
1092,695
|
||||||
|
576,364
|
||||||
|
1028,121
|
||||||
|
1198,851
|
||||||
|
522,605
|
||||||
|
1143,575
|
||||||
|
1111,402
|
||||||
|
426,546
|
||||||
|
1295,149
|
||||||
|
|
||||||
|
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
|
102
2021/full/day14.txt
Normal file
102
2021/full/day14.txt
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
SNPVPFCPPKSBNSPSPSOF
|
||||||
|
|
||||||
|
CF -> N
|
||||||
|
NK -> B
|
||||||
|
SF -> B
|
||||||
|
HV -> P
|
||||||
|
FN -> S
|
||||||
|
VV -> F
|
||||||
|
FO -> F
|
||||||
|
VN -> V
|
||||||
|
PV -> P
|
||||||
|
FF -> P
|
||||||
|
ON -> S
|
||||||
|
PB -> S
|
||||||
|
PK -> P
|
||||||
|
OO -> P
|
||||||
|
SP -> F
|
||||||
|
VF -> H
|
||||||
|
OV -> C
|
||||||
|
BN -> P
|
||||||
|
OH -> H
|
||||||
|
NC -> F
|
||||||
|
BH -> N
|
||||||
|
CS -> C
|
||||||
|
BC -> N
|
||||||
|
OF -> N
|
||||||
|
SN -> B
|
||||||
|
FP -> F
|
||||||
|
FV -> K
|
||||||
|
HP -> H
|
||||||
|
VB -> P
|
||||||
|
FH -> F
|
||||||
|
HF -> P
|
||||||
|
BB -> O
|
||||||
|
HH -> S
|
||||||
|
PC -> O
|
||||||
|
PP -> B
|
||||||
|
VS -> B
|
||||||
|
HC -> H
|
||||||
|
NS -> N
|
||||||
|
KF -> S
|
||||||
|
BO -> V
|
||||||
|
NP -> S
|
||||||
|
NF -> K
|
||||||
|
BS -> O
|
||||||
|
KK -> O
|
||||||
|
VC -> V
|
||||||
|
KP -> K
|
||||||
|
CK -> P
|
||||||
|
HN -> F
|
||||||
|
KN -> H
|
||||||
|
KH -> N
|
||||||
|
SB -> S
|
||||||
|
NO -> K
|
||||||
|
HK -> H
|
||||||
|
BF -> V
|
||||||
|
SV -> B
|
||||||
|
CV -> P
|
||||||
|
CO -> P
|
||||||
|
FC -> O
|
||||||
|
CP -> H
|
||||||
|
CC -> N
|
||||||
|
CN -> P
|
||||||
|
SK -> V
|
||||||
|
SS -> V
|
||||||
|
VH -> B
|
||||||
|
OS -> N
|
||||||
|
FB -> H
|
||||||
|
NB -> N
|
||||||
|
SC -> K
|
||||||
|
NV -> H
|
||||||
|
HO -> S
|
||||||
|
SO -> P
|
||||||
|
PH -> C
|
||||||
|
VO -> O
|
||||||
|
OB -> O
|
||||||
|
FK -> S
|
||||||
|
PN -> P
|
||||||
|
VK -> O
|
||||||
|
NH -> N
|
||||||
|
OC -> B
|
||||||
|
BP -> O
|
||||||
|
PF -> F
|
||||||
|
KB -> K
|
||||||
|
KV -> B
|
||||||
|
PO -> N
|
||||||
|
NN -> K
|
||||||
|
CH -> O
|
||||||
|
KC -> P
|
||||||
|
OP -> V
|
||||||
|
VP -> F
|
||||||
|
OK -> P
|
||||||
|
FS -> K
|
||||||
|
CB -> S
|
||||||
|
HB -> N
|
||||||
|
KS -> O
|
||||||
|
BK -> C
|
||||||
|
BV -> O
|
||||||
|
SH -> H
|
||||||
|
PS -> N
|
||||||
|
HS -> K
|
||||||
|
KO -> N
|
100
2021/full/day15.txt
Normal file
100
2021/full/day15.txt
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
8278572114793756191833561127452853426929615899116958969481427593944191389121411192127899512211639555
|
||||||
|
2495171585122426519281919685613271991924121543192937558138395964783255375528718245475125436917188379
|
||||||
|
7961821999883965642974131223415952226122149135757469151378271261942142914126999286296912626324385126
|
||||||
|
6441179418166119485338911954311735412134219517651998824469721124695113922376591228278111534398748579
|
||||||
|
8424516666869191815919915114592841194492325941357613456911196292486835511835219129622871119578589971
|
||||||
|
4934282611638317524366865197791637785138383929285174289723984228151951111983211626913556611911829937
|
||||||
|
1151621499331229211126371681389432146113111191182949449598792179919361176214191999459113112713976728
|
||||||
|
3543168652917496122811711414994886233243178481181718739884152128165181497816913243592225189281913243
|
||||||
|
8119874956918529299886117198419866996469979678721168111546811425162192142928429419213182343144695232
|
||||||
|
3715358458184981829314869115929193353913729251938123314814899961596542283596814884718213256699682795
|
||||||
|
1457749119784391733139584826119658874912622938352136991922153247283117211453981321869218151772119241
|
||||||
|
7179176958892653731299198523131231844957919593248775178121191579258731497841241367137171199591213113
|
||||||
|
4471161421339111933369587973937292894188371915184619223639743975336137681191429298916799146143115252
|
||||||
|
1931215141473344532681163495387852753769911119111496117891655513181516411521451328225794431126335749
|
||||||
|
9151689756849234387443425922933377332991858479147517224818914914425732127251965496121942295591183172
|
||||||
|
2566113547914162641599298843229739383828642848144944852282893912779288715932788642899891297329297335
|
||||||
|
9922876696896994217561793182369411198699179871259954463871913115184734221799911711326923219223276139
|
||||||
|
2411339863315612919718312194943949341228281651784525919132828782375965326712781781442989945125592185
|
||||||
|
1418841118819719419136342692253322911243214985154999627192389816921612619549481134921215629682111939
|
||||||
|
2991112471164498237119512836126148891288395561377883392312743919942937825816841441118322241659389277
|
||||||
|
2369155536658248242446196714214179784918844181199991939119268159197418739116392138931189992188846971
|
||||||
|
3139737615566929828592321519611921732953991396521141165811881293391199737587536111331331196419156798
|
||||||
|
2473192981948227987111687486532119994897341114574629339124219164536824734799478832613111816588191148
|
||||||
|
4311152779495176926527172116979937356891171332243361912427574933999759591533258454228319797436295139
|
||||||
|
4296794597642297911762612592247759519869443198118291875988399937961162212147523611425284112262745711
|
||||||
|
2919426121311135263324939726832931137973611199921321523791621141513222863567654962618137111392894422
|
||||||
|
4634915181699181572153395211661987562131211481129117478131424114241178921227517288679722328986823922
|
||||||
|
6297719121113669981592326191394834414485988819761166812197429119921315747318111218181992586126993919
|
||||||
|
3318614241139113159116719411236593772715946293531825213649325427717633162144974482959899826716597521
|
||||||
|
2383419157242919637211129811118515633215692397315115195991989124876193315459918971973489494911283217
|
||||||
|
9521529194981517981232979669792487442129597979226311938488195924436928541121214639119337935199991117
|
||||||
|
2192189971299175771117868563478533237938994962133199366951122734186711527399931794763686991514814662
|
||||||
|
7881913138114955461135924149222738381179396843291244767312291267247642317671911986256995961422161959
|
||||||
|
3843362141443222644212379314232847247972118224544224919819451911833619826719779527571929718196858145
|
||||||
|
8385162537318633361137193897832962297676464912264123117394391829196261318841959998837814919924922953
|
||||||
|
8221212119334729141984389191114483517898927112545166192711293823912553322553197819157776647516939141
|
||||||
|
3255619572231874771181619628278542957284278985715127319521445711213483781683791875823115112171161593
|
||||||
|
5128122983945275882694953934111585511282939925866973662677121821923965945796285431719542616138158188
|
||||||
|
1114714187852179791925944829277928365391625896371297229279856697273911118484711381511757931867215649
|
||||||
|
2136995112393969411115117811392578597296824186351393148827913317214177929268227343313353893923511632
|
||||||
|
4425479887766493391898627186142951193972698451215519114983911227179622146954172418992341826112167866
|
||||||
|
5111387196811253395631314459132217416234828743931596134128141969141158686811353152121616931964797891
|
||||||
|
1281981853884141491129192211466222912384397781318376518318151569516738296599922374687193924811575151
|
||||||
|
4214168945722211551589814173167426111979895615335479353741989719899321828311892898131998119379778971
|
||||||
|
1698126514489399112929175994131914431611342772121934925432344544423913839915832992371361426254688971
|
||||||
|
2611741223511697957256712677157994471229119912479116238329218159118319417112711251115741432298991675
|
||||||
|
1986199322419269948123997119141417276181122386587573999448625998979137444139118661231916299216237816
|
||||||
|
1192692299325547983953157273594191687111773574111831139919179117182211537317191492612996482125719135
|
||||||
|
2618137369191556773571949529451551811187939855121392262981116194316131959155491562182411351259963197
|
||||||
|
8291227832771244631183289512115145431921179351599239991889721749519277227819196284578312711114771933
|
||||||
|
8981962179738463579242192181563523744938932338629418123118165383629833214199619655973411258287294111
|
||||||
|
8619915743617939513929219214969281929991561391431128913883571199794329274227297771481964191959319854
|
||||||
|
9661921896148816274329413191213247721642973365721833219284864558144513363393813619978321483549692113
|
||||||
|
1221822379347999136211136218671719191161287539743533389111571921729981996951171917511894919222458338
|
||||||
|
9179814439128882333169175926635746971123349598164185736129161426323644543783696391977888446282158193
|
||||||
|
8919941115162197814112689589249939913122148387958484396667721419199788161191494147954329319451368227
|
||||||
|
1283383939189511883998654629172448151128762184636314937172618589313123848776939135383681811654471522
|
||||||
|
4715619189119739192634991921998844714396939583519299492337911136398474149811151145461933134874142828
|
||||||
|
1117481573895941939424518349392997473449671461935946881181312652591682539197685834621162263218683198
|
||||||
|
9394562899911652727388398568123241827141738357143277722124594366392682466191119988911992663238764771
|
||||||
|
2585966996818144122959341112693718175511912678919195958899282312779823311945811917412189169191914619
|
||||||
|
1848495443417266121112634424271555676396443373324838214497832614396187418192188918146284171173421749
|
||||||
|
6219895897831829379714113972317818929697612535358251896324917772691898279896669612539591147152489338
|
||||||
|
6115612912112113324242167994435148645911867787136267211781213917111546157212149287331129992317887151
|
||||||
|
6118169128927892484311512131621967642919324341529263891337911411129492162612776899121931248882139644
|
||||||
|
6884838296782692281158822326814131725184916187194546991912899824434812718735631819653791998193841264
|
||||||
|
3485227759142991956221813281664289335731621123188291134995562639531863888211751951122552236997334852
|
||||||
|
4845141111241192161537876516198782167269132581522211179712915387257181133491267199451122265499922659
|
||||||
|
2477848488634968257491171291519224412581996417371411931394372219338545611181523931293424196381115936
|
||||||
|
8911319712238921239948883419991938254319821221163746121194349641739831829966821897752722981537562291
|
||||||
|
8292478573168677999812391286993666192914511399319138945554999392894819423181966166488181891969131749
|
||||||
|
3264173311179517375193219491832914392218389931492941426132248467586919997529138838826141892437977563
|
||||||
|
8319936993882457327125991956278814829118421321922375769776436683211313756211534968729618521882226127
|
||||||
|
8638599994131461557113578449423472638334111745934214239234929925229712127897989732923483271191411596
|
||||||
|
1523419968194149815212174333853151919128599116116518413315158689181119643842371922352598214112729111
|
||||||
|
1224189161195993439421611631912867163999222335519879636723284419496865292871251261634369981276431216
|
||||||
|
7917832715864343179944317954494748181747449119129421199134193985168143693142131121189224214116129789
|
||||||
|
1995274614784214559849841188151381892312137231555881234712143592531781694159197143298119349576313288
|
||||||
|
6872676869621987263257677493158696216232141889137144892149212252643429691459127525396618722228211355
|
||||||
|
9529131312198127195146611139957169375945817199886385734424125668955254391749172287495221433939346271
|
||||||
|
1317597221324639268821956316831718923818731193924341148895319223528139911981118618392281299815415484
|
||||||
|
6311491136929625422264122934959537441311729119921619133219127391911591173775188988221145475286479247
|
||||||
|
2214669476122959718451929746211392861541917917111355149672919182998486751591424875262899741911991966
|
||||||
|
5487717296119894141568198141794929233554118134815419581752348188169498421912911863811199812577419228
|
||||||
|
3287347189899116764139996172211718221461156348196278882293319458126326275182618429176619478622567138
|
||||||
|
1217339827453222194178294713351137215119153323897976211844191311588753942221192915127591664618634566
|
||||||
|
8391229721621914838897761141891492975212126113876523932971411182631292177219192741129962223763588181
|
||||||
|
9281395981783715414967594956432849942278193925471491289523616222495169785232911414516328962999974978
|
||||||
|
7536568137284691778271641238229711141621826181987912357983119929869911582296219171189725615212124465
|
||||||
|
9595583261896818139583613922162716243317157921593921818213913993135811139511646138183273731177299744
|
||||||
|
1478335243376975293521995994234166518112945289282915476547398231571885929451238161265918286396527143
|
||||||
|
3589659231838871758533921821826411128778214875195493613897887818994186862452911921219752434728159178
|
||||||
|
1519822318615118939492581148919717226195114292383874899669291852333991742198362725995259791943333211
|
||||||
|
9795914596639922726274191923229243293291863125939211616969521549341942544782482711218467872852318217
|
||||||
|
5613289519141121739839293878959282231316192133211496939347144791959915179746671957919621313595284142
|
||||||
|
9181131731288744182367198138971923921179618862219412318217797142481389325923525313271629938185882472
|
||||||
|
5551511368118741121367417369949814314261396112791258129753271621312272649275289184568199481948313935
|
||||||
|
2241379916113999611116384261153791251196441711978721719853121261161249511335295434239192122475341439
|
||||||
|
2953391923245469371889427113838314197862363197769418641714149439123119271299765999981554921212242232
|
||||||
|
2429196117668731239983129261421913394811262338222177425225587612716828952193511255156792968133924511
|
1
2021/full/day16.txt
Normal file
1
2021/full/day16.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
E0529D18025800ABCA6996534CB22E4C00FB48E233BAEC947A8AA010CE1249DB51A02CC7DB67EF33D4002AE6ACDC40101CF0449AE4D9E4C071802D400F84BD21CAF3C8F2C35295EF3E0A600848F77893360066C200F476841040401C88908A19B001FD35CCF0B40012992AC81E3B980553659366736653A931018027C87332011E2771FFC3CEEC0630A80126007B0152E2005280186004101060C03C0200DA66006B8018200538012C01F3300660401433801A6007380132DD993100A4DC01AB0803B1FE2343500042E24C338B33F5852C3E002749803B0422EC782004221A41A8CE600EC2F8F11FD0037196CF19A67AA926892D2C643675A0C013C00CC0401F82F1BA168803510E3942E969C389C40193CFD27C32E005F271CE4B95906C151003A7BD229300362D1802727056C00556769101921F200AC74015960E97EC3F2D03C2430046C0119A3E9A3F95FD3AFE40132CEC52F4017995D9993A90060729EFCA52D3168021223F2236600ECC874E10CC1F9802F3A71C00964EC46E6580402291FE59E0FCF2B4EC31C9C7A6860094B2C4D2E880592F1AD7782992D204A82C954EA5A52E8030064D02A6C1E4EA852FE83D49CB4AE4020CD80272D3B4AA552D3B4AA5B356F77BF1630056C0119FF16C5192901CEDFB77A200E9E65EAC01693C0BCA76FEBE73487CC64DEC804659274A00CDC401F8B51CE3F8803B05217C2E40041A72E2516A663F119AC72250A00F44A98893C453005E57415A00BCD5F1DD66F3448D2600AC66F005246500C9194039C01986B317CDB10890C94BF68E6DF950C0802B09496E8A3600BCB15CA44425279539B089EB7774DDA33642012DA6B1E15B005C0010C8C917A2B880391160944D30074401D845172180803D1AA3045F00042630C5B866200CC2A9A5091C43BBD964D7F5D8914B46F040
|
1
2021/full/day17.txt
Normal file
1
2021/full/day17.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
target area: x=150..171, y=-129..-70
|
100
2021/full/day18.txt
Normal file
100
2021/full/day18.txt
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
[5,[7,[8,4]]]
|
||||||
|
[[[4,1],[6,[9,3]]],[[7,4],[5,[7,0]]]]
|
||||||
|
[[6,2],[[[8,6],[5,5]],0]]
|
||||||
|
[[[5,9],[3,[4,2]]],[[[1,2],0],2]]
|
||||||
|
[[[[4,3],2],0],[[[1,7],[1,2]],[[8,2],[6,7]]]]
|
||||||
|
[[[[0,1],9],3],[[4,7],[7,8]]]
|
||||||
|
[[[[8,7],4],[5,[9,2]]],[[8,[9,6]],[1,8]]]
|
||||||
|
[[[2,3],[[9,9],[7,0]]],[6,7]]
|
||||||
|
[8,[[9,9],[8,6]]]
|
||||||
|
[[[[5,7],[7,1]],[3,[7,6]]],[2,[[5,5],[8,3]]]]
|
||||||
|
[[[7,0],2],[[[2,2],7],[6,[2,9]]]]
|
||||||
|
[[6,2],[[0,8],8]]
|
||||||
|
[[[[2,9],4],9],[1,[[6,9],[7,5]]]]
|
||||||
|
[[[9,3],[[5,7],[3,1]]],[5,[6,[7,8]]]]
|
||||||
|
[0,[[8,9],1]]
|
||||||
|
[[4,[[4,3],4]],[7,[[4,0],0]]]
|
||||||
|
[[0,[[1,9],[6,1]]],[[[7,0],[5,2]],[[3,8],[0,4]]]]
|
||||||
|
[[[2,7],[7,[1,6]]],[6,[[8,7],[8,5]]]]
|
||||||
|
[[9,5],[[1,[2,5]],[8,[2,0]]]]
|
||||||
|
[6,[[8,[9,4]],[9,8]]]
|
||||||
|
[[[[2,0],[4,6]],3],[[8,0],4]]
|
||||||
|
[[[8,8],[[5,7],[5,6]]],5]
|
||||||
|
[[5,[[7,9],9]],[1,6]]
|
||||||
|
[[[[5,2],[4,9]],[[1,9],[2,9]]],[[[6,8],[7,5]],[[0,2],4]]]
|
||||||
|
[1,[5,[[5,5],[1,2]]]]
|
||||||
|
[[[1,4],[[0,3],7]],[[[9,1],9],[[2,3],7]]]
|
||||||
|
[[[[6,4],[4,0]],[[3,4],[7,0]]],[[8,7],[5,[0,6]]]]
|
||||||
|
[[3,[8,[2,8]]],[9,[0,[5,2]]]]
|
||||||
|
[[7,[[1,8],1]],[6,[6,6]]]
|
||||||
|
[[[3,[9,4]],[[3,2],[5,2]]],8]
|
||||||
|
[3,[[4,[4,3]],[5,[9,2]]]]
|
||||||
|
[[[1,8],[2,[7,5]]],[[0,[8,1]],[2,0]]]
|
||||||
|
[1,3]
|
||||||
|
[7,[[[9,6],[8,4]],9]]
|
||||||
|
[6,4]
|
||||||
|
[[[8,9],[[3,7],2]],[4,[[5,0],8]]]
|
||||||
|
[[[[1,8],[7,9]],0],[[[4,4],3],[4,[1,7]]]]
|
||||||
|
[[[[2,2],[0,9]],[1,2]],[[[9,1],[0,0]],[[1,6],4]]]
|
||||||
|
[[[[8,1],6],[[3,3],[6,7]]],[[2,3],5]]
|
||||||
|
[[[[9,0],7],6],[[[3,6],[6,7]],3]]
|
||||||
|
[[[[1,0],6],[5,[0,0]]],[[[9,7],7],5]]
|
||||||
|
[[[[5,1],4],[[7,7],[6,2]]],[[0,[6,0]],2]]
|
||||||
|
[[[[8,3],[0,4]],[[9,9],[3,7]]],[[[2,7],[2,9]],[[2,0],[4,7]]]]
|
||||||
|
[6,[[[4,8],0],8]]
|
||||||
|
[[[6,[5,9]],[[0,3],9]],[[[2,5],[9,5]],0]]
|
||||||
|
[[1,4],[6,[0,[6,2]]]]
|
||||||
|
[9,[[[3,7],1],7]]
|
||||||
|
[[[2,3],[[1,2],1]],[[[2,6],[0,1]],[0,[4,1]]]]
|
||||||
|
[[[0,1],[[0,3],[7,3]]],[[8,7],3]]
|
||||||
|
[[0,[[1,5],[5,3]]],4]
|
||||||
|
[[[5,3],[[5,8],6]],[[[6,0],3],[4,1]]]
|
||||||
|
[8,3]
|
||||||
|
[[[[5,5],[3,0]],6],[[7,5],[2,[9,4]]]]
|
||||||
|
[[[3,[3,3]],[[4,7],4]],[[2,0],1]]
|
||||||
|
[[[0,[2,8]],[4,[7,9]]],[[[5,4],2],2]]
|
||||||
|
[[3,[7,[1,8]]],[5,[[8,2],0]]]
|
||||||
|
[[1,9],[[6,[5,9]],8]]
|
||||||
|
[[5,[5,2]],5]
|
||||||
|
[[[1,1],[4,3]],1]
|
||||||
|
[[[[6,9],[4,1]],0],[[[3,0],6],7]]
|
||||||
|
[[9,[[7,3],6]],[[[7,2],0],[9,9]]]
|
||||||
|
[[5,4],[[[6,0],[5,1]],7]]
|
||||||
|
[[[4,0],0],[[[2,6],[4,4]],[[6,8],2]]]
|
||||||
|
[[[9,6],8],[[0,[9,5]],9]]
|
||||||
|
[[6,[2,5]],[[[1,8],[9,0]],[[4,0],[5,7]]]]
|
||||||
|
[5,[[8,[9,9]],[5,[6,8]]]]
|
||||||
|
[[[7,[9,0]],5],6]
|
||||||
|
[[9,[[3,7],[3,0]]],[[[7,2],[5,7]],[[0,5],[7,4]]]]
|
||||||
|
[[7,3],[[6,5],[9,4]]]
|
||||||
|
[[4,[4,3]],[9,[[2,6],0]]]
|
||||||
|
[[[6,[0,1]],9],[[7,[3,2]],[[0,1],[5,2]]]]
|
||||||
|
[[5,[0,[3,1]]],[[[1,1],[8,9]],[[6,3],[0,9]]]]
|
||||||
|
[[[[2,8],0],[[8,7],4]],[[[9,6],3],[[7,8],[2,3]]]]
|
||||||
|
[[[[1,0],1],4],[4,9]]
|
||||||
|
[[[7,8],5],[[[3,7],[5,7]],6]]
|
||||||
|
[[[8,[7,4]],[[1,6],[6,7]]],[2,4]]
|
||||||
|
[[7,8],3]
|
||||||
|
[[0,[4,[3,8]]],[[[1,0],1],6]]
|
||||||
|
[[[[6,3],7],2],[[4,5],6]]
|
||||||
|
[[[5,9],[[1,8],1]],[[[1,8],8],[[6,4],0]]]
|
||||||
|
[[3,[8,[2,8]]],[[[2,8],[4,4]],9]]
|
||||||
|
[7,[5,[[3,3],3]]]
|
||||||
|
[3,[1,[0,[3,0]]]]
|
||||||
|
[[[1,2],4],[9,[[7,1],[5,4]]]]
|
||||||
|
[[[5,8],[7,[0,7]]],[0,[[2,9],8]]]
|
||||||
|
[[[7,[2,0]],[1,[4,3]]],[0,[[1,1],[2,0]]]]
|
||||||
|
[[[2,[2,5]],[4,1]],[0,[6,0]]]
|
||||||
|
[[[8,3],9],[[[4,3],[5,8]],[[7,0],9]]]
|
||||||
|
[2,[1,4]]
|
||||||
|
[[[3,[2,6]],6],[[[3,2],[0,8]],[[3,5],[6,4]]]]
|
||||||
|
[[[1,[3,3]],[[0,8],[1,3]]],[8,[[3,8],[0,8]]]]
|
||||||
|
[[[[1,5],[0,1]],3],[[6,[1,7]],[4,7]]]
|
||||||
|
[[4,[5,7]],[6,[[6,2],7]]]
|
||||||
|
[[[[7,4],[3,1]],[5,6]],[0,[6,5]]]
|
||||||
|
[[[7,[0,0]],6],[5,[[0,0],[3,5]]]]
|
||||||
|
[[[[8,7],[5,8]],[8,[9,3]]],[[7,0],[[7,2],0]]]
|
||||||
|
[[[7,[4,2]],0],[[[4,0],1],3]]
|
||||||
|
[[[6,3],[9,[2,2]]],[[0,8],[1,2]]]
|
||||||
|
[3,[[3,1],[[7,1],1]]]
|
||||||
|
[[3,[[4,0],7]],[[[4,6],[2,3]],[[0,2],[1,8]]]]
|
BIN
2021/python/09/day09.gif
Normal file
BIN
2021/python/09/day09.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 MiB |
27
2021/python/day01.py
Normal file
27
2021/python/day01.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import shared
|
||||||
|
|
||||||
|
|
||||||
|
def pt1(inp):
|
||||||
|
count = 0
|
||||||
|
for x in range(1, len(inp)):
|
||||||
|
if inp[x] > inp[x - 1]:
|
||||||
|
count += 1
|
||||||
|
return count
|
||||||
|
|
||||||
|
|
||||||
|
def pt2(inp):
|
||||||
|
count = 0
|
||||||
|
prev = 0
|
||||||
|
for x in range(2, len(inp)):
|
||||||
|
window = sum(inp[x - 3 : x])
|
||||||
|
if window > prev:
|
||||||
|
count += 1
|
||||||
|
prev = window
|
||||||
|
return count
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
with open(shared.get_fname(1), "r") as f:
|
||||||
|
inp = [int(x) for x in f.readlines()]
|
||||||
|
print(pt1(inp))
|
||||||
|
print(pt2(inp))
|
41
2021/python/day02.py
Normal file
41
2021/python/day02.py
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import shared
|
||||||
|
|
||||||
|
|
||||||
|
class Position:
|
||||||
|
def __init__(self):
|
||||||
|
self.horiz = 0
|
||||||
|
self.depth = 0
|
||||||
|
self.aim = 0
|
||||||
|
|
||||||
|
def parse_line(self, line: str):
|
||||||
|
direction, x = line.split(" ")
|
||||||
|
x = int(x)
|
||||||
|
|
||||||
|
if direction == "up":
|
||||||
|
self.aim -= x
|
||||||
|
elif direction == "down":
|
||||||
|
self.aim += x
|
||||||
|
elif direction == "forward":
|
||||||
|
self.horiz += x
|
||||||
|
self.depth += self.aim * x
|
||||||
|
|
||||||
|
def whereami(self):
|
||||||
|
return self.horiz * self.depth
|
||||||
|
|
||||||
|
|
||||||
|
def run(inp):
|
||||||
|
p = Position()
|
||||||
|
for i in inp:
|
||||||
|
p.parse_line(i)
|
||||||
|
return p.whereami()
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
with open(shared.get_fname(2), "r") as f:
|
||||||
|
inp = f.readlines()
|
||||||
|
|
||||||
|
print(run(inp))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
39
2021/python/day03.py
Normal file
39
2021/python/day03.py
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
import shared
|
||||||
|
from pprint import pprint as pp
|
||||||
|
from collections import Counter
|
||||||
|
|
||||||
|
|
||||||
|
def run(orig):
|
||||||
|
ox = grab(orig, 1, 0)
|
||||||
|
co = grab(orig, 0, 1)
|
||||||
|
return ox * co
|
||||||
|
|
||||||
|
|
||||||
|
def grab(orig, high, low):
|
||||||
|
idx = 0
|
||||||
|
while len(orig) != 1:
|
||||||
|
matrix = _rot(orig)
|
||||||
|
c = Counter(matrix[idx])
|
||||||
|
if c[1] >= c[0]:
|
||||||
|
orig = [o for o in orig if o[idx] == high]
|
||||||
|
else:
|
||||||
|
orig = [o for o in orig if o[idx] == low]
|
||||||
|
idx += 1
|
||||||
|
return int("".join(str(x) for x in orig[0]), 2)
|
||||||
|
|
||||||
|
|
||||||
|
def _rot(m):
|
||||||
|
x = list(zip(*m[::-1]))
|
||||||
|
return [list(reversed(y)) for y in x]
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
spl = lambda y: [int(w) for w in y]
|
||||||
|
with open(shared.get_fname(3), "r") as f:
|
||||||
|
rows = [x.rstrip() for x in f.readlines()]
|
||||||
|
matrix = [spl(x) for x in rows]
|
||||||
|
print(run(matrix))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
94
2021/python/day04.py
Normal file
94
2021/python/day04.py
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
import shared
|
||||||
|
from itertools import groupby
|
||||||
|
from pprint import pprint as pp
|
||||||
|
from matrix import rotate, load_matrix_file, split_line_to_int_list, get_column
|
||||||
|
from copy import deepcopy
|
||||||
|
|
||||||
|
|
||||||
|
def all_equal(iterable):
|
||||||
|
g = groupby(iterable)
|
||||||
|
return next(g, True) and not next(g, False)
|
||||||
|
|
||||||
|
|
||||||
|
class Bingo:
|
||||||
|
def __init__(self, name):
|
||||||
|
self.parse(name)
|
||||||
|
|
||||||
|
def parse(self, name):
|
||||||
|
with open(name, "r") as f:
|
||||||
|
lines = [x.rstrip() for x in f.readlines()]
|
||||||
|
self.rolls = [int(x) for x in lines.pop(0).split(",")]
|
||||||
|
lines.pop(0)
|
||||||
|
|
||||||
|
self.boards = []
|
||||||
|
current_board = []
|
||||||
|
while len(lines) > 0:
|
||||||
|
line = lines.pop(0)
|
||||||
|
if line == "":
|
||||||
|
self.boards.append(current_board)
|
||||||
|
current_board = []
|
||||||
|
continue
|
||||||
|
current_board.append(split_line_to_int_list(line))
|
||||||
|
if len(lines) == 0:
|
||||||
|
self.boards.append(current_board)
|
||||||
|
self.board_snapshot = deepcopy(self.boards)
|
||||||
|
|
||||||
|
def mark_roll(self, roll):
|
||||||
|
for idB, b in enumerate(self.boards):
|
||||||
|
breaking = False
|
||||||
|
for x, row in enumerate(b):
|
||||||
|
for y, col in enumerate(row):
|
||||||
|
if col == roll:
|
||||||
|
self.boards[idB][x][y] = -1
|
||||||
|
breaking = True
|
||||||
|
break
|
||||||
|
if breaking:
|
||||||
|
break
|
||||||
|
for idB, b in enumerate(self.boards):
|
||||||
|
winning_board = self.check_remove(idB)
|
||||||
|
if winning_board:
|
||||||
|
return winning_board
|
||||||
|
|
||||||
|
def check_remove(self, board_idx):
|
||||||
|
for row in self.boards[board_idx]:
|
||||||
|
if all_equal(row):
|
||||||
|
b = self.boards.pop(board_idx)
|
||||||
|
if len(self.boards) == 0:
|
||||||
|
return b
|
||||||
|
return
|
||||||
|
for col in zip(*self.boards[board_idx]):
|
||||||
|
if all_equal(col):
|
||||||
|
b = self.boards.pop(board_idx)
|
||||||
|
if len(self.boards) == 0:
|
||||||
|
return b
|
||||||
|
return
|
||||||
|
|
||||||
|
def roll(self):
|
||||||
|
roll = self.rolls.pop(0)
|
||||||
|
self.last_roll = roll
|
||||||
|
return self.mark_roll(roll)
|
||||||
|
|
||||||
|
def roll_all(self):
|
||||||
|
while len(self.rolls):
|
||||||
|
bingoCheck = self.roll()
|
||||||
|
if bingoCheck:
|
||||||
|
self.winner = bingoCheck
|
||||||
|
return
|
||||||
|
|
||||||
|
def total(self):
|
||||||
|
total = 0
|
||||||
|
for row in self.winner:
|
||||||
|
for col in row:
|
||||||
|
if col != -1:
|
||||||
|
total += col
|
||||||
|
return total * self.last_roll
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
b = Bingo(shared.get_fname(4))
|
||||||
|
b.roll_all()
|
||||||
|
print(b.total())
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
79
2021/python/day05.py
Normal file
79
2021/python/day05.py
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
import shared
|
||||||
|
from pprint import pprint as pp
|
||||||
|
from matrix import matrix_of_size
|
||||||
|
|
||||||
|
|
||||||
|
class Vents:
|
||||||
|
def __init__(self, name):
|
||||||
|
self.width = 0
|
||||||
|
self.height = 0
|
||||||
|
self.parse(name)
|
||||||
|
self.matrix = matrix_of_size(self.width + 1, self.height + 1)
|
||||||
|
|
||||||
|
def parse(self, name):
|
||||||
|
def _split_line(line):
|
||||||
|
one, two = line.split(" -> ")
|
||||||
|
coords = list(map(int, one.split(","))), list(map(int, two.split(",")))
|
||||||
|
(x1, y1), (x2, y2) = coords
|
||||||
|
# set grid size
|
||||||
|
if max(x1, x2) > self.width:
|
||||||
|
self.width = max(x1, x2)
|
||||||
|
if max(y1, y2) > self.height:
|
||||||
|
self.height = max(y1, y2)
|
||||||
|
return coords
|
||||||
|
|
||||||
|
with open(name, "r") as f:
|
||||||
|
self.coords = [_split_line(x.rstrip()) for x in f.readlines() if x.rstrip()]
|
||||||
|
|
||||||
|
def draw_lines(self):
|
||||||
|
for coords in self.coords:
|
||||||
|
self.draw_line(*coords)
|
||||||
|
|
||||||
|
def draw_line(self, pos1, pos2):
|
||||||
|
x1, y1 = pos1
|
||||||
|
x2, y2 = pos2
|
||||||
|
|
||||||
|
if x1 == x2: # Straight
|
||||||
|
self.draw_horizontal_x(x1, (y1, y2))
|
||||||
|
elif y1 == y2: # Straight
|
||||||
|
self.draw_horizontal_y((x1, x2), y1)
|
||||||
|
else: # diagonal
|
||||||
|
self.draw_diagonal((x1, x2), (y1, y2))
|
||||||
|
|
||||||
|
def draw_horizontal_x(self, x, y_coords):
|
||||||
|
coords = sorted(y_coords)
|
||||||
|
for y in range(coords[0], coords[1] + 1):
|
||||||
|
self.matrix[y][x] += 1
|
||||||
|
|
||||||
|
def draw_horizontal_y(self, x_coords, y):
|
||||||
|
coords = sorted(x_coords)
|
||||||
|
for x in range(coords[0], coords[1] + 1):
|
||||||
|
self.matrix[y][x] += 1
|
||||||
|
|
||||||
|
def draw_diagonal(self, x_coords, y_coords):
|
||||||
|
coords = self.generate_diagonal(*x_coords, *y_coords)
|
||||||
|
for x, y in coords:
|
||||||
|
self.matrix[y][x] += 1
|
||||||
|
|
||||||
|
def generate_diagonal(self, x1, x2, y1, y2):
|
||||||
|
x_dir, y_dir = 1, 1
|
||||||
|
if x2 < x1:
|
||||||
|
x_dir = -1
|
||||||
|
if y2 < y1:
|
||||||
|
y_dir = -1
|
||||||
|
new_y = range(y1 + y_dir, y2, y_dir)
|
||||||
|
new_x = range(x1 + x_dir, x2, x_dir)
|
||||||
|
return [(x1, y1), *list(zip(new_x, new_y)), (x2, y2)]
|
||||||
|
|
||||||
|
def count(self):
|
||||||
|
return len([item for sublist in self.matrix for item in sublist if item > 1])
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
v = Vents(shared.get_fname(5))
|
||||||
|
v.draw_lines()
|
||||||
|
pp(v.count())
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
44
2021/python/day06.py
Normal file
44
2021/python/day06.py
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import shared
|
||||||
|
from collections import Counter, defaultdict
|
||||||
|
from pprint import pp
|
||||||
|
|
||||||
|
|
||||||
|
class Lanternfish:
|
||||||
|
def __init__(self, name):
|
||||||
|
self.load(name)
|
||||||
|
self.new = 0
|
||||||
|
|
||||||
|
def load(self, name):
|
||||||
|
with open(name, "r") as f:
|
||||||
|
self.nums = list(map(int, f.read().split(",")))
|
||||||
|
self.fish = defaultdict(int)
|
||||||
|
self.fish.update(dict(Counter(self.nums)))
|
||||||
|
|
||||||
|
def tick(self):
|
||||||
|
self.new = self.fish[0]
|
||||||
|
|
||||||
|
# could do for loop from 0-6 then handle 6 specially
|
||||||
|
self.fish[0] = self.fish[1]
|
||||||
|
self.fish[1] = self.fish[2]
|
||||||
|
self.fish[2] = self.fish[3]
|
||||||
|
self.fish[3] = self.fish[4]
|
||||||
|
self.fish[4] = self.fish[5]
|
||||||
|
self.fish[5] = self.fish[6]
|
||||||
|
self.fish[6] = self.fish[7] + self.new
|
||||||
|
self.fish[7] = self.fish[8]
|
||||||
|
self.fish[8] = self.new
|
||||||
|
|
||||||
|
def total(self):
|
||||||
|
return sum([v for k, v in self.fish.items() if k > -1])
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
l = Lanternfish(shared.get_fname(6))
|
||||||
|
TIMES = 256
|
||||||
|
for x in range(TIMES):
|
||||||
|
l.tick()
|
||||||
|
pp(l.total())
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
37
2021/python/day07.py
Normal file
37
2021/python/day07.py
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import shared
|
||||||
|
from pprint import pp
|
||||||
|
from scipy import stats
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
|
|
||||||
|
class Whale:
|
||||||
|
def __init__(self, name):
|
||||||
|
self.load(name)
|
||||||
|
self.set_target()
|
||||||
|
|
||||||
|
def load(self, name):
|
||||||
|
with open(name, "r") as f:
|
||||||
|
self.positions = list(map(int, f.read().split(",")))
|
||||||
|
|
||||||
|
def set_target(self):
|
||||||
|
data = np.array(self.positions)
|
||||||
|
self.target = round(np.mean(data))
|
||||||
|
|
||||||
|
def calculate(self, target=None):
|
||||||
|
return int(sum([self.sigma(abs(target - pos)) for pos in self.positions]))
|
||||||
|
|
||||||
|
def sigma(self, value):
|
||||||
|
return value * (value + 1) / 2
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
w = Whale(shared.get_fname(7))
|
||||||
|
if w.target in w.positions:
|
||||||
|
target = w.target
|
||||||
|
else:
|
||||||
|
target = w.target - 1
|
||||||
|
pp(w.calculate(target))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
96
2021/python/day08.py
Normal file
96
2021/python/day08.py
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
import shared
|
||||||
|
from pprint import pp
|
||||||
|
from collections import defaultdict, Counter
|
||||||
|
|
||||||
|
ACTUAL = [
|
||||||
|
"abcefg", # 0
|
||||||
|
"cf", # 1 --- l2
|
||||||
|
"acdeg", # 2
|
||||||
|
"acdfg", # 3
|
||||||
|
"bcdf", # 4 ---l4
|
||||||
|
"abdfg", # 5
|
||||||
|
"abdefg", # 6
|
||||||
|
"acf", # 7 ---l3
|
||||||
|
"abcdefg", # 8 ---l7
|
||||||
|
"abcdfg", # 9
|
||||||
|
]
|
||||||
|
LENGTHS = list(map(len, ACTUAL))
|
||||||
|
|
||||||
|
SEGMENT_FREQ = {
|
||||||
|
"a": 8,
|
||||||
|
"b": 6,
|
||||||
|
"c": 8,
|
||||||
|
"d": 7,
|
||||||
|
"e": 4,
|
||||||
|
"f": 9,
|
||||||
|
"g": 7,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class Segments:
|
||||||
|
def __init__(self, name):
|
||||||
|
self.load(name)
|
||||||
|
|
||||||
|
def load(self, name):
|
||||||
|
self.lines = []
|
||||||
|
with open(name, "r") as f:
|
||||||
|
for line in f.readlines():
|
||||||
|
l = line.rstrip()
|
||||||
|
signals, output = l.split(" | ")
|
||||||
|
row = [signals.split(), output.split()]
|
||||||
|
self.lines.append(row)
|
||||||
|
|
||||||
|
def map(self, signals, output):
|
||||||
|
counts = Counter("".join(signals))
|
||||||
|
segments = {"a", "b", "c", "d", "e", "f", "g"}
|
||||||
|
segment_mapping = {}
|
||||||
|
|
||||||
|
for iw, c in SEGMENT_FREQ.items():
|
||||||
|
if c in (7, 8):
|
||||||
|
continue
|
||||||
|
for rw, rc in counts.items():
|
||||||
|
if rc == c:
|
||||||
|
segment_mapping[iw] = rw
|
||||||
|
|
||||||
|
lengths = {len(signal): set(signal) for signal in signals}
|
||||||
|
k1 = lengths[LENGTHS[1]]
|
||||||
|
k4 = lengths[LENGTHS[4]]
|
||||||
|
k7 = lengths[LENGTHS[7]]
|
||||||
|
|
||||||
|
segment_mapping["a"] = (k7 ^ k1).pop()
|
||||||
|
for wire in k1:
|
||||||
|
if wire not in segment_mapping.values():
|
||||||
|
segment_mapping["c"] = wire
|
||||||
|
|
||||||
|
for wire in k4:
|
||||||
|
if wire not in segment_mapping.values():
|
||||||
|
segment_mapping["d"] = wire
|
||||||
|
|
||||||
|
segment_mapping["g"] = (segments ^ set(segment_mapping.values())).pop()
|
||||||
|
|
||||||
|
wiring = {}
|
||||||
|
for num, ideal in enumerate(ACTUAL):
|
||||||
|
key = ""
|
||||||
|
for wire in ideal:
|
||||||
|
key += segment_mapping[wire]
|
||||||
|
|
||||||
|
key = "".join(sorted(key))
|
||||||
|
wiring[key] = str(num)
|
||||||
|
|
||||||
|
return wiring
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
s = Segments(shared.get_fname(8))
|
||||||
|
total = 0
|
||||||
|
for sig, out in s.lines:
|
||||||
|
wiring = s.map(sig, out)
|
||||||
|
display = ""
|
||||||
|
for digit in out:
|
||||||
|
display += wiring["".join(sorted(digit))]
|
||||||
|
total += int(display)
|
||||||
|
print(total)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
132
2021/python/day09.py
Normal file
132
2021/python/day09.py
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
import sys
|
||||||
|
from matrix import load_matrix_file, get_neighbors, get_size
|
||||||
|
import shared
|
||||||
|
from scipy import ndimage
|
||||||
|
import imageio
|
||||||
|
from skimage.measure import euler_number, label
|
||||||
|
from skimage.morphology import flood_fill, flood
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
import numpy as np
|
||||||
|
from math import prod
|
||||||
|
import random
|
||||||
|
|
||||||
|
|
||||||
|
class Smoke:
|
||||||
|
def __init__(self, name):
|
||||||
|
self.footprint = np.array([[0, 1, 0], [1, 1, 1], [0, 1, 0]])
|
||||||
|
self.parse(name)
|
||||||
|
|
||||||
|
def parse(self, name):
|
||||||
|
_split = lambda line: list(map(int, [l for l in line]))
|
||||||
|
self.mx = np.array(load_matrix_file(name, func=_split))
|
||||||
|
self.mx = np.pad(self.mx, pad_width=1, mode="constant", constant_values="9")
|
||||||
|
self.set_values()
|
||||||
|
self.set_coords()
|
||||||
|
|
||||||
|
def set_values(self):
|
||||||
|
self.lows = (
|
||||||
|
ndimage.generic_filter(self.mx, np.min, footprint=self.footprint) == self.mx
|
||||||
|
)
|
||||||
|
self.low_values = self.mx[self.lows][self.mx[self.lows] < 9]
|
||||||
|
self.highs = (
|
||||||
|
ndimage.generic_filter(self.mx, np.max, footprint=self.footprint) == self.mx
|
||||||
|
)
|
||||||
|
mask = self.mx != 9
|
||||||
|
self.mask = mask.astype(int)
|
||||||
|
|
||||||
|
def set_coords(self):
|
||||||
|
lc = []
|
||||||
|
for idr, row in enumerate(self.lows):
|
||||||
|
if idr == 0 or idr == len(self.lows) - 1:
|
||||||
|
continue
|
||||||
|
for idc, col in enumerate(row):
|
||||||
|
if idc == 0 or idc == len(row) - 1:
|
||||||
|
continue
|
||||||
|
if col:
|
||||||
|
lc.append((idr, idc))
|
||||||
|
self.low_coords = lc
|
||||||
|
|
||||||
|
def total_low_values(self):
|
||||||
|
return (self.low_values + 1).sum()
|
||||||
|
|
||||||
|
def find_chunks(self):
|
||||||
|
cell_sizes = []
|
||||||
|
self.cells = []
|
||||||
|
by_center = []
|
||||||
|
for x, y in self.low_coords:
|
||||||
|
current = np.zeros_like(self.mx)
|
||||||
|
m = flood_fill(self.mask, (x, y), -1, connectivity=1)
|
||||||
|
current_cell = (m == -1).astype(int)
|
||||||
|
self.cells.append(current_cell)
|
||||||
|
cells = np.argwhere(current_cell == 1)
|
||||||
|
by_center.append((len(cells), (x, y), cells))
|
||||||
|
cell_sizes.append(len(cells))
|
||||||
|
cells_sorted = list(set(sorted(cell_sizes)))
|
||||||
|
self.by_center = by_center
|
||||||
|
largest = cells_sorted[-3:]
|
||||||
|
assert len(largest) == 3
|
||||||
|
self.largest = largest
|
||||||
|
return prod(largest)
|
||||||
|
|
||||||
|
def animate(self, save=False):
|
||||||
|
largest = [x for x in self.by_center if x[0] in self.largest][-3:]
|
||||||
|
current = np.zeros_like(self.mx)
|
||||||
|
shuf = self.by_center[:]
|
||||||
|
random.shuffle(shuf)
|
||||||
|
|
||||||
|
last_file = 0
|
||||||
|
|
||||||
|
for idx, (length, xy, c) in enumerate(shuf):
|
||||||
|
last_file = idx
|
||||||
|
if length in largest:
|
||||||
|
continue
|
||||||
|
|
||||||
|
for x, y in c:
|
||||||
|
current[y][x] = 1
|
||||||
|
|
||||||
|
fig, ax = plt.subplots()
|
||||||
|
ax.imshow(current, cmap=plt.cm.gray)
|
||||||
|
ax.axis("off")
|
||||||
|
if save:
|
||||||
|
plt.savefig(f"09/{idx:03}.png")
|
||||||
|
plt.close()
|
||||||
|
|
||||||
|
lg = np.zeros_like(self.mx)
|
||||||
|
for _, _, c in largest:
|
||||||
|
for x, y in c:
|
||||||
|
lg[y][x] = 1
|
||||||
|
|
||||||
|
fig, ax = plt.subplots()
|
||||||
|
ax.imshow(lg)
|
||||||
|
ax.axis("off")
|
||||||
|
plt.savefig(f"09/largest.png")
|
||||||
|
plt.close()
|
||||||
|
|
||||||
|
with imageio.get_writer("09/day09.gif", mode="I") as writer:
|
||||||
|
names = [f"09/{x:03}.png" for x in range(334)]
|
||||||
|
for filename in names:
|
||||||
|
try:
|
||||||
|
image = imageio.imread(filename)
|
||||||
|
writer.append_data(image)
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
for x in range(15):
|
||||||
|
image = imageio.imread("09/largest.png")
|
||||||
|
for x in range(5):
|
||||||
|
writer.append_data(image)
|
||||||
|
image = imageio.imread(f"09/{last_file:03}.png")
|
||||||
|
for x in range(5):
|
||||||
|
writer.append_data(image)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
s = Smoke(shared.get_fname(9))
|
||||||
|
print(s.total_low_values())
|
||||||
|
print(s.find_chunks())
|
||||||
|
if sys.argv[-1] != "--sample":
|
||||||
|
s.animate(1)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
67
2021/python/day10.py
Normal file
67
2021/python/day10.py
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
import shared
|
||||||
|
from pprint import pprint as pp
|
||||||
|
import sys
|
||||||
|
|
||||||
|
OPEN = "([{<"
|
||||||
|
CLOSE = ")]}>"
|
||||||
|
PAIRS = dict(zip(OPEN, CLOSE))
|
||||||
|
PAIRS.update(zip(CLOSE, OPEN))
|
||||||
|
BAD_POINTS = dict(zip(CLOSE, [3, 57, 1197, 25137]))
|
||||||
|
GOOD_POINTS = dict(zip(CLOSE, [1, 2, 3, 4]))
|
||||||
|
|
||||||
|
|
||||||
|
def load_file(name):
|
||||||
|
with open(name, "r") as f:
|
||||||
|
my_file = []
|
||||||
|
for line in f:
|
||||||
|
my_file.append(line.rstrip())
|
||||||
|
return [x for x in my_file]
|
||||||
|
|
||||||
|
|
||||||
|
class Syntax:
|
||||||
|
def __init__(self, name):
|
||||||
|
self.parse(name)
|
||||||
|
|
||||||
|
def parse(self, name):
|
||||||
|
self.mx = load_file(name)
|
||||||
|
self.good_lines = []
|
||||||
|
|
||||||
|
def find_all(self):
|
||||||
|
bad_points = 0
|
||||||
|
all_points = []
|
||||||
|
for idx, line in enumerate(self.mx):
|
||||||
|
c, bad = self.find_chunks(line)
|
||||||
|
if bad:
|
||||||
|
bad_points += BAD_POINTS[c]
|
||||||
|
else:
|
||||||
|
match_points = 0
|
||||||
|
for x in c:
|
||||||
|
match_points *= 5
|
||||||
|
match_points += GOOD_POINTS[x]
|
||||||
|
all_points.append(match_points)
|
||||||
|
|
||||||
|
mp = list(sorted(all_points))
|
||||||
|
print(bad_points) # pt1
|
||||||
|
print(mp[len(mp) // 2]) # pt2
|
||||||
|
|
||||||
|
def find_chunks(self, line):
|
||||||
|
unpaired = []
|
||||||
|
for idx, char in enumerate(line):
|
||||||
|
if char in OPEN:
|
||||||
|
unpaired.append(char)
|
||||||
|
if char in CLOSE:
|
||||||
|
if unpaired[-1] != PAIRS[char]:
|
||||||
|
return char, True
|
||||||
|
unpaired.pop(-1)
|
||||||
|
# Line is good here
|
||||||
|
unpaired = list(reversed(unpaired))
|
||||||
|
return [PAIRS[u] for u in unpaired], False
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
s = Syntax(shared.get_fname(10))
|
||||||
|
s.find_all()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
90
2021/python/day11.py
Normal file
90
2021/python/day11.py
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
import matrix
|
||||||
|
import shared
|
||||||
|
import sys
|
||||||
|
import numpy as np
|
||||||
|
from scipy import ndimage
|
||||||
|
from pprint import pprint as pp
|
||||||
|
|
||||||
|
|
||||||
|
class Syntax:
|
||||||
|
def __init__(self, name):
|
||||||
|
mx = shared.load_file_int_matrix(name)
|
||||||
|
self.mx = np.array(mx)
|
||||||
|
self.flash_count = 0
|
||||||
|
self.step_count = 0
|
||||||
|
|
||||||
|
def check_syncronized(self):
|
||||||
|
cpy = np.copy(self.mx)
|
||||||
|
flat = np.ravel(cpy)
|
||||||
|
if np.all(flat == 10):
|
||||||
|
return True
|
||||||
|
|
||||||
|
def step(self):
|
||||||
|
self.step_count += 1
|
||||||
|
self.increment_all()
|
||||||
|
|
||||||
|
# Get a 2darray of bools of whether it's flashing
|
||||||
|
self.flashed = (self.mx > 9).astype(int)
|
||||||
|
flash_coords = np.argwhere(self.flashed == 1) # get a list of any flashed
|
||||||
|
|
||||||
|
if len(flash_coords) == 0:
|
||||||
|
return
|
||||||
|
|
||||||
|
self.flash_count += len(flash_coords)
|
||||||
|
|
||||||
|
if flash_coords.any():
|
||||||
|
for coord in flash_coords:
|
||||||
|
self.flash({"c": coord[1], "r": coord[0]})
|
||||||
|
|
||||||
|
if self.check_syncronized():
|
||||||
|
return True
|
||||||
|
self.reset_flashes()
|
||||||
|
#matrix.pmx(self.mx, self.flashed) # Print a pretty matrix
|
||||||
|
|
||||||
|
def flash(self, coord: dict) -> np.ndarray:
|
||||||
|
neighbor_coords = matrix.get_neighbor_coords(
|
||||||
|
self.mx, c=coord["c"], r=coord["r"]
|
||||||
|
)
|
||||||
|
|
||||||
|
for c, val in neighbor_coords:
|
||||||
|
self.add_clamp(**c)
|
||||||
|
if self.flashed[c["r"]][c["c"]]:
|
||||||
|
continue
|
||||||
|
if self.mx[c["r"]][c["c"]] > 9:
|
||||||
|
self.flash_count += 1
|
||||||
|
self.flashed[c["r"]][c["c"]] = 1
|
||||||
|
self.flash(c)
|
||||||
|
|
||||||
|
def reset_flashes(self):
|
||||||
|
for r, row in enumerate(self.mx):
|
||||||
|
for c, col in enumerate(row):
|
||||||
|
if self.mx[r][c] == 10:
|
||||||
|
self.mx[r][c] = 0
|
||||||
|
|
||||||
|
def add_clamp(self, c, r):
|
||||||
|
""" Clamp to 10, but add 1 """
|
||||||
|
if self.mx[r][c] < 10:
|
||||||
|
self.mx[r][c] += 1
|
||||||
|
|
||||||
|
def increment_all(self):
|
||||||
|
for r, row in enumerate(self.mx):
|
||||||
|
for c, _ in enumerate(row):
|
||||||
|
self.add_clamp(c, r)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
s = Syntax(shared.get_fname(11))
|
||||||
|
print(f"before any steps")
|
||||||
|
matrix.pmx(s.mx)
|
||||||
|
print("----")
|
||||||
|
for x in range(9999):
|
||||||
|
if s.step():
|
||||||
|
print(x)
|
||||||
|
break
|
||||||
|
matrix.pmx(s.mx)
|
||||||
|
print(s.flash_count)
|
||||||
|
print(s.step_count)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
51
2021/python/day12.py
Normal file
51
2021/python/day12.py
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
import matrix
|
||||||
|
import shared
|
||||||
|
from collections import defaultdict
|
||||||
|
|
||||||
|
START = 'start'
|
||||||
|
END = 'end'
|
||||||
|
|
||||||
|
class Passage:
|
||||||
|
def __init__(self, name):
|
||||||
|
self.load(name)
|
||||||
|
self.parse_connections()
|
||||||
|
|
||||||
|
|
||||||
|
def load(self, name):
|
||||||
|
lines= []
|
||||||
|
with open(name, 'r') as f:
|
||||||
|
for line in f.readlines():
|
||||||
|
lines.append(line.rstrip())
|
||||||
|
self.instructions = lines
|
||||||
|
|
||||||
|
def parse_connections(self):
|
||||||
|
connections = defaultdict(list)
|
||||||
|
for edge in self.instructions:
|
||||||
|
node1, node2 = edge.split('-')
|
||||||
|
# Add bidirectional
|
||||||
|
connections[node1].append(node2)
|
||||||
|
connections[node2].append(node1)
|
||||||
|
self.connections = connections
|
||||||
|
|
||||||
|
def traverse(self, multiple_entry, enter=START, seen={START}):
|
||||||
|
if enter == END: # we're done!
|
||||||
|
yield 1
|
||||||
|
return
|
||||||
|
|
||||||
|
for node in self.connections[enter]:
|
||||||
|
if node.islower():
|
||||||
|
if node not in seen:
|
||||||
|
yield from self.traverse(multiple_entry, node, seen | {node})
|
||||||
|
elif multiple_entry and node not in {START, END}:
|
||||||
|
yield from self.traverse(False, node, seen | {node})
|
||||||
|
else:
|
||||||
|
yield from self.traverse(multiple_entry, node, seen)
|
||||||
|
|
||||||
|
def main():
|
||||||
|
p = Passage(shared.get_fname(12))
|
||||||
|
print(sum(p.traverse(multiple_entry=False)))
|
||||||
|
print(sum(p.traverse(multiple_entry=True)))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
89
2021/python/day13.py
Normal file
89
2021/python/day13.py
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
import scanf
|
||||||
|
import itertools
|
||||||
|
import matrix
|
||||||
|
from matrix import ppmx as pmx
|
||||||
|
import numpy as np
|
||||||
|
import pandas as pd
|
||||||
|
import shared
|
||||||
|
from pprint import pprint as pp
|
||||||
|
|
||||||
|
class Oragami:
|
||||||
|
def __init__(self, name):
|
||||||
|
lines = []
|
||||||
|
with open(name, "r") as f:
|
||||||
|
for line in f.readlines():
|
||||||
|
lines.append(line.rstrip())
|
||||||
|
splitter = lines.index("")
|
||||||
|
coords, folds = lines[:splitter], lines[splitter + 1 :]
|
||||||
|
self.coords = [list(map(int, c.split(","))) for c in coords]
|
||||||
|
print(self.coords[:6])
|
||||||
|
self.parse_folds(folds)
|
||||||
|
self.max()
|
||||||
|
self.new_matrix()
|
||||||
|
|
||||||
|
|
||||||
|
def parse_folds(self, folds):
|
||||||
|
self.folds = []
|
||||||
|
for fold in folds:
|
||||||
|
axis, index = scanf.scanf("fold along %s=%d", fold)
|
||||||
|
self.folds.append({'axis':axis, 'index':index})
|
||||||
|
|
||||||
|
def max(self):
|
||||||
|
by_x = max([x['index'] for x in self.folds if x['axis'] == 'x'])
|
||||||
|
by_y = max([x['index'] for x in self.folds if x['axis'] == 'y'])
|
||||||
|
self.max_width = by_x*2+1
|
||||||
|
self.max_height = by_y*2+1
|
||||||
|
|
||||||
|
def new_matrix(self):
|
||||||
|
self.matrix = matrix.matrix_of_size(width=self.max_width, height=self.max_height)
|
||||||
|
for c, r in self.coords:
|
||||||
|
self.matrix[r][c] = 1
|
||||||
|
|
||||||
|
def process_folds(self):
|
||||||
|
for idx, fold in enumerate(self.folds):
|
||||||
|
print('---')
|
||||||
|
if fold['axis'] == 'y':
|
||||||
|
self.fold_y(fold['index'])
|
||||||
|
else:
|
||||||
|
self.fold_x(fold['index'])
|
||||||
|
self.count()
|
||||||
|
pmx(self.matrix,pad=False,space=False)
|
||||||
|
|
||||||
|
def fold_y(self, cut):
|
||||||
|
#folding on y removes the y row
|
||||||
|
bottom = self.matrix[cut+1:]
|
||||||
|
bottom = list(reversed(bottom))
|
||||||
|
self.matrix = self.matrix[:cut]
|
||||||
|
self.copy_from(bottom)
|
||||||
|
|
||||||
|
def fold_x(self, cut):
|
||||||
|
#folding on X removes the x column
|
||||||
|
left, right = [], []
|
||||||
|
removed = 0
|
||||||
|
for r, row in enumerate(self.matrix):
|
||||||
|
left.append(row[:cut])
|
||||||
|
right.append(list(reversed(row[cut+1:])))
|
||||||
|
if row[cut] == 1:
|
||||||
|
removed += 1
|
||||||
|
self.matrix = left
|
||||||
|
self.copy_from(right)
|
||||||
|
|
||||||
|
def copy_from(self, source):
|
||||||
|
for r, row in enumerate(source):
|
||||||
|
for c, col in enumerate(row):
|
||||||
|
if col == 1:
|
||||||
|
self.matrix[r][c] = 1
|
||||||
|
print("")
|
||||||
|
|
||||||
|
def count(self):
|
||||||
|
flat = np.ravel(np.array(self.matrix))
|
||||||
|
print(sum(flat))
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
o = Oragami(shared.get_fname(13))
|
||||||
|
o.process_folds()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
66
2021/python/day14.py
Normal file
66
2021/python/day14.py
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
import matrix
|
||||||
|
import numpy as np
|
||||||
|
import pandas as pd
|
||||||
|
import shared
|
||||||
|
from pprint import pprint as pp
|
||||||
|
from collections import Counter
|
||||||
|
|
||||||
|
class Polymers:
|
||||||
|
def __init__(self, name):
|
||||||
|
self.load(name)
|
||||||
|
self.process()
|
||||||
|
|
||||||
|
def load(self, name):
|
||||||
|
rules = []
|
||||||
|
with open(name, "r") as f:
|
||||||
|
template = f.readline().rstrip()
|
||||||
|
f.readline()
|
||||||
|
for rule in f.readlines():
|
||||||
|
rules.append(rule.rstrip().split(" -> "))
|
||||||
|
self.template = template
|
||||||
|
self.rules = dict(rules)
|
||||||
|
|
||||||
|
def process(self):
|
||||||
|
# make a counter with letters grouped together in twos
|
||||||
|
self.pair_counter = Counter([self.template[i:i+2] for i in range(len(self.template) - 1)])
|
||||||
|
for x in range(40):
|
||||||
|
self.x = x
|
||||||
|
self.step()
|
||||||
|
self.totals()
|
||||||
|
|
||||||
|
def step(self):
|
||||||
|
# Start a new counter
|
||||||
|
step_counter = Counter()
|
||||||
|
|
||||||
|
# loop over the pairs in the old counter
|
||||||
|
for pair in self.pair_counter:
|
||||||
|
# expand a and c from the pair
|
||||||
|
a, c = pair
|
||||||
|
# get the new letter to add
|
||||||
|
b = self.rules[pair]
|
||||||
|
# increment the new pairs
|
||||||
|
step_counter[f"{a}{b}"] += self.pair_counter[pair]
|
||||||
|
step_counter[f"{b}{c}"] += self.pair_counter[pair]
|
||||||
|
# replace
|
||||||
|
self.pair_counter = step_counter
|
||||||
|
|
||||||
|
def totals(self):
|
||||||
|
# start a new letter counter
|
||||||
|
c = Counter()
|
||||||
|
# loop over the pairs
|
||||||
|
for pair in self.pair_counter:
|
||||||
|
# increment the first letter in the pair, the 2nd letter is already taken care of
|
||||||
|
c[pair[0]] += self.pair_counter[pair]
|
||||||
|
# add the final letter of the template, because it
|
||||||
|
# never gets a right pair so its silently ignored
|
||||||
|
c[self.template[-1]] += 1
|
||||||
|
|
||||||
|
print(max(c.values()) - min(c.values()), self.x)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
p = Polymers(shared.get_fname(14))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
87
2021/python/day15.py
Normal file
87
2021/python/day15.py
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
import matrix
|
||||||
|
import numpy as np
|
||||||
|
import shared
|
||||||
|
from pprint import pprint as pp
|
||||||
|
from queue import PriorityQueue
|
||||||
|
X = '.'
|
||||||
|
|
||||||
|
class Chiton:
|
||||||
|
def __init__(self, name):
|
||||||
|
self.load(name)
|
||||||
|
self.y = 0
|
||||||
|
self.x = 0
|
||||||
|
self.values = []
|
||||||
|
self.set_goal()
|
||||||
|
|
||||||
|
def load(self, name):
|
||||||
|
self.base = np.array(matrix.load_matrix_file(name))
|
||||||
|
self.mx = self.base.copy()
|
||||||
|
|
||||||
|
def walk(self):
|
||||||
|
# Dijkstra from RedBlobGames
|
||||||
|
start = (self.x,self.y)
|
||||||
|
frontier = PriorityQueue()
|
||||||
|
frontier.put(start, 0)
|
||||||
|
came_from = dict()
|
||||||
|
cost_so_far = dict()
|
||||||
|
came_from[start] = None
|
||||||
|
cost_so_far[start] = 0
|
||||||
|
while not frontier.empty():
|
||||||
|
current = frontier.get()
|
||||||
|
if current == self.goal:
|
||||||
|
break
|
||||||
|
for _nxt in self.neighbors(current):
|
||||||
|
nxt = (_nxt['x'],_nxt['y'])
|
||||||
|
new_cost = cost_so_far[current] + _nxt['value']
|
||||||
|
if nxt not in cost_so_far or new_cost < cost_so_far[nxt]:
|
||||||
|
cost_so_far[nxt] = new_cost
|
||||||
|
priority = new_cost
|
||||||
|
frontier.put(nxt, priority)
|
||||||
|
came_from[nxt] = current
|
||||||
|
print(cost_so_far[self.goal])
|
||||||
|
|
||||||
|
def neighbors(self, pos):
|
||||||
|
return matrix.get_neighbors(self.mx, x=pos[0], y=pos[1], _dict=True)
|
||||||
|
|
||||||
|
def pp(self):
|
||||||
|
matrix.ppmx(self.mx,pad=False,space=False)
|
||||||
|
print(self.x,self.y)
|
||||||
|
|
||||||
|
def grow(self, size):
|
||||||
|
ALL = [self.base.copy()]
|
||||||
|
for x in range(25):
|
||||||
|
n = ALL[-1].copy()
|
||||||
|
n = self.increment(n)
|
||||||
|
ALL.append(n)
|
||||||
|
|
||||||
|
rows = []
|
||||||
|
for x in range(5):
|
||||||
|
rows.append(np.hstack(ALL[x:x+5]))
|
||||||
|
|
||||||
|
grid = np.array(rows.pop(0))
|
||||||
|
for row in rows:
|
||||||
|
grid = np.vstack((grid,row))
|
||||||
|
|
||||||
|
self.mx = grid
|
||||||
|
self.set_goal()
|
||||||
|
|
||||||
|
def set_goal(self):
|
||||||
|
h,w = matrix.get_size(self.mx)
|
||||||
|
self.goal = (h-1,w-1)
|
||||||
|
|
||||||
|
def increment(self, row):
|
||||||
|
row += 1
|
||||||
|
row = np.where(row > 9, 1, row)
|
||||||
|
return row
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
c = Chiton(shared.get_fname(15))
|
||||||
|
c.walk()
|
||||||
|
c.grow(5)
|
||||||
|
c.walk()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
90
2021/python/day16.py
Normal file
90
2021/python/day16.py
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
import shared
|
||||||
|
from functools import reduce
|
||||||
|
from pprint import pprint as pp
|
||||||
|
from math import prod
|
||||||
|
|
||||||
|
|
||||||
|
HEX = {
|
||||||
|
(str(i) if i <= 9 else chr(ord("A") + i % 10)): bin(i)[2:].zfill(4)
|
||||||
|
for i in range(16)
|
||||||
|
}
|
||||||
|
|
||||||
|
OPS_TYPES = {
|
||||||
|
0: lambda *x: sum(x),
|
||||||
|
1: lambda *x: prod(x),
|
||||||
|
2: min,
|
||||||
|
3: max,
|
||||||
|
5: lambda *x: 1 if x[0] > x[1] else 0,
|
||||||
|
6: lambda *x: 1 if x[0] < x[1] else 0,
|
||||||
|
7: lambda *x: 1 if x[0] == x[1] else 0,
|
||||||
|
}
|
||||||
|
|
||||||
|
class Packet:
|
||||||
|
def __init__(self):
|
||||||
|
with open(shared.get_fname(16), "r") as f:
|
||||||
|
val = f.read().rstrip()
|
||||||
|
self.binary = "".join([HEX[x] for x in val])
|
||||||
|
packet, _ = self.get_packet(self.binary)
|
||||||
|
self.packet = packet
|
||||||
|
|
||||||
|
def to_value(self, binary):
|
||||||
|
# print("to_value", len(binary))
|
||||||
|
value = ""
|
||||||
|
while True:
|
||||||
|
value += binary[1:5]
|
||||||
|
if binary[0] == "0":
|
||||||
|
break
|
||||||
|
binary = binary[5:]
|
||||||
|
return int(value, 2), binary[5:]
|
||||||
|
|
||||||
|
def get_subpackets(self, binary, packet, length_id_type):
|
||||||
|
# print("get_subpacket", len(binary), packet, length_id_type)
|
||||||
|
if int(length_id_type) == 0:
|
||||||
|
packet_length = int(binary[:15], 2)
|
||||||
|
checking = binary[15 : 15 + packet_length]
|
||||||
|
rem = binary[15 + packet_length :]
|
||||||
|
while checking:
|
||||||
|
subpacket, checking = self.get_packet(checking)
|
||||||
|
packet["children"].append(subpacket)
|
||||||
|
packet["version_sum"] += subpacket["version_sum"]
|
||||||
|
else:
|
||||||
|
subpacket_count = int(binary[:11], 2)
|
||||||
|
rem = binary[11:]
|
||||||
|
for _ in range(subpacket_count):
|
||||||
|
subpacket, rem = self.get_packet(rem)
|
||||||
|
packet["children"].append(subpacket)
|
||||||
|
packet["version_sum"] += subpacket["version_sum"]
|
||||||
|
return packet, rem
|
||||||
|
|
||||||
|
def get_packet(self, binary):
|
||||||
|
# print("get_packet", len(binary))
|
||||||
|
packet = {
|
||||||
|
"version": int(binary[:3], 2),
|
||||||
|
"type_id": int(binary[3:6], 2),
|
||||||
|
"version_sum": int(binary[:3], 2),
|
||||||
|
"children": list(),
|
||||||
|
}
|
||||||
|
# print(packet["type_id"], len(binary))
|
||||||
|
if packet["type_id"] == 4:
|
||||||
|
packet["value"], rem = self.to_value(binary[6:])
|
||||||
|
return packet, rem
|
||||||
|
return self.get_subpackets(binary[7:], packet, binary[6])
|
||||||
|
|
||||||
|
def calculate(self, packet):
|
||||||
|
if packet["type_id"] == 4:
|
||||||
|
return packet["value"]
|
||||||
|
|
||||||
|
return int(
|
||||||
|
reduce(
|
||||||
|
OPS_TYPES[packet["type_id"]], [self.calculate(p) for p in packet["children"]]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
def main():
|
||||||
|
p = Packet()
|
||||||
|
print(p.packet['version_sum'])
|
||||||
|
print(p.calculate(p.packet))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
85
2021/python/day17.py
Normal file
85
2021/python/day17.py
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
import shared
|
||||||
|
from scanf import scanf
|
||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class Probe:
|
||||||
|
x: int
|
||||||
|
y: int
|
||||||
|
x_vel: int
|
||||||
|
y_vel: int
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class Box:
|
||||||
|
x1: int
|
||||||
|
x2: int
|
||||||
|
y1: int
|
||||||
|
y2: int
|
||||||
|
|
||||||
|
@property
|
||||||
|
def max_x(self):
|
||||||
|
return max(self.x1, self.x2)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def min_y(self):
|
||||||
|
return min(self.y1, self.y2)
|
||||||
|
|
||||||
|
|
||||||
|
class TrickShot:
|
||||||
|
def __init__(self, target, x_vel, y_vel):
|
||||||
|
self.target = target
|
||||||
|
self.probe = Probe(0, 0, x_vel, y_vel)
|
||||||
|
self.y_max = -9999
|
||||||
|
|
||||||
|
def step(self):
|
||||||
|
self.probe.x += self.probe.x_vel
|
||||||
|
self.probe.y += self.probe.y_vel
|
||||||
|
if self.probe.y > self.y_max:
|
||||||
|
self.y_max = self.probe.y
|
||||||
|
self.probe.x_vel += towards_zero(self.probe.x_vel)
|
||||||
|
self.probe.y_vel -= 1
|
||||||
|
|
||||||
|
def check_in_target(self):
|
||||||
|
return (
|
||||||
|
self.target.x1 <= self.probe.x <= self.target.x2
|
||||||
|
and self.target.y1 <= self.probe.y <= self.target.y2
|
||||||
|
)
|
||||||
|
|
||||||
|
def check_out_of_bounds(self):
|
||||||
|
return self.probe.y < self.target.min_y or self.probe.x > self.target.max_x
|
||||||
|
|
||||||
|
|
||||||
|
def towards_zero(value):
|
||||||
|
if value > 0:
|
||||||
|
return -1
|
||||||
|
elif value == 0:
|
||||||
|
return 0
|
||||||
|
else:
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
with open(shared.get_fname(17), "r") as f:
|
||||||
|
target = Box(*scanf("target area: x=%d..%d, y=%d..%d", f.read()))
|
||||||
|
|
||||||
|
hits = []
|
||||||
|
for x in range(target.max_x + 1):
|
||||||
|
for y in range(target.min_y, -target.min_y):
|
||||||
|
t = TrickShot(target, x, y)
|
||||||
|
while True:
|
||||||
|
t.step()
|
||||||
|
if t.check_in_target():
|
||||||
|
hits.append((x, y, t.y_max))
|
||||||
|
break
|
||||||
|
elif t.check_out_of_bounds():
|
||||||
|
break
|
||||||
|
|
||||||
|
hits = sorted(hits, key=lambda x: x[-1])
|
||||||
|
highest = hits[-1][-1]
|
||||||
|
print("highest", highest)
|
||||||
|
print("hits", len(hits))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
104
2021/python/day18.py
Normal file
104
2021/python/day18.py
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
import shared
|
||||||
|
import itertools
|
||||||
|
import json
|
||||||
|
import math
|
||||||
|
from functools import reduce
|
||||||
|
|
||||||
|
red = lambda word: f"\u001b[31m{word}\u001b[0m"
|
||||||
|
yellow = lambda word: f"\u001b[33m{word}\u001b[0m"
|
||||||
|
blue = lambda word: f"\u001b[34m{word}\u001b[0m"
|
||||||
|
green = lambda word: f"\u001b[32m{word}\u001b[0m"
|
||||||
|
|
||||||
|
class Snailfish:
|
||||||
|
def __init__(self):
|
||||||
|
self.load()
|
||||||
|
|
||||||
|
def load(self):
|
||||||
|
snailfish = []
|
||||||
|
with open(shared.get_fname(18), "r") as f:
|
||||||
|
for line in f.readlines():
|
||||||
|
snailfish.append(json.loads(line.rstrip()))
|
||||||
|
print(snailfish[-1])
|
||||||
|
self.snailfish = snailfish
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
reduced = reduce(self.add, self.snailfish)
|
||||||
|
print(green(reduced))
|
||||||
|
self.magnitude_sum = self.magnitude(reduced)
|
||||||
|
permutations = itertools.permutations(self.snailfish, 2)
|
||||||
|
self.magnitude_max = 0
|
||||||
|
for a,b in permutations:
|
||||||
|
print(red(a), yellow(b))
|
||||||
|
fish_sum = self.add(a,b)
|
||||||
|
print("\t", blue(fish_sum))
|
||||||
|
mag = self.magnitude(fish_sum)
|
||||||
|
if mag > self.magnitude_max:
|
||||||
|
self.magnitude_max = mag
|
||||||
|
print()
|
||||||
|
|
||||||
|
def add_left(self, fish, value):
|
||||||
|
if value is None:
|
||||||
|
return fish
|
||||||
|
if isinstance(fish, int):
|
||||||
|
return fish + value
|
||||||
|
return [self.add_left(fish[0], value), fish[1]]
|
||||||
|
|
||||||
|
def add_right(self, fish, value):
|
||||||
|
if value is None:
|
||||||
|
return fish
|
||||||
|
if isinstance(fish, int):
|
||||||
|
return fish + value
|
||||||
|
return [fish[0], self.add_right(fish[1], value)]
|
||||||
|
|
||||||
|
def explode(self, fish, depth=4):
|
||||||
|
if isinstance(fish, int):
|
||||||
|
return False, None, fish, None
|
||||||
|
if depth == 0:
|
||||||
|
return True, fish[0], 0, fish[1]
|
||||||
|
x, y = fish
|
||||||
|
exploded, left, x, right = self.explode(x, depth - 1)
|
||||||
|
if exploded:
|
||||||
|
return True, left, [x, self.add_left(y, right)], None
|
||||||
|
exploded, left, y, right = self.explode(y, depth - 1)
|
||||||
|
if exploded:
|
||||||
|
return True, None, [self.add_right(x, left), y], right
|
||||||
|
return False, None, fish, None
|
||||||
|
|
||||||
|
def split(self, fish):
|
||||||
|
if isinstance(fish, int):
|
||||||
|
if fish >= 10:
|
||||||
|
return True, [fish // 2, math.ceil(fish / 2)]
|
||||||
|
return False, fish
|
||||||
|
x, y = fish
|
||||||
|
split, x = self.split(x)
|
||||||
|
if split:
|
||||||
|
return True, [x, y]
|
||||||
|
split, y = self.split(y)
|
||||||
|
return split, [x, y]
|
||||||
|
|
||||||
|
def add(self, x, y):
|
||||||
|
fish = [x, y]
|
||||||
|
while True:
|
||||||
|
exploded, _, fish, _ = self.explode(fish)
|
||||||
|
if exploded:
|
||||||
|
continue
|
||||||
|
split, fish = self.split(fish)
|
||||||
|
if not split:
|
||||||
|
break
|
||||||
|
return fish
|
||||||
|
|
||||||
|
def magnitude(self, fish):
|
||||||
|
if isinstance(fish, int):
|
||||||
|
return fish
|
||||||
|
return 3 * self.magnitude(fish[0]) + 2 * self.magnitude(fish[1])
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
s = Snailfish()
|
||||||
|
s.run()
|
||||||
|
print('part1: sum', s.magnitude_sum)
|
||||||
|
print('part2: max', s.magnitude_max)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
0
2021/python/day25.py
Normal file
0
2021/python/day25.py
Normal file
147
2021/python/matrix.py
Normal file
147
2021/python/matrix.py
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
split_word_to_int_list = lambda y: [int(w) for w in y]
|
||||||
|
split_line_to_int_list = lambda y: [int(w) for w in y.split(" ") if w]
|
||||||
|
|
||||||
|
|
||||||
|
def rotate(m, right=True): # -90
|
||||||
|
x = list(zip(*m[::-1]))
|
||||||
|
if right:
|
||||||
|
return x
|
||||||
|
return [list(reversed(y)) for y in x]
|
||||||
|
|
||||||
|
|
||||||
|
def load_matrix_file(name, func=None):
|
||||||
|
with open(name, "r") as f:
|
||||||
|
my_file = []
|
||||||
|
for line in f:
|
||||||
|
my_file.append(line.rstrip())
|
||||||
|
if func:
|
||||||
|
return [func(x) for x in my_file]
|
||||||
|
return [split_word_to_int_list(x) for x in my_file]
|
||||||
|
|
||||||
|
|
||||||
|
def get_neighbors(matrix, x, y, _dict=False):
|
||||||
|
neighbors = []
|
||||||
|
# left
|
||||||
|
try:
|
||||||
|
if x - 1 >= 0:
|
||||||
|
if _dict:
|
||||||
|
neighbors.append({'x':x - 1,'y':y,'value':matrix[y][x - 1]})
|
||||||
|
else:
|
||||||
|
neighbors.append([(x - 1, y), matrix[y][x - 1]])
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
|
# right
|
||||||
|
try:
|
||||||
|
if _dict:
|
||||||
|
neighbors.append({'x':x + 1,'y':y,'value':matrix[y][x + 1]})
|
||||||
|
else:
|
||||||
|
neighbors.append([(x + 1, y), matrix[y][x + 1]])
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
# up
|
||||||
|
try:
|
||||||
|
if y - 1 >= 0:
|
||||||
|
if _dict:
|
||||||
|
neighbors.append({'x':x,'y':y-1,'value':matrix[y-1][x]})
|
||||||
|
else:
|
||||||
|
neighbors.append([(x, y - 1), matrix[y - 1][x]])
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
# down
|
||||||
|
try:
|
||||||
|
if _dict:
|
||||||
|
neighbors.append({'x':x,'y':y+1,'value':matrix[y+1][x]})
|
||||||
|
else:
|
||||||
|
neighbors.append([(x, y + 1), matrix[y + 1][x]])
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
return neighbors
|
||||||
|
|
||||||
|
|
||||||
|
def get_neighbor_coords(matrix, c, r, diagonals=True):
|
||||||
|
height = len(matrix)
|
||||||
|
width = len(matrix[0])
|
||||||
|
if diagonals:
|
||||||
|
coords = (
|
||||||
|
(-1, -1), (0, -1), (1, -1),
|
||||||
|
(-1, 0), (1, 0),
|
||||||
|
(-1, 1), (0, 1), (1, 1),
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
coords = (
|
||||||
|
(0, -1),
|
||||||
|
(-1, 0), (1, 0),
|
||||||
|
(0, 1),
|
||||||
|
)
|
||||||
|
neighbors = []
|
||||||
|
|
||||||
|
for _c, _r in coords:
|
||||||
|
try:
|
||||||
|
value = matrix[r + _r][c + _c] # Try to get a value error
|
||||||
|
if (r+_r>=0 and c+_c >= 0):
|
||||||
|
neighbors.append(
|
||||||
|
[{"c": c + _c, "r": r + _r}, value]
|
||||||
|
) # woo, no error, this coord is valid
|
||||||
|
except IndexError:
|
||||||
|
pass # okay we out of bounds boizzzz
|
||||||
|
return neighbors
|
||||||
|
|
||||||
|
|
||||||
|
def get_column(matrix, col):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def matrix_of_size(width, height):
|
||||||
|
return [[0] * width for x in range(height)]
|
||||||
|
|
||||||
|
|
||||||
|
def get_size(matrix):
|
||||||
|
height = len(matrix)
|
||||||
|
width = len(matrix[0])
|
||||||
|
return height, width
|
||||||
|
|
||||||
|
|
||||||
|
def pmx(*matrices, pad=True, space=True):
|
||||||
|
if len(matrices) > 1:
|
||||||
|
matrices = list(zip(*matrices))
|
||||||
|
for row in matrices:
|
||||||
|
r = []
|
||||||
|
for col in row:
|
||||||
|
r.append("".join([f"{int(x)or '.'}".rjust(3) for x in col]))
|
||||||
|
print(" ".join(r))
|
||||||
|
else:
|
||||||
|
for row in matrices:
|
||||||
|
for c in row:
|
||||||
|
if pad:
|
||||||
|
f = lambda x: f"{int(x)or '.'}".rjust(2)
|
||||||
|
if space:
|
||||||
|
f = lambda x: f"{int(x)or '.'}".rjust(3)
|
||||||
|
else:
|
||||||
|
f = lambda x: f"{int(x)or '.'}"
|
||||||
|
if space:
|
||||||
|
f = lambda x: f"{int(x)or '.'} "
|
||||||
|
print("".join([f(x) for x in c]))
|
||||||
|
|
||||||
|
def ppmx(*matrices, pad=True, space=True):
|
||||||
|
if len(matrices) > 1:
|
||||||
|
matrices = list(zip(*matrices))
|
||||||
|
for row in matrices:
|
||||||
|
r = []
|
||||||
|
for col in row:
|
||||||
|
r.append("".join([f"{x or '.'}".rjust(3) for x in col]))
|
||||||
|
print(" ".join(r))
|
||||||
|
else:
|
||||||
|
for row in matrices:
|
||||||
|
for c in row:
|
||||||
|
if pad:
|
||||||
|
f = lambda x: f"{x or '.'}".rjust(2)
|
||||||
|
if space:
|
||||||
|
f = lambda x: f"{x or '.'}".rjust(3)
|
||||||
|
else:
|
||||||
|
f = lambda x: f"{x or '.'}"
|
||||||
|
if space:
|
||||||
|
f = lambda x: f"{x or '.'} "
|
||||||
|
print("".join([f(x) for x in c]))
|
31
2021/python/shared.py
Normal file
31
2021/python/shared.py
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
def get_fname(day: int) -> str:
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if sys.argv[-1] == "--sample":
|
||||||
|
return f"../samples/day{day:02}.txt"
|
||||||
|
else:
|
||||||
|
return f"../full/day{day:02}.txt"
|
||||||
|
|
||||||
|
|
||||||
|
def load_file_char_matrix(name):
|
||||||
|
with open(name, "r") as f:
|
||||||
|
my_file = []
|
||||||
|
for line in f:
|
||||||
|
my_file.append(line.rstrip())
|
||||||
|
return [list(x) for x in my_file]
|
||||||
|
|
||||||
|
|
||||||
|
def load_file_int_matrix(name):
|
||||||
|
with open(name, "r") as f:
|
||||||
|
my_file = []
|
||||||
|
for line in f:
|
||||||
|
my_file.append(line.rstrip())
|
||||||
|
return [list(map(int, x)) for x in my_file]
|
||||||
|
|
||||||
|
|
||||||
|
def load_file_word_matrix(name):
|
||||||
|
with open(name, "r") as f:
|
||||||
|
my_file = []
|
||||||
|
for line in f:
|
||||||
|
my_file.append(line.rstrip())
|
||||||
|
return [x.split(" ") for x in my_file]
|
10
2021/samples/day01.txt
Normal file
10
2021/samples/day01.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
199
|
||||||
|
200
|
||||||
|
208
|
||||||
|
210
|
||||||
|
200
|
||||||
|
207
|
||||||
|
240
|
||||||
|
269
|
||||||
|
260
|
||||||
|
263
|
6
2021/samples/day02.txt
Normal file
6
2021/samples/day02.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
forward 5
|
||||||
|
down 5
|
||||||
|
forward 8
|
||||||
|
up 3
|
||||||
|
down 8
|
||||||
|
forward 2
|
12
2021/samples/day03.txt
Normal file
12
2021/samples/day03.txt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
00100
|
||||||
|
11110
|
||||||
|
10110
|
||||||
|
10111
|
||||||
|
10101
|
||||||
|
01111
|
||||||
|
00111
|
||||||
|
11100
|
||||||
|
10000
|
||||||
|
11001
|
||||||
|
00010
|
||||||
|
01010
|
19
2021/samples/day04.txt
Normal file
19
2021/samples/day04.txt
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
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
|
11
2021/samples/day05.txt
Normal file
11
2021/samples/day05.txt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
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
|
||||||
|
|
1
2021/samples/day06.txt
Normal file
1
2021/samples/day06.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
3,4,3,1,2
|
1
2021/samples/day07.txt
Normal file
1
2021/samples/day07.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
16,1,2,0,4,2,7,1,2,14
|
10
2021/samples/day08.txt
Normal file
10
2021/samples/day08.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
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
|
5
2021/samples/day09.txt
Normal file
5
2021/samples/day09.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
2199943210
|
||||||
|
3987894921
|
||||||
|
9856789892
|
||||||
|
8767896789
|
||||||
|
9899965678
|
10
2021/samples/day10.txt
Normal file
10
2021/samples/day10.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[({(<(())[]>[[{[]{<()<>>
|
||||||
|
[(()[<>])]({[<{<<[]>>(
|
||||||
|
{([(<{}[<>[]}>{[]{[(<()>
|
||||||
|
(((({<>}<{<{<>}{[]{[]{}
|
||||||
|
[[<[([]))<([[{}[[()]]]
|
||||||
|
[{[{({}]{}}([{[{{{}}([]
|
||||||
|
{<[[]]>}<{[{[{[]{()[[[]
|
||||||
|
[<(<(<(<{}))><([]([]()
|
||||||
|
<{([([[(<>()){}]>(<<{{
|
||||||
|
<{([{{}}[<[[[<>{}]]]>[]]
|
10
2021/samples/day11.txt
Normal file
10
2021/samples/day11.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
5483143223
|
||||||
|
2745854711
|
||||||
|
5264556173
|
||||||
|
6141336146
|
||||||
|
6357385478
|
||||||
|
4167524645
|
||||||
|
2176841721
|
||||||
|
6882881134
|
||||||
|
4846848554
|
||||||
|
5283751526
|
18
2021/samples/day12.txt
Normal file
18
2021/samples/day12.txt
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
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
|
21
2021/samples/day13.txt
Normal file
21
2021/samples/day13.txt
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
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
|
18
2021/samples/day14.txt
Normal file
18
2021/samples/day14.txt
Normal file
@ -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
|
10
2021/samples/day15.txt
Normal file
10
2021/samples/day15.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
1163751742
|
||||||
|
1381373672
|
||||||
|
2136511328
|
||||||
|
3694931569
|
||||||
|
7463417111
|
||||||
|
1319128137
|
||||||
|
1359912421
|
||||||
|
3125421639
|
||||||
|
1293138521
|
||||||
|
2311944581
|
1
2021/samples/day16.txt
Normal file
1
2021/samples/day16.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
38006F45291200
|
1
2021/samples/day17.txt
Normal file
1
2021/samples/day17.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
target area: x=20..30, y=-10..-5
|
3
2021/samples/day18.txt
Normal file
3
2021/samples/day18.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[[[0,[4,5]],[0,0]],[[[4,5],[2,6]],[9,5]]]
|
||||||
|
[7,[[[3,7],[4,3]],[[6,3],[8,8]]]]
|
||||||
|
[[1,2],[3,[4,5]]]
|
2236
2022/full/day01.txt
Normal file
2236
2022/full/day01.txt
Normal file
File diff suppressed because it is too large
Load Diff
2500
2022/full/day02.txt
Normal file
2500
2022/full/day02.txt
Normal file
File diff suppressed because it is too large
Load Diff
300
2022/full/day03.txt
Normal file
300
2022/full/day03.txt
Normal file
@ -0,0 +1,300 @@
|
|||||||
|
QJRBMDMtRDCtJzBtJMfjNjhwvmNDvwjLVVgh
|
||||||
|
TPSNNPZGTjgmSmvfjL
|
||||||
|
bPlpZZbpsTlTsWprpGFCJtRtzMNdMMBBcWnJQB
|
||||||
|
tppvbQBhpQQdrzMMcLwhMc
|
||||||
|
gZnWRccRNgFGRGRFRNNgZgJMddddLLLMCPqwLCNPwqPJ
|
||||||
|
nRRmFSnWmlgZlTlTllSlSWWWTsfvfDQpBfBcpQvpVQpTfQQf
|
||||||
|
lRlsVFgTlMgRNsSNTlFgmbWnMPppPnMqWZMWPPWW
|
||||||
|
fDjgBJdCfCHHBnfLWpqnmnpZmf
|
||||||
|
GjQHHcdvJHQBHSSNsFQFslwwRg
|
||||||
|
NPwDLDHNwjLLHWjbdSbDfJJQTZsZDS
|
||||||
|
BcFBcvgFvghnFLrBpvrgcgrJSZJpQdfSTZbCsSdfZZfbCf
|
||||||
|
VrngVFRmrVWHLGVMlL
|
||||||
|
SNBBBDlfZDLqNGmgFjjmBsQgCFtF
|
||||||
|
VPPVbhpbhMhRhncnScRncbrQtCgQQFmjjjsgtRtQHmFQ
|
||||||
|
nhWcPJVhpbvMvwvwllvSlGlD
|
||||||
|
wNlNNqtqHHHPhqCz
|
||||||
|
MMMMcQSWSpQCWFnRRPchLVvPLLzhmhLzhh
|
||||||
|
CrgRSWrnrQpppRQrCTnRTRtGtBDBfbNBllbTJlZtfNBN
|
||||||
|
QNbbNrnNnCwHmNPQmzqQNPsCCfBFFGtsBBddBDtCJDJd
|
||||||
|
gvVgpZWgTWvRvlvLPDDJjGBfdsdpDDJGdd
|
||||||
|
ZRMWWRMVgRZghTggPSMZzQwwnqwmnzhNnNwHcQHm
|
||||||
|
VmPHzBmpmQHbVHSpNHBVQCtRPPCPvFFMqqntZCZqMR
|
||||||
|
dWlDcfcfcjcfDWjlsZfjJhdGvFLGnLsLqsRnvRvRGGRttC
|
||||||
|
wfJhZTllcfdZdfjJfjdmQzHVSzHzgHQTpHpmpV
|
||||||
|
qNnqmzmCBfvmDvBm
|
||||||
|
HcdhtQdttbbhtVcrVVDMfZvdMBTqsWZMBsWZ
|
||||||
|
HQGtctRblwqpNwRN
|
||||||
|
SBtBLBMZzPDDNFFDQnVVVnnDmf
|
||||||
|
dgCjblRdgRvrbwjJGzQQQzwJVJ
|
||||||
|
WpWbCWWvlgrcCHdvvCdvWbSLZzhhZhtLBPPStSPhMSpM
|
||||||
|
PlPnGGGzCqqlrqTRsbTmFRWgDPmR
|
||||||
|
wwpLtjwpzjDwFWRsWTWW
|
||||||
|
NZtJjHNNhHfnCBcJMBlCSz
|
||||||
|
wSrwggPrhJhCdddw
|
||||||
|
tLMNvMTFhDZdhTBh
|
||||||
|
LtMvFttGbNcWRsLFLsccRRgfnSrPjPnfljSfPWlnPhrS
|
||||||
|
TSZlwZSSccSHZLHVcllSvmDLmJhjDDffJmGjQjgQQJ
|
||||||
|
sdBdzsNnBMBstNNMFhNPNbPzgGfDgJrtrfjCjDrCfJmmDQJf
|
||||||
|
BnnBznRsFRFBsspzzbZpSTqVTpHVhpTvlqVW
|
||||||
|
VtVjjhdFmCCfhRRzzSDbDzpmgzmvgb
|
||||||
|
CHJqrswsWvbvJbpD
|
||||||
|
CqCPcZHGHTcsCBQsBrTGHMFnLVQjMjLVVhdhnFQVRL
|
||||||
|
tvlPSrlNNvtglTtPccldQdhbQbZdcqqZ
|
||||||
|
mRmBGHWmDFRsZqHrfbdhqhZZ
|
||||||
|
jjMGjWrJpttNjtgg
|
||||||
|
HPtCMJNjvJLMDZRdBgLSBSfsWBgG
|
||||||
|
VmnrhwwqhbbzrwnDrqpdWBgfdSdfBGgffGWRdh
|
||||||
|
qmnTFbVnpqVzpnvlDFJZDClNZPZN
|
||||||
|
NNRFQfzbNWhLHTVh
|
||||||
|
dGjptnrPqgvqjccvndnnPPhlHrVVTHLWMHlwmrlHMmVTWm
|
||||||
|
tDggGnPqDcPPpPpddjGhggtJCCSssfJbQsDfbZsbsbRZFQ
|
||||||
|
bqZWhbvvvqfvhqvQCChhZlllGwlwGjNRrNGrwGwNRQ
|
||||||
|
PmspSscJVJStzSVzWJlgwlwNlGRLDGrPgNwN
|
||||||
|
pdHmWMVStWJWFBBCCbMhCfbC
|
||||||
|
wtwbctGLwGWhGwfWwhNrnLrlrQFNmPNNVrrl
|
||||||
|
CSdqZRsMStdJMMSZqPnFmVqPQlnjNjqj
|
||||||
|
TMtsTBSSRZBCJStMJSZTHtfvpgvzzWwhbpwhggbzHpbW
|
||||||
|
HncMbCwCncHlcbMDMnMFGsNsJVFJGchVTTcmcG
|
||||||
|
RRfBRNjRLLJTLTThsq
|
||||||
|
zpBRjWRrRvBpNtRWrgwbrwQPDPMDwCnn
|
||||||
|
TDcPLTVRjntFwDwDnb
|
||||||
|
SJJhffHqHZZgHGSFFbdrGTGnGv
|
||||||
|
NQHWZgJQHNHgHQhlLLLBjpRTjLjMNNLM
|
||||||
|
sMNnNRNrlGlsZBrGsrFQpclWlWLfpWjtzTfDtpzj
|
||||||
|
gvhPgwTgdSHtHDtpDPLp
|
||||||
|
gwhSwdvTSTbSgRrZNrrNFFNBGb
|
||||||
|
rtZnDHJrrDtGtGHvGHDWfdfwCjcBhjBCffwwLv
|
||||||
|
lzVlzsTRsmzVNTspVsMMsmwCLcmjmcdbBBChwfBbCW
|
||||||
|
sVTMpTpppsVMsPRPVzMNFqMFwZtQrHZDGqgHZrSQQrQQJDGn
|
||||||
|
wGQQMMQvCTPPQnHPBS
|
||||||
|
FsWdJddszWrrRRJRTmRmpppRHBNPBppNHp
|
||||||
|
rWdFWlFJzbzzMTwcvvMbGMgc
|
||||||
|
WTnnTpqSnCLmjGgSgjztgg
|
||||||
|
rQRHQvbNLwrgtGtrmDglJt
|
||||||
|
PwHRNvQPsvHvPTTpLTcCLVnq
|
||||||
|
qTsqJDJHjjfMCSDj
|
||||||
|
RnGGNFGznzGVnBCWmfSMSLwWRwSj
|
||||||
|
NnBbVQFVCClctHQc
|
||||||
|
BHzmfDHfJLGcQBGgQLDcstNttlZgdlltldshgZZg
|
||||||
|
PwPPSJwPvSNZlvSl
|
||||||
|
CJwwjnJFFnWRMcMzcHMHRzGL
|
||||||
|
rmZpvcZcqccsqmqzzzcBRLBZbBBRLBlRGVdfZR
|
||||||
|
PwjFggwMDgNFwPgTwNFgtFJjfGLhBLsGRGbfBfBLbbTVLbdf
|
||||||
|
DWJwgDWMJJDWCCNHmrnscmqqcnpWSQ
|
||||||
|
bsRlVgMhtzHvhRvpzcLSZcTWLGzTTrGc
|
||||||
|
QJnDjmqjJdmDqqrGWWsZsZTc
|
||||||
|
nQPsnwCJdBDJDDJvhHhpMRCVlhlgRV
|
||||||
|
NBNwMCtNgqCHClHClq
|
||||||
|
JpQmFrQQfHfWjJTfLTjfLRRFRvnvhvnDGDcRcvVGGV
|
||||||
|
HTzzpzzdHgbBZZtdMB
|
||||||
|
SWcVvBFBVBjShWhGQtZnHFDHRGGQsR
|
||||||
|
pMZpmmJPbwbTTQttrDrRrttT
|
||||||
|
mZflqdlbMVcNjdWLSj
|
||||||
|
tvjdccdbLjhvhlcjRMvRTCQJmBPBCFRG
|
||||||
|
qgnqZfHpZDVnCpZzZJQFQBgmmPFJBmRQJQ
|
||||||
|
SHDZDDzpNVpfsNsHqpDSjLwCbbWLChwtwjtCWc
|
||||||
|
FsWTbcwmGfFFFrpl
|
||||||
|
LMhzdfqjLdHQQnSvldGvnS
|
||||||
|
VZjVNzfNLtjzDMhVDNtqDqwJwRmmmZJgmgcbWgRRwCbJ
|
||||||
|
ZJbPwwfJcGlwCrrZrMMddMMMtt
|
||||||
|
pTNvvSSHmmnbpFRp
|
||||||
|
SLSjSLDSQNLHNDbJbcfJclBzjGsz
|
||||||
|
WSQCWQWstCWCCgNNsDCZMZDBjjlLPnHMMLPrHlcrcLHHTjTh
|
||||||
|
bVFJFwfdRFFgjTPgnc
|
||||||
|
GmzRRqvRddbdRRdfJRJfsqsSSsZDsDBQZtCSgpgt
|
||||||
|
FPjprPpPCCFpFPHWsWvqnnllQsdLQMMlLtslLQMc
|
||||||
|
wmzJgzRSRRJghBbwGBBSbtGfLfGlcNnlltdddQtrMd
|
||||||
|
zDmRBmwDrpVFDTVDVp
|
||||||
|
FPGqjsZGlDJmzsHcTcTMMs
|
||||||
|
SQNLSvdbvVbrSbHcftGcrpHGfMmf
|
||||||
|
CNNGSCCdSCZqjqljZF
|
||||||
|
GvqpqrpqdqdsdGshSMhhRsSMhhlSlJ
|
||||||
|
DLCzzjzBwCbQWtQlRRFRRJFptfffgM
|
||||||
|
WzpLbLDbBcLPjWQWDBzzmnvNndHNqZqZNZNvcrNT
|
||||||
|
scHCGfWHsvWHVfGsggHfgvVcSLwLLPRwwDLPLllRPDzlPr
|
||||||
|
tbjqqNNTlPDTTSrD
|
||||||
|
QntmNbNnnddqJqqbFJHZWWHWJWvZHGVJsSsp
|
||||||
|
WZjpjwwGBGZQsqBLBHLHSRLP
|
||||||
|
mJhtdfVtDVJtvVLSmNRSccPPPlNHcH
|
||||||
|
JJLCFDhLCfVGGwbGGCwrGC
|
||||||
|
nBnsGSCrptmsLWGhWRvVRJVJ
|
||||||
|
rllMZZbcWWLJvhTl
|
||||||
|
MHwzczHwwHqZcdzMdbqSmwsssmtNCrBmtrnQNB
|
||||||
|
LzwrZNrNzBMrJBzJsfqqntMlVlSfhnhb
|
||||||
|
HTDPWDHPTgGHWTGcPFRgFpPPtfqmsfqlccmlSmnblbshqnmm
|
||||||
|
jWGgpRGPFRHjzdBBsrBJvj
|
||||||
|
hjNghjlwqjzGhwhGwLrMMrsMdsMfczPfsr
|
||||||
|
ZJQSFZFZpCTQSZHTTFbcWWPbWsWrdLVmrMWMfr
|
||||||
|
tttHSCpFQBQQpJZSJLgBNNDhqhBqvBvvRq
|
||||||
|
hLLJJJLcLPLfLwcJDchfhpSmqGbmdQGmGSdbqdbmqGGGdG
|
||||||
|
zgCCVVvVCNVssdbqmtMWvbnndD
|
||||||
|
rCCZZCVTjVZNzFZJBlflBLccDhBFFB
|
||||||
|
wwPPHfCMHQsrcwPbMPMcvQFJvqWgFTZgDFJltgZt
|
||||||
|
jRBVLhpNqpBmRhhRdNJZJgWTBBtgZWltZJJJ
|
||||||
|
mSjndhSzphjLRVqmhphNShrGMGrcbGbnGCHGwrwGfbbG
|
||||||
|
PVBRhBdlwRtRhRBwtBlVzDcGpVcZnggGzGMMsg
|
||||||
|
fFFWQqbFbLWCWvvFbTjjGnsZMfgsZcZzSZGMpSgD
|
||||||
|
QJTCCLFFLjFqFbHTbbltmhBNwwcNmthNhlHr
|
||||||
|
qwPJJsJdbPdwJddQCRCgCTMTRGGwMG
|
||||||
|
cLFcFBZNWWQLSQRfZjpljTGRCgGR
|
||||||
|
cFvrcNBFJDhzdQzv
|
||||||
|
zTsVTqDqQNtNwwMVmN
|
||||||
|
pHpSzPbRrvbRrGzGMwZwlBJmNtclwJpB
|
||||||
|
SjHRPfRbffPHqzCCCdTsTzqj
|
||||||
|
jnbMBnPjjjFtBtMjFPRtGfvvfzgWWHMfWHTlGgHH
|
||||||
|
dCpdqrVrmdpHfTJTCWGJgG
|
||||||
|
qVdrppqSTddqNwZcDPPPhZRBPBLBRLjF
|
||||||
|
VbHqLlGQlgjLjjQsNvCZTsNjMtCZvT
|
||||||
|
SJtttppwwpwBwdPvsvCvBZrvNrTrvM
|
||||||
|
JDnWJpDSSpmSwmpPzSwznhDlqGqqtqqHGHLlhblGbR
|
||||||
|
RqRJJVMPdRVVpqMdFwmvnSMwZcfCGfDSZc
|
||||||
|
CssQgjssvZvjffmS
|
||||||
|
zNlbbWTBLWCbCPPFPbVH
|
||||||
|
nvQsHSsGvNvnQghTRMrrjpjM
|
||||||
|
ttlLDlzPtGDcRRtpZTFjtgMj
|
||||||
|
PBLBwPPDzzLwblzffzLlVHHsCCHqsfvCCSsGSNWC
|
||||||
|
jHrTrThrtHgttThgHTtfgTgsmZZmBSZGSGsSGfZBZFFmQs
|
||||||
|
qCCPdbcCJddbRcsQSGhFzmZqZGmq
|
||||||
|
VVNNdVvclDcPbMWMwnnlwhphjp
|
||||||
|
ZdBgJqFWNNNqnZZNGsBCCCRvrCwCjCssCB
|
||||||
|
htDPMSPtMPzPTLMzMTMbRRbTbvwRCjfRfsbWWs
|
||||||
|
LhMmtMDWmHlpppplJZJgNd
|
||||||
|
mhtsjtbChcpLqmpmzL
|
||||||
|
DPlPprrfBrpGHHVGNVHRqcNvvLLqLcvJzzTvLc
|
||||||
|
VFfVPrrBQFPlDDwDwBpBtSgQjnghMhCdbSnnhtMM
|
||||||
|
DPDMpbsHPDPNtdtrgMtdnQ
|
||||||
|
WShWlSCJVlzccSBvBvhVZZWlgTNTrNrrQTjQjjjjgDSgSdNt
|
||||||
|
cvmCDvCJCcsRbmpFmqms
|
||||||
|
sSfFssmLnLwPtrrmttsFbDvWgCvddVgfgWdRDWlChD
|
||||||
|
nnGnHBzqHjqBJGChlRClhvghJWDd
|
||||||
|
jNzNcczMcGntPMwwSsSr
|
||||||
|
GGPCThCCvCTVWBCBGMVMsTgZJsrZtHNNtrsHJrgH
|
||||||
|
zjRwcwwfvSjmwznfzQSHDJtgrNrRNrLDsRrHtD
|
||||||
|
fjvzmcfSlSznwcnmnSQnhdlhWBpGpdBqhGhqhVPd
|
||||||
|
sHGGqpRqfNRVbDDtVwwzWf
|
||||||
|
CCLQZllTQLTcSShTQvjhQLnnWrDzVpwtDDwVDnczwMwM
|
||||||
|
vggZLZTldlhpCTlZlZCRRPNRmqdmGBHPFqsGqN
|
||||||
|
wwFDFLMDjjCNgNwNlwwgvR
|
||||||
|
frPbSJMSSPBqrfppSqrBZqMQhHlmNsRZmmslvghsmhsgggtZ
|
||||||
|
TPSPfBQrdJSfTTqSbbBfTfdcGWjFWWFDWnGMjLjGVFCj
|
||||||
|
LZRZbHtqnVztHTTTjMBQjQHH
|
||||||
|
rJcDGpwwgDwCCWFGSFMSffVWfF
|
||||||
|
cNNNgvhNglDnhdzsbLbmVs
|
||||||
|
RwmrGVPmNLzdmVpmrVtHDjjgDHHRqjFtngFt
|
||||||
|
CBlWhQWlTWshsblFGntjHtGbHG
|
||||||
|
WsTSGZSTQZZJpPNdzSrzwvpr
|
||||||
|
CVsggSgdwSwghVSTCgVZjJlRvlQNJHJGZVvjvj
|
||||||
|
qrrnzrrpDFMzbDbbzrMbBcNjRBHHQHGRRllHHPBNBljl
|
||||||
|
rnFppcpWcqnWMLDNsggSmWmsWfggdg
|
||||||
|
wjQzPjJcplwmDDBL
|
||||||
|
vghWhhnfWqzhftWtfnbFBmnGDnLGDbDmmC
|
||||||
|
zZNvZrNsWfgVftNZhQcSdPHPTcPHQQTTJV
|
||||||
|
WjvPVbWnbbFvjfLlcplQvLQvCwCl
|
||||||
|
sJhmrrTRTDDJHhhsmJhmrNDdQwLQQlHllHwwLpCLclBBlcPC
|
||||||
|
RJTRDdmPmmzNTDhnWtzMfMWtqjqqWM
|
||||||
|
vvpjqtllDMlHDtDBsPSSfBJFlSffNS
|
||||||
|
gwTmJrTcJWrNSmsNBBPfmf
|
||||||
|
VzzJzgTnddzWrwngnWqbHqbtLqjqvpvqhbMd
|
||||||
|
TlpzwGZGGFmZJdPpRtpHPrpcPs
|
||||||
|
CMJCMgQjMQvrfMHtMfHv
|
||||||
|
DjnNjCBqCCNnWWgDBQQDnCZwFJwmwwTznmFVwFmzTJJm
|
||||||
|
CcDPppDCFdDrFcFsMsdlLVjjLsMHvM
|
||||||
|
fqSmmtNGqLNffhHHbsMsbjbjNjbv
|
||||||
|
SthSGmLnmfwfWGWhSQGSQRnGpDpJPCDJrBPTcPrDwPzFcpFT
|
||||||
|
FdqjDtPWzqPdnPPtPFbssllqLJlqNppsJGppLp
|
||||||
|
TwfrcvwRgvfTBWRgBssJhspHfffJHlHNGh
|
||||||
|
MMZCQrrRBwQCCZMQwcTMwPztnFZSDWVWPttPSZzdzd
|
||||||
|
prHlrpJbdccllrrPbFdrgPzZfZhZVhRZVScNRNWtSZjWRW
|
||||||
|
LmwCCnvqwGCLMnsWtGRZWVfbfbftRW
|
||||||
|
bwnvBnLBvbsBvszHzpgBlPzHHlzg
|
||||||
|
grSJNTSgBHgpqhvCGbbZddGCGbbT
|
||||||
|
nDLMssQMRLwMtMWRWCZdQfqjfGvZQfCjCc
|
||||||
|
PqsDWPMLnwlRllJzghmgmSNhpgrl
|
||||||
|
TQGcWQBDnSzzsBSL
|
||||||
|
mJJlqJwVJdbSrhlrlhhsLL
|
||||||
|
JPtwMtdPbJbVqVNpPtmbpwZcQDFFcCccFjCQjpQWSWZg
|
||||||
|
JfbfpZJmzffmpZnZZwsrwDFvwHPP
|
||||||
|
RDdQtWTWQQSTGNRhsFsjnvjwrhPjtH
|
||||||
|
QccddTVQQldcGGRdGlgmVmBzfVpDmbgggmpL
|
||||||
|
HVnhVcHvpVFWDpmP
|
||||||
|
QswNZblTTwmqlntDPdqD
|
||||||
|
sGZzNwsGNThhMrhBBhzn
|
||||||
|
fQllBlVQncgwLlfWwWDvppZZggZqGpZgpGdvGG
|
||||||
|
shPTRsFbNFJmvqpGjrpvPDdr
|
||||||
|
RNFDtRRRssRTStRmTlnzwSVQlVVWfWzcQc
|
||||||
|
WmCpPCWTjQPCWWSjSTmrqRLGDRFGrTFDRFDLDD
|
||||||
|
gJnVcnVzdfnZgchvrslMDZGlRRDZLR
|
||||||
|
fdHhfncwfbfzJbnJzJfcczhhSmLCCNBjSpjmpjHjBQjpmpNW
|
||||||
|
BDvDPGRwRvCmLssGLmsL
|
||||||
|
frRjjlldrqtNspLWpqFcCmzm
|
||||||
|
ndSnVNtllldrdfSjfNvgVRHBwbbVMRbVPJgH
|
||||||
|
PpgjhpVLghPZhSgZVVzzcJWccPNCrcJzrFsJ
|
||||||
|
BdBNNMqMdfDnDNTFHHJCqHrJHzrFzF
|
||||||
|
wfMNtMndlBTlmTBndRpgghhjZRjvSZVjRw
|
||||||
|
ZQnQMWMcjHDHrWNF
|
||||||
|
TvtCvvBVgdRdmvBVNzDHlGFjFHjfRfDD
|
||||||
|
dvtCCbdJmhvhhhhbhVBPMwqZswnZqZjjMccsZJ
|
||||||
|
DDMzRBBSzRDTMQRZsbvssCbhZtCDtP
|
||||||
|
dLmwNplnmmwjGvPVCRtVVvVd
|
||||||
|
NNmjLmqWJjFRwFSrgcrSHBzcTz
|
||||||
|
TwTwTMBWcWBJJBtTWHddCmfgzlCzClsvmfsM
|
||||||
|
PPLDnNqPRLQNVnGNVsDQnNmzdhvdddlvdlqgqmdlrfvv
|
||||||
|
SQQsjPPLGLbDSnGLLNnWTFZJHbcpFctHZpwJWB
|
||||||
|
FzMltgtMzFpZtmzdjPpnvRTQTvRWTDfnnTlvwW
|
||||||
|
JcbVcBrqLCVJHJSNCcZVqVqqTRQRWWfNsTfTvDfsWvwTsnwv
|
||||||
|
rcZqVJVhmhgPmhmd
|
||||||
|
ttvSnlWvWWgcScMDsHHMPMjPmH
|
||||||
|
pzLGLfNRpJsvmmfvMDfs
|
||||||
|
GhpzRqqpZppNrhvFgwSlWnnBFn
|
||||||
|
sbQcDJQJJDbQhwchSctVnVnqTMvMWSqTMPSMlP
|
||||||
|
jtjCtNRLNCRgRnlTPPWg
|
||||||
|
pzpHdLtFNdJbDhJHsQhs
|
||||||
|
pSqnfqDnWPHNPCCHCp
|
||||||
|
GdJZQdgZbBvgQLcCZZCCZlPLRH
|
||||||
|
PzBgQggbvBthtMdMvbzvVfFfzTWqDmWDqzqWrfff
|
||||||
|
nnJdrfgfrdMCMdgrqMnWdgwNTTTzFhPSSHfSHhllzjzNFT
|
||||||
|
vBRvmvGZsLZZsHFNFFzTNPzb
|
||||||
|
LZVRmcDRvpQLmvvVGDGmpntJJwCWCnCPJwgJDrPDqM
|
||||||
|
QddMvdzlVfvdSQmGhmwLbGbmzbns
|
||||||
|
JtCCWqqZDsLpGhbGjD
|
||||||
|
FNrhqCTWMSRSrQQg
|
||||||
|
ZsBZJFsZSmmJsJSmrJrJrvsrdGdCQGQphMGwRMGQRGdbBChM
|
||||||
|
FlgfqNNNWnNnHfVnnHdbGwpwGWQhGdRMMdRM
|
||||||
|
LFnggHlDqDLvjDmZPcPmvP
|
||||||
|
CRHJWfvJvrQfrCsDlGGBszQBjjGB
|
||||||
|
LmPHVnMmpLlPssBPlDtd
|
||||||
|
MmMSZmVnncMFcmSVHvfSrffCwSvfbHWv
|
||||||
|
wsrJrpdJLsMCZDWL
|
||||||
|
BbLtGGbNmLQggqgQQtGgMmDCTnWZCZWZTmMmCZnT
|
||||||
|
qNBGNNgQcbbtGbbFBLVjfcfwHvrHHJHJcr
|
||||||
|
pCZCpdjBljhjBlpVccCpbDDwRWDsLhLbwDsDwsDw
|
||||||
|
HNgFSSNvSmdqwsFLFWLGttbw
|
||||||
|
gMMndNrzNHnzJZVlMCMCTcpc
|
||||||
|
CfsFNszCrrGzrsggsPfPVNVlqTdSjSqMTdSVTdLL
|
||||||
|
vRhcHllwJDmnJmDMMdhqSqpVMhdjdp
|
||||||
|
cvHRvwQBPZZlrQgz
|
||||||
|
TsFhCtQtQsBBLtBLPvgz
|
||||||
|
jjWZZjZSMNlNNjljNnlmjjfJLMBGGLvBdzPQpggJJLQzpg
|
||||||
|
wjbcmmlnQZmlrTsCFVwshwTr
|
||||||
|
nRGFnFjcdlwLSHSpNNnBfWHN
|
||||||
|
TgQvPbCMPRhbMPQvtQPvMCRBSHNQHBrQSNfWqpHHrWNWSf
|
||||||
|
PCgMbPvTZVDgtPRggtCCbgmmFJJLmcGFLjdmJFcDwJmm
|
||||||
|
dgWPssfdvQCLPLhL
|
||||||
|
pMtSMtpSmpMpFSMMFZjQCLbLQZZbVbVhNTLblZ
|
||||||
|
mpqcpzncfWwhzfRf
|
||||||
|
vntvVnRCsvpBpMjCpTpj
|
||||||
|
rQdZfhzczNzWcNLTpWgSvjjjpGpMSB
|
||||||
|
ZqNDQhfcNchLchQqcDqRHJtHVwnwbtvHsbVs
|
||||||
|
qtJGQgTrqtqQdQDgbGjPzZHWWzVjslPZlG
|
||||||
|
vBShwRRvvSRSvFvwLSvfcnfBWmHZHVWWHPzlNPWVWjZsWnWV
|
||||||
|
cLBFBFhCBLlwpFccFBFftqJDQdgdTDJJCbJgCCdg
|
||||||
|
wfmsPvPwNfvmfLNFvzzJbRMnllhlnLhRLC
|
||||||
|
gjtqDDTtjgpJcbnMTzCRnCCWhC
|
||||||
|
SDqtpGSStVtdqpgBVjBGZmFPJNJmffvfPsHZPZQd
|
||||||
|
HQMBBWrQQmPBvmBWnvrTnMSsbFfcfwgfCgscsmGgwgcJGg
|
||||||
|
NzzlJLthtlgswGFcwGst
|
||||||
|
JqNNRqpzhVRWTSQrrvSQ
|
||||||
|
mFpDZjvmtPPGvFjmmGTzTcFRbHczHTbzQgRS
|
||||||
|
fNdqhJsNrnnVNhwNVdrdsVczQCcwCMHSTCHgHCRzHgcM
|
||||||
|
JlgnNhsqVqNqNpPlvZvDDDGlZZ
|
1000
2022/full/day04.txt
Normal file
1000
2022/full/day04.txt
Normal file
File diff suppressed because it is too large
Load Diff
512
2022/full/day05.txt
Normal file
512
2022/full/day05.txt
Normal file
@ -0,0 +1,512 @@
|
|||||||
|
[V] [C] [M]
|
||||||
|
[V] [J] [N] [H] [V]
|
||||||
|
[R] [F] [N] [W] [Z] [N]
|
||||||
|
[H] [R] [D] [Q] [M] [L] [B]
|
||||||
|
[B] [C] [H] [V] [R] [C] [G] [R]
|
||||||
|
[G] [G] [F] [S] [D] [H] [B] [R] [S]
|
||||||
|
[D] [N] [S] [D] [H] [G] [J] [J] [G]
|
||||||
|
[W] [J] [L] [J] [S] [P] [F] [S] [L]
|
||||||
|
1 2 3 4 5 6 7 8 9
|
||||||
|
|
||||||
|
move 2 from 2 to 7
|
||||||
|
move 8 from 5 to 6
|
||||||
|
move 2 from 4 to 5
|
||||||
|
move 1 from 4 to 5
|
||||||
|
move 1 from 5 to 8
|
||||||
|
move 5 from 9 to 2
|
||||||
|
move 7 from 1 to 6
|
||||||
|
move 7 from 3 to 8
|
||||||
|
move 1 from 4 to 6
|
||||||
|
move 2 from 5 to 6
|
||||||
|
move 6 from 7 to 5
|
||||||
|
move 2 from 2 to 4
|
||||||
|
move 4 from 5 to 2
|
||||||
|
move 10 from 8 to 1
|
||||||
|
move 2 from 7 to 4
|
||||||
|
move 4 from 2 to 8
|
||||||
|
move 2 from 9 to 8
|
||||||
|
move 1 from 8 to 4
|
||||||
|
move 2 from 4 to 9
|
||||||
|
move 5 from 8 to 2
|
||||||
|
move 1 from 4 to 6
|
||||||
|
move 1 from 8 to 9
|
||||||
|
move 1 from 7 to 2
|
||||||
|
move 2 from 4 to 2
|
||||||
|
move 1 from 7 to 3
|
||||||
|
move 13 from 2 to 1
|
||||||
|
move 1 from 2 to 4
|
||||||
|
move 1 from 2 to 3
|
||||||
|
move 2 from 5 to 4
|
||||||
|
move 17 from 6 to 4
|
||||||
|
move 3 from 4 to 9
|
||||||
|
move 14 from 1 to 4
|
||||||
|
move 4 from 6 to 8
|
||||||
|
move 1 from 9 to 8
|
||||||
|
move 23 from 4 to 8
|
||||||
|
move 6 from 1 to 7
|
||||||
|
move 3 from 1 to 5
|
||||||
|
move 1 from 3 to 8
|
||||||
|
move 5 from 7 to 8
|
||||||
|
move 1 from 3 to 4
|
||||||
|
move 1 from 5 to 3
|
||||||
|
move 1 from 5 to 1
|
||||||
|
move 1 from 3 to 2
|
||||||
|
move 1 from 9 to 4
|
||||||
|
move 9 from 4 to 9
|
||||||
|
move 1 from 1 to 2
|
||||||
|
move 11 from 8 to 2
|
||||||
|
move 1 from 4 to 5
|
||||||
|
move 13 from 2 to 3
|
||||||
|
move 7 from 9 to 6
|
||||||
|
move 1 from 5 to 6
|
||||||
|
move 1 from 5 to 2
|
||||||
|
move 1 from 9 to 4
|
||||||
|
move 1 from 4 to 9
|
||||||
|
move 2 from 8 to 9
|
||||||
|
move 1 from 7 to 8
|
||||||
|
move 8 from 9 to 1
|
||||||
|
move 8 from 1 to 4
|
||||||
|
move 4 from 6 to 7
|
||||||
|
move 1 from 9 to 4
|
||||||
|
move 2 from 3 to 9
|
||||||
|
move 1 from 9 to 1
|
||||||
|
move 6 from 4 to 1
|
||||||
|
move 2 from 1 to 3
|
||||||
|
move 22 from 8 to 6
|
||||||
|
move 1 from 2 to 5
|
||||||
|
move 3 from 7 to 8
|
||||||
|
move 15 from 6 to 4
|
||||||
|
move 7 from 3 to 7
|
||||||
|
move 4 from 6 to 9
|
||||||
|
move 2 from 9 to 2
|
||||||
|
move 6 from 3 to 5
|
||||||
|
move 3 from 9 to 5
|
||||||
|
move 5 from 5 to 8
|
||||||
|
move 1 from 2 to 1
|
||||||
|
move 6 from 8 to 2
|
||||||
|
move 1 from 1 to 2
|
||||||
|
move 3 from 5 to 3
|
||||||
|
move 1 from 7 to 2
|
||||||
|
move 4 from 7 to 8
|
||||||
|
move 4 from 6 to 1
|
||||||
|
move 1 from 5 to 1
|
||||||
|
move 4 from 8 to 7
|
||||||
|
move 2 from 3 to 2
|
||||||
|
move 1 from 1 to 3
|
||||||
|
move 15 from 4 to 2
|
||||||
|
move 3 from 7 to 3
|
||||||
|
move 4 from 7 to 2
|
||||||
|
move 1 from 4 to 9
|
||||||
|
move 5 from 3 to 8
|
||||||
|
move 29 from 2 to 1
|
||||||
|
move 1 from 9 to 5
|
||||||
|
move 1 from 2 to 1
|
||||||
|
move 11 from 1 to 5
|
||||||
|
move 1 from 4 to 5
|
||||||
|
move 2 from 6 to 3
|
||||||
|
move 1 from 3 to 4
|
||||||
|
move 16 from 1 to 9
|
||||||
|
move 4 from 8 to 4
|
||||||
|
move 3 from 6 to 9
|
||||||
|
move 1 from 3 to 7
|
||||||
|
move 1 from 7 to 3
|
||||||
|
move 6 from 1 to 6
|
||||||
|
move 3 from 4 to 3
|
||||||
|
move 3 from 8 to 5
|
||||||
|
move 3 from 1 to 8
|
||||||
|
move 3 from 1 to 4
|
||||||
|
move 2 from 4 to 9
|
||||||
|
move 3 from 6 to 3
|
||||||
|
move 15 from 5 to 2
|
||||||
|
move 3 from 2 to 3
|
||||||
|
move 4 from 2 to 7
|
||||||
|
move 2 from 5 to 9
|
||||||
|
move 10 from 3 to 6
|
||||||
|
move 11 from 9 to 5
|
||||||
|
move 2 from 4 to 9
|
||||||
|
move 8 from 9 to 4
|
||||||
|
move 1 from 9 to 6
|
||||||
|
move 7 from 4 to 6
|
||||||
|
move 3 from 5 to 8
|
||||||
|
move 22 from 6 to 9
|
||||||
|
move 4 from 7 to 8
|
||||||
|
move 8 from 5 to 8
|
||||||
|
move 2 from 4 to 3
|
||||||
|
move 1 from 8 to 1
|
||||||
|
move 17 from 8 to 3
|
||||||
|
move 3 from 3 to 4
|
||||||
|
move 13 from 3 to 9
|
||||||
|
move 20 from 9 to 7
|
||||||
|
move 2 from 2 to 9
|
||||||
|
move 19 from 9 to 5
|
||||||
|
move 1 from 1 to 4
|
||||||
|
move 3 from 2 to 7
|
||||||
|
move 4 from 4 to 3
|
||||||
|
move 1 from 9 to 8
|
||||||
|
move 18 from 5 to 1
|
||||||
|
move 1 from 9 to 4
|
||||||
|
move 1 from 9 to 7
|
||||||
|
move 2 from 4 to 8
|
||||||
|
move 1 from 5 to 4
|
||||||
|
move 3 from 2 to 7
|
||||||
|
move 3 from 3 to 1
|
||||||
|
move 2 from 1 to 3
|
||||||
|
move 3 from 3 to 8
|
||||||
|
move 1 from 4 to 8
|
||||||
|
move 6 from 8 to 2
|
||||||
|
move 1 from 3 to 9
|
||||||
|
move 1 from 3 to 9
|
||||||
|
move 10 from 1 to 9
|
||||||
|
move 7 from 1 to 7
|
||||||
|
move 4 from 7 to 4
|
||||||
|
move 29 from 7 to 3
|
||||||
|
move 6 from 2 to 9
|
||||||
|
move 25 from 3 to 6
|
||||||
|
move 5 from 3 to 9
|
||||||
|
move 13 from 6 to 9
|
||||||
|
move 12 from 6 to 2
|
||||||
|
move 1 from 8 to 9
|
||||||
|
move 10 from 2 to 6
|
||||||
|
move 7 from 6 to 5
|
||||||
|
move 20 from 9 to 3
|
||||||
|
move 11 from 3 to 6
|
||||||
|
move 1 from 7 to 9
|
||||||
|
move 2 from 2 to 9
|
||||||
|
move 19 from 9 to 2
|
||||||
|
move 14 from 6 to 8
|
||||||
|
move 4 from 5 to 2
|
||||||
|
move 2 from 4 to 6
|
||||||
|
move 3 from 5 to 1
|
||||||
|
move 13 from 8 to 5
|
||||||
|
move 1 from 6 to 1
|
||||||
|
move 2 from 4 to 2
|
||||||
|
move 8 from 2 to 4
|
||||||
|
move 6 from 4 to 7
|
||||||
|
move 1 from 9 to 8
|
||||||
|
move 2 from 4 to 7
|
||||||
|
move 5 from 2 to 4
|
||||||
|
move 4 from 4 to 2
|
||||||
|
move 10 from 5 to 6
|
||||||
|
move 1 from 1 to 7
|
||||||
|
move 1 from 5 to 4
|
||||||
|
move 1 from 4 to 9
|
||||||
|
move 4 from 7 to 8
|
||||||
|
move 5 from 1 to 7
|
||||||
|
move 1 from 9 to 7
|
||||||
|
move 7 from 3 to 2
|
||||||
|
move 2 from 5 to 2
|
||||||
|
move 8 from 6 to 9
|
||||||
|
move 1 from 4 to 6
|
||||||
|
move 3 from 7 to 4
|
||||||
|
move 5 from 9 to 7
|
||||||
|
move 2 from 4 to 3
|
||||||
|
move 20 from 2 to 4
|
||||||
|
move 2 from 4 to 8
|
||||||
|
move 14 from 4 to 2
|
||||||
|
move 12 from 7 to 4
|
||||||
|
move 8 from 2 to 1
|
||||||
|
move 10 from 2 to 4
|
||||||
|
move 6 from 8 to 5
|
||||||
|
move 1 from 7 to 8
|
||||||
|
move 4 from 4 to 3
|
||||||
|
move 1 from 3 to 9
|
||||||
|
move 1 from 2 to 7
|
||||||
|
move 1 from 6 to 8
|
||||||
|
move 5 from 3 to 5
|
||||||
|
move 1 from 3 to 2
|
||||||
|
move 7 from 4 to 5
|
||||||
|
move 6 from 1 to 7
|
||||||
|
move 5 from 7 to 6
|
||||||
|
move 1 from 6 to 5
|
||||||
|
move 2 from 7 to 8
|
||||||
|
move 1 from 2 to 6
|
||||||
|
move 2 from 8 to 2
|
||||||
|
move 5 from 5 to 7
|
||||||
|
move 6 from 6 to 8
|
||||||
|
move 16 from 4 to 9
|
||||||
|
move 16 from 9 to 4
|
||||||
|
move 11 from 5 to 4
|
||||||
|
move 5 from 8 to 3
|
||||||
|
move 2 from 5 to 2
|
||||||
|
move 14 from 4 to 2
|
||||||
|
move 1 from 6 to 3
|
||||||
|
move 1 from 6 to 9
|
||||||
|
move 1 from 5 to 3
|
||||||
|
move 3 from 8 to 2
|
||||||
|
move 10 from 4 to 7
|
||||||
|
move 5 from 9 to 2
|
||||||
|
move 3 from 4 to 7
|
||||||
|
move 1 from 1 to 4
|
||||||
|
move 3 from 2 to 5
|
||||||
|
move 2 from 3 to 7
|
||||||
|
move 1 from 4 to 2
|
||||||
|
move 18 from 2 to 8
|
||||||
|
move 3 from 8 to 4
|
||||||
|
move 5 from 3 to 1
|
||||||
|
move 1 from 3 to 9
|
||||||
|
move 1 from 9 to 3
|
||||||
|
move 8 from 8 to 7
|
||||||
|
move 2 from 5 to 4
|
||||||
|
move 1 from 5 to 6
|
||||||
|
move 1 from 2 to 5
|
||||||
|
move 1 from 5 to 8
|
||||||
|
move 1 from 6 to 9
|
||||||
|
move 3 from 2 to 7
|
||||||
|
move 27 from 7 to 4
|
||||||
|
move 2 from 2 to 4
|
||||||
|
move 4 from 8 to 4
|
||||||
|
move 1 from 9 to 8
|
||||||
|
move 3 from 1 to 6
|
||||||
|
move 1 from 3 to 5
|
||||||
|
move 3 from 8 to 3
|
||||||
|
move 1 from 1 to 4
|
||||||
|
move 1 from 8 to 1
|
||||||
|
move 3 from 1 to 4
|
||||||
|
move 2 from 8 to 2
|
||||||
|
move 2 from 6 to 2
|
||||||
|
move 8 from 4 to 9
|
||||||
|
move 1 from 7 to 1
|
||||||
|
move 1 from 5 to 4
|
||||||
|
move 1 from 7 to 3
|
||||||
|
move 4 from 2 to 7
|
||||||
|
move 1 from 8 to 6
|
||||||
|
move 8 from 9 to 7
|
||||||
|
move 1 from 6 to 3
|
||||||
|
move 3 from 3 to 4
|
||||||
|
move 37 from 4 to 1
|
||||||
|
move 1 from 4 to 5
|
||||||
|
move 13 from 7 to 8
|
||||||
|
move 6 from 8 to 4
|
||||||
|
move 5 from 8 to 3
|
||||||
|
move 1 from 7 to 6
|
||||||
|
move 4 from 1 to 5
|
||||||
|
move 1 from 6 to 5
|
||||||
|
move 2 from 8 to 4
|
||||||
|
move 32 from 1 to 5
|
||||||
|
move 1 from 1 to 4
|
||||||
|
move 5 from 3 to 5
|
||||||
|
move 1 from 3 to 2
|
||||||
|
move 1 from 2 to 9
|
||||||
|
move 19 from 5 to 2
|
||||||
|
move 1 from 9 to 1
|
||||||
|
move 16 from 5 to 1
|
||||||
|
move 7 from 5 to 6
|
||||||
|
move 1 from 3 to 1
|
||||||
|
move 11 from 1 to 2
|
||||||
|
move 18 from 2 to 4
|
||||||
|
move 1 from 5 to 9
|
||||||
|
move 8 from 6 to 1
|
||||||
|
move 10 from 2 to 6
|
||||||
|
move 7 from 4 to 9
|
||||||
|
move 2 from 2 to 1
|
||||||
|
move 7 from 4 to 2
|
||||||
|
move 5 from 4 to 5
|
||||||
|
move 2 from 9 to 6
|
||||||
|
move 9 from 6 to 3
|
||||||
|
move 5 from 5 to 3
|
||||||
|
move 8 from 4 to 9
|
||||||
|
move 7 from 9 to 8
|
||||||
|
move 4 from 2 to 9
|
||||||
|
move 10 from 3 to 1
|
||||||
|
move 6 from 8 to 1
|
||||||
|
move 2 from 6 to 3
|
||||||
|
move 5 from 3 to 8
|
||||||
|
move 3 from 2 to 7
|
||||||
|
move 1 from 9 to 5
|
||||||
|
move 1 from 3 to 5
|
||||||
|
move 2 from 7 to 8
|
||||||
|
move 1 from 8 to 9
|
||||||
|
move 1 from 6 to 1
|
||||||
|
move 23 from 1 to 4
|
||||||
|
move 2 from 5 to 3
|
||||||
|
move 1 from 8 to 2
|
||||||
|
move 2 from 8 to 5
|
||||||
|
move 2 from 5 to 6
|
||||||
|
move 1 from 2 to 7
|
||||||
|
move 1 from 7 to 5
|
||||||
|
move 4 from 9 to 7
|
||||||
|
move 1 from 7 to 5
|
||||||
|
move 1 from 3 to 6
|
||||||
|
move 3 from 7 to 4
|
||||||
|
move 1 from 3 to 8
|
||||||
|
move 1 from 4 to 6
|
||||||
|
move 6 from 1 to 8
|
||||||
|
move 4 from 6 to 4
|
||||||
|
move 2 from 9 to 1
|
||||||
|
move 1 from 5 to 1
|
||||||
|
move 19 from 4 to 2
|
||||||
|
move 2 from 9 to 3
|
||||||
|
move 1 from 9 to 3
|
||||||
|
move 9 from 1 to 8
|
||||||
|
move 1 from 5 to 8
|
||||||
|
move 1 from 9 to 3
|
||||||
|
move 2 from 3 to 9
|
||||||
|
move 3 from 8 to 4
|
||||||
|
move 1 from 4 to 9
|
||||||
|
move 1 from 9 to 5
|
||||||
|
move 2 from 3 to 4
|
||||||
|
move 6 from 4 to 7
|
||||||
|
move 3 from 9 to 5
|
||||||
|
move 4 from 4 to 7
|
||||||
|
move 1 from 5 to 6
|
||||||
|
move 18 from 2 to 7
|
||||||
|
move 13 from 7 to 9
|
||||||
|
move 3 from 5 to 1
|
||||||
|
move 1 from 2 to 1
|
||||||
|
move 1 from 6 to 5
|
||||||
|
move 3 from 1 to 7
|
||||||
|
move 1 from 1 to 5
|
||||||
|
move 7 from 9 to 6
|
||||||
|
move 8 from 7 to 4
|
||||||
|
move 11 from 7 to 6
|
||||||
|
move 5 from 9 to 2
|
||||||
|
move 17 from 6 to 1
|
||||||
|
move 2 from 5 to 1
|
||||||
|
move 11 from 8 to 1
|
||||||
|
move 20 from 1 to 2
|
||||||
|
move 3 from 8 to 1
|
||||||
|
move 1 from 9 to 8
|
||||||
|
move 1 from 6 to 1
|
||||||
|
move 11 from 1 to 7
|
||||||
|
move 18 from 2 to 3
|
||||||
|
move 12 from 4 to 8
|
||||||
|
move 11 from 7 to 3
|
||||||
|
move 7 from 2 to 3
|
||||||
|
move 2 from 1 to 5
|
||||||
|
move 1 from 1 to 3
|
||||||
|
move 1 from 8 to 1
|
||||||
|
move 1 from 5 to 9
|
||||||
|
move 1 from 9 to 6
|
||||||
|
move 1 from 8 to 7
|
||||||
|
move 1 from 5 to 3
|
||||||
|
move 1 from 6 to 7
|
||||||
|
move 2 from 8 to 1
|
||||||
|
move 8 from 3 to 2
|
||||||
|
move 7 from 2 to 9
|
||||||
|
move 6 from 8 to 6
|
||||||
|
move 1 from 9 to 3
|
||||||
|
move 2 from 6 to 4
|
||||||
|
move 5 from 9 to 6
|
||||||
|
move 7 from 6 to 2
|
||||||
|
move 8 from 2 to 9
|
||||||
|
move 2 from 1 to 9
|
||||||
|
move 2 from 7 to 2
|
||||||
|
move 2 from 4 to 8
|
||||||
|
move 1 from 2 to 7
|
||||||
|
move 25 from 3 to 7
|
||||||
|
move 7 from 9 to 7
|
||||||
|
move 1 from 2 to 5
|
||||||
|
move 1 from 1 to 4
|
||||||
|
move 3 from 8 to 1
|
||||||
|
move 3 from 1 to 8
|
||||||
|
move 3 from 7 to 8
|
||||||
|
move 15 from 7 to 3
|
||||||
|
move 10 from 8 to 3
|
||||||
|
move 1 from 5 to 7
|
||||||
|
move 1 from 8 to 5
|
||||||
|
move 3 from 9 to 2
|
||||||
|
move 1 from 6 to 4
|
||||||
|
move 2 from 2 to 7
|
||||||
|
move 1 from 2 to 5
|
||||||
|
move 14 from 7 to 9
|
||||||
|
move 1 from 6 to 2
|
||||||
|
move 1 from 7 to 1
|
||||||
|
move 1 from 5 to 4
|
||||||
|
move 3 from 4 to 3
|
||||||
|
move 1 from 7 to 6
|
||||||
|
move 1 from 2 to 7
|
||||||
|
move 1 from 1 to 2
|
||||||
|
move 3 from 9 to 1
|
||||||
|
move 1 from 6 to 2
|
||||||
|
move 2 from 2 to 6
|
||||||
|
move 17 from 3 to 6
|
||||||
|
move 1 from 8 to 3
|
||||||
|
move 1 from 5 to 4
|
||||||
|
move 2 from 7 to 2
|
||||||
|
move 9 from 9 to 8
|
||||||
|
move 1 from 9 to 3
|
||||||
|
move 16 from 3 to 2
|
||||||
|
move 1 from 7 to 5
|
||||||
|
move 5 from 6 to 5
|
||||||
|
move 1 from 1 to 6
|
||||||
|
move 1 from 4 to 1
|
||||||
|
move 1 from 9 to 3
|
||||||
|
move 9 from 8 to 6
|
||||||
|
move 3 from 1 to 5
|
||||||
|
move 1 from 9 to 1
|
||||||
|
move 16 from 2 to 1
|
||||||
|
move 2 from 2 to 7
|
||||||
|
move 2 from 3 to 9
|
||||||
|
move 2 from 7 to 4
|
||||||
|
move 2 from 9 to 3
|
||||||
|
move 3 from 3 to 5
|
||||||
|
move 1 from 4 to 5
|
||||||
|
move 1 from 4 to 2
|
||||||
|
move 1 from 1 to 7
|
||||||
|
move 1 from 7 to 1
|
||||||
|
move 1 from 3 to 6
|
||||||
|
move 2 from 5 to 1
|
||||||
|
move 3 from 6 to 2
|
||||||
|
move 2 from 5 to 8
|
||||||
|
move 8 from 5 to 4
|
||||||
|
move 1 from 5 to 3
|
||||||
|
move 1 from 3 to 2
|
||||||
|
move 1 from 8 to 3
|
||||||
|
move 1 from 3 to 8
|
||||||
|
move 4 from 1 to 7
|
||||||
|
move 9 from 1 to 7
|
||||||
|
move 6 from 1 to 8
|
||||||
|
move 3 from 7 to 4
|
||||||
|
move 7 from 6 to 7
|
||||||
|
move 11 from 4 to 3
|
||||||
|
move 2 from 3 to 8
|
||||||
|
move 8 from 3 to 8
|
||||||
|
move 4 from 6 to 1
|
||||||
|
move 1 from 7 to 4
|
||||||
|
move 2 from 1 to 2
|
||||||
|
move 8 from 7 to 2
|
||||||
|
move 1 from 4 to 8
|
||||||
|
move 10 from 8 to 2
|
||||||
|
move 2 from 6 to 1
|
||||||
|
move 1 from 1 to 4
|
||||||
|
move 1 from 4 to 8
|
||||||
|
move 2 from 1 to 4
|
||||||
|
move 6 from 6 to 5
|
||||||
|
move 1 from 1 to 9
|
||||||
|
move 2 from 6 to 8
|
||||||
|
move 1 from 4 to 5
|
||||||
|
move 1 from 6 to 9
|
||||||
|
move 4 from 8 to 9
|
||||||
|
move 1 from 7 to 1
|
||||||
|
move 6 from 8 to 6
|
||||||
|
move 1 from 6 to 1
|
||||||
|
move 1 from 4 to 9
|
||||||
|
move 2 from 9 to 5
|
||||||
|
move 5 from 5 to 9
|
||||||
|
move 8 from 9 to 5
|
||||||
|
move 2 from 8 to 5
|
||||||
|
move 3 from 6 to 9
|
||||||
|
move 8 from 5 to 7
|
||||||
|
move 5 from 5 to 6
|
||||||
|
move 1 from 9 to 2
|
||||||
|
move 1 from 3 to 1
|
||||||
|
move 1 from 6 to 7
|
||||||
|
move 1 from 5 to 6
|
||||||
|
move 24 from 2 to 4
|
||||||
|
move 3 from 9 to 7
|
||||||
|
move 16 from 4 to 5
|
||||||
|
move 2 from 1 to 3
|
||||||
|
move 12 from 5 to 6
|
||||||
|
move 1 from 9 to 5
|
||||||
|
move 4 from 5 to 9
|
||||||
|
move 1 from 1 to 6
|
||||||
|
move 1 from 5 to 2
|
||||||
|
move 2 from 9 to 8
|
||||||
|
move 1 from 8 to 1
|
||||||
|
move 5 from 4 to 5
|
||||||
|
move 2 from 3 to 5
|
||||||
|
move 1 from 8 to 3
|
||||||
|
move 1 from 1 to 6
|
||||||
|
move 3 from 5 to 7
|
||||||
|
move 1 from 9 to 1
|
||||||
|
move 1 from 2 to 8
|
1
2022/full/day06.txt
Normal file
1
2022/full/day06.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
wzsspbssbhshchmmrmprmrfrsfrrjhjphjjtppbfflqfqppdhdbhdhbbjgghgzgsgfsfhfhvvwcwhwwnppsbsggqnnvvtffpssjfjnnltntdtdddptprppjmmqssrlrplllfrrzggbmmlmnmtnnzddfdgfdfsstbstbbzcbbcjcvvfwwwzlzssglsgllnbnmbnmbbgmmppmwwsrrzqqvgqgnqnmmswwrnnbsnnbdbwwqnwqnwwzzqwzqzjqqwbqbccjcwwjlwjwppqfqjffwddrzrjzrjzzzhchjjlqqrggzvvnlvnvjvhvnvjvbbvdvldldbbwddtsscbbhccmbmbppbmmgjggcjjlrrwjwtjwwmffgddwvdvbdbvvhchmhmdmwwbjbjcbbcmbmmslmlslsjjrnrjrjpjcjgcjcjbbwsbsbfssjzsjsggcmcsswgssbbqpbqqdsdqqztzmzpmpbmbvbjjtrjtthwhbhnbhnbnssvpvsppgrrcwrrmqqhpphrpphchvhphqhbqbtttllsrlsrshrrmhmvvrmrnngbgnbnpbprrrftfjtjwwmrmvmcmvmrmwmssrccfbbhppjbpbwbqwbqbzzfmzmtttjbbvcvppmwwrbbzsbzbfzfdzzhrhzhvvsqvsqsnslljwllqlwllvccnttzhtzzpspqspqsqgsssvnsvshvsvqvnvlldbbfdfmmpbpgphhpqhpppchhbfbrfrllntnznrrhdrdhhdhjjgwwqhhfssjbjwjqqbffvvcrchccwmcwcllljtjrrqgrrdcrddvfvwvzzjqqcffgjgzzdhdwdssffjjhccggmtmltlhtthzhvhlvlddsfsbbtjbjcbjcjzcjjpfjfzzpnnbtbqtbqtqptpnplllbzbllhbllnqnttpddqvdqvqmmjnjggnnnhqqfcqcffqppdgpddvqddmhmrhrtrmrzmzhzpzlzqlqpqhphrpppjqqppzbzmmjgggqtggtjthhlclnclcnccmcppdcpddqrrfgrgbbhwhdhrrqtqpqjpqjpqjqqmcqmccnngqqqmtqtssnvnzvvpcpwcwwqcqqqfcqffsvsmvmttttmrrzssghgssjmsmbmvvwggggzhhfvdpgjmmvzbfjghqhrfbpmbvjzwvfmcthrqwdhghpwsspmhpqnmwhjzpnlzfnvhdnnrqwnvctbmjqzhqrpjlwrssdlwqzmsfrfzmgjhnwwnwczswnhsdbvqbmdlvntsdrhrjjcjjhpbblgwhjwdcdjtpvtmslwvncwdjbwzvbpzbvddvssnrhtshrcvnhqnpmjzfswqbbrztnwjcpflfbhnphfwmjvnvtswgfttgjcqcngmmwjlfsprwfcfwcmgrgbnqmzbtzbtbztngvrzpsnrzvhbsdjnzpwwzllgnfdrlwpmnrznqsqcmvnfbnhqjddvcjmtgbpbmsgqdqzflmlmqncmhwltrmdmgnwpfwddrdpfhsgsnggchzjhgpwrsmdzgjtrgmnprhbwbcbpzbdvvstfqcnqzbdjqpmrdbtgcthtclftghhmnrzrjqqsbndhpvmdpfpwdlhvmczvdfgvpqclssvlhqnhlcfnfbvtspdzmgzdctvpdcwchtqhpsgmmblspjdlvgblbpgrfrgnqqsphcsrgfsdmpqscbjmnqrfbcwfthdtswbzthpnvsfbntnbmmgpfzlqwhppvvdrmwbqzbgppbgsqmjfqtmntgwpnccthftwdmvwmnchlbjhsnmbhndczbrhhjpbvnjdzrcndbbmfwfwsjwfgbqhwhrsvlngsbhhlrdjzzbmjpsqhlpzwcsntjhlmngblspmsjrjwsjsrqwnrcwsmcsbmpjwrthbqhrschrmrppnnbmjbvjzlmzsrfdwqlfnfjljftjvzsqdwlhbblqcdlqjbprpcllhlhmwrbrlgfrcqshrtjpnmhljttdvpfnhdjqvjhhfczwvbzqgnzgljcfrbpgwnfhfchwzqmqqzpbcdpqmnbrppzblnnzqrfnmgtljwnfgzwvnjppdbdhbznvpgwhbdjjvlspgwgjsmfsvllpgwlfnnptmwnfsshjjvqzjwrqpvmsphpmftqdllqqdzcjwfvpftgvspprdwvvcnglmbpntghntdwpjvvsppgjvnbjgvtzchtqtwbddncsbrfcvrnvlggvwgmmnfzrswnzjrwthzmdsmzqmzsnrqsnslnhmfqljnnnzshqfqshrhhjmnhdgphctswdbhnrcgnzmmzqpjqbtdfhhltsmvvtntbgsznshhsghblhlhqpmdcfhmnfzvhgnfsfflcfwbfqzmccrjdpfvphtqbrdnzjfmfhbzqcpdnjdcgwprvchlzrcvrghgjqncjvnndbcshntrfsbsnmjlhclnzpfdgztflcpwqpnvlscfndwqzfvcmpgfncszpmwcsrdbrrhdjvmthslfvmlgpqhlgwhqnjljcvhswbsbqfrfhvzwjvdmhzsgbmbmfnbpclqdwhvrlpppszptjvwtvdmfltfqqgjttdggcvllblnnhjqnjzhvpgpzzpzwbpjqbthnjjlmsjgjzqwnjlqrcdmmvsldtcrzqdrcmwqhnhfghdlmzwcspgmlpzhbdsmlwlqnhhvcvdfzmvfwpbfmjtdllprfqzzjpbrshdzgspsrlrwrhdpmznzzqngwrzqpmtwgbsswrnnnfctjhbcftnslsqwjvmfwfdvfqcnsvfsvgstgbzpmljjtlvtnfsdzpvcgbjqwgbgzqbjfgltqvnhffflsbjzfqfrfbssrvvwqvqptmhrbgllqjwptrzgvqgccsrvbgtvmzfzlmtqrgfwhzddsptclbhjlwqfntvjqdvcddnffmbtqrnsvtmlvljcqdsrpggcmqvmmlzwwbgznhblwzjdppvtqzjvcmtfzhdzjplrdbrfrgzpldvnsgqlbwbmfvrbgwzmjmmqdfgwtbgtzmdqnvqbwvcfjhddqvnjtjlhhjnltbtqqvblwlmglrqcrcfjvdntrnqzzbmrjqglmrdcjgnshcghtprjqqsdrmgdnzmzcfqqdtjtrqgtqtgrpmmgzjtcrznmqccjbdpbvrnnbmbzvgdcnrczbctbrsrrqrjnfcdpzlnngwvcdtbbgssvhpptntqdzhcqtlpvzjbfgzggrgrcgtdfjbwdcrpztnfcdbscnlmqmwcbmtnddgbmhwsgvcfdcmhlsvtnqtmrnsjzhppgwvzlmhwwmpfjzrfbhsgntzrdhwswrnfmmmczqrvdrqnhgrvqbdddhglwsftsljvgbnjqfwfzsspdqvgsnlgfsfpvdrjhzcldtrmjjrmdhvvfrjldhhtqnvsvlldjpjbpwstfsmrpmbqbnnpvqtbgjvblthbmwqtfcfgnjscvtbvlqcmlhffpzgjzfscsqwnhrjhvbrrzwqvbjwtwhtqsdbssfgncppnsfgfltdcbjqjzqqtprsbvjzhmchnltvmbsvpvhgzhfhbrnttsqbcmwpdnwqqgdrjrdwdhtzwsmcdffqgsddvbzfjhtfhtnfdbfrwmdtcqshfjrcpswzcptgwgmctpmzjdbqlmqwthmnfplmctpsslcsdtqpqhjtmjdnmnqnjgchwstsmtpvsmgpsbfgwqnzhrdgdvcdlcldfcmjvsdldgbmhltjhczffwmzqssnhfnwftfgpshntjbpjdffjpcmcpwhclrrwqcqzmntjglzgcfrplfpvprtpvpjdlcrfwrtrzdzmhsrsmdcpqqrqgvfpdbmzbzqdfhpplmgfrdghclbclgswvwhhdvcpmpzflpffmptcrwglftztccrpbrvmpnqmqdgjgrrlbtqtvgcjpljttwtdslqjqlsdpblgrqbrtbmtblfbqtbvsqhpqzpqfhjqpmjrmcvqmsbbpjpdncgnjftclbltwszrrfzqbjcdtphcvpmbhppvwjwlprgmghrjzzgnvzlvghnjbzqjpdgzfsnjchpbzqdzpsjmsrvvqwjcpwznlpbjldlrdfqtrzhqzcnpjqbbbf
|
1318
2022/full/day07.txt
Normal file
1318
2022/full/day07.txt
Normal file
File diff suppressed because it is too large
Load Diff
99
2022/full/day08.txt
Normal file
99
2022/full/day08.txt
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
313213123212200312011243203120214010202554420335045116203101005212525131015305511140012431022113113
|
||||||
|
222021333112322244231542054023354511304431216312534453560105660253445311020244233130144313440030322
|
||||||
|
200012220300132310233100025524032003355144536126232161330106115213441450552235514000243120210031130
|
||||||
|
102111124044033113241415155401056014506203413216651520206613342353052505445000321043121021430440021
|
||||||
|
221134021010031320101542213340113552161113350123516154134654046250223033000413443321231233142213010
|
||||||
|
112241233114245202523201433013460320664034202602144006022621253536213222400131120345151014014131133
|
||||||
|
132211130114141401325141212460540656525106651152012063404633651340223361443201520054113541144043031
|
||||||
|
323140320024314005210155316202152552621415660063112177564603241212312025036551350313225504314404112
|
||||||
|
014013242041230510442265205625331115540222744516266167254216354043533020346502032534231121044441220
|
||||||
|
233414030101315255335126055263144512111777464611565216157441673706100506241423030403420343112342030
|
||||||
|
133144314412553330012446404244433465434666762135116677765213463444460612511131340332552424201204120
|
||||||
|
010320402332512110363213044530335655613562223756572424746437567672262256431540210005310544243444101
|
||||||
|
324403411232230200215144254550257275144535323452276762234354361552536153612012260502425410505314212
|
||||||
|
044143021304533036524115200363122146144443357746134567133417572143572217253466665420004544002052304
|
||||||
|
031301205442313664253200353721523337451137554555385833341715227554331566151244334446363035232422032
|
||||||
|
412021132254126340642250212415471513377143653545744364662761514364426436251422450305502445230351142
|
||||||
|
423013525424334650512351242132544127615655738268233852527877887577454317715373566210510633013145020
|
||||||
|
314013042244622602006117664713652263528475833433263846468763678447134716635345050225504112315124312
|
||||||
|
210530032555051320514661111414734263472852682724485772623266565822423365264512541061226540103142223
|
||||||
|
202523210140346233027372362557125436368725536228624865344774378537888747171665564143331101501212340
|
||||||
|
312102150200503360534132445517484678583587678756766763747725475724228724317675166660536246102044404
|
||||||
|
014501150514404506226424155762432386227846258625478334768375862827476433553651311460116133631440213
|
||||||
|
145345025402132601222234271268834838244287765994936689397836424284644676342577451356463132062234232
|
||||||
|
030520533600060465674743543832435622275594666933473957864637427284284528866426734257033413611153542
|
||||||
|
111125222126126664625217555874224623337857863456948836785373353757744683247375632677514312554402024
|
||||||
|
454344234313551645731724622525365832657894545768964536939387863978465673442253722125752553236132004
|
||||||
|
141351656653224237252122854224855258938593946648537669944575478986734723225856761571634036114323202
|
||||||
|
301354130411223555466416844555847677853855433636774857897563386873392265447728545634555234214003555
|
||||||
|
324351500351156142554654722557458488698547355994463766454687489898485753473777574124613414652504004
|
||||||
|
000202526603566624271288867428799685358698759656849978553895836996388433252545546266753551322305123
|
||||||
|
142140450656776227714466585833798874975635767795445874946645465477849772464684527525213236023524220
|
||||||
|
324262353505673315724236445748536388973668654588599896854469535494838643744387872721615221063235321
|
||||||
|
552206463167666154577658258569744567339446596474586868848866645743399869362886626547344767533546153
|
||||||
|
352323434663437355725427826449799477395999565764668865854945787936654594832633678767541225131001503
|
||||||
|
440166362233562667478335763956389857755767497475848959778498799895595785387844464757513162265652640
|
||||||
|
104122124642766642664452283555537376598457767558647554969995685645795999475473687336165523560052001
|
||||||
|
255352243015641217534667849769975859955778464876555786747474774794864778373768452562637255330444232
|
||||||
|
456220432747476336866782246873698697677699688678997975678548856759743777979632262638565415133210633
|
||||||
|
354641641663166247236463863687744889449497969668886767686756898498698544578857834482516366746042103
|
||||||
|
125201564115437683566423743488648645944969969766988857659599646944656843556585768447477145122536100
|
||||||
|
565166453317161563746425435958546648857589858689866779576599554476785965354884443284615264253254316
|
||||||
|
121246126671552573824643637663796768749697876859599686798755755668478994537789677336675255111501306
|
||||||
|
360355134677155672632437676667797548778989878956585555755888869798448799556895227877387243567410342
|
||||||
|
201045427623176635776469999883749944896899977995889968875595559556975886998744463243563112165201326
|
||||||
|
352250115546124536536769454447786744475757988989886986985776968688899563536676844455461472345336201
|
||||||
|
444012305276547277522595375654994558855859877987996678887769879954854599865599846623773465534004160
|
||||||
|
003621673437674224248486547979885878957565757686996887766986595599447858644667462254244517674205046
|
||||||
|
045265132276456334554365893935749649965989576778789869677576755756899986563778785582684657425224532
|
||||||
|
256151375615717542563666894835779554876779596976976699887778577957456866545674477228666746346403631
|
||||||
|
161152464371764263643334333389748956969597666797767878866755966565484647664843525828682412373755454
|
||||||
|
502011544714165463843278447485479797867666888668797796768977767569575788836334565474627531473704246
|
||||||
|
151460364232447443233565968759985868786557997798976867676959589967898874545836432537554441566122314
|
||||||
|
325354014323767722264889584534897666569996596668678778968696799996649764974489874252576563221244356
|
||||||
|
300165663442414468382638967476995984959988868887699967676597986577798947648889527728225341345144126
|
||||||
|
523044146537227284236854867884546566896896589678689877799567996884747789569869374746443236356121631
|
||||||
|
623520016256236672238393557665746588457977578897867867689877778857948885353767526367472655634211324
|
||||||
|
513112323743777428355697564974758755988785986568979868979685685997847967586943842248473255451053311
|
||||||
|
450020506764535784366644976997588757498856779786876686775868855996746554394579645638756632417635430
|
||||||
|
333302106653766675873339799535474646879996789788987875587977755587884588498366525263657241244563411
|
||||||
|
021603345313213632267754575346995947848565695878969885767869775868759846376874235783854235221066060
|
||||||
|
451051105676415353834239879477689664878678578559658579558858859685656646333643282578751361221450043
|
||||||
|
323133151167312457234657559765757999468467698869969666865897797857485499569838464565771443341433624
|
||||||
|
351226435216677645378442636393858569688464696659679658777559879978765539986842833528347477142364355
|
||||||
|
312522015134552576843564246393479975856585945659576986575979678487794748787843877358147735663364153
|
||||||
|
436221405132742616333723774335457748498747869445768557777496645469557694497322763335217424704452516
|
||||||
|
531453464276746646458848784658447874499485559877948986585644748765566863496685884585514544145343261
|
||||||
|
124004035175455643547236885494794479865464946999998568586788689967343377758845738571672264321061003
|
||||||
|
200155306351543777457257657968974568856495865454798449784799858884637386375422526864243565062364102
|
||||||
|
445601414321444235648773664866559437996644487476459565964785659539635568456223755627145663416360463
|
||||||
|
450034302502443262354377457789598776596746648495968457946465588399656898646426472411777146341644150
|
||||||
|
023146264504256441756645634487555664987468946766784647877558359936934483654774826324735714633603030
|
||||||
|
333342045300642417421427522458538378785933374679488696549488964673985948667688553344343522163201010
|
||||||
|
455545402043235615564685485576228935958544883643955984493945756635487843653852747147246556553523510
|
||||||
|
521503005555124536565566284723484688885348465998948435535997783785742684873228712152117622054235215
|
||||||
|
312504066020457274731625463858577544637764966338466339435677364997568623562286441516367015430243140
|
||||||
|
205031053461063473777474186844553532897797357638539497889554739476455778658267742121765420506102155
|
||||||
|
234254241452503617412556672484735427269749864873783849964559983463526474536714377341620430652445005
|
||||||
|
005122256601541121767617243673775345873688335643477574686454362545566824655271216641353663405312143
|
||||||
|
433412443503526366274346321587248483458325774873734889987843368227357425636513234740304061623033442
|
||||||
|
150425005143315445343366357776572258884478742563678357783845862235758564513525337622046146253440425
|
||||||
|
225155323264631456635462325511885764326675428846268646575225734474437376612544667111053406332354205
|
||||||
|
035014011000365630427277363261244836668367562448734772533252234588746775752633154601553624254020455
|
||||||
|
012332415442566650666617225747354638747746384682743326746678826728355131225614470132623462424342514
|
||||||
|
013524113311511615516563562155256314453777643324383464236254565752742637247411046651633511302344051
|
||||||
|
212122212430404140032134131564756752725322885466434352224875446515552517267614410524244004301240143
|
||||||
|
311400235445132520254065617566464245641623888587556667385287735312776421161334445544251524420400232
|
||||||
|
440215452341344043062300567544524332733611636552822742567416277354477557756312354353622415135520342
|
||||||
|
212430430313114143406656305336551452762327233736172563224242725162751616161102623013055041203553040
|
||||||
|
321010353433305435042151016603142762425754273737777221111751751754217734105034366116400050235001301
|
||||||
|
141012030043441152515110066520525231112547624256173331346341451761472053411546323404310404443302411
|
||||||
|
133133034522454043232213312145664546126452755453724144154261454733124054403605004150535010413000334
|
||||||
|
331412441152240551104612131344064131112564126362561532523311462604061151623121543003234021543312303
|
||||||
|
010301442302500534021525552205536466144454523741535255444641345430402356234514221410435324321440211
|
||||||
|
222301014410242404221240250563134040056104626021173454550103400400616550340400310015454450242211021
|
||||||
|
233412422204111420244300456264320032401430366334634641441411125102262216452333414201235210001133200
|
||||||
|
132244430320123233143125240232350142156620032556633233042303530460352401020133104323414224314240333
|
||||||
|
003213243020203044035550441012322051645661162162123160565554312321050133555533333123214002014231123
|
||||||
|
000032030402033315113220225514041611664662663525144303562161423513133325130431534323303033322212313
|
||||||
|
101211324120322333355055001035515221630532526633042003421442155144120444232152535003241233413001002
|
2000
2022/full/day09.txt
Normal file
2000
2022/full/day09.txt
Normal file
File diff suppressed because it is too large
Load Diff
14
2022/python/_sample.py
Normal file
14
2022/python/_sample.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import shared
|
||||||
|
from pprint import pprint as pp
|
||||||
|
|
||||||
|
def run(SOMETHING):
|
||||||
|
pp(SOMETHING)
|
||||||
|
|
||||||
|
def main():
|
||||||
|
spl = lambda y: [int(w) for w in y]
|
||||||
|
rows = [row.rstrip().split() for row in shared.load(3)]
|
||||||
|
print(run(rows))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
33
2022/python/day01.py
Normal file
33
2022/python/day01.py
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
import shared
|
||||||
|
from pprint import pprint as pp
|
||||||
|
|
||||||
|
|
||||||
|
def run(rows):
|
||||||
|
elves = []
|
||||||
|
current_elf = 0
|
||||||
|
for row in rows:
|
||||||
|
if row == '':
|
||||||
|
elves.append(current_elf)
|
||||||
|
current_elf = 0
|
||||||
|
continue
|
||||||
|
current_elf += int(row)
|
||||||
|
|
||||||
|
three = 0
|
||||||
|
|
||||||
|
for x in range(3):
|
||||||
|
most = max(elves)
|
||||||
|
idx = elves.index(most)
|
||||||
|
elves.pop(idx)
|
||||||
|
three += most
|
||||||
|
print(three)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
with open(shared.get_fname(1), "r") as f:
|
||||||
|
rows = [x.rstrip() for x in f.readlines()]
|
||||||
|
run(rows)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
75
2022/python/day02.py
Normal file
75
2022/python/day02.py
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
import shared
|
||||||
|
from pprint import pprint as pp
|
||||||
|
|
||||||
|
rock = "rock"
|
||||||
|
paper = "paper"
|
||||||
|
scissors = "scissors"
|
||||||
|
|
||||||
|
lose = "X"
|
||||||
|
tie = "Y"
|
||||||
|
win = "Z"
|
||||||
|
|
||||||
|
Moves = {
|
||||||
|
"A":rock,
|
||||||
|
"B":paper,
|
||||||
|
"C":scissors,
|
||||||
|
|
||||||
|
"X":rock,
|
||||||
|
"Y":paper,
|
||||||
|
"Z":scissors,
|
||||||
|
}
|
||||||
|
|
||||||
|
Scores = {
|
||||||
|
rock: 1,
|
||||||
|
paper: 2,
|
||||||
|
scissors: 3
|
||||||
|
}
|
||||||
|
|
||||||
|
LosesTo = {
|
||||||
|
rock: paper,
|
||||||
|
paper: scissors,
|
||||||
|
scissors: rock
|
||||||
|
}
|
||||||
|
WinsTo = {
|
||||||
|
paper: rock,
|
||||||
|
scissors: paper,
|
||||||
|
rock: scissors
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def winner(opponent, me):
|
||||||
|
if opponent == me:
|
||||||
|
return 3 + Scores[me]
|
||||||
|
|
||||||
|
# wins
|
||||||
|
if (opponent == rock and me == paper) or (opponent == paper and me == scissors) or (opponent == scissors and me == rock):
|
||||||
|
return 6 + Scores[me]
|
||||||
|
|
||||||
|
return 0 + Scores[me]
|
||||||
|
|
||||||
|
def which_move(opponent, me):
|
||||||
|
if me == lose:
|
||||||
|
return WinsTo[Moves[opponent]]
|
||||||
|
if me == win:
|
||||||
|
return LosesTo[Moves[opponent]]
|
||||||
|
if me == tie:
|
||||||
|
return Moves[opponent]
|
||||||
|
|
||||||
|
|
||||||
|
def run(moves):
|
||||||
|
score = 0
|
||||||
|
for move in moves:
|
||||||
|
opponent, me = move
|
||||||
|
my_move = which_move(opponent, me)
|
||||||
|
o_move = Moves[opponent]
|
||||||
|
pts = winner(o_move, my_move)
|
||||||
|
score += pts
|
||||||
|
print(score)
|
||||||
|
|
||||||
|
def main():
|
||||||
|
rows = [row.rstrip().split() for row in shared.load(2)]
|
||||||
|
run(rows)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
33
2022/python/day02_golf.py
Normal file
33
2022/python/day02_golf.py
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
import shared
|
||||||
|
|
||||||
|
R = "A"
|
||||||
|
P = "B"
|
||||||
|
S = "C"
|
||||||
|
|
||||||
|
X = "X" # lose
|
||||||
|
Y = "Y" # tie
|
||||||
|
Z = "Z" # win
|
||||||
|
|
||||||
|
Moves = {
|
||||||
|
R: {X:S, Y:R, Z:P},
|
||||||
|
P: {X:R, Y:P, Z:S},
|
||||||
|
S: {X:P, Y:S, Z:R},
|
||||||
|
}
|
||||||
|
|
||||||
|
Scores = {
|
||||||
|
R: 1, P: 2, S: 3, X: 0, Y: 3, Z: 6,
|
||||||
|
}
|
||||||
|
|
||||||
|
def run(moves):
|
||||||
|
score = 0
|
||||||
|
for o, a in moves:
|
||||||
|
score += Scores[Moves[o][a]] + Scores[a]
|
||||||
|
print(score)
|
||||||
|
|
||||||
|
def main():
|
||||||
|
rows = [row.rstrip().split() for row in shared.load(2)]
|
||||||
|
run(rows)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
32
2022/python/day03.py
Normal file
32
2022/python/day03.py
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
import shared
|
||||||
|
import string
|
||||||
|
|
||||||
|
|
||||||
|
def part1(rucksacks):
|
||||||
|
total = 0
|
||||||
|
for comp1,comp2 in [(r[:len(r)//2], r[len(r)//2:]) for r in rucksacks]:
|
||||||
|
c1 = set(x for x in comp1)
|
||||||
|
c2 = set(x for x in comp2)
|
||||||
|
match = list(c1.intersection(c2))[0]
|
||||||
|
total += string.ascii_letters.index(match) + 1
|
||||||
|
print(total)
|
||||||
|
|
||||||
|
def part2(rucksacks):
|
||||||
|
total = 0
|
||||||
|
for idx in range(0, len(rucksacks), 3):
|
||||||
|
r1,r2,r3 = rucksacks[idx:idx+3]
|
||||||
|
c1 = set(x for x in r1)
|
||||||
|
c2 = set(x for x in r2)
|
||||||
|
c3 = set(x for x in r3)
|
||||||
|
match = list(c1.intersection(c2).intersection(c3))[0]
|
||||||
|
total += string.ascii_letters.index(match) + 1
|
||||||
|
print(total)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
rows = [row for row in shared.load(3)]
|
||||||
|
part1(rows)
|
||||||
|
part2(rows)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
38
2022/python/day04.py
Normal file
38
2022/python/day04.py
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import shared
|
||||||
|
|
||||||
|
|
||||||
|
def part1(x):
|
||||||
|
internal = 0
|
||||||
|
for pair in x:
|
||||||
|
l,r = pair.split(",")
|
||||||
|
l1,l2 = map(int, l.split("-"))
|
||||||
|
r1,r2 = map(int, r.split("-"))
|
||||||
|
if l1 <= r1 and l2 >= r2:
|
||||||
|
internal += 1
|
||||||
|
elif r1 <= l1 and r2 >= l2:
|
||||||
|
internal += 1
|
||||||
|
print(internal)
|
||||||
|
|
||||||
|
|
||||||
|
def part2(x):
|
||||||
|
internal = 0
|
||||||
|
for pair in x:
|
||||||
|
l,r = pair.split(",")
|
||||||
|
ll = list(sorted(map(int, l.split("-"))))
|
||||||
|
rl = list(sorted(map(int, r.split("-"))))
|
||||||
|
|
||||||
|
set1 = set(range(ll[0], ll[1]+1))
|
||||||
|
set2 = set(range(rl[0], rl[1]+1))
|
||||||
|
if bool(set1 & set2):
|
||||||
|
internal +=1
|
||||||
|
print(internal)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
rows = [row for row in shared.load(4)]
|
||||||
|
part1(rows)
|
||||||
|
part2(rows)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
82
2022/python/day05.py
Normal file
82
2022/python/day05.py
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
from pprint import pprint as pp
|
||||||
|
from shared import load_rows
|
||||||
|
from scanf import scanf
|
||||||
|
from string import ascii_letters
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
|
def load_crates(x):
|
||||||
|
done_crates = False
|
||||||
|
crates = []
|
||||||
|
instructions = []
|
||||||
|
for row in x:
|
||||||
|
if done_crates:
|
||||||
|
instructions.append(row)
|
||||||
|
else:
|
||||||
|
if row == '':
|
||||||
|
done_crates = True
|
||||||
|
else:
|
||||||
|
crates.append(row)
|
||||||
|
crates.pop()
|
||||||
|
return crates, instructions
|
||||||
|
|
||||||
|
def to_lists(crates):
|
||||||
|
parsed = []
|
||||||
|
reg = re.compile(r"[\([{})\]]")
|
||||||
|
for row in crates:
|
||||||
|
parsed.append([x for x in reg.sub(" ",row)])
|
||||||
|
parsed = list(zip(*parsed[::-1]))
|
||||||
|
parsed = list(zip(*parsed[::-1]))
|
||||||
|
parsed = list(zip(*parsed[::-1]))
|
||||||
|
cleaned1 = [[x for x in y if x.strip()] for y in parsed if y]
|
||||||
|
cleaned2 = [x for x in cleaned1 if x != []][::-1]
|
||||||
|
return cleaned2
|
||||||
|
|
||||||
|
def parse_instructions(crates, instructions):
|
||||||
|
for instruction in instructions:
|
||||||
|
count,_from,_to = scanf("move %d from %d to %d", instruction)
|
||||||
|
print(count,_from,_to)
|
||||||
|
_from -=1 # 1 based yo
|
||||||
|
_to -=1
|
||||||
|
for x in range(count):
|
||||||
|
value = crates[_from].pop(0)
|
||||||
|
crates[_to].insert(0, value)
|
||||||
|
return crates
|
||||||
|
|
||||||
|
def parse_instructions_pt2(crates, instructions):
|
||||||
|
for instruction in instructions:
|
||||||
|
count,_from,_to = scanf("move %d from %d to %d", instruction)
|
||||||
|
_from -=1 # 1 based yo
|
||||||
|
_to -=1
|
||||||
|
moving = crates[_from][:count]
|
||||||
|
print(instruction, moving)
|
||||||
|
for x in range(count):
|
||||||
|
crates[_from].pop(0)
|
||||||
|
for x in reversed(moving):
|
||||||
|
crates[_to].insert(0, x)
|
||||||
|
|
||||||
|
return crates
|
||||||
|
|
||||||
|
|
||||||
|
def part1(x):
|
||||||
|
crates, instructions = load_crates(x)
|
||||||
|
crates = to_lists(crates)
|
||||||
|
crates = parse_instructions(crates, instructions)
|
||||||
|
print([c[0] for c in crates])
|
||||||
|
|
||||||
|
|
||||||
|
def part2(x):
|
||||||
|
crates, instructions = load_crates(x)
|
||||||
|
crates = to_lists(crates)
|
||||||
|
crates = parse_instructions_pt2(crates, instructions)
|
||||||
|
print("".join([c[0] for c in crates]))
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
rows = load_rows(5)
|
||||||
|
#part1(rows)
|
||||||
|
part2(rows)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
20
2022/python/day06.py
Normal file
20
2022/python/day06.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
from shared import load_rows
|
||||||
|
|
||||||
|
def part1(row, group_size=4):
|
||||||
|
for x in range(len(row)):
|
||||||
|
if (len(set(row[x:x+group_size])) == group_size):
|
||||||
|
print(x+group_size)
|
||||||
|
break
|
||||||
|
|
||||||
|
def part2(row):
|
||||||
|
part1(row, 14)
|
||||||
|
|
||||||
|
def main():
|
||||||
|
rows = load_rows(6)
|
||||||
|
for row in rows:
|
||||||
|
part1(row)
|
||||||
|
part2(row)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
153
2022/python/day07.py
Normal file
153
2022/python/day07.py
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
from pprint import pprint as pp
|
||||||
|
from pathlib import Path
|
||||||
|
import json
|
||||||
|
from shared import load_rows
|
||||||
|
import re
|
||||||
|
|
||||||
|
from functools import reduce
|
||||||
|
import operator
|
||||||
|
|
||||||
|
PWD = []
|
||||||
|
FS = { "/": {".":{"size":0, "files":[]}} }
|
||||||
|
|
||||||
|
def get_keys(input_dict):
|
||||||
|
for key, value in input_dict.items():
|
||||||
|
if isinstance(value, dict):
|
||||||
|
for subkey in get_keys(value):
|
||||||
|
yield key + ',' + subkey
|
||||||
|
else:
|
||||||
|
if key in ("files"):
|
||||||
|
continue
|
||||||
|
yield f"{value}"
|
||||||
|
|
||||||
|
def getFromDict(mapList):
|
||||||
|
return reduce(operator.getitem, mapList, FS)
|
||||||
|
|
||||||
|
def setInDict(mapList, value):
|
||||||
|
getFromDict(mapList[:-1])[mapList[-1]] = value
|
||||||
|
|
||||||
|
def addInDict(mapList, filename, value):
|
||||||
|
try:
|
||||||
|
v = getFromDict(mapList[:-1])[mapList[-1]]
|
||||||
|
v += value
|
||||||
|
getFromDict(mapList[:-1])[mapList[-1]] = v
|
||||||
|
except KeyError:
|
||||||
|
getFromDict(mapList[:-1])["."] = {"size": 0, "files":[]}
|
||||||
|
v = getFromDict(mapList[:-1])[mapList[-1]]
|
||||||
|
v["size"] += 0 # Value
|
||||||
|
v["files"].append(f"{filename}:{value}")
|
||||||
|
getFromDict(mapList[:-1])[mapList[-1]] = v
|
||||||
|
except TypeError:
|
||||||
|
v = getFromDict(mapList[:-1])["."]
|
||||||
|
v["size"] += 0 # value
|
||||||
|
v["files"].append(f"{filename}:{value}")
|
||||||
|
getFromDict(mapList[:-1])[mapList[-1]] = v
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def part1(rows):
|
||||||
|
build_fs(rows)
|
||||||
|
#calculate_directories()
|
||||||
|
|
||||||
|
def calculate_directories():
|
||||||
|
keys = list(get_keys(FS))
|
||||||
|
new_FS = {}
|
||||||
|
for key in keys:
|
||||||
|
pwd = key.split(",")
|
||||||
|
size = int(pwd.pop()) # split out size
|
||||||
|
pwd.pop() # remove .
|
||||||
|
pwd_key = ",".join(pwd)
|
||||||
|
parent = ",".join(pwd[:-1])
|
||||||
|
new_FS[pwd_key] = {"size":size, "full_size":size, "parent":parent}
|
||||||
|
print("made")
|
||||||
|
|
||||||
|
#pp(new_FS)
|
||||||
|
#print("----")
|
||||||
|
#for pwd, directory in new_FS.items():
|
||||||
|
# print(pwd, "\t", directory['parent'])
|
||||||
|
print(new_FS.keys())
|
||||||
|
print("keys^")
|
||||||
|
for pwd, directory in new_FS.items():
|
||||||
|
parent = directory['parent']
|
||||||
|
if parent:
|
||||||
|
print(parent)
|
||||||
|
#print(f"{pwd}:{parent} Adding {directory['size']} to fullsize {new_FS[parent]['full_size']}")
|
||||||
|
new_FS[parent]["size"] += directory["size"]
|
||||||
|
print("added sizes")
|
||||||
|
|
||||||
|
sizes = []
|
||||||
|
for k,v in new_FS.items():
|
||||||
|
sizes.append(v['size'])
|
||||||
|
total = 0
|
||||||
|
|
||||||
|
for size in sizes:
|
||||||
|
if size <= 100000:
|
||||||
|
print("+", size)
|
||||||
|
total += size
|
||||||
|
|
||||||
|
print("=" ,total)
|
||||||
|
|
||||||
|
def build_fs(rows):
|
||||||
|
LS_ING = False
|
||||||
|
for row in rows:
|
||||||
|
parts = row.split(" ")
|
||||||
|
if parts[0] == "$":
|
||||||
|
if LS_ING:
|
||||||
|
LS_ING = False
|
||||||
|
|
||||||
|
# Action
|
||||||
|
if parts[1] == "cd":
|
||||||
|
if parts[2] == "..":
|
||||||
|
PWD.pop()
|
||||||
|
else:
|
||||||
|
PWD.append(parts[2])
|
||||||
|
#print(PWD)
|
||||||
|
elif parts[1] == "ls":
|
||||||
|
LS_ING = True
|
||||||
|
continue
|
||||||
|
if LS_ING:
|
||||||
|
if parts[0] == "dir":
|
||||||
|
add_directory(parts[1])
|
||||||
|
else:
|
||||||
|
add_file(parts[1], int(parts[0]))
|
||||||
|
jp(FS)
|
||||||
|
|
||||||
|
def jp(d):
|
||||||
|
output = json.dumps(FS, indent=4)
|
||||||
|
output2 = re.sub(r'": \[\s+', '": [', output)
|
||||||
|
output3 = re.sub(r'",\s+', '", ', output2)
|
||||||
|
output4 = re.sub(r'"\s+\]', '"]', output3)
|
||||||
|
print(output4)
|
||||||
|
|
||||||
|
|
||||||
|
def add_directory(dirname):
|
||||||
|
temp_new_path = PWD + [dirname]
|
||||||
|
setInDict(temp_new_path, {".":{"size":0, "files":[]}})
|
||||||
|
|
||||||
|
def add_file(filename, size):
|
||||||
|
#print(".", PWD, filename, size)
|
||||||
|
mapList = PWD + ["."]
|
||||||
|
addInDict(mapList, filename, size)
|
||||||
|
curr = getFromDict(mapList[:-1])
|
||||||
|
print(curr)
|
||||||
|
#print(curr)
|
||||||
|
s = curr["."]
|
||||||
|
s["size"] += size
|
||||||
|
print(size,s)
|
||||||
|
tmp = mapList + ["size"]
|
||||||
|
setInDict(mapList, s)
|
||||||
|
print("-----")
|
||||||
|
|
||||||
|
|
||||||
|
def part2(row):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def main():
|
||||||
|
rows = load_rows(7)
|
||||||
|
part1(rows)
|
||||||
|
part2(rows)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
136
2022/python/day08.py
Normal file
136
2022/python/day08.py
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
from pprint import pprint as pp
|
||||||
|
from shared import get_fname
|
||||||
|
import matrix
|
||||||
|
|
||||||
|
|
||||||
|
def part1(mx):
|
||||||
|
SIZE=len(mx)
|
||||||
|
MAX_IDX = SIZE -1
|
||||||
|
data = matrix.matrix_of_size(SIZE, SIZE)
|
||||||
|
data = matrix.set_matrix_dict(data)
|
||||||
|
|
||||||
|
for row in range(SIZE):
|
||||||
|
for col in range(SIZE):
|
||||||
|
data[row][col] = { "l": True, "r": True, "u": True, "d": True }
|
||||||
|
|
||||||
|
for row, _row in enumerate(mx):
|
||||||
|
# Skip outer edges
|
||||||
|
if row == 0 or row == MAX_IDX:
|
||||||
|
continue
|
||||||
|
for col, _val in enumerate(mx[row]):
|
||||||
|
# Skip outer edges
|
||||||
|
if col == 0 or col == MAX_IDX:
|
||||||
|
continue
|
||||||
|
|
||||||
|
# TODO: slice
|
||||||
|
# Get a list of indexes in the current direction to check
|
||||||
|
trees_u_indexes = list(range(0, row))
|
||||||
|
trees_l_indexes = list(range(0, col))
|
||||||
|
trees_d_indexes = list(range(MAX_IDX, row, -1))
|
||||||
|
trees_r_indexes = list(range(col+1, SIZE))
|
||||||
|
|
||||||
|
# Get the trees in the line
|
||||||
|
trees_u = [mx[y][col] for y in trees_u_indexes]
|
||||||
|
trees_l = [mx[row][x] for x in trees_l_indexes]
|
||||||
|
trees_d = [mx[y][col] for y in trees_d_indexes]
|
||||||
|
trees_r = [mx[row][x] for x in trees_r_indexes]
|
||||||
|
|
||||||
|
# find tallest tree in line
|
||||||
|
highest_u = max(trees_u)
|
||||||
|
highest_l = max(trees_l)
|
||||||
|
highest_d = max(trees_d)
|
||||||
|
highest_r = max(trees_r)
|
||||||
|
|
||||||
|
# if there's anything as tall, or taller than this tree in that line
|
||||||
|
# then it's not visible
|
||||||
|
if highest_u >= _val:
|
||||||
|
data[row][col]["u"] = False
|
||||||
|
|
||||||
|
if highest_l >= _val:
|
||||||
|
data[row][col]["l"] = False
|
||||||
|
|
||||||
|
if highest_d >= _val:
|
||||||
|
data[row][col]["d"] = False
|
||||||
|
|
||||||
|
if highest_r >= _val:
|
||||||
|
data[row][col]["r"] = False
|
||||||
|
|
||||||
|
# count visible
|
||||||
|
count = 0
|
||||||
|
for row in range(SIZE):
|
||||||
|
for col in range(SIZE):
|
||||||
|
u = data[row][col]["u"]
|
||||||
|
l = data[row][col]["l"]
|
||||||
|
d = data[row][col]["d"]
|
||||||
|
r = data[row][col]["r"]
|
||||||
|
if any((r,l,u,d)):
|
||||||
|
count += 1
|
||||||
|
print(count)
|
||||||
|
|
||||||
|
|
||||||
|
def part2(mx):
|
||||||
|
SIZE=len(mx)
|
||||||
|
MAX_IDX = SIZE -1
|
||||||
|
data = matrix.matrix_of_size(SIZE, SIZE)
|
||||||
|
data = matrix.set_matrix_dict(data)
|
||||||
|
|
||||||
|
high_score = 0
|
||||||
|
|
||||||
|
for row in range(SIZE):
|
||||||
|
for col in range(SIZE):
|
||||||
|
data[row][col] = { "value": mx[row][col]}
|
||||||
|
|
||||||
|
for row, _row in enumerate(mx):
|
||||||
|
for col, _val in enumerate(mx[row]):
|
||||||
|
# Get a list of indexes in the current direction to check
|
||||||
|
# TODO: slice
|
||||||
|
trees_u_indexes = list(range(0, row))
|
||||||
|
trees_l_indexes = list(range(0,col))
|
||||||
|
trees_d_indexes = list(range(MAX_IDX, row, -1))
|
||||||
|
trees_r_indexes = list(range(col+1, SIZE))
|
||||||
|
|
||||||
|
# Grab the trees potentially in sight
|
||||||
|
trees_u = [mx[y][col] for y in trees_u_indexes]
|
||||||
|
trees_l = [mx[row][x] for x in trees_l_indexes]
|
||||||
|
trees_d = [mx[y][col] for y in trees_d_indexes]
|
||||||
|
trees_r = [mx[row][x] for x in trees_r_indexes]
|
||||||
|
|
||||||
|
# Reverse everything but r, as everything is "away" from the tree
|
||||||
|
data[row][col]["u"] = list(reversed(trees_u))
|
||||||
|
data[row][col]["l"] = list(reversed(trees_l))
|
||||||
|
data[row][col]["d"] = list(reversed(trees_d))
|
||||||
|
data[row][col]["r"] = trees_r
|
||||||
|
|
||||||
|
# Calculate score
|
||||||
|
score = 1 # identity yoooo
|
||||||
|
cell = data[row][col]
|
||||||
|
val = cell['value']
|
||||||
|
# Get the score of visible trees in each direction
|
||||||
|
for direction in ("u","l","d","r"):
|
||||||
|
in_line = cell[direction]
|
||||||
|
if not in_line:
|
||||||
|
# we're on an edge
|
||||||
|
score = 0
|
||||||
|
break
|
||||||
|
|
||||||
|
line_score = 0
|
||||||
|
for idx, tree in enumerate(in_line):
|
||||||
|
# for every tree, check if its as tall or taller,
|
||||||
|
# stop countig after that
|
||||||
|
line_score += 1
|
||||||
|
if tree >= val:
|
||||||
|
break
|
||||||
|
score = score * line_score
|
||||||
|
if score > high_score:
|
||||||
|
high_score = score
|
||||||
|
print(high_score)
|
||||||
|
|
||||||
|
def main():
|
||||||
|
mx = matrix.load_matrix_file(get_fname(8))
|
||||||
|
part1(mx)
|
||||||
|
part2(mx)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
152
2022/python/day09.py
Normal file
152
2022/python/day09.py
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
from pprint import pprint as pp
|
||||||
|
import shared
|
||||||
|
import matrix
|
||||||
|
|
||||||
|
MATRIX_SIZE = 500
|
||||||
|
#MATRIX_SIZE = 40 # sample
|
||||||
|
HALF = MATRIX_SIZE // 2
|
||||||
|
|
||||||
|
H = [HALF,HALF]
|
||||||
|
T = [HALF,HALF]
|
||||||
|
|
||||||
|
|
||||||
|
# returns (x,y) - so remember to take dx,dy lower
|
||||||
|
DIRS = {
|
||||||
|
'U': matrix.M_U, # (0, -1)
|
||||||
|
'D': matrix.M_D,
|
||||||
|
'L': matrix.M_L,
|
||||||
|
'R': matrix.M_R,
|
||||||
|
|
||||||
|
'UR': matrix.M_UR, # (+1, -1)
|
||||||
|
'DR': matrix.M_DR,
|
||||||
|
'UL': matrix.M_UL,
|
||||||
|
'DL': matrix.M_DL,
|
||||||
|
}
|
||||||
|
|
||||||
|
def part1(steps):
|
||||||
|
field = matrix.matrix_of_size(MATRIX_SIZE,MATRIX_SIZE)
|
||||||
|
|
||||||
|
for direction, amount in steps:
|
||||||
|
# move HEAD
|
||||||
|
amount = int(amount)
|
||||||
|
for x in range(amount):
|
||||||
|
|
||||||
|
dx,dy = DIRS[direction]
|
||||||
|
H[0] += dy
|
||||||
|
H[1] += dx
|
||||||
|
HY,bX = H
|
||||||
|
# head is in new position
|
||||||
|
kY,kX = T
|
||||||
|
field[kY][kX] = 1 # 'T'
|
||||||
|
|
||||||
|
# Check if same
|
||||||
|
if kY == HY and kX == bX:
|
||||||
|
continue
|
||||||
|
touching = False
|
||||||
|
for _, d in DIRS.items():
|
||||||
|
dx,dy = d
|
||||||
|
t_y, t_x = H[0]+dy, H[1]+dx
|
||||||
|
if kY == t_y and kX == t_x:
|
||||||
|
touching = True
|
||||||
|
break
|
||||||
|
if touching:
|
||||||
|
continue
|
||||||
|
|
||||||
|
# assume the same row/column, no movement needed
|
||||||
|
tY = 0
|
||||||
|
tX = 0
|
||||||
|
|
||||||
|
# if Head X is less than Tail X, move Tail X 1 left
|
||||||
|
if bX < kX:
|
||||||
|
tX = -1
|
||||||
|
# if Head X is greater than Tail X, move Tail X 1 left
|
||||||
|
elif bX > kX:
|
||||||
|
tX = 1
|
||||||
|
|
||||||
|
|
||||||
|
# if Head Y is less than Tail Y, move Tail Y 1 up
|
||||||
|
if HY < kY:
|
||||||
|
tY = -1
|
||||||
|
# if Head Y is greater than Tail Y, move Tail Y 1 down
|
||||||
|
elif HY > kY:
|
||||||
|
tY = 1
|
||||||
|
|
||||||
|
T[0] += tY
|
||||||
|
T[1] += tX
|
||||||
|
|
||||||
|
field[T[0]][T[1]] = 1 # mark visited tails
|
||||||
|
print(matrix.sum_matrix(field))
|
||||||
|
|
||||||
|
|
||||||
|
def part2(steps):
|
||||||
|
field = matrix.matrix_of_size(MATRIX_SIZE,MATRIX_SIZE)
|
||||||
|
S = [[HALF,HALF],] # HEAD ONLY
|
||||||
|
for x in range(9):
|
||||||
|
S.append([HALF,HALF])
|
||||||
|
|
||||||
|
for direction, amount in steps:
|
||||||
|
# move HEAD
|
||||||
|
amount = int(amount)
|
||||||
|
for x in range(amount):
|
||||||
|
HEAD_dx,HEAD_dy = DIRS[direction]
|
||||||
|
S[0][0] += HEAD_dy
|
||||||
|
S[0][1] += HEAD_dx
|
||||||
|
#print(HEAD_dy,HEAD_dx, S)
|
||||||
|
# HEAD MOVED one step
|
||||||
|
|
||||||
|
for knot_idx, _ in enumerate(S):
|
||||||
|
if knot_idx == 0:
|
||||||
|
# Skip Head
|
||||||
|
continue
|
||||||
|
knot = S[knot_idx]
|
||||||
|
kY,kX = knot
|
||||||
|
|
||||||
|
bY,bX = S[knot_idx-1]
|
||||||
|
|
||||||
|
# Check if same
|
||||||
|
if kY == bY and kX == bX:
|
||||||
|
continue
|
||||||
|
|
||||||
|
touching = False
|
||||||
|
for _, d in DIRS.items():
|
||||||
|
dx,dy = d
|
||||||
|
t_y, t_x = S[knot_idx-1][0]+dy, S[knot_idx-1][1]+dx
|
||||||
|
if kY == t_y and kX == t_x:
|
||||||
|
touching = True
|
||||||
|
break
|
||||||
|
if touching:
|
||||||
|
continue
|
||||||
|
|
||||||
|
# assume the same row/column, no movement needed
|
||||||
|
tY, tX = 0,0
|
||||||
|
|
||||||
|
# if Head X is less than Tail X, move Tail X 1 left
|
||||||
|
if bX < kX:
|
||||||
|
tX = -1
|
||||||
|
# if Head X is greater than Tail X, move Tail X 1 left
|
||||||
|
elif bX > kX:
|
||||||
|
tX = 1
|
||||||
|
|
||||||
|
# if Head Y is less than Tail Y, move Tail Y 1 up
|
||||||
|
if bY < kY:
|
||||||
|
tY = -1
|
||||||
|
# if Head Y is greater than Tail Y, move Tail Y 1 down
|
||||||
|
elif bY > kY:
|
||||||
|
tY = 1
|
||||||
|
|
||||||
|
S[knot_idx][0] += tY
|
||||||
|
S[knot_idx][1] += tX
|
||||||
|
|
||||||
|
field[S[-1][0]][S[-1][1]] = 1 # mark visited tails
|
||||||
|
print(matrix.sum_matrix(field))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
rows = [x.split(" ") for x in shared.load_rows(9)]
|
||||||
|
part1(rows)
|
||||||
|
part2(rows)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
163
2022/python/matrix.py
Normal file
163
2022/python/matrix.py
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
split_word_to_int_list = lambda y: [int(w) for w in y]
|
||||||
|
split_line_to_int_list = lambda y: [int(w) for w in y.split(" ") if w]
|
||||||
|
|
||||||
|
|
||||||
|
def rotate(m, right=True): # -90
|
||||||
|
x = list(zip(*m[::-1]))
|
||||||
|
if right:
|
||||||
|
return x
|
||||||
|
return [list(reversed(y)) for y in x]
|
||||||
|
|
||||||
|
|
||||||
|
def load_matrix_file(name, func=None):
|
||||||
|
with open(name, "r") as f:
|
||||||
|
my_file = []
|
||||||
|
for line in f:
|
||||||
|
my_file.append(line.rstrip())
|
||||||
|
if func:
|
||||||
|
return [func(x) for x in my_file]
|
||||||
|
return [split_word_to_int_list(x) for x in my_file]
|
||||||
|
|
||||||
|
|
||||||
|
def get_neighbors(matrix, x, y, _dict=False):
|
||||||
|
neighbors = []
|
||||||
|
# left
|
||||||
|
try:
|
||||||
|
if x - 1 >= 0:
|
||||||
|
if _dict:
|
||||||
|
neighbors.append({'x':x - 1,'y':y,'value':matrix[y][x - 1]})
|
||||||
|
else:
|
||||||
|
neighbors.append([(x - 1, y), matrix[y][x - 1]])
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
|
# right
|
||||||
|
try:
|
||||||
|
if _dict:
|
||||||
|
neighbors.append({'x':x + 1,'y':y,'value':matrix[y][x + 1]})
|
||||||
|
else:
|
||||||
|
neighbors.append([(x + 1, y), matrix[y][x + 1]])
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
# up
|
||||||
|
try:
|
||||||
|
if y - 1 >= 0:
|
||||||
|
if _dict:
|
||||||
|
neighbors.append({'x':x,'y':y-1,'value':matrix[y-1][x]})
|
||||||
|
else:
|
||||||
|
neighbors.append([(x, y - 1), matrix[y - 1][x]])
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
# down
|
||||||
|
try:
|
||||||
|
if _dict:
|
||||||
|
neighbors.append({'x':x,'y':y+1,'value':matrix[y+1][x]})
|
||||||
|
else:
|
||||||
|
neighbors.append([(x, y + 1), matrix[y + 1][x]])
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
return neighbors
|
||||||
|
|
||||||
|
def sum_matrix(mtx):
|
||||||
|
total = 0
|
||||||
|
for row in mtx:
|
||||||
|
total += sum(row)
|
||||||
|
return total
|
||||||
|
|
||||||
|
|
||||||
|
M_UL, M_U, M_UR = (-1, -1), (0, -1), (1, -1)
|
||||||
|
M_L, M_R = (-1, 0), (1, 0)
|
||||||
|
M_DL, M_D, M_DR = (-1, 1), (0, 1), (1, 1)
|
||||||
|
|
||||||
|
def get_neighbor_coords(matrix, c, r, diagonals=True):
|
||||||
|
height = len(matrix)
|
||||||
|
width = len(matrix[0])
|
||||||
|
if diagonals:
|
||||||
|
coords = (
|
||||||
|
M_UL, M_U, M_UR,
|
||||||
|
M_L, M_R,
|
||||||
|
M_DL, M_D, M_DR
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
coords = (
|
||||||
|
M_U,
|
||||||
|
M_L,M_R,
|
||||||
|
M_D
|
||||||
|
)
|
||||||
|
neighbors = []
|
||||||
|
|
||||||
|
for _c, _r in coords:
|
||||||
|
try:
|
||||||
|
value = matrix[r + _r][c + _c] # Try to get a value error
|
||||||
|
if (r+_r>=0 and c+_c >= 0):
|
||||||
|
neighbors.append(
|
||||||
|
[{"c": c + _c, "r": r + _r}, value]
|
||||||
|
) # woo, no error, this coord is valid
|
||||||
|
except IndexError:
|
||||||
|
pass # okay we out of bounds boizzzz
|
||||||
|
return neighbors
|
||||||
|
|
||||||
|
|
||||||
|
def get_column(matrix, col):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def matrix_of_size(width, height, default=0):
|
||||||
|
return [[default] * width for x in range(height)]
|
||||||
|
|
||||||
|
def set_matrix_dict(m):
|
||||||
|
for x in range(len(m)):
|
||||||
|
for y in range(len(m[x])):
|
||||||
|
m[x][y] = {}
|
||||||
|
return m
|
||||||
|
|
||||||
|
|
||||||
|
def get_size(matrix):
|
||||||
|
height = len(matrix)
|
||||||
|
width = len(matrix[0])
|
||||||
|
return height, width
|
||||||
|
|
||||||
|
|
||||||
|
def pmx(*matrices, pad=True, space=True):
|
||||||
|
if len(matrices) > 1:
|
||||||
|
matrices = list(zip(*matrices))
|
||||||
|
for row in matrices:
|
||||||
|
r = []
|
||||||
|
for col in row:
|
||||||
|
r.append("".join([f"{int(x)or '.'}".rjust(3) for x in col]))
|
||||||
|
print(" ".join(r))
|
||||||
|
else:
|
||||||
|
for row in matrices:
|
||||||
|
for c in row:
|
||||||
|
if pad:
|
||||||
|
f = lambda x: f"{int(x)or '.'}".rjust(2)
|
||||||
|
if space:
|
||||||
|
f = lambda x: f"{int(x)or '.'}".rjust(3)
|
||||||
|
else:
|
||||||
|
f = lambda x: f"{int(x)or '.'}"
|
||||||
|
if space:
|
||||||
|
f = lambda x: f"{int(x)or '.'} "
|
||||||
|
print("".join([f(x) for x in c]))
|
||||||
|
|
||||||
|
def ppmx(*matrices, pad=True, space=True):
|
||||||
|
if len(matrices) > 1:
|
||||||
|
matrices = list(zip(*matrices))
|
||||||
|
for row in matrices:
|
||||||
|
r = []
|
||||||
|
for col in row:
|
||||||
|
r.append("".join([f"{x or '.'}".rjust(3) for x in col]))
|
||||||
|
print(" ".join(r))
|
||||||
|
else:
|
||||||
|
for row in matrices:
|
||||||
|
for c in row:
|
||||||
|
if pad:
|
||||||
|
f = lambda x: f"{x or '.'}".rjust(2)
|
||||||
|
if space:
|
||||||
|
f = lambda x: f"{x or '.'}".rjust(3)
|
||||||
|
else:
|
||||||
|
f = lambda x: f"{x or '.'}"
|
||||||
|
if space:
|
||||||
|
f = lambda x: f"{x or '.'} "
|
||||||
|
print("".join([f(x) for x in c]))
|
58
2022/python/shared.py
Normal file
58
2022/python/shared.py
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
spl = lambda y: [int(w) for w in y]
|
||||||
|
|
||||||
|
def load_rows(day):
|
||||||
|
return [row for row in load(day)]
|
||||||
|
|
||||||
|
def load(day):
|
||||||
|
path = Path(get_fname(day))
|
||||||
|
return path.read_text().rstrip().split("\n")
|
||||||
|
|
||||||
|
def get_fname(day: int) -> str:
|
||||||
|
import sys
|
||||||
|
|
||||||
|
if sys.argv[-1] == "--sample":
|
||||||
|
return f"../samples/day{day:02}.txt"
|
||||||
|
else:
|
||||||
|
return f"../full/day{day:02}.txt"
|
||||||
|
|
||||||
|
|
||||||
|
#############
|
||||||
|
def load_char_matrix(f):
|
||||||
|
my_file = []
|
||||||
|
for line in f:
|
||||||
|
my_file.append(line.rstrip())
|
||||||
|
return [list(x) for x in my_file]
|
||||||
|
|
||||||
|
def load_file_char_matrix(name):
|
||||||
|
with open(name, "r") as f:
|
||||||
|
return load_char_matrix(f)
|
||||||
|
|
||||||
|
|
||||||
|
def load_int_matrix(f):
|
||||||
|
my_file = []
|
||||||
|
for line in f:
|
||||||
|
my_file.append(line.rstrip())
|
||||||
|
return [list(map(int, x)) for x in my_file]
|
||||||
|
|
||||||
|
def load_file_int_matrix(name):
|
||||||
|
with open(name, "r") as f:
|
||||||
|
return load_int_matrix(f)
|
||||||
|
|
||||||
|
def load_word_matrix(f):
|
||||||
|
my_file = []
|
||||||
|
for line in f:
|
||||||
|
my_file.append(line.rstrip())
|
||||||
|
return [x.split(" ") for x in my_file]
|
||||||
|
|
||||||
|
def load_file_word_matrix(name):
|
||||||
|
with open(name, "r") as f:
|
||||||
|
return load_word_matrix(f)
|
||||||
|
#############
|
||||||
|
|
||||||
|
def rotate(WHAT, times=1):
|
||||||
|
what = WHAT
|
||||||
|
for x in range(times):
|
||||||
|
what = list(zip(*what[::-1]))
|
||||||
|
return what
|
BIN
2022/rust/day01
Executable file
BIN
2022/rust/day01
Executable file
Binary file not shown.
53
2022/rust/day01.rs
Normal file
53
2022/rust/day01.rs
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
use std::{
|
||||||
|
fs::File,
|
||||||
|
io::{prelude::*, BufReader},
|
||||||
|
path::Path,
|
||||||
|
};
|
||||||
|
|
||||||
|
fn lines_from_file(filename: impl AsRef<Path>) -> Vec<String> {
|
||||||
|
let file = File::open(filename).expect("no such file");
|
||||||
|
let buf = BufReader::new(file);
|
||||||
|
buf.lines()
|
||||||
|
.map(|l| l.expect("Could not parse line"))
|
||||||
|
.collect()
|
||||||
|
}
|
||||||
|
// ---
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let lines = lines_from_file("../full/day01.txt");
|
||||||
|
part1(&lines);
|
||||||
|
part2(&lines);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fn part1(lines: &Vec<String>) {
|
||||||
|
let mut totals: Vec<i32> = Vec::new();
|
||||||
|
let mut total = 0;
|
||||||
|
for line in lines {
|
||||||
|
if line.is_empty(){
|
||||||
|
totals.push(total);
|
||||||
|
total = 0;
|
||||||
|
} else {
|
||||||
|
total += line.parse::<i32>().unwrap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
totals.sort_by(|a, b| a.partial_cmp(b).unwrap());
|
||||||
|
println!("{:?}", totals[totals.len()-1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn part2(lines: &Vec<String>) {
|
||||||
|
let mut totals: Vec<i32> = Vec::new();
|
||||||
|
let mut total = 0;
|
||||||
|
for line in lines {
|
||||||
|
if line.is_empty(){
|
||||||
|
totals.push(total);
|
||||||
|
total = 0;
|
||||||
|
} else {
|
||||||
|
total += line.parse::<i32>().unwrap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
totals.sort_by(|a, b| a.partial_cmp(b).unwrap());
|
||||||
|
let last3 = &totals[totals.len()-3..];
|
||||||
|
let total: i32 = last3.iter().sum();
|
||||||
|
println!("{:?}", total);
|
||||||
|
}
|
BIN
2022/rust/day02
Executable file
BIN
2022/rust/day02
Executable file
Binary file not shown.
159
2022/rust/day02.rs
Normal file
159
2022/rust/day02.rs
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
use std::collections::HashMap;
|
||||||
|
use std::{
|
||||||
|
fs::File,
|
||||||
|
io::{prelude::*, BufReader},
|
||||||
|
path::Path,
|
||||||
|
};
|
||||||
|
|
||||||
|
fn lines_from_file(filename: impl AsRef<Path>) -> Vec<String> {
|
||||||
|
let file = File::open(filename).expect("no such file");
|
||||||
|
let buf = BufReader::new(file);
|
||||||
|
buf.lines()
|
||||||
|
.map(|l| l.expect("Could not parse line"))
|
||||||
|
.collect()
|
||||||
|
}
|
||||||
|
// ---
|
||||||
|
|
||||||
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||||
|
enum Move {
|
||||||
|
Rock,
|
||||||
|
Paper,
|
||||||
|
Scissors,
|
||||||
|
INVALID,
|
||||||
|
Win,
|
||||||
|
Lose,
|
||||||
|
Tie,
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let lines = lines_from_file("../full/day02.txt");
|
||||||
|
part1(&lines);
|
||||||
|
part2(&lines);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn to_enum(s: &str, part: i32) -> Move {
|
||||||
|
if s == "A" {
|
||||||
|
return Move::Rock;
|
||||||
|
} else if s == "B" {
|
||||||
|
return Move::Paper;
|
||||||
|
} else if s == "C" {
|
||||||
|
return Move::Scissors;
|
||||||
|
} else if s == "X" {
|
||||||
|
if part == 1 {
|
||||||
|
return Move::Rock;
|
||||||
|
} else {
|
||||||
|
return Move::Lose;
|
||||||
|
}
|
||||||
|
} else if s == "Y" {
|
||||||
|
if part == 1 {
|
||||||
|
return Move::Paper;
|
||||||
|
} else {
|
||||||
|
return Move::Tie;
|
||||||
|
}
|
||||||
|
} else if s == "Z" {
|
||||||
|
if part == 1 {
|
||||||
|
return Move::Scissors;
|
||||||
|
} else {
|
||||||
|
return Move::Win;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Move::INVALID;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn parse(lines: &Vec<String>, part: i32) -> (Vec<Move>, Vec<Move>) {
|
||||||
|
let mut oppt: Vec<Move> = Vec::new();
|
||||||
|
let mut mine: Vec<Move> = Vec::new();
|
||||||
|
for line in lines {
|
||||||
|
let split = line.split_whitespace().collect::<Vec<_>>();
|
||||||
|
oppt.push(to_enum(split[0], part));
|
||||||
|
mine.push(to_enum(split[1], part));
|
||||||
|
}
|
||||||
|
return (oppt, mine);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn score_1(o: &Move, m: Move) -> i32 {
|
||||||
|
let mut score: i32 = 0;
|
||||||
|
let scores: HashMap<Move, i32> = HashMap::from([
|
||||||
|
(Move::Rock, 1),
|
||||||
|
(Move::Paper, 2),
|
||||||
|
(Move::Scissors, 3),
|
||||||
|
(Move::Win, 6),
|
||||||
|
(Move::Tie, 3),
|
||||||
|
(Move::Lose, 0),
|
||||||
|
]);
|
||||||
|
// For my choice
|
||||||
|
score += scores[&m];
|
||||||
|
|
||||||
|
// for which outcome
|
||||||
|
if o == &m {
|
||||||
|
//println!("Tie");
|
||||||
|
score += scores[&Move::Tie];
|
||||||
|
} else if (m == Move::Paper && o == &Move::Rock)
|
||||||
|
|| (m == Move::Rock && o == &Move::Scissors)
|
||||||
|
|| (m == Move::Scissors && o == &Move::Paper)
|
||||||
|
{
|
||||||
|
//println!("Win");
|
||||||
|
score += scores[&Move::Win];
|
||||||
|
} else {
|
||||||
|
//println!("Lose");
|
||||||
|
score += scores[&Move::Lose];
|
||||||
|
}
|
||||||
|
|
||||||
|
return score;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn part1(lines: &Vec<String>) {
|
||||||
|
let (oppt, mine) = parse(lines, 1);
|
||||||
|
let mut score: i32 = 0;
|
||||||
|
for (idx, el) in oppt.iter().enumerate() {
|
||||||
|
score += score_1(el, mine[idx]);
|
||||||
|
}
|
||||||
|
println!("{}", score);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn score_2(o: &Move, m: Move) -> i32 {
|
||||||
|
let mut new_move: &Move = &Move::INVALID;
|
||||||
|
let mut score: i32 = 0;
|
||||||
|
let scores: HashMap<Move, i32> = HashMap::from([
|
||||||
|
(Move::Rock, 1),
|
||||||
|
(Move::Paper, 2),
|
||||||
|
(Move::Scissors, 3),
|
||||||
|
(Move::Win, 6),
|
||||||
|
(Move::Tie, 3),
|
||||||
|
(Move::Lose, 0),
|
||||||
|
]);
|
||||||
|
// For my choice
|
||||||
|
if m == Move::Tie {
|
||||||
|
new_move = o;
|
||||||
|
} else if m == Move::Lose {
|
||||||
|
if o == &Move::Rock {
|
||||||
|
new_move = &Move::Scissors;
|
||||||
|
} else if o == &Move::Paper {
|
||||||
|
new_move = &Move::Rock;
|
||||||
|
} else {
|
||||||
|
new_move = &Move::Paper;
|
||||||
|
}
|
||||||
|
} else if m == Move::Win {
|
||||||
|
if o == &Move::Rock {
|
||||||
|
new_move = &Move::Paper;
|
||||||
|
} else if o == &Move::Paper {
|
||||||
|
new_move = &Move::Scissors;
|
||||||
|
} else {
|
||||||
|
new_move = &Move::Rock;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
score += scores[new_move];
|
||||||
|
score += scores[&m];
|
||||||
|
|
||||||
|
return score;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn part2(lines: &Vec<String>) {
|
||||||
|
let (oppt, mine) = parse(lines, 2);
|
||||||
|
let mut score: i32 = 0;
|
||||||
|
for (idx, el) in oppt.iter().enumerate() {
|
||||||
|
score += score_2(el, mine[idx]);
|
||||||
|
}
|
||||||
|
println!("{}", score);
|
||||||
|
}
|
34
2022/rust/day03.rs
Normal file
34
2022/rust/day03.rs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
use std::collections::HashMap;
|
||||||
|
use std::{
|
||||||
|
fs::File,
|
||||||
|
io::{prelude::*, BufReader},
|
||||||
|
path::Path,
|
||||||
|
};
|
||||||
|
|
||||||
|
fn lines_from_file(filename: impl AsRef<Path>) -> Vec<String> {
|
||||||
|
let file = File::open(filename).expect("no such file");
|
||||||
|
let buf = BufReader::new(file);
|
||||||
|
buf.lines()
|
||||||
|
.map(|l| l.expect("Could not parse line"))
|
||||||
|
.collect()
|
||||||
|
}
|
||||||
|
// ---
|
||||||
|
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let lines = lines_from_file("../full/day02.txt");
|
||||||
|
part1(&lines);
|
||||||
|
part2(&lines);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
fn part1(lines: &Vec<String>) {
|
||||||
|
println!("{:?}", lines);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fn part2(lines: &Vec<String>) {
|
||||||
|
println!("{:?}", lines);
|
||||||
|
}
|
14
2022/samples/day01.txt
Normal file
14
2022/samples/day01.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
1000
|
||||||
|
2000
|
||||||
|
3000
|
||||||
|
|
||||||
|
4000
|
||||||
|
|
||||||
|
5000
|
||||||
|
6000
|
||||||
|
|
||||||
|
7000
|
||||||
|
8000
|
||||||
|
9000
|
||||||
|
|
||||||
|
10000
|
3
2022/samples/day02.txt
Normal file
3
2022/samples/day02.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
A Y
|
||||||
|
B X
|
||||||
|
C Z
|
6
2022/samples/day03.txt
Normal file
6
2022/samples/day03.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
vJrwpWtwJgWrhcsFMMfFFhFp
|
||||||
|
jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL
|
||||||
|
PmmdzqPrVvPwwTWBwg
|
||||||
|
wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn
|
||||||
|
ttgJtRGJQctTZtZT
|
||||||
|
CrZsJsPPZsGzwwsLwLmpwMDw
|
6
2022/samples/day04.txt
Normal file
6
2022/samples/day04.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
2-4,6-8
|
||||||
|
2-3,4-5
|
||||||
|
5-7,7-9
|
||||||
|
2-8,3-7
|
||||||
|
6-6,4-6
|
||||||
|
2-6,4-8
|
9
2022/samples/day05.txt
Normal file
9
2022/samples/day05.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[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
|
5
2022/samples/day06.txt
Normal file
5
2022/samples/day06.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
mjqjpqmgbljsphdztnvjfqwrcgsmlb
|
||||||
|
bvwbjplbgvbhsrlpgdmjqwftvncz
|
||||||
|
nppdvjthqldpwncqszvftbrmjlhg
|
||||||
|
nznrnfrfntjfmvfwmzdfjlvtqnbhcprsg
|
||||||
|
zcfzfwzzqfrljwzlrfnpqdbhtmscgvjw
|
23
2022/samples/day07.txt
Normal file
23
2022/samples/day07.txt
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
$ 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
|
5
2022/samples/day08.txt
Normal file
5
2022/samples/day08.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
30373
|
||||||
|
25512
|
||||||
|
65332
|
||||||
|
33549
|
||||||
|
35390
|
8
2022/samples/day09.txt
Normal file
8
2022/samples/day09.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
R 4
|
||||||
|
U 4
|
||||||
|
L 3
|
||||||
|
D 1
|
||||||
|
R 4
|
||||||
|
D 1
|
||||||
|
L 5
|
||||||
|
R 2
|
7
requirements.txt
Normal file
7
requirements.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
black
|
||||||
|
imageio
|
||||||
|
matplotlib
|
||||||
|
numpy
|
||||||
|
pandas
|
||||||
|
scanf
|
||||||
|
scikit-image
|
Loading…
Reference in New Issue
Block a user