initial commit
This commit is contained in:
commit
27fe77bbe1
134 changed files with 21939 additions and 0 deletions
259
.gitignore
vendored
Normal file
259
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,259 @@
|
|||
# Created by https://www.toptal.com/developers/gitignore/api/pycharm+all,python
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=pycharm+all,python
|
||||
|
||||
### PyCharm+all ###
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# AWS User-specific
|
||||
.idea/**/aws.xml
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# SonarLint plugin
|
||||
.idea/sonarlint/
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
### PyCharm+all Patch ###
|
||||
# Ignore everything but code style settings and run configurations
|
||||
# that are supposed to be shared within teams.
|
||||
|
||||
.idea/*
|
||||
|
||||
!.idea/codeStyles
|
||||
!.idea/runConfigurations
|
||||
|
||||
### 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/pycharm+all,python
|
||||
10
2020/Day1/main.py
Normal file
10
2020/Day1/main.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
if __name__ == '__main__':
|
||||
numbers = []
|
||||
with open("numbers.txt") as f:
|
||||
numbers = list(map(int, f.readlines()))
|
||||
|
||||
for x in numbers:
|
||||
for y in numbers:
|
||||
for z in numbers:
|
||||
if x+y+z == 2020:
|
||||
print(x*y*z)
|
||||
200
2020/Day1/numbers.txt
Normal file
200
2020/Day1/numbers.txt
Normal file
|
|
@ -0,0 +1,200 @@
|
|||
408
|
||||
1614
|
||||
1321
|
||||
1028
|
||||
1018
|
||||
2008
|
||||
1061
|
||||
1433
|
||||
1434
|
||||
1383
|
||||
1645
|
||||
1841
|
||||
1594
|
||||
1218
|
||||
1729
|
||||
1908
|
||||
1237
|
||||
1152
|
||||
1771
|
||||
1837
|
||||
1709
|
||||
1449
|
||||
1876
|
||||
1763
|
||||
1676
|
||||
1491
|
||||
1983
|
||||
1743
|
||||
1845
|
||||
999
|
||||
1478
|
||||
1929
|
||||
1819
|
||||
1385
|
||||
1308
|
||||
1703
|
||||
1246
|
||||
1831
|
||||
1964
|
||||
1469
|
||||
1977
|
||||
1488
|
||||
1698
|
||||
1640
|
||||
1513
|
||||
1136
|
||||
1794
|
||||
1685
|
||||
1802
|
||||
1520
|
||||
1807
|
||||
1654
|
||||
1547
|
||||
1917
|
||||
1792
|
||||
1949
|
||||
1268
|
||||
1626
|
||||
1493
|
||||
1534
|
||||
1700
|
||||
1844
|
||||
1146
|
||||
1049
|
||||
1811
|
||||
1627
|
||||
1630
|
||||
1755
|
||||
1887
|
||||
1290
|
||||
1446
|
||||
1968
|
||||
168
|
||||
1749
|
||||
1479
|
||||
1651
|
||||
1646
|
||||
1839
|
||||
14
|
||||
1918
|
||||
1568
|
||||
1554
|
||||
1926
|
||||
1942
|
||||
1862
|
||||
1966
|
||||
1536
|
||||
1599
|
||||
1439
|
||||
1766
|
||||
1643
|
||||
1045
|
||||
1537
|
||||
1786
|
||||
1596
|
||||
1954
|
||||
1390
|
||||
1981
|
||||
1362
|
||||
1292
|
||||
1573
|
||||
1541
|
||||
1515
|
||||
1567
|
||||
1860
|
||||
1066
|
||||
1879
|
||||
1800
|
||||
1309
|
||||
1533
|
||||
1812
|
||||
1774
|
||||
1119
|
||||
1602
|
||||
1677
|
||||
482
|
||||
1054
|
||||
1424
|
||||
1631
|
||||
1829
|
||||
1550
|
||||
1636
|
||||
1604
|
||||
185
|
||||
1642
|
||||
1304
|
||||
1843
|
||||
1773
|
||||
1667
|
||||
1530
|
||||
1047
|
||||
1584
|
||||
1958
|
||||
1160
|
||||
1570
|
||||
1705
|
||||
1582
|
||||
1692
|
||||
1886
|
||||
1673
|
||||
1842
|
||||
1402
|
||||
1517
|
||||
1805
|
||||
1386
|
||||
1165
|
||||
1867
|
||||
1153
|
||||
1467
|
||||
1473
|
||||
1803
|
||||
1967
|
||||
1485
|
||||
1448
|
||||
1922
|
||||
1258
|
||||
1590
|
||||
1996
|
||||
1208
|
||||
1241
|
||||
1412
|
||||
1610
|
||||
1219
|
||||
523
|
||||
1813
|
||||
1123
|
||||
1916
|
||||
1861
|
||||
1020
|
||||
1783
|
||||
1052
|
||||
1140
|
||||
1994
|
||||
1761
|
||||
747
|
||||
1885
|
||||
1675
|
||||
1957
|
||||
1476
|
||||
1382
|
||||
1878
|
||||
1099
|
||||
1882
|
||||
855
|
||||
1905
|
||||
1037
|
||||
1714
|
||||
1988
|
||||
1648
|
||||
1135
|
||||
1859
|
||||
1798
|
||||
1333
|
||||
1158
|
||||
1909
|
||||
652
|
||||
1934
|
||||
1830
|
||||
1442
|
||||
1224
|
||||
106
2020/Day10/input.txt
Normal file
106
2020/Day10/input.txt
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
145
|
||||
3
|
||||
157
|
||||
75
|
||||
84
|
||||
141
|
||||
40
|
||||
20
|
||||
60
|
||||
48
|
||||
15
|
||||
4
|
||||
2
|
||||
21
|
||||
129
|
||||
113
|
||||
54
|
||||
28
|
||||
69
|
||||
42
|
||||
34
|
||||
1
|
||||
155
|
||||
63
|
||||
151
|
||||
8
|
||||
139
|
||||
135
|
||||
33
|
||||
81
|
||||
70
|
||||
132
|
||||
150
|
||||
112
|
||||
102
|
||||
59
|
||||
154
|
||||
53
|
||||
144
|
||||
149
|
||||
116
|
||||
13
|
||||
41
|
||||
156
|
||||
85
|
||||
22
|
||||
165
|
||||
51
|
||||
14
|
||||
125
|
||||
52
|
||||
64
|
||||
16
|
||||
134
|
||||
110
|
||||
71
|
||||
107
|
||||
124
|
||||
164
|
||||
160
|
||||
10
|
||||
25
|
||||
66
|
||||
74
|
||||
161
|
||||
111
|
||||
122
|
||||
166
|
||||
140
|
||||
87
|
||||
126
|
||||
123
|
||||
146
|
||||
35
|
||||
91
|
||||
106
|
||||
133
|
||||
26
|
||||
77
|
||||
19
|
||||
86
|
||||
105
|
||||
39
|
||||
99
|
||||
76
|
||||
58
|
||||
31
|
||||
96
|
||||
78
|
||||
88
|
||||
168
|
||||
119
|
||||
27
|
||||
45
|
||||
9
|
||||
92
|
||||
138
|
||||
38
|
||||
97
|
||||
32
|
||||
7
|
||||
98
|
||||
167
|
||||
95
|
||||
55
|
||||
65
|
||||
24
2020/Day10/main.py
Normal file
24
2020/Day10/main.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import collections
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
with open("input.txt") as f:
|
||||
raw = [0]
|
||||
for i in f.read().splitlines():
|
||||
raw.append(int(i))
|
||||
raw = sorted(raw)
|
||||
raw.append(max(raw) + 3)
|
||||
|
||||
diffs = []
|
||||
for i in range(1, len(raw)):
|
||||
diffs.append(raw[i] - raw[i - 1])
|
||||
|
||||
diff_counter = collections.Counter(diffs)
|
||||
print(diff_counter[1] * diff_counter[3])
|
||||
|
||||
ways = [1] + [0]*raw[-1]
|
||||
|
||||
for i in raw[1:]:
|
||||
ways[i] = ways[i-1] + ways[i-2] + ways[i-3]
|
||||
|
||||
print(ways[-1])
|
||||
95
2020/Day11/input.txt
Normal file
95
2020/Day11/input.txt
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
.LLLL.L.LLLL.LL.LLL.L.LLLLLLL.LLLLL.LLLLLLLLLLLLL.LLLL.LLL.LLLLL.LLLLLLLL.LLLLL.LLLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLLLLLLLLL.LLLLLLLLLLLLL.LLLLLL.LLLL.LLL..LLLL.LLLLLLLL.LLLLL.LLLLLLL.LLLLL
|
||||
LLLLLLLLLLLL.LL.LLLLL.LLLL.L.LLLL.LLLLLL.L.LLL.LL..LLL.LLLLLLLLLLLLLLLLLL.L.LLL.LLLLLLL.LLLLL
|
||||
LLLLLLLLLLLLLLL.LLLLL.LLLLLL.LLLLLLL.LLLLL.LLLLLL.LLLL.LLLLLLLLL.LLLLLLLL.LLLLL.LLLLLLL.L.LLL
|
||||
LL.LLLL.LLLLLLL.L.LLL.LLLLLL.L.LL.LLLLLLLL.LLLLLLLLL.LLLL.LLLLLL.LLLLLLLL.LL.LL.LLLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLL.LLLLLLL.LLL.LLLLL.LLLLLLLLL.LLLL.LLLLLLLLL.LLLLLLLL.LLLL.L.LLLLLLLLLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLLLLLLLLL.LL.L.LLLLLLLL.LLLLLLLLLLL.LLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLL.LLLL.
|
||||
LLLLLLLLLLLLLLL.LLLLLLLLLLL..LLLL.LLLLLLLL.LLLLLL.LL.L.LLLLL.LLL.LLLLLLLLLLLLL.LLLLLLL.L.LLLL
|
||||
....L..L.....L......LL...L.LL.......L...L.L......L.L.LLL....L..L....L.LL..LLL....LL..L..L...L
|
||||
LLLLLLLLLLLLL.L.LLLLLLLLLLLL.LLLLLL.LLLLLL.LLLLLL.LLLLLLLLLLLLLL.LLLL.LLL.LLLLL.LLLLLLLLLLLL.
|
||||
LLLLLLL.LLLLLLL.LLLLLLLLLL.L.LLLL.LLLLL.LL.LLLLLL.LLLLLLLLLLLLLL.LLLLLLLL.LLLLL.LLLLLLLLLLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLL.LLLLLL.LLLL.LLLLLLLLLLLLLLLLLLLLL.LLLLLLLL.LLLLLLLL.LLLLLLLLLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLLLLLLLL.LLLLLL.LLLL.LLLLL.LL.LL.LLLLLLLL.LLLLLLLLLLLLLLLLLL..LLLL.LLLLLLLLLLLLL
|
||||
LLLL.LL.LLLLLLLLLLLLL.LLLLLL.LLLL.LLLLLLLL.LLLLLL.LLLLLLLLLLLLLL.LLLLLLLL.LLLLL.LLLLLLL.L.LLL
|
||||
LLLLLLL..LLLLLL.LLLLL..LLLLL.LLLL.LLLLLLLLLLL.LLL.LLL..LLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLL..LLLL
|
||||
...L...L..LL....L.......L...L.......LL........LL.....LL....L.....LL............L..LL....L....
|
||||
LLLLLLL.LLLLLLL.LLLLL.LLLLLLLLLLL.LLLLLLLL.LLLLLL.LLLL..LLLLLLLL.LLLLLLLL.LLL.L.LLLLLLLLLLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLLLLLLLLL.L.LLLLLLLLLLL.LLLLL.LLLLLLL..LLLLLL.LLLLLL.LLLLLLLLLLLLL.L.LLLLL
|
||||
LLLLLLL.LLLLLLLLLL.L..LLLLLLLLLLL.L.L.LLLLLLLLLLL.LLLL.LLLLL.LLL.LLLLLLLL.LLLLLLLLLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLL.LLLLLL.LLLL.LLLLLLLLLLLLL.L.LLLL.LLLLLLLLL.LLLLLLLL..LLLL.LLLLLLLLLLLLL
|
||||
LLLLLLLLLLLL.LL.LLLLL.LLLLLL.LLLLLLLLLLLLL..LLLLL.LLLL.LLLLL.LLL.LLLLLLLL.LL.LLLLLLLLLL...LLL
|
||||
LLLLLLLLLLLLLLL.LLLLL.LLLLLL.LLLLLLLLLLLLLLLLLLLL.L.LLLLLLLLLLLL.LLLLLLLL.LLLLL.LLLLLLLLLLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLLLLLLLLL.L.LL.LLLLLL.LLLLLLLL.LLLLLLLLLLLLLL.LL.LLLLL.LLLLL.LLLLLLL.LLLLL
|
||||
LLLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLL.LLLLLLLLLLLL.LLLLLLLLLLLLLLLLL.LLLLLLLL.LLLLL.LLLLL.L.LLLLL
|
||||
...........LL.....L.LL....L....L..LL..LL.L.LLLL........LL.L.LL..L......L...LL...LL..L.L......
|
||||
LLLLLLL.LLLLLLL.LLLLL.LLLLLLLLLLL.LLLLL.LL.LLLLLL.LLLL.LLL.LLLLL..LLLLLLLLLLLLLLLLLLLLL.LLLLL
|
||||
LLLLLLLLLLLLLLL.LLLLL.LLLLLLLLLLLLLLLL.LLLLLLLLLL.LLLL.LLLLLLLLLLLLLLLL.L.LLLLLLLLLLLLL.LLLLL
|
||||
LLLLLLLLLLLLLLL.LLLLL.LLLLLLLLL.LLLLLLLLLL.LLLLLL.LLLL.LLLLLLLLL.LLLLLLL..LLLLL.LLLLLLLLLLLLL
|
||||
LLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLL.LLLLLLLLLLLLLLL.LLLLL.L..LLLLL.LLLLL.LLLLLLL.LLLLL
|
||||
LLLLLL..LLLLLLL.LLLLL.LLLLLL.LLLL.LLLL.LLL.LLLLLLLLLLLLLLLLLLLLL.LLLLLLLL.LLLLL.LLLLLLL.LLLLL
|
||||
LL.LL...L....LLL.L.L....LL.L.....L...LLL..LL.......L.......L.......L..L......LLL..L.LL..LL..L
|
||||
LLLL.LL.LLLLL.L.LLLLLLLLLLLL.LLLL..LLLLLLL.LLLLLL.LLLL.LLLLLLLLL.LLLLLLLL.LLLLLLLLLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLL.LLLLLL.LL.LLLLL.LLLLLLLLLLLLLLLL.LLLLLLL.L.LLLLLLLLLLLLLL.LLLLLLLL.LLLL
|
||||
LLLLL.L.LLLLLLL.LLLLL.LLLLLLLLLLL.LLLLLLLL.LLLLL..LLLL.LLLLLLLLL.LLLLLLLL.LLLLLLLLLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLLLLLLLLLLLLLLLL.L.LLLLLLLLLL.LLLLLL.LLLL.LLLLLLLLL.LLLLLLLLLLLLLL.LLLLLLL.LLLLL
|
||||
L.LLLLLLLLLLLLL..LLLLLLLLLLL..LLL.LLLLLLLL.LLLLL...LLL.LLLLLLLLL.LLLLLLLLLLL.LL.LLLLLLLLLLLLL
|
||||
.L......LL...L.L....L...L...........L.LL...L.LLLLL.....LL....L......L.LL..L..L.....L...L.L.LL
|
||||
LLLLLLL.LLLLLLLLLLLLLLLLLLLL.LLLL.LLLL.LLL.LLLLLL.LLL..LLLLLLLLL.LLLLLLLLLLLLLL..LLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLL.LLLL.LLLLLLLLLL.LLLLL.LLLLLLLL.LLLLL.LLLLL.L.LLLLL
|
||||
LLLLLLLLLLLLLLL.LLLLL.LLL.LL.LLLL.LLLLLLLLLLLLLLLLLLLL.LL.LLLLLL.LLLLLLLL.LLLLL.LLLLLLLLLLLLL
|
||||
LLLLLLL.LLLLLLLLLLLLLLLLLLLL.LLLL.LLLLLLLL.L.LLLLL.LLL.LLLLLLLLL.LLLLLLLL.LLLLL.LLLLLLLLLLLLL
|
||||
LL.L.LLLLL.LLLL.LLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLLL.LLLLLLLLLLLLLL.LLLLLLL.LLLLL
|
||||
LLLL.LLLLLLLLLL.LLLLLLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLL.LLLLLLLLL.L.LLLLLL.LLLLL.LLLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLL.LLLLLL.LLLL.LLLLLLLL.LLLLLLLLLLL.LLLLL.LLLLL.LLLLLL.LL.LL.LLLLLLLLLLLLL
|
||||
..L....L.L.LL.L.........L...LL.L....LL......LL..LL.L.L.....L..L..L..L..LL.L...L..L....L......
|
||||
LLLLLLL.LLLLLLL.LLLLL.LLLLLL.LLL..LLLLLLLLLLLLLLLLLLLLL.LLL.LLLLLLLLLL.LL.LLLLL.LLLLLLL.LLLLL
|
||||
LLLLLLL.L.LLLLLLLLLLLLLLLLLLLLLLL.LLLLLLL..LLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLL.L.LLLL.L.LLLLLLLLLLL..LLLLLLLLLL.LL.LLLLLLLLLLLLLLL.LLLLL.LLLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLL.LLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLL.LLLLLL.LL.LLLLLLLL..L.LL.LLLLLLLLLLLLL
|
||||
.L......L....L.L.L...LLLL......LL...LL...L...L......L..L...........L......L.......L....L.L...
|
||||
LL.LLLLLLLLLLLLLLLLLLLLLLLLL.LLLL.LL.LLLLL.LLLLLLLLLLL.LLL.LLLLL.LLLLLLLL.LLLLL.LL.LLLL.LLLLL
|
||||
L.LLLLL.LLLLLLL.LLLLL.LLLLLL.LL.LLLLLLLLLL.L.LLLLLLLLL.LLLLLLLLL.LLLLLLLL.LLLLLLL.LLLLLLLLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLL.LLLLLLLLLLL.LLLLL.LLLLLLLL.LLLLLLLLLLLLLLL.LLL.LLLL.LLLLLLLLLLLLL.LLLLL
|
||||
LLLLLLLLLLLLLLLLL.LLLLLLLLLL.LLLL.LLLLLLLLLLLLLLL.L.LLLLLLLLLLLL.LLLLL.LLLLLLLL.LLLLLLL.LLLLL
|
||||
.LLLLLL.LLLLLLL.LLLLLLLLLLLL.LLLL.LLLLLLLLLLL.LLLLLLLLLLLLLLLLL.LLLLLLLLL.LLLLL.L.LLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLLLLLLLLLLLLL.L.LLLL.LLLLLLLLLLL.LLL.LLLL.LLL.LLLLL.LLL.LLLLLLLLLL.LLLLLLL..LLLL
|
||||
.L.....L...L....L.LL............LL..L.LL.....LLL..L.............L...........L...L.L.L........
|
||||
LLLLLLLLLLLLL.L.LLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLL.LLLL.LLLLLLLLL.LLL.LLLL.LLLLLLLLLLLLL.LLLLL
|
||||
LLLLLLL..LLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLL.LLLLLLLLL.LLLLLLLLLLLLLL.LLLLLLL.LLLLL
|
||||
LL.LLLLLLLLLLLL.LLLLL.LLL.LL.LLL..LLLLLLLL.L.LLLL.LLLLLLLLLLLLLL.LLLLLL.L.LLLLLLLLLLLL.L.LLLL
|
||||
LLL.LLL.LLLLLLLLLLLL..LLLLLL.LLLL.LLLLLLLLLLLL.LLLLLLLLLLLLLLLLL.LLLLLLLLLLLLLL.LLLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLL.LLLLLL.LLLLLLLLLLLLL.LLLLLL.LLLLLLLLLLLLLLLLLLLLL.L.LLLLL.LLLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLLLLLLLLL.LLLL.LL.L.LLLLLLLLLL.LLLL.LLLLLLLLL.LLLLLLLLLLLLLL.LLLLLLLLLLLLL
|
||||
LLLLLLLLLLLLLLLLLLLLL.LLLLLL.LLLLLLLLLLLLL..LLLL..LLLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLL.LLLLLLLLLLL.LLLLLLLL.LLLLLL.LLLLLLLLLLLLLL.LLLLLLLL.LLLLL.LLLLLLL.LL.LL
|
||||
.LLLLLL.LL.LLLLLLLLLLLLLL.LLLLLLLLLLLLLLLL.LLLLLL.LLLLLLLLLLLLLL.LLLLLLLLLL.LLL.LLLLLLL.LLLLL
|
||||
LL.L.L...L...L...LLL.......LLL..L.L...L.......L......L.LL.......L..LLL.L..L.L.LL..L..L.L.LLL.
|
||||
LLLLLLL.LLLLLL..LLLLL.LLLLLL.LLLL.LLLLLLLL.LLLLLL.LLLL.LLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLL.LLLLLL.LLLLLLLLLLLLL.LLLLLL.LLLL.LLLLLLLLLLLLLLLLLL.LLLLL.LLLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLLLLLLLLL.LLLL.LLLLLLLL.LLLLLL.LLLL.LLLLLLLLL.LLLLLLLLLLLLLL.LLLLLLLL.LLLL
|
||||
LLLLLLLLLLLLLLL.LL.LL.LLLLLL.LLLL.LLLLLLLL.LLLLLLLLLLL.LLLL.LLLL.LLLLLLLL.LLLLLLLLLLLLLLLLLLL
|
||||
LLLLLLL.LL.LLLL..LLL.LLLLLLLL.L.L.LLLLLLLL.LLLLLL.L.LL.LLLLLL.LL.LLLLLLLL.LLLLL.LLLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLLLLLLLL.LLLLLL.LLLL.LLLLLLLL.LLLLLLLLLLL.LLLLLLLLL.LLLLL.LL.LLLLLLLLL.LLL.LLLL.
|
||||
L.LLLLLLLLLLLLLLLLLLL.LLLL.L.LLLL.L.LLLL.L.LLLLLL.LLLL.LLLLLL.L.LLLLLLLLLLLLLLLLLLLLLLL.LL.LL
|
||||
.LLLLLL.LLLLLLLLLLLLL.LLLLLL.LLLL.LLLL.LLL.LLLLLLLLLLL.LLLLLL.LLLLLLLLLLLLLLLLL.LLLLL.L.LLLLL
|
||||
LL....L....L..L.L.....L.L...L...L.....L.....L....LLL..L.L..L..L.LL.L...L.LLL.......L....L.LL.
|
||||
LLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLL.LLLLLLLLLLL.LLL.LLLLLLLLLLLLLL.LLLLL.LLLLLLL.LLLLL
|
||||
LLLLLLL.LLL.LLLLLLL.LLLL.LLL.LLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLL.LLLLLLLL.L..LLLLLLLLLL.LLLLL
|
||||
LLLLLLLLLLLLLLL.LLLLL.LLLLLLLLLLL.LLLLLLLL.LLLLLLLLLLL.LLLLLLLLL.L.LLL.LLLLLLLL.LLLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLLLLLLLLL.LLLLLL.LLLLL.LLLLLLL.LLLLLL.LLLL.LLLLLL.LLLLLLLLLLL.LLLLL.LLLLLLLLLLLLL
|
||||
LLLL.LL.LLLLLLLLLLLLL.LLLLLL.LLLL.LLLLLLLL.LLLLLLLLLLL.LLLLLLL.L.LLLLLLLL.LLLLL.LLLLLLL.LLLLL
|
||||
LLLLLLL.LLLLLL.LLLLLL.LLLLLLLLLL..LLLLLLLL.LLLLLL.LLLL.LLL.LLLLL.LLLLLLLLLLLLLL.LLL.LLL.LLLLL
|
||||
LLLLLLLLLLLLLLL..LLLLLLLLLLLLLLLLLLLL..LLL.LLLLLL.LL.L.LLL.LLLLLLLLL..LLL.LLLLL.LLLLLLL.LLLLL
|
||||
..L..L..L.L.......L..LL...L.L..LL...L............L.L...L.....L...LL..LL......L.L...L.....L..L
|
||||
LLLLL.LLLLLLLLLLLLLLL.LLLLLL.LLLL.LL.LLLLLLLLLLLL.LLLLLLLLLLLLLL.LLLLLLLL.LLLLL.LLLLLLLLLLLLL
|
||||
L.LLLLL.LLLLLLL.LLLLLLL.LLLL.LLLL.LLLLLLLLLLLLLLL.LLLLLLLLLLLLLL.LLLLLLLL.L.LLL.LL.LLL.LLLLLL
|
||||
LLLLLLL.LLLLLLLLL.LLLLLLLLLLL.L.L.LLLLLLLL.LLLLLL.LLLL.LLLLLLLLLLLLLLLLLL.L.LLL.LLL.LL..LLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLLLLLLLLL.LLLLLLLLLLLLL.LLLLLL.LLLL.LLLL.LLLL.LLLLLLLL.LLLLL.LLL..LL.LLLLL
|
||||
LLLLLLL.LLLLLLL.LLLLLLLLLLLL.LLLL.LLLLLLLL.LLLL.LLLLLL.LLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLL.LL
|
||||
LLLLLL.LLLLLLLL.LLL...LLLLLL.LLLL.LLLLLLLL.LLLLLL.LLLLLLLLLL.L.L.LLLLLLLL.LLLLL.LLLLLLL.L.LL.
|
||||
LL.LL.L.LLLLLLLLLLLLL.L.LLLLLLLLLLLLLLLLLL.LLLLLL..LLL.LLLLLLLLLLLLLLLLL..LLLLL.LLLLLLL.LLLLL
|
||||
LLLLLLLLLLLLLLL.LLL.LL.LLLLL.LLLL.LLLLLLLL.LLLLLLLLLLL.LLLLLLLLL.LLLLLLLLL.LL.L.LLLLLLLLLLLLL
|
||||
LLLLLLL.LLLL.LL.LLLLL.LLLLLL.LLLL.L.LLLLLLLLLLLLLLLLLLLLLLLLLLL..LLLLLLLLL.LLLLLLLLLLLL.LLLLL
|
||||
L.LLLLL.LLLLLLL.LLLLL.LLLLLLLLLLL.LLLLLLLL.LLLLLL.LLLL.LLLLLLLLLLLLLLLL.L.LLLLLLLLLLLLL..LLLL
|
||||
LLLLLLL.LLLLLLLL.LLLLLLLLLLL.LLLLLLLLL.LLL.LLLLLLLLLL..LL.LLLLLL.LLLLLLLL.LLLLL.LLLLLLLLLLLLL
|
||||
35
2020/Day11/main.py
Normal file
35
2020/Day11/main.py
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import collections
|
||||
import copy
|
||||
|
||||
|
||||
def getNeighbors():
|
||||
count = [temp[x][y + 1], temp[x][y - 1], temp[x + 1][y + 1], temp[x - 1][y + 1], temp[x + 1][y], temp[x - 1][y],
|
||||
temp[x - 1][y - 1], temp[x + 1][y + 1]]
|
||||
|
||||
count = collections.Counter(count)
|
||||
return count
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
with open("input.txt") as f:
|
||||
raw = list(f.read().splitlines())
|
||||
|
||||
while True:
|
||||
temp = copy.deepcopy(raw)
|
||||
for x in range(len(temp)):
|
||||
for y in range(len(temp[x])):
|
||||
line = list(temp[x])
|
||||
symbol = line[y]
|
||||
if symbol != '.':
|
||||
neigh = getNeighbors()
|
||||
if symbol == "L" and neigh["#"] == 0:
|
||||
line[y] = '#'
|
||||
if symbol == "#" and neigh["#"] >= 4:
|
||||
line[y] = 'L'
|
||||
temp[x] = line
|
||||
if temp != raw:
|
||||
break
|
||||
|
||||
raw = copy.deepcopy(temp)
|
||||
|
||||
print(getNeighbors()["#"])
|
||||
1000
2020/Day2/input.txt
Normal file
1000
2020/Day2/input.txt
Normal file
File diff suppressed because it is too large
Load diff
15
2020/Day2/main.py
Normal file
15
2020/Day2/main.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
if __name__ == '__main__':
|
||||
with open("input.txt") as f:
|
||||
inputs = f.readlines()
|
||||
result = 0
|
||||
entered = 0
|
||||
for i in inputs:
|
||||
rng, let, text = i.split(" ")
|
||||
for x in range(0, len(text)):
|
||||
letequal = text[x] == let[0]
|
||||
if (letequal and x == int(rng.split("-")[0])-1) ^ (letequal and x == int(rng.split("-")[1])-1):
|
||||
entered += 1
|
||||
if entered == 1:
|
||||
result += 1
|
||||
entered = 0
|
||||
print(result)
|
||||
16
2020/Day3/main.py
Normal file
16
2020/Day3/main.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# This is a sample Python script.
|
||||
|
||||
# Press Umschalt+F10 to execute it or replace it with your code.
|
||||
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
|
||||
|
||||
|
||||
def print_hi(name):
|
||||
# Use a breakpoint in the code line below to debug your script.
|
||||
print(f'Hi, {name}') # Press Strg+F8 to toggle the breakpoint.
|
||||
|
||||
|
||||
# Press the green button in the gutter to run the script.
|
||||
if __name__ == '__main__':
|
||||
print_hi('PyCharm')
|
||||
|
||||
# See PyCharm help at https://www.jetbrains.com/help/pycharm/
|
||||
1029
2020/Day4/input
Normal file
1029
2020/Day4/input
Normal file
File diff suppressed because it is too large
Load diff
1029
2020/Day4/input.txt
Normal file
1029
2020/Day4/input.txt
Normal file
File diff suppressed because it is too large
Load diff
18
2020/Day4/main-DESKTOP-0CGMHB1.py
Normal file
18
2020/Day4/main-DESKTOP-0CGMHB1.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
if __name__ == '__main__':
|
||||
f = open("input", "r")
|
||||
inputs = f.read().split("\n\n")
|
||||
|
||||
passports = []
|
||||
for i in inputs:
|
||||
passports.append(i.replace("\n", " ").split(" "))
|
||||
|
||||
reqFields = ["byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid"]
|
||||
|
||||
valid = 0
|
||||
|
||||
for passport in passports:
|
||||
dsplit = dict(i.split(":") for i in passport)
|
||||
if all(field in dsplit for field in reqFields):
|
||||
valid += 1
|
||||
|
||||
print(valid)
|
||||
77
2020/Day4/main.py
Normal file
77
2020/Day4/main.py
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
import re
|
||||
|
||||
|
||||
def checkDate(min, max, val):
|
||||
return min <= int(val) <= max and len(val) == 4
|
||||
|
||||
|
||||
def checkHeight(height):
|
||||
unit = height[-2:]
|
||||
rv = False
|
||||
if unit == "cm" or unit == "in":
|
||||
num = height.strip(unit)
|
||||
|
||||
if unit == "cm" and 150 <= int(num) <= 193:
|
||||
rv = True
|
||||
elif unit == "in" and 59 <= int(num) <= 76:
|
||||
rv = True
|
||||
return rv
|
||||
|
||||
|
||||
def checkHair(color):
|
||||
return re.match(r'#[a-f0-9]{6}', color)
|
||||
|
||||
|
||||
def checkAll():
|
||||
rv = 0
|
||||
for val in keys:
|
||||
for j in range(0, len(keyval)):
|
||||
if val == keyval[j][0]:
|
||||
rv += 1
|
||||
break
|
||||
return rv == 7
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
with open("input.txt", "r") as f:
|
||||
raw = f.read().split("\n\n")
|
||||
|
||||
keys = ['byr', 'iyr', 'eyr', 'hgt', 'hcl', 'ecl', 'pid']
|
||||
eclValids = ['amb', 'blu', 'brn', 'gry', 'grn', 'hzl', 'oth']
|
||||
|
||||
pp = []
|
||||
|
||||
for i in raw:
|
||||
pp.append(i.replace("\n", " ").split(" "))
|
||||
|
||||
valid = 0
|
||||
|
||||
for passport in pp:
|
||||
keyval = []
|
||||
counter = 0
|
||||
for i in passport:
|
||||
keyval.append(i.split(":"))
|
||||
|
||||
if checkAll():
|
||||
for i in keyval:
|
||||
key = i[0]
|
||||
val = i[1]
|
||||
if key == "byr" and checkDate(1920, 2002, val):
|
||||
counter += 1
|
||||
elif key == "iyr" and checkDate(2010, 2020, val):
|
||||
counter += 1
|
||||
elif key == "eyr" and checkDate(2020, 2030, val):
|
||||
counter += 1
|
||||
elif key == "hgt" and checkHeight(val):
|
||||
counter += 1
|
||||
elif key == "hcl" and checkHair(val):
|
||||
counter += 1
|
||||
elif key == "ecl" and val in eclValids:
|
||||
counter += 1
|
||||
elif key == "pid" and len(val) == 9 and val.isdigit():
|
||||
counter += 1
|
||||
|
||||
if counter == 7:
|
||||
valid += 1
|
||||
|
||||
print(valid)
|
||||
807
2020/Day5/input.txt
Normal file
807
2020/Day5/input.txt
Normal file
|
|
@ -0,0 +1,807 @@
|
|||
FBFFFFFLLL
|
||||
FFBFFFFRRR
|
||||
FFFBBBBLRL
|
||||
FBFFBBFLLL
|
||||
FFFBFBBLLL
|
||||
FBFFFFBRLR
|
||||
BFFBBFBLLL
|
||||
FBFBFFBLLL
|
||||
BFFFBBBRLL
|
||||
FBFBBFBRLR
|
||||
BFBFFFBRLR
|
||||
FFFBBFFRLR
|
||||
FFFFFBFRRR
|
||||
FBFBBBFRRL
|
||||
FBFBBFBRRR
|
||||
FBFBBBFLRR
|
||||
BBFFFBBRLL
|
||||
FBBBBBFRLL
|
||||
FBFFFFBLLR
|
||||
FBFFFFFLRR
|
||||
FBFBFFBLRR
|
||||
FBFBFBBRRL
|
||||
FFFFBFFRRL
|
||||
FFFFBBFLRR
|
||||
BFFBBFBRLR
|
||||
BBFFFFFRLR
|
||||
FFBFBBBRLL
|
||||
FFBFBBBLRL
|
||||
FBFFFBBLLL
|
||||
FFFFBBFRLR
|
||||
FBFBBFFLLR
|
||||
FBBFFBFRLL
|
||||
BFFFBFBLLR
|
||||
FBFFBBBLLL
|
||||
FFFFBBBLRR
|
||||
FFBFFBFLLL
|
||||
BFBFBFBRRL
|
||||
BFBFFFBRRL
|
||||
FBFBFBFLLL
|
||||
FBBBBFFRRR
|
||||
FBFFBFBRRR
|
||||
BBFFFFFRRL
|
||||
BFFFFFFLRL
|
||||
FFFFFBBLLR
|
||||
FBBFBFBRRL
|
||||
BFBFFBFLLL
|
||||
FFFFBBBRLL
|
||||
BFFFBFBRLL
|
||||
FFFBBFFLLL
|
||||
BFFFFFBRLR
|
||||
FBFBBFFRLR
|
||||
BFFBBBFRLR
|
||||
BBFFBFFRRR
|
||||
BFFBFFFRLL
|
||||
FFFBBBFLLR
|
||||
FBFBFFFRRL
|
||||
FBBFFFBLLR
|
||||
BFBFFBFLRR
|
||||
BFFBBFBRRR
|
||||
FFFBBBBRLR
|
||||
BBFFBFFRLR
|
||||
FBBBBBFRRR
|
||||
FBFBBBFRLR
|
||||
FBFFFBBLRL
|
||||
FFBFBFFLRR
|
||||
BFFFBFFRLL
|
||||
FBFFBFBLRL
|
||||
BFBBFBFLLR
|
||||
BFFFBBFRLL
|
||||
BFBFBFBLRR
|
||||
BFFFFBBRLR
|
||||
BFBBFFBRRL
|
||||
BFFBFFBRRR
|
||||
FBFFFBFRLL
|
||||
FFFFBFFLLR
|
||||
FBFFFBFLLR
|
||||
FBFFFFFRRL
|
||||
FBBBFBBLLR
|
||||
BFBFFFBLLR
|
||||
BFFBFFBLLR
|
||||
FFFBBBFRLL
|
||||
FBBBBFFRRL
|
||||
FBBFBBFRRR
|
||||
BFBFBFFLLR
|
||||
BFFFBBBRRL
|
||||
FBBFBBBRRL
|
||||
FFBFBBFRLL
|
||||
FBBFBFFLLL
|
||||
FBBBBBFRLR
|
||||
BFBFBFFRRL
|
||||
BFFBBFFRRR
|
||||
BFBFBFBRLL
|
||||
BFFBFFBRLR
|
||||
BBFFBFBLRL
|
||||
FFBFBFBLLL
|
||||
FFBBBFBRRR
|
||||
BBFFFFBLRR
|
||||
BFBBBBBRLR
|
||||
BFFFFFBLLR
|
||||
FBFBBBBRRR
|
||||
FBBBFBFLRR
|
||||
FBBFBBFLLL
|
||||
BBFFFFBLRL
|
||||
FFBBFBFLLL
|
||||
FBBBBFBLLR
|
||||
FFFBBBBRRL
|
||||
FFBFFBFRLL
|
||||
BFFBBBFLLR
|
||||
FFFBFBBLRR
|
||||
FFBBFFBLLR
|
||||
FFBFFBFLRR
|
||||
FBBBBFBLRL
|
||||
FBBBFBFRLL
|
||||
FBFBFFFRLL
|
||||
FBBFBBFRLR
|
||||
BFFFFBBLLL
|
||||
FBFBFBFLRL
|
||||
FBBBFFBRRR
|
||||
FFFFBFFLLL
|
||||
BFBBBFFRLL
|
||||
FBBBFBFLLR
|
||||
FBBFBBFLRR
|
||||
FBFFBBBLRL
|
||||
FBFFBBFLRR
|
||||
FBBBFFBRRL
|
||||
FBFBBFBRRL
|
||||
FBFBBFBLRL
|
||||
BFBFFBBLLL
|
||||
FBFFFBFLRR
|
||||
FBFFBBFRLL
|
||||
FFBBFFFRLR
|
||||
FBFBBBBRLL
|
||||
FBBBBFFRLR
|
||||
BFBFBFBRLR
|
||||
BFFBFBFRLR
|
||||
FFFBFFBLLL
|
||||
FFFFBBFLLR
|
||||
FFBFBBFRRL
|
||||
FBBFBFBRLR
|
||||
FBFBBFBLRR
|
||||
BFBBBBFLRL
|
||||
BFFFFBBRRR
|
||||
FBBFBFBLLL
|
||||
BFFFFBFLLR
|
||||
FFFFFBBLRR
|
||||
FFFBFBBRRL
|
||||
BFBFFFFRRR
|
||||
FBFBBFFLRL
|
||||
FBFFBBBRLL
|
||||
FFBBBBFLLR
|
||||
FFFBFFBLLR
|
||||
FBFFFFFRLL
|
||||
BFBFFFBLLL
|
||||
FBBBBFBRLL
|
||||
FFFFFFBRRL
|
||||
FFBFBFBLLR
|
||||
FBFBFBFRLR
|
||||
FBBBBBBLLL
|
||||
BFFBFFBLRL
|
||||
FFBBBFBLRL
|
||||
FBBFFFFRLL
|
||||
BBFFBFBLRR
|
||||
BFBFFBFLLR
|
||||
FFBBFBBRLR
|
||||
FBBFFFFRRL
|
||||
FBFFBFBRLR
|
||||
BFBFBFFLLL
|
||||
FFFBFFFLLL
|
||||
BFBFBFFLRL
|
||||
BFBFBBFLLL
|
||||
FFFBBBBLRR
|
||||
BFFBFBFLLL
|
||||
BFBBFBFRRR
|
||||
BFBBFFFLLL
|
||||
BFFFBBBLRL
|
||||
FFBBFBFLRL
|
||||
FFFFBFBLLR
|
||||
FBFBFFFLLL
|
||||
BFBFFFBLRR
|
||||
FFBBFBBLLR
|
||||
FFFFBBFLRL
|
||||
BFBBFBBLLR
|
||||
BFFBBFBLLR
|
||||
BFFBFFBRLL
|
||||
BFFFBBFLLR
|
||||
FFBBFBFLLR
|
||||
FBBBFFBRLR
|
||||
FFBFBFFLLR
|
||||
FBFFFBBRLR
|
||||
FBBFFFBRLL
|
||||
FBBFFBBLRL
|
||||
BBFFFFBRRL
|
||||
FFBFFFBRLL
|
||||
BFFFBFFLRL
|
||||
FFFFFBBRRR
|
||||
FBFFBBFRRL
|
||||
FBFBFBFLRR
|
||||
FBBFFBFLRR
|
||||
BFBBFBBLLL
|
||||
FFFBFBFLRL
|
||||
BBFFFFBLLR
|
||||
BBFFBFBLLL
|
||||
BFBBFBFRRL
|
||||
FBBFFFBRRL
|
||||
BFFBBBFLRR
|
||||
FFBBBBFRRL
|
||||
FBBBBBBRLR
|
||||
FFFBFFBRRL
|
||||
FFFBBFBLRL
|
||||
FBBBBBBRRL
|
||||
FFFFBFFRRR
|
||||
FFFBBBBRLL
|
||||
FFBBFFBLLL
|
||||
BFBFBBFRLR
|
||||
FFBFFBBRLL
|
||||
BFBBBBFLRR
|
||||
FBFFBFFLLR
|
||||
FBBBFFBLLR
|
||||
BFFBBBBRRR
|
||||
FFBFFFFLRL
|
||||
BFFBBFBRLL
|
||||
FFBFBBBRRL
|
||||
FFBBBFFRLL
|
||||
FBBFFBFLLR
|
||||
FBFFBFFLRR
|
||||
BBFFFFFLRL
|
||||
FFBBBBFRLR
|
||||
BBFFFBBLRR
|
||||
FFFFFFBRRR
|
||||
FBBBFBBLRL
|
||||
BFFBBFBRRL
|
||||
BFBFBBFRRL
|
||||
BFBBFBBRLL
|
||||
BFBFFFBRLL
|
||||
BFFBFFFLRL
|
||||
BFFBBBBRLL
|
||||
FFBBBBBRRL
|
||||
FBBFFBFRRR
|
||||
BFBBBBBLRL
|
||||
BFFFFFBLRL
|
||||
BBFFFFBRLR
|
||||
FFBBBBBLRL
|
||||
BFFBFBFLRL
|
||||
BFBBFFFLRR
|
||||
BFFBBBFLRL
|
||||
BFFBFFFLRR
|
||||
BFBBFBFLRR
|
||||
BBFFFFFLLR
|
||||
FFBFFBBLRL
|
||||
BFFBBBBLLR
|
||||
FBFFBBBRLR
|
||||
BFFFFBBLRR
|
||||
BFFFBFFRRR
|
||||
FBBFFBBRLL
|
||||
FBFBFBFRRL
|
||||
FFFFBFBRRR
|
||||
FFBBBFBRLL
|
||||
FBFFBFBRRL
|
||||
FFBFBFBLRR
|
||||
BFFFFFFRLL
|
||||
BFFBFFBRRL
|
||||
FBFBFFFLLR
|
||||
BFBFFBBRLL
|
||||
FFBFFBBLLR
|
||||
FBFBBFBLLL
|
||||
FFBBFBFLRR
|
||||
FFFBBFBRLL
|
||||
FBBFFBFLRL
|
||||
FFBFBFFRRR
|
||||
FBBBFBBRLL
|
||||
FBFFFFBLRL
|
||||
FFFFFFBLRR
|
||||
BFFBFFFRRL
|
||||
BFFBFBBLRR
|
||||
FBBFFFBLRL
|
||||
FBFFBBFRRR
|
||||
BBFFFBFLRL
|
||||
BBFFBFFLRL
|
||||
FFBBFFFLRR
|
||||
BFBBBFBLLR
|
||||
FBFBFBFRLL
|
||||
BFBFBBFRLL
|
||||
FFBBFBBRLL
|
||||
BFBBBFBRRL
|
||||
BFFFBBFLRR
|
||||
FFFBFFFRLL
|
||||
BBFFBFFLRR
|
||||
BBFFBFFLLR
|
||||
FFFBFFBLRR
|
||||
BFFBFFFRRR
|
||||
FBFBFFFRLR
|
||||
FBFBFFBLLR
|
||||
FBBFBFBLRR
|
||||
FBFBBBBLRL
|
||||
FBFBBFFRRR
|
||||
BFFFFBFLRR
|
||||
FBBFBBBRLL
|
||||
FFBFFBBLRR
|
||||
FFBFBFFRLR
|
||||
FBBBBBBLLR
|
||||
BFBFFFFLRR
|
||||
BFFFBBFRRR
|
||||
FFBFBFFLLL
|
||||
FFBFBBFRRR
|
||||
BFFBBBFRLL
|
||||
BFBBFBFRLL
|
||||
BFBBBFFRRR
|
||||
BFFFBBBLRR
|
||||
FFFBBFBRLR
|
||||
BBFFFBBLLR
|
||||
BFFFBBBLLL
|
||||
FFFBFFBRRR
|
||||
BFBFBBBLRR
|
||||
BFBFBFFLRR
|
||||
FBFBFBBLLL
|
||||
FBBBFBBLRR
|
||||
FBFFBBBRRR
|
||||
FFBFFBBRLR
|
||||
FFFBBFFRRL
|
||||
FBBFFBBRLR
|
||||
BFFBFBBRRL
|
||||
FBBBFFFLRL
|
||||
FBBFFFFLLR
|
||||
FFBBFFBRRR
|
||||
FFFFFBFLRL
|
||||
BBFFFFFRLL
|
||||
BFBBBFFLLL
|
||||
FBFBBFBRLL
|
||||
FBFBBBFRLL
|
||||
FBBBFFFLLR
|
||||
BFBBFBBLRL
|
||||
FFFFBBFLLL
|
||||
BFBBBBBRRR
|
||||
FFFBFBFRLR
|
||||
FBFFBFBLLL
|
||||
BFBBBBBLLR
|
||||
FFBBFFFRLL
|
||||
FFFBFFFLRL
|
||||
FFBBBFFRRL
|
||||
FFBFFFFRLR
|
||||
BFFFBBBLLR
|
||||
BFBFFFFLRL
|
||||
FBBFFBFRLR
|
||||
FBFFFFFRLR
|
||||
BBFFFBBRRL
|
||||
BBFFFBBLRL
|
||||
FBFFFBFLRL
|
||||
FBBFFFFLRR
|
||||
FBFFFFBLRR
|
||||
FBFFBFFLRL
|
||||
BFBFFBFRLL
|
||||
BFBFBBFRRR
|
||||
FBBBFBFLLL
|
||||
BBFFFFFLLL
|
||||
FFFFBFFLRL
|
||||
FBBFBBFLRL
|
||||
FBBFBBBRLR
|
||||
FFBFFFFLLR
|
||||
FFBFBFBRRR
|
||||
FBBBFBBLLL
|
||||
FBFBBBBLLR
|
||||
BFFFFBBLRL
|
||||
BFFBFBFLLR
|
||||
BFFBBBFRRR
|
||||
BBFFFBFLRR
|
||||
FBFFFFFLRL
|
||||
BFFFFFFRRL
|
||||
BFFBFFBLLL
|
||||
BFFFFFFLLL
|
||||
FFFBFFBLRL
|
||||
BFFFFBFRRL
|
||||
FBBBFFFRLR
|
||||
BFBFBBBLRL
|
||||
BBFFFBFRRR
|
||||
BFFFFBBLLR
|
||||
BFBFBBBRRR
|
||||
FBFFFBFLLL
|
||||
FBBBFBFRLR
|
||||
FFFFFFBLRL
|
||||
FBFBBFFRRL
|
||||
BFBBFBFLLL
|
||||
FFBFFBBRRL
|
||||
BFBFFFFLLL
|
||||
FBBFFBFLLL
|
||||
FBFFFBFRRR
|
||||
BFBBBBFRRL
|
||||
BBFFFBFRLL
|
||||
FBBFBFBLRL
|
||||
FFBBFFFLRL
|
||||
FBBFBBFRRL
|
||||
FBBFBBFLLR
|
||||
BFBFBFBLLR
|
||||
FBBFFFFRRR
|
||||
FBBFFBFRRL
|
||||
BFFFFFFRRR
|
||||
BFBBFBBRLR
|
||||
FFFBFBFRLL
|
||||
FBFFBBBLLR
|
||||
BFBBBBBRLL
|
||||
BFFBFFFRLR
|
||||
BFBBBFFLRL
|
||||
BFBBBFFRRL
|
||||
FFBBFBFRRR
|
||||
FFBFBBFRLR
|
||||
FFBFBFFLRL
|
||||
FBFBFFBLRL
|
||||
FBBBFFBLRR
|
||||
BFBBBFFRLR
|
||||
BBFFBFFRRL
|
||||
FBBBBBFRRL
|
||||
FBFBBFFLLL
|
||||
BFBBFBFRLR
|
||||
FFBFBFFRRL
|
||||
BBFFFFFLRR
|
||||
FBBBFBFRRL
|
||||
BFBFBBBRLR
|
||||
FFBFFBFRLR
|
||||
FFBBFBFRLR
|
||||
FBFFBFFLLL
|
||||
BFBFBBBLLL
|
||||
BFFFFFBRLL
|
||||
FFBFBBFLRR
|
||||
BFBBFFFLRL
|
||||
BFFFFBFLRL
|
||||
FFBBFBFRRL
|
||||
FFFFBBFRRR
|
||||
FBFBFFBRLL
|
||||
FBBBBFBLRR
|
||||
BFBBFBBRRL
|
||||
FFFBFBFRRL
|
||||
FBFFBFBLLR
|
||||
FFBFBBBLRR
|
||||
BBFFFBFLLL
|
||||
BFBBBBFRLR
|
||||
FFFFFBFRLL
|
||||
BBFFFBBRRR
|
||||
BFFBBFFRLR
|
||||
FBFBBBFLRL
|
||||
BFBBFFBLRL
|
||||
BFBBBFFLRR
|
||||
FBBBFFFRRR
|
||||
FFFFBFBLRL
|
||||
BFFBBBFLLL
|
||||
FBBBBFBRRL
|
||||
BFFBFBBRRR
|
||||
FBBBBBFLLR
|
||||
BFBFBBBRLL
|
||||
FFFFFBFLRR
|
||||
BFFFBBFRRL
|
||||
FFFBBBFLRL
|
||||
FBBBBFBLLL
|
||||
FBBFBBBLLR
|
||||
FBFBBFBLLR
|
||||
FBFBFFFLRR
|
||||
BFFFFBFRLR
|
||||
FFFBBBBLLL
|
||||
BFBFFFFRRL
|
||||
FBFBBBBLRR
|
||||
FBBBBFFLRL
|
||||
BFBBBFBLLL
|
||||
FBBFFFBRRR
|
||||
FFFBBFFLRL
|
||||
FBBFFFFLLL
|
||||
BFFFFBBRLL
|
||||
FBBBBFBRLR
|
||||
FFBBBFBLLL
|
||||
BFFFBFFLLL
|
||||
BFBBBBBLRR
|
||||
FFBFFFFLRR
|
||||
FBBFBFFRLL
|
||||
BFFBBBFRRL
|
||||
FFFBFBFLLR
|
||||
BFFFBFFRRL
|
||||
FBFBFBBLLR
|
||||
FBFBBBFRRR
|
||||
FBBFBFBRLL
|
||||
BBFFFBBLLL
|
||||
FBFFBFBRLL
|
||||
BFBFFBBLLR
|
||||
FFFBBFFLRR
|
||||
FBBFBBBLRL
|
||||
FFFFBFFRLL
|
||||
FFBBFFFLLL
|
||||
BFFBBBBLRL
|
||||
BFBBBFFLLR
|
||||
FFBBFBFRLL
|
||||
BFBBBFBLRL
|
||||
BFBBBFBRLR
|
||||
BFFBBFFLRL
|
||||
FFBBBBBRLL
|
||||
FBBFBFFLRR
|
||||
FFFBBFBLRR
|
||||
FBBFFBBRRL
|
||||
FFFBBFBLLR
|
||||
FFFBBFBLLL
|
||||
FBFBFFFRRR
|
||||
FFFFFFFRRR
|
||||
BFFFBFFLLR
|
||||
FFBFFBFLRL
|
||||
FFFBFFFLRR
|
||||
FBBFBFFRLR
|
||||
FBFBFBFLLR
|
||||
FBFFFBBRRL
|
||||
FBFFFBBRLL
|
||||
FFBBFFBLRL
|
||||
FFFFBFBRRL
|
||||
FFFFFBFRRL
|
||||
BFBBFFBLLR
|
||||
FBFFFBBLRR
|
||||
FFFFBFFRLR
|
||||
BFFBBFFLRR
|
||||
FBBBBBFLLL
|
||||
BBFFBFFRLL
|
||||
BFFFFFBRRL
|
||||
FFFBBBFLLL
|
||||
FFBBBBBRLR
|
||||
FFBBBBBLRR
|
||||
BFFFFFFLRR
|
||||
FFFBBBFRRR
|
||||
FFBBBFBRRL
|
||||
BFBBBFBLRR
|
||||
FBBFFBBLLR
|
||||
FFFBFBBRRR
|
||||
FBFBFBBRRR
|
||||
FBBFFFBLRR
|
||||
FFBFFFBLRR
|
||||
FFBFBBBRLR
|
||||
FFFBFBFRRR
|
||||
BFFBFBFRLL
|
||||
FFFFFBBLRL
|
||||
FFBBFFFRRL
|
||||
FFBFBBBRRR
|
||||
FFBFFBBRRR
|
||||
FFFFFBBRLL
|
||||
FFFFBBBLLL
|
||||
FBFBFFBRRL
|
||||
FFFBFBFLRR
|
||||
BFBBFBBRRR
|
||||
BFFBFBBLLR
|
||||
BFBFBBBLLR
|
||||
FBBBBBBRLL
|
||||
BFFBFBBRLL
|
||||
FBFFBFFRRR
|
||||
BFFFBFBRLR
|
||||
FFBBFBBLRL
|
||||
BFFFBBFLRL
|
||||
FFFBBFFRRR
|
||||
BFFBFFBLRR
|
||||
FFFFFFBLLR
|
||||
BFFBFBBRLR
|
||||
FBFBBBBRRL
|
||||
BFBBFFFRLL
|
||||
FBFBBFFLRR
|
||||
FBBFBBFRLL
|
||||
FFBBFBBLRR
|
||||
BFBBFFBRRR
|
||||
FBBBFBFRRR
|
||||
FFFFBFBRLR
|
||||
FFFFFBFRLR
|
||||
FBBBFFFRRL
|
||||
FBBFFFFRLR
|
||||
FFFFBBFRLL
|
||||
FBBBFBFLRL
|
||||
BBFFFBFRLR
|
||||
BFBBFFFLLR
|
||||
BFFBFBFRRL
|
||||
FBBBFBBRLR
|
||||
FBBFBFBRRR
|
||||
FBFFBBFRLR
|
||||
FFBBFBBRRL
|
||||
FBFFFFBLLL
|
||||
FBFFBBFLLR
|
||||
BBFFBFBRLR
|
||||
FBFBBBFLLR
|
||||
FFFFFFFRRL
|
||||
FFBFBBBLLL
|
||||
FFFFBFBLRR
|
||||
BFFFBFFLRR
|
||||
FFFFBBBLLR
|
||||
FFBFBFBRLR
|
||||
BFFBBFFLLL
|
||||
BFBBBFBRLL
|
||||
BBFFFBFLLR
|
||||
FFFBFBFLLL
|
||||
FFFFBFFLRR
|
||||
FFBBBBBLLL
|
||||
FFFFFBFLLL
|
||||
FBFBFBBLRR
|
||||
BFFFFFBLLL
|
||||
BFBBFFBRLL
|
||||
FBFBFBBRLR
|
||||
FBFBFBBLRL
|
||||
FBBBBBBLRR
|
||||
FFBFFFBRRL
|
||||
FBBFBFFLLR
|
||||
FBBFFBBRRR
|
||||
BFBBBBFLLR
|
||||
BFFBBBBRRL
|
||||
FFFBFFFRRR
|
||||
BFBFBBFLLR
|
||||
FFBBFFBLRR
|
||||
BFFBFFFLLL
|
||||
FBBFBFBLLR
|
||||
FFBFFFBLLL
|
||||
FFFBFFFRRL
|
||||
FFBFFFFRRL
|
||||
FFFBBBFRLR
|
||||
FBFFBBBLRR
|
||||
FFBBFFBRLR
|
||||
FFFBBFBRRL
|
||||
BFFFFFBLRR
|
||||
BFBFBFFRLR
|
||||
FFBBFBBLLL
|
||||
FFFFFBBLLL
|
||||
FFFFBBBRRL
|
||||
BFFBFBFLRR
|
||||
FFBBFFBRLL
|
||||
FFBFBFBRRL
|
||||
BFBFFFFLLR
|
||||
BFFBBBBLRR
|
||||
FFFBBBBRRR
|
||||
FFBFBFBLRL
|
||||
FBFFFBBRRR
|
||||
FFBFFFFLLL
|
||||
FFBBBFFRLR
|
||||
FBFBBBBRLR
|
||||
FBBBBFFLLR
|
||||
BFFFBFBRRR
|
||||
FBBFBBBRRR
|
||||
FFBFFBFLLR
|
||||
FFBBBFBLRR
|
||||
BFBFFFFRLL
|
||||
BFBBBBBLLL
|
||||
BFBFFBFRRR
|
||||
BFFFBFBRRL
|
||||
FBFBBBFLLL
|
||||
FFBBBBFLLL
|
||||
BFFBBFFLLR
|
||||
BFBFFBFRLR
|
||||
FBBBBFBRRR
|
||||
FBFFFBFRRL
|
||||
FFBBBFBLLR
|
||||
FBFFBBFLRL
|
||||
BFFBFBBLLL
|
||||
FFFFFFBRLR
|
||||
FBBFBBBLLL
|
||||
FFFBFFBRLR
|
||||
BFBBBFBRRR
|
||||
BFFFFFFRLR
|
||||
BFFFBBFRLR
|
||||
FFBBBBFRRR
|
||||
FFFFFBBRLR
|
||||
BFBFFBBRRR
|
||||
FBBFBFFRRR
|
||||
FFBBBBFLRL
|
||||
FBBBFBBRRL
|
||||
FBBBBBBLRL
|
||||
FBBBBBFLRR
|
||||
BFBFFBFRRL
|
||||
FFFFBFBRLL
|
||||
FBBBBFFRLL
|
||||
FBBFFFBLLL
|
||||
BBFFFBFRRL
|
||||
FFBFFFBLRL
|
||||
FFFBFFFLLR
|
||||
FFBFFFBLLR
|
||||
BFFFBFBLLL
|
||||
BFBBBBFRRR
|
||||
BFBBFBBLRR
|
||||
BFBBFFBLLL
|
||||
FBFFBFFRRL
|
||||
FBBFBFFRRL
|
||||
FFFBBBBLLR
|
||||
FFBBBFFLLL
|
||||
BFFBBFBLRR
|
||||
FBFBFFBRLR
|
||||
FFBFFFBRRR
|
||||
FFFFBBBRRR
|
||||
BFBFFFFRLR
|
||||
FFBBBFFLLR
|
||||
FBBBFFFRLL
|
||||
FBBFFBBLRR
|
||||
FFBBBFFLRR
|
||||
FFBFBFBRLL
|
||||
BFBFBBFLRL
|
||||
BFBFFBFLRL
|
||||
FBBBFFFLLL
|
||||
FFBBBFFLRL
|
||||
FBFBBBBLLL
|
||||
FFBBBBFRLL
|
||||
FBBBFFFLRR
|
||||
FBFBBFFRLL
|
||||
BFBFFBBLRL
|
||||
FBBBFFBLLL
|
||||
BBFFBFBLLR
|
||||
FBBBFBBRRR
|
||||
BBFFFFBRLL
|
||||
FFFBFBBLLR
|
||||
BFBFBBBRRL
|
||||
BBFFFFFRRR
|
||||
BFFFFFFLLR
|
||||
FFBFFFFRLL
|
||||
FBBFFFFLRL
|
||||
FFFBBBFLRR
|
||||
FFBFBBFLLR
|
||||
BFBBFBFLRL
|
||||
FFBFBBBLLR
|
||||
BFFFFFBRRR
|
||||
BFBBBBBRRL
|
||||
BFFBFFFLLR
|
||||
BFBBFFFRRL
|
||||
FFFBFBBLRL
|
||||
FBBBBBBRRR
|
||||
FFFFBFBLLL
|
||||
FFBBBFFRRR
|
||||
BFFFFBFRRR
|
||||
FFFFFFBRLL
|
||||
FFFFFBFLLR
|
||||
FFBFBBFLRL
|
||||
BFFFFBBRRL
|
||||
BFBFBBFLRR
|
||||
FBFBFBFRRR
|
||||
FBFFBFFRLL
|
||||
FFFFBBBRLR
|
||||
BFBBFFBRLR
|
||||
BFBFBFFRRR
|
||||
FFBFFFBRLR
|
||||
FBBFBBBLRR
|
||||
FBFFFBBLLR
|
||||
FFFBBFFLLR
|
||||
FBBFBFFLRL
|
||||
BFFFFBFRLL
|
||||
BFFFBBBRRR
|
||||
FBFFFFFLLR
|
||||
FFBBBBBLLR
|
||||
FBFFFFFRRR
|
||||
FBFBFBBRLL
|
||||
BBFFFFBRRR
|
||||
BFFFBFBLRR
|
||||
BFFFBFBLRL
|
||||
BFFFBFFRLR
|
||||
FFFBFBBRLL
|
||||
BFBFFFBRRR
|
||||
FFBFFBFRRR
|
||||
BFBFBFFRLL
|
||||
BFBBBBFLLL
|
||||
FBBFFFBRLR
|
||||
BBFFBFBRLL
|
||||
FFBFFBFRRL
|
||||
BFFBBBBLLL
|
||||
BFBFFFBLRL
|
||||
BFBBFFFRLR
|
||||
FBBBBBFLRL
|
||||
FFFFBBBLRL
|
||||
FFFBBFBRRR
|
||||
BFFBFBFRRR
|
||||
FBFFFFBRLL
|
||||
FBFFBBBRRL
|
||||
FFBFBBFLLL
|
||||
FFFFBBFRRL
|
||||
FBFFBFFRLR
|
||||
BFBFFBBRRL
|
||||
FFFFFFBLLL
|
||||
BFBFFBBRLR
|
||||
FBBBFFBLRL
|
||||
BFFBBBBRLR
|
||||
BBFFFFBLLL
|
||||
FBFFFBFRLR
|
||||
FBBBBFFLLL
|
||||
BBFFFBBRLR
|
||||
FFFBBBFRRL
|
||||
BFBFBFBLRL
|
||||
FFFFFBBRRL
|
||||
BFBFBFBLLL
|
||||
FFFBFBBRLR
|
||||
FBBFFBBLLL
|
||||
FFBBBBBRRR
|
||||
BFFFBBFLLL
|
||||
BFBFBFBRRR
|
||||
BFFBFBBLRL
|
||||
FFBBFFFLLR
|
||||
BFFBBFFRRL
|
||||
BFFBBFBLRL
|
||||
FBFFFFBRRR
|
||||
FBBBFFBRLL
|
||||
FFFBFFFRLR
|
||||
BFBFFBBLRR
|
||||
FFBBFBBRRR
|
||||
FFBBBFBRLR
|
||||
FFBBFFBRRL
|
||||
BFBBFFBLRR
|
||||
FBFBFFBRRR
|
||||
BFBBFFFRRR
|
||||
FBBBBFFLRR
|
||||
BFFFFBFLLL
|
||||
FBFFFFBRRL
|
||||
FFFBFFBRLL
|
||||
BFFFBBBRLR
|
||||
FBFBFFFLRL
|
||||
FFBFBFFRLL
|
||||
FFBBFFFRRR
|
||||
BFBBBBFRLL
|
||||
BBFFBFFLLL
|
||||
FFBBBBFLRR
|
||||
FFBFFBBLLL
|
||||
FBFFBFBLRR
|
||||
FFFBBFFRLL
|
||||
17
2020/Day5/main.py
Normal file
17
2020/Day5/main.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
if __name__ == '__main__':
|
||||
highest = 0
|
||||
with open("input.txt", "r") as f:
|
||||
raw = f.read().split("\n")
|
||||
|
||||
seatIDs = []
|
||||
|
||||
for less in raw:
|
||||
row = int(less[:7].replace("F", "0").replace("B", "1"), 2)
|
||||
seatnum = int(less[-3:].replace("L", "0").replace("R", "1"), 2)
|
||||
seatID = row*8+seatnum
|
||||
seatIDs.append(seatID)
|
||||
|
||||
seatIDs = sorted(seatIDs)
|
||||
|
||||
mySeat = set(range(seatIDs[0], seatIDs[-1])) - set(seatIDs)
|
||||
print(mySeat)
|
||||
2178
2020/Day6/input.txt
Normal file
2178
2020/Day6/input.txt
Normal file
File diff suppressed because it is too large
Load diff
25
2020/Day6/main.py
Normal file
25
2020/Day6/main.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
if __name__ == '__main__':
|
||||
with open("input.txt") as f:
|
||||
raw = f.read().split("\n\n")
|
||||
|
||||
groups = []
|
||||
for i in raw:
|
||||
groups.append(i.split("\n"))
|
||||
|
||||
counter = 0
|
||||
people = 0
|
||||
answer = 0
|
||||
|
||||
for group in groups:
|
||||
curransw = []
|
||||
people = 0
|
||||
for answergroup in group:
|
||||
people += 1
|
||||
for answer in answergroup:
|
||||
curransw.append(answer)
|
||||
|
||||
if curransw.count(answer) == people:
|
||||
counter += 1
|
||||
|
||||
|
||||
print(counter)
|
||||
594
2020/Day7/input.txt
Normal file
594
2020/Day7/input.txt
Normal file
|
|
@ -0,0 +1,594 @@
|
|||
vibrant salmon bags contain 1 vibrant gold bag, 2 wavy aqua bags, 1 dotted crimson bag.
|
||||
dotted plum bags contain 3 wavy cyan bags.
|
||||
muted salmon bags contain 2 pale purple bags, 3 dull orange bags, 2 dotted lime bags, 3 clear crimson bags.
|
||||
wavy green bags contain 1 plaid crimson bag.
|
||||
light salmon bags contain 3 posh lime bags, 1 plaid plum bag, 3 faded yellow bags, 4 clear fuchsia bags.
|
||||
dim violet bags contain 4 drab tan bags, 4 drab violet bags, 2 faded coral bags, 4 dark white bags.
|
||||
dim black bags contain 4 posh lime bags.
|
||||
drab indigo bags contain 4 light aqua bags, 2 light white bags, 4 clear plum bags.
|
||||
clear purple bags contain 4 drab olive bags, 2 vibrant chartreuse bags.
|
||||
wavy indigo bags contain 3 clear maroon bags, 4 striped blue bags, 2 wavy gray bags, 2 dim magenta bags.
|
||||
drab olive bags contain 2 shiny salmon bags, 4 mirrored white bags, 4 mirrored fuchsia bags.
|
||||
plaid crimson bags contain 2 dull chartreuse bags, 4 striped maroon bags, 4 dull crimson bags, 4 plaid red bags.
|
||||
pale lavender bags contain 4 dotted tan bags, 5 striped olive bags.
|
||||
vibrant maroon bags contain 2 faded plum bags, 4 wavy aqua bags, 5 drab lavender bags, 4 light lavender bags.
|
||||
wavy coral bags contain 5 drab purple bags.
|
||||
drab salmon bags contain 4 shiny tan bags, 2 shiny white bags.
|
||||
light green bags contain 5 dim turquoise bags, 4 striped crimson bags, 5 dim salmon bags, 3 clear gray bags.
|
||||
dark indigo bags contain 5 shiny crimson bags.
|
||||
dark blue bags contain 3 drab indigo bags, 2 shiny beige bags, 2 shiny coral bags.
|
||||
shiny cyan bags contain 2 striped aqua bags, 2 drab turquoise bags, 5 light purple bags.
|
||||
pale cyan bags contain 2 muted violet bags, 2 clear beige bags, 1 clear indigo bag, 5 striped turquoise bags.
|
||||
muted lime bags contain 5 drab silver bags.
|
||||
shiny brown bags contain 4 clear purple bags, 5 striped chartreuse bags, 5 pale lavender bags.
|
||||
muted purple bags contain 4 dark purple bags, 2 dull crimson bags.
|
||||
plaid turquoise bags contain 2 clear gray bags, 4 clear magenta bags, 4 dull bronze bags.
|
||||
clear cyan bags contain 3 dotted plum bags, 3 shiny coral bags.
|
||||
shiny violet bags contain 3 drab chartreuse bags, 1 pale aqua bag, 3 bright aqua bags.
|
||||
wavy tan bags contain 5 dark magenta bags, 4 dull beige bags, 1 wavy cyan bag.
|
||||
mirrored lime bags contain 2 clear plum bags, 3 dark bronze bags, 5 faded turquoise bags, 5 plaid crimson bags.
|
||||
wavy purple bags contain 3 dark bronze bags, 2 bright bronze bags.
|
||||
plaid plum bags contain 5 muted tan bags, 1 drab teal bag, 2 dark purple bags, 1 dotted blue bag.
|
||||
dotted cyan bags contain 4 vibrant fuchsia bags, 3 muted plum bags.
|
||||
striped white bags contain 3 faded salmon bags, 4 plaid cyan bags, 5 wavy gray bags.
|
||||
posh black bags contain 2 dotted blue bags, 3 muted crimson bags.
|
||||
dotted bronze bags contain 2 posh tan bags.
|
||||
muted gray bags contain 2 posh green bags.
|
||||
plaid violet bags contain 4 muted orange bags.
|
||||
muted green bags contain 3 drab silver bags, 2 mirrored maroon bags, 3 dark teal bags.
|
||||
dotted tan bags contain 3 pale black bags.
|
||||
dim beige bags contain 4 light plum bags, 4 posh blue bags, 4 dotted purple bags.
|
||||
posh magenta bags contain 2 clear purple bags, 4 posh aqua bags.
|
||||
bright coral bags contain 5 light bronze bags, 2 vibrant crimson bags, 4 dark gold bags.
|
||||
pale bronze bags contain 1 striped orange bag.
|
||||
dim lime bags contain 3 dim green bags.
|
||||
plaid green bags contain 2 faded brown bags, 3 faded bronze bags, 3 pale green bags, 5 plaid magenta bags.
|
||||
vibrant cyan bags contain 5 pale black bags, 5 vibrant violet bags, 1 mirrored red bag.
|
||||
dotted fuchsia bags contain 3 dull crimson bags, 2 wavy silver bags, 4 muted purple bags.
|
||||
dim red bags contain 2 clear indigo bags, 5 dotted yellow bags.
|
||||
faded black bags contain 4 bright fuchsia bags.
|
||||
faded chartreuse bags contain 4 striped orange bags.
|
||||
plaid blue bags contain 5 dim gray bags, 2 pale salmon bags, 2 muted orange bags.
|
||||
plaid teal bags contain 5 bright lavender bags.
|
||||
drab magenta bags contain 2 dim crimson bags, 1 bright fuchsia bag.
|
||||
clear violet bags contain 3 mirrored white bags, 5 faded lime bags, 2 light olive bags, 1 dotted turquoise bag.
|
||||
posh tan bags contain 3 posh orange bags, 1 vibrant purple bag, 4 posh gray bags, 2 mirrored fuchsia bags.
|
||||
posh red bags contain 5 mirrored red bags.
|
||||
striped lavender bags contain 5 dotted crimson bags, 1 dotted purple bag.
|
||||
dull salmon bags contain 1 wavy black bag, 2 dull lime bags, 3 bright plum bags, 2 dark gray bags.
|
||||
light tan bags contain 3 wavy violet bags, 1 shiny olive bag, 5 bright brown bags.
|
||||
pale orange bags contain 5 vibrant orange bags, 3 wavy black bags.
|
||||
mirrored green bags contain 1 dark tan bag.
|
||||
plaid gray bags contain 4 muted magenta bags.
|
||||
dim maroon bags contain 3 light magenta bags, 4 dull red bags.
|
||||
dull cyan bags contain 1 wavy blue bag, 1 dark chartreuse bag.
|
||||
mirrored blue bags contain 4 dark cyan bags, 4 muted magenta bags, 2 striped olive bags, 1 posh gold bag.
|
||||
plaid purple bags contain 1 shiny orange bag, 5 plaid coral bags, 4 dim red bags, 5 faded aqua bags.
|
||||
vibrant magenta bags contain 5 posh aqua bags, 5 shiny chartreuse bags, 4 dark teal bags.
|
||||
bright indigo bags contain 1 dark bronze bag.
|
||||
bright yellow bags contain 4 muted lime bags, 1 drab maroon bag.
|
||||
clear gold bags contain 2 striped blue bags, 3 clear green bags, 4 drab indigo bags.
|
||||
wavy red bags contain 5 faded fuchsia bags, 5 mirrored indigo bags.
|
||||
dark coral bags contain 3 drab aqua bags, 5 bright fuchsia bags.
|
||||
striped teal bags contain 1 clear red bag, 3 drab magenta bags, 4 dim green bags, 2 dark fuchsia bags.
|
||||
pale salmon bags contain 1 muted gray bag, 4 dotted lavender bags, 3 dark maroon bags, 4 plaid plum bags.
|
||||
dull plum bags contain 3 dim black bags, 5 shiny aqua bags, 3 pale teal bags, 4 clear purple bags.
|
||||
plaid indigo bags contain 4 drab maroon bags, 2 shiny chartreuse bags, 4 shiny yellow bags, 1 pale violet bag.
|
||||
shiny orange bags contain 5 bright silver bags, 2 light olive bags, 5 light beige bags.
|
||||
dotted salmon bags contain 4 posh chartreuse bags, 4 light crimson bags, 5 muted yellow bags.
|
||||
vibrant aqua bags contain 2 dull brown bags.
|
||||
shiny bronze bags contain 1 mirrored teal bag, 2 drab tomato bags.
|
||||
dark black bags contain 5 muted red bags, 5 mirrored crimson bags.
|
||||
muted bronze bags contain 3 clear tomato bags, 1 vibrant purple bag.
|
||||
faded beige bags contain 1 shiny blue bag, 5 plaid lime bags.
|
||||
pale green bags contain 2 pale crimson bags, 4 muted cyan bags.
|
||||
vibrant bronze bags contain 1 bright lavender bag.
|
||||
posh salmon bags contain 1 clear green bag, 2 plaid yellow bags, 3 bright orange bags.
|
||||
dull yellow bags contain 1 clear plum bag, 2 dim bronze bags.
|
||||
mirrored indigo bags contain 5 dark tomato bags, 5 pale coral bags, 5 light magenta bags, 5 striped turquoise bags.
|
||||
muted chartreuse bags contain 3 dark tan bags, 4 dotted teal bags.
|
||||
drab bronze bags contain 3 pale lavender bags, 1 bright salmon bag, 4 plaid red bags.
|
||||
dim cyan bags contain 1 bright plum bag.
|
||||
drab purple bags contain 1 dim fuchsia bag, 4 mirrored turquoise bags, 5 striped blue bags.
|
||||
pale violet bags contain 5 posh brown bags, 5 striped plum bags, 1 dotted indigo bag.
|
||||
wavy maroon bags contain 3 shiny blue bags, 3 wavy cyan bags, 1 faded purple bag, 4 posh lime bags.
|
||||
vibrant coral bags contain 3 shiny turquoise bags, 4 mirrored maroon bags.
|
||||
vibrant lavender bags contain 2 drab turquoise bags, 2 clear red bags.
|
||||
striped fuchsia bags contain 4 dotted tan bags, 4 posh silver bags, 4 clear maroon bags, 5 wavy fuchsia bags.
|
||||
muted lavender bags contain 2 pale aqua bags, 2 bright green bags, 5 posh beige bags.
|
||||
posh tomato bags contain 2 vibrant bronze bags, 3 light brown bags, 5 posh indigo bags.
|
||||
dull lavender bags contain 2 wavy olive bags.
|
||||
mirrored violet bags contain 5 wavy violet bags, 2 posh cyan bags, 2 dull olive bags, 3 drab yellow bags.
|
||||
mirrored chartreuse bags contain 2 shiny salmon bags, 5 dark purple bags, 2 posh lime bags.
|
||||
dim brown bags contain 4 clear red bags, 1 drab blue bag, 1 pale silver bag, 5 dark gray bags.
|
||||
striped magenta bags contain 1 light orange bag, 4 muted beige bags.
|
||||
light red bags contain 3 shiny yellow bags, 3 faded tan bags, 3 vibrant lime bags, 3 muted coral bags.
|
||||
muted olive bags contain 4 drab coral bags, 5 light salmon bags, 1 vibrant violet bag.
|
||||
clear silver bags contain 1 posh aqua bag, 1 drab teal bag, 4 dark orange bags.
|
||||
faded orange bags contain 4 vibrant purple bags, 4 wavy cyan bags, 1 drab brown bag.
|
||||
mirrored crimson bags contain 5 light aqua bags, 1 wavy olive bag, 2 vibrant lime bags.
|
||||
shiny plum bags contain 2 shiny maroon bags, 3 dark red bags.
|
||||
faded green bags contain 3 striped turquoise bags.
|
||||
bright orange bags contain 1 dull crimson bag, 1 pale lavender bag, 5 shiny aqua bags.
|
||||
dim gray bags contain 2 drab indigo bags, 5 dim turquoise bags.
|
||||
mirrored plum bags contain 1 vibrant red bag, 4 dotted purple bags.
|
||||
posh gold bags contain 4 bright red bags.
|
||||
posh silver bags contain 3 drab coral bags, 1 faded tan bag, 1 bright silver bag, 1 shiny blue bag.
|
||||
dull lime bags contain 5 muted tan bags, 4 mirrored cyan bags.
|
||||
faded turquoise bags contain 2 pale teal bags, 2 bright green bags.
|
||||
bright salmon bags contain 1 dim white bag, 2 clear tomato bags, 1 bright aqua bag.
|
||||
dim gold bags contain 3 mirrored turquoise bags, 5 wavy tomato bags.
|
||||
dull fuchsia bags contain 2 pale beige bags, 1 dotted yellow bag.
|
||||
dark beige bags contain 2 pale magenta bags.
|
||||
dotted maroon bags contain 2 dark tomato bags, 2 light gray bags, 3 faded teal bags, 1 clear gray bag.
|
||||
muted white bags contain 3 dull turquoise bags, 5 dark bronze bags, 1 light olive bag, 3 clear bronze bags.
|
||||
faded blue bags contain 1 dark chartreuse bag, 3 pale aqua bags, 5 faded crimson bags.
|
||||
clear aqua bags contain 3 vibrant olive bags, 5 clear crimson bags.
|
||||
faded cyan bags contain 1 vibrant blue bag, 1 light magenta bag.
|
||||
shiny aqua bags contain 1 clear green bag.
|
||||
bright gray bags contain 2 dim fuchsia bags, 1 striped chartreuse bag, 2 clear aqua bags, 2 dull olive bags.
|
||||
bright white bags contain 2 light purple bags, 5 bright aqua bags.
|
||||
bright lime bags contain 1 pale orange bag, 5 plaid magenta bags, 4 mirrored maroon bags.
|
||||
dark lavender bags contain 5 mirrored bronze bags, 4 dotted aqua bags.
|
||||
striped chartreuse bags contain 3 striped indigo bags, 2 faded plum bags, 4 clear gray bags.
|
||||
muted magenta bags contain 3 clear red bags, 3 dull crimson bags, 1 clear aqua bag, 4 faded tomato bags.
|
||||
clear magenta bags contain 2 striped cyan bags, 5 vibrant lime bags, 4 striped salmon bags.
|
||||
pale yellow bags contain 3 faded fuchsia bags, 2 dotted lime bags, 5 pale gold bags, 1 plaid tomato bag.
|
||||
dull teal bags contain 4 dim green bags, 1 drab maroon bag, 2 dim crimson bags.
|
||||
pale brown bags contain 5 drab orange bags, 2 dotted purple bags, 3 plaid olive bags, 3 pale black bags.
|
||||
posh blue bags contain 4 faded purple bags, 4 drab turquoise bags.
|
||||
pale olive bags contain 5 muted silver bags, 3 mirrored plum bags, 4 vibrant lime bags, 5 striped olive bags.
|
||||
plaid black bags contain 3 posh yellow bags.
|
||||
striped tomato bags contain 4 faded blue bags, 2 shiny magenta bags.
|
||||
wavy tomato bags contain 1 pale gold bag, 2 dim magenta bags.
|
||||
faded plum bags contain 3 light violet bags, 3 posh beige bags, 3 striped aqua bags, 4 dim magenta bags.
|
||||
vibrant turquoise bags contain 3 muted silver bags, 5 dotted black bags.
|
||||
dull white bags contain 5 dim gray bags, 1 faded crimson bag.
|
||||
faded purple bags contain 1 vibrant orange bag, 4 pale crimson bags, 5 shiny blue bags, 1 light gold bag.
|
||||
clear white bags contain 1 striped orange bag, 3 pale coral bags, 5 plaid chartreuse bags.
|
||||
striped maroon bags contain 2 wavy olive bags.
|
||||
light tomato bags contain 2 pale crimson bags, 3 bright fuchsia bags, 2 pale salmon bags, 3 pale olive bags.
|
||||
drab tomato bags contain 1 pale olive bag.
|
||||
dark aqua bags contain 1 shiny magenta bag, 4 faded lime bags, 4 faded gold bags.
|
||||
plaid bronze bags contain 2 pale purple bags.
|
||||
dark plum bags contain 3 wavy brown bags, 1 bright salmon bag.
|
||||
dark purple bags contain 4 dotted red bags.
|
||||
light teal bags contain 1 vibrant indigo bag, 5 wavy olive bags, 4 clear maroon bags, 1 light silver bag.
|
||||
drab fuchsia bags contain 3 faded turquoise bags, 5 dim yellow bags.
|
||||
light turquoise bags contain 1 dotted blue bag, 4 mirrored tomato bags.
|
||||
clear maroon bags contain 4 mirrored green bags.
|
||||
posh maroon bags contain 3 dim black bags, 3 bright gold bags, 3 mirrored white bags, 1 clear lavender bag.
|
||||
dotted blue bags contain 2 wavy maroon bags.
|
||||
bright tan bags contain 4 faded turquoise bags, 5 drab coral bags, 5 dull red bags, 2 dim gray bags.
|
||||
dark salmon bags contain 4 clear fuchsia bags, 5 mirrored red bags.
|
||||
mirrored fuchsia bags contain 4 bright tomato bags, 3 vibrant orange bags.
|
||||
vibrant green bags contain 1 clear lavender bag.
|
||||
dim white bags contain 5 dull red bags.
|
||||
light white bags contain 3 dark purple bags, 1 mirrored fuchsia bag, 1 plaid gold bag, 1 posh lime bag.
|
||||
dark turquoise bags contain 3 striped green bags, 1 dull gold bag, 2 pale gray bags.
|
||||
light purple bags contain 5 muted brown bags, 5 muted purple bags, 4 dull yellow bags, 5 vibrant gold bags.
|
||||
posh lavender bags contain 5 posh yellow bags, 4 plaid plum bags, 1 dark fuchsia bag, 1 bright maroon bag.
|
||||
posh crimson bags contain 1 vibrant gold bag, 5 clear green bags, 2 posh chartreuse bags.
|
||||
wavy lime bags contain 5 mirrored beige bags.
|
||||
wavy black bags contain 1 plaid orange bag, 4 shiny green bags, 3 shiny blue bags, 4 muted red bags.
|
||||
muted red bags contain 4 vibrant lime bags, 2 drab black bags, 4 vibrant red bags, 5 faded beige bags.
|
||||
vibrant gold bags contain 2 bright silver bags, 4 faded teal bags, 2 vibrant orange bags, 3 striped salmon bags.
|
||||
shiny crimson bags contain 2 bright yellow bags.
|
||||
muted turquoise bags contain 5 bright plum bags.
|
||||
posh orange bags contain 4 vibrant yellow bags, 5 clear crimson bags.
|
||||
wavy aqua bags contain 5 shiny green bags, 5 bright fuchsia bags, 4 muted fuchsia bags.
|
||||
clear green bags contain 4 dotted plum bags, 2 vibrant olive bags, 5 pale beige bags.
|
||||
pale aqua bags contain 3 dark tomato bags, 5 posh lime bags.
|
||||
drab maroon bags contain 5 bright magenta bags, 2 bright plum bags, 5 clear green bags, 3 faded tomato bags.
|
||||
vibrant plum bags contain 3 light crimson bags, 5 dotted silver bags, 5 mirrored red bags, 1 dotted turquoise bag.
|
||||
posh yellow bags contain 5 plaid lavender bags, 5 dim tomato bags.
|
||||
faded brown bags contain 1 striped orange bag, 5 wavy green bags.
|
||||
drab cyan bags contain 4 faded teal bags, 3 vibrant aqua bags, 2 light chartreuse bags, 3 dark orange bags.
|
||||
dark lime bags contain 4 vibrant blue bags.
|
||||
faded coral bags contain 4 wavy green bags, 4 mirrored gold bags, 3 striped fuchsia bags, 1 pale fuchsia bag.
|
||||
dark orange bags contain 1 dotted red bag, 2 vibrant red bags.
|
||||
wavy magenta bags contain 3 dull chartreuse bags, 2 dim maroon bags, 2 clear maroon bags.
|
||||
plaid coral bags contain 4 drab tan bags, 1 pale tan bag.
|
||||
mirrored salmon bags contain 1 muted bronze bag, 5 muted purple bags.
|
||||
dim tomato bags contain 2 drab silver bags, 4 mirrored purple bags, 1 dull olive bag, 5 dotted purple bags.
|
||||
wavy gold bags contain 3 dark crimson bags, 1 dim white bag.
|
||||
light fuchsia bags contain 3 mirrored green bags, 2 wavy fuchsia bags.
|
||||
pale tomato bags contain 4 clear purple bags, 5 faded brown bags, 4 light coral bags.
|
||||
faded yellow bags contain 5 wavy olive bags, 2 pale lavender bags, 4 bright plum bags.
|
||||
light violet bags contain 1 dotted red bag, 4 dim aqua bags.
|
||||
posh lime bags contain 2 pale crimson bags, 1 pale gold bag, 1 shiny blue bag, 4 muted gray bags.
|
||||
mirrored silver bags contain 4 striped bronze bags, 3 faded salmon bags, 3 drab green bags, 4 striped green bags.
|
||||
dark green bags contain 5 striped maroon bags, 3 dim olive bags, 4 vibrant chartreuse bags, 5 dim white bags.
|
||||
mirrored olive bags contain 2 dotted red bags, 5 dim white bags.
|
||||
dark teal bags contain 3 wavy olive bags, 3 pale crimson bags.
|
||||
pale tan bags contain 2 dark orange bags, 5 bright plum bags, 4 pale crimson bags.
|
||||
wavy plum bags contain 3 dull lime bags.
|
||||
light indigo bags contain 5 dark magenta bags.
|
||||
drab lime bags contain 1 bright fuchsia bag, 4 wavy brown bags.
|
||||
drab tan bags contain 3 bright tomato bags, 1 muted green bag.
|
||||
vibrant indigo bags contain 5 dull chartreuse bags, 5 clear aqua bags.
|
||||
dark bronze bags contain 3 dull red bags, 3 mirrored maroon bags, 1 muted green bag.
|
||||
shiny red bags contain 2 dark bronze bags, 4 faded magenta bags, 5 dull teal bags.
|
||||
shiny black bags contain 3 vibrant olive bags, 2 plaid lime bags, 5 shiny gold bags, 2 dotted plum bags.
|
||||
light gold bags contain 5 vibrant olive bags.
|
||||
light plum bags contain 5 clear gray bags, 5 dotted chartreuse bags, 4 plaid red bags, 1 plaid lime bag.
|
||||
bright violet bags contain 4 bright maroon bags, 5 posh red bags, 2 faded olive bags, 4 dim gray bags.
|
||||
faded red bags contain 4 drab maroon bags, 4 vibrant violet bags, 1 faded purple bag, 2 dotted black bags.
|
||||
muted orange bags contain 4 plaid chartreuse bags, 5 muted lavender bags, 2 faded purple bags.
|
||||
clear coral bags contain 2 drab teal bags, 5 bright turquoise bags.
|
||||
wavy orange bags contain 4 muted cyan bags, 3 light indigo bags, 5 bright black bags, 5 light salmon bags.
|
||||
faded fuchsia bags contain 3 pale gold bags, 3 faded salmon bags, 4 pale red bags.
|
||||
light brown bags contain 4 pale silver bags, 4 clear tan bags.
|
||||
shiny gray bags contain 3 muted teal bags, 1 bright purple bag, 2 bright olive bags, 4 mirrored green bags.
|
||||
bright brown bags contain 2 dark teal bags, 5 light plum bags, 2 plaid olive bags, 5 dark chartreuse bags.
|
||||
mirrored white bags contain 1 wavy gray bag, 3 bright tomato bags, 1 muted silver bag, 4 striped olive bags.
|
||||
pale magenta bags contain 1 clear gray bag, 1 muted gray bag, 1 wavy cyan bag, 4 dull brown bags.
|
||||
bright magenta bags contain 2 muted tan bags, 1 pale gold bag, 2 wavy cyan bags, 4 vibrant orange bags.
|
||||
clear teal bags contain 1 dark teal bag, 2 vibrant lime bags.
|
||||
light orange bags contain 3 light gold bags, 4 clear plum bags, 4 dotted indigo bags.
|
||||
plaid cyan bags contain 1 pale magenta bag.
|
||||
wavy chartreuse bags contain 2 posh green bags, 5 dotted purple bags, 2 dark tomato bags, 3 muted gray bags.
|
||||
light coral bags contain 5 clear gray bags, 2 posh purple bags, 2 mirrored violet bags.
|
||||
dull violet bags contain 3 dotted blue bags, 5 mirrored tomato bags, 1 dull chartreuse bag, 2 posh beige bags.
|
||||
bright tomato bags contain 3 vibrant red bags, 3 muted gray bags.
|
||||
mirrored magenta bags contain 4 wavy brown bags.
|
||||
muted indigo bags contain 4 wavy chartreuse bags, 3 vibrant indigo bags, 2 posh magenta bags, 1 plaid crimson bag.
|
||||
bright maroon bags contain 2 dull violet bags, 2 faded tan bags, 3 striped gray bags, 5 pale magenta bags.
|
||||
dark tomato bags contain no other bags.
|
||||
pale fuchsia bags contain 3 drab silver bags, 4 faded purple bags, 2 mirrored cyan bags, 5 dark bronze bags.
|
||||
dull black bags contain 1 dull indigo bag, 1 wavy brown bag, 5 striped gray bags.
|
||||
pale white bags contain 3 light gray bags, 2 plaid lavender bags, 1 wavy maroon bag.
|
||||
shiny turquoise bags contain 4 pale red bags.
|
||||
drab brown bags contain 5 mirrored plum bags, 4 dotted red bags.
|
||||
bright green bags contain 1 dull lime bag, 2 clear lavender bags.
|
||||
wavy blue bags contain 4 dotted purple bags.
|
||||
muted aqua bags contain 5 faded plum bags, 3 plaid plum bags, 4 dotted tan bags, 1 clear gray bag.
|
||||
clear yellow bags contain 4 dotted indigo bags, 3 vibrant aqua bags, 4 vibrant orange bags.
|
||||
mirrored gray bags contain 4 shiny crimson bags, 2 mirrored coral bags, 1 dotted tan bag, 4 posh cyan bags.
|
||||
dark maroon bags contain 1 dark salmon bag, 3 muted coral bags.
|
||||
posh plum bags contain 1 mirrored bronze bag, 4 plaid purple bags, 3 vibrant white bags.
|
||||
bright teal bags contain 2 pale aqua bags, 1 mirrored black bag.
|
||||
wavy teal bags contain 5 plaid tan bags, 3 dull black bags, 1 bright teal bag, 3 clear teal bags.
|
||||
dotted magenta bags contain 1 plaid plum bag, 5 plaid salmon bags, 3 light gold bags.
|
||||
faded tomato bags contain 1 dark bronze bag, 2 faded purple bags, 4 vibrant red bags, 4 pale lavender bags.
|
||||
dull blue bags contain 3 dotted bronze bags, 2 shiny olive bags, 3 muted gold bags.
|
||||
posh aqua bags contain 5 vibrant orange bags, 1 vibrant olive bag.
|
||||
mirrored black bags contain 3 dark teal bags, 4 plaid chartreuse bags, 2 light salmon bags, 2 vibrant white bags.
|
||||
wavy violet bags contain 5 vibrant indigo bags.
|
||||
vibrant blue bags contain 4 shiny olive bags, 4 light olive bags, 2 muted green bags.
|
||||
dotted green bags contain 3 shiny violet bags, 3 posh black bags, 3 dark lime bags.
|
||||
wavy cyan bags contain 2 muted gray bags, 3 vibrant olive bags, 4 striped olive bags, 4 drab silver bags.
|
||||
faded maroon bags contain 5 bright yellow bags, 2 bright tomato bags, 5 mirrored magenta bags.
|
||||
dull olive bags contain 1 bright plum bag, 2 pale crimson bags.
|
||||
clear lime bags contain 5 striped blue bags, 5 wavy blue bags, 3 drab tan bags, 1 shiny olive bag.
|
||||
striped yellow bags contain 1 mirrored red bag.
|
||||
plaid magenta bags contain 2 clear yellow bags, 1 pale coral bag, 3 muted bronze bags.
|
||||
light lime bags contain 1 dim turquoise bag.
|
||||
striped brown bags contain 3 mirrored brown bags, 4 clear cyan bags, 5 bright white bags, 1 muted maroon bag.
|
||||
dotted indigo bags contain 3 light olive bags, 1 dull chartreuse bag.
|
||||
shiny tan bags contain 2 dull lime bags, 5 shiny black bags, 5 dull teal bags.
|
||||
clear olive bags contain 5 drab coral bags, 4 striped aqua bags, 4 dotted lavender bags.
|
||||
plaid chartreuse bags contain 1 plaid red bag, 4 faded tomato bags.
|
||||
dotted olive bags contain 2 dull yellow bags.
|
||||
faded lime bags contain 5 dotted aqua bags, 4 shiny silver bags, 4 muted white bags.
|
||||
vibrant silver bags contain 4 dotted teal bags, 3 posh olive bags.
|
||||
striped beige bags contain 2 vibrant white bags, 3 dark gold bags, 4 posh violet bags, 4 bright chartreuse bags.
|
||||
dim plum bags contain 2 striped indigo bags, 2 vibrant gold bags.
|
||||
clear crimson bags contain 5 vibrant red bags.
|
||||
plaid maroon bags contain 4 clear crimson bags.
|
||||
drab coral bags contain 2 plaid plum bags.
|
||||
dull bronze bags contain 4 pale black bags, 1 dull tan bag, 5 dull cyan bags, 4 pale lavender bags.
|
||||
wavy bronze bags contain 4 posh coral bags, 2 bright silver bags.
|
||||
dull aqua bags contain 3 dotted orange bags, 3 pale teal bags.
|
||||
muted plum bags contain 1 light blue bag, 2 muted maroon bags, 4 dull olive bags.
|
||||
vibrant tan bags contain 4 drab teal bags.
|
||||
dull tomato bags contain 5 dull white bags.
|
||||
muted yellow bags contain 3 dark yellow bags, 5 faded beige bags.
|
||||
shiny white bags contain 4 bright silver bags.
|
||||
muted crimson bags contain 1 clear maroon bag.
|
||||
muted violet bags contain 3 dotted yellow bags, 1 light indigo bag, 4 mirrored black bags, 5 drab lime bags.
|
||||
posh white bags contain 3 faded brown bags, 2 dull yellow bags.
|
||||
wavy crimson bags contain 3 shiny black bags, 2 dotted blue bags, 4 dark maroon bags.
|
||||
clear salmon bags contain 1 mirrored magenta bag, 4 bright chartreuse bags, 5 vibrant black bags, 2 vibrant chartreuse bags.
|
||||
pale teal bags contain 5 mirrored white bags, 2 plaid orange bags, 4 muted lime bags.
|
||||
light aqua bags contain 2 shiny salmon bags, 3 dark tomato bags, 1 mirrored purple bag.
|
||||
clear beige bags contain 1 muted crimson bag.
|
||||
vibrant olive bags contain 5 dark tomato bags, 1 pale gold bag, 4 muted tan bags.
|
||||
plaid brown bags contain 3 mirrored lavender bags, 1 muted crimson bag, 3 muted green bags, 1 bright lavender bag.
|
||||
dim magenta bags contain 4 pale fuchsia bags, 3 drab black bags, 4 plaid orange bags.
|
||||
bright purple bags contain 3 muted gray bags, 3 pale coral bags.
|
||||
posh indigo bags contain 2 bright beige bags, 2 dim tomato bags.
|
||||
drab lavender bags contain 2 dotted chartreuse bags, 1 posh green bag, 3 light silver bags, 1 dotted black bag.
|
||||
pale crimson bags contain no other bags.
|
||||
posh gray bags contain 1 muted green bag.
|
||||
shiny lime bags contain 3 mirrored maroon bags, 1 posh crimson bag, 4 mirrored orange bags, 2 posh olive bags.
|
||||
muted beige bags contain 1 posh tan bag, 3 posh olive bags, 1 faded white bag, 2 posh green bags.
|
||||
light black bags contain 3 striped green bags, 2 pale salmon bags, 3 muted crimson bags.
|
||||
dark gold bags contain 5 striped maroon bags, 2 pale fuchsia bags, 3 light gold bags.
|
||||
light bronze bags contain 2 clear purple bags, 4 dim crimson bags.
|
||||
muted blue bags contain 1 faded gray bag, 4 muted salmon bags, 5 dull bronze bags.
|
||||
vibrant orange bags contain no other bags.
|
||||
dim lavender bags contain 1 vibrant indigo bag.
|
||||
posh fuchsia bags contain 3 clear fuchsia bags, 2 shiny green bags, 3 plaid plum bags.
|
||||
dim tan bags contain 5 pale plum bags, 3 posh gray bags, 1 clear yellow bag.
|
||||
pale lime bags contain no other bags.
|
||||
striped blue bags contain 5 pale black bags.
|
||||
shiny tomato bags contain 1 dim fuchsia bag, 5 faded blue bags, 3 muted brown bags, 3 mirrored salmon bags.
|
||||
dotted orange bags contain 4 bright tomato bags, 1 light silver bag.
|
||||
muted tan bags contain no other bags.
|
||||
pale black bags contain 2 dull brown bags, 4 mirrored chartreuse bags, 2 dim aqua bags.
|
||||
shiny purple bags contain 3 dotted indigo bags, 5 vibrant gold bags, 2 light chartreuse bags, 4 clear magenta bags.
|
||||
dull brown bags contain 2 bright beige bags, 4 vibrant orange bags, 2 bright tomato bags, 4 clear lavender bags.
|
||||
plaid aqua bags contain 3 plaid indigo bags.
|
||||
dark olive bags contain 1 pale plum bag, 4 dim maroon bags.
|
||||
dark silver bags contain 3 shiny blue bags, 2 muted gray bags, 4 drab coral bags.
|
||||
clear turquoise bags contain 5 light violet bags, 3 drab yellow bags.
|
||||
wavy brown bags contain 3 shiny coral bags, 3 shiny salmon bags, 1 drab magenta bag.
|
||||
dim indigo bags contain 5 bright green bags.
|
||||
mirrored gold bags contain 1 plaid magenta bag, 2 plaid gold bags, 4 light turquoise bags.
|
||||
drab red bags contain 3 mirrored bronze bags.
|
||||
faded bronze bags contain 1 vibrant aqua bag, 2 clear tomato bags, 2 dull tan bags.
|
||||
bright lavender bags contain 4 drab coral bags, 1 bright green bag.
|
||||
wavy lavender bags contain 2 wavy green bags, 4 drab silver bags, 5 light turquoise bags.
|
||||
wavy salmon bags contain 2 dotted gray bags, 4 bright chartreuse bags, 4 striped gray bags.
|
||||
dotted yellow bags contain 4 dark salmon bags, 1 posh tan bag, 4 drab tomato bags, 4 vibrant chartreuse bags.
|
||||
dull turquoise bags contain 5 drab silver bags, 1 dark orange bag.
|
||||
pale gray bags contain 4 dull aqua bags, 4 faded gold bags, 2 mirrored orange bags, 2 dim magenta bags.
|
||||
dark red bags contain 2 bright gray bags, 4 bright black bags.
|
||||
dim fuchsia bags contain 3 bright magenta bags, 5 pale crimson bags.
|
||||
vibrant lime bags contain 2 wavy maroon bags, 2 pale magenta bags, 4 pale crimson bags, 3 drab orange bags.
|
||||
bright bronze bags contain 4 vibrant black bags, 3 drab fuchsia bags, 3 striped cyan bags, 3 dotted blue bags.
|
||||
muted coral bags contain 3 wavy white bags, 1 plaid tan bag.
|
||||
wavy white bags contain 2 drab maroon bags.
|
||||
pale coral bags contain 3 dotted bronze bags, 1 dull gold bag.
|
||||
drab white bags contain 3 drab silver bags, 3 bright tomato bags, 1 bright silver bag.
|
||||
light olive bags contain 3 muted tan bags, 2 mirrored tomato bags.
|
||||
mirrored tomato bags contain 2 dark tomato bags, 3 shiny gold bags.
|
||||
light crimson bags contain 4 clear magenta bags, 2 plaid coral bags, 5 dull chartreuse bags, 5 dark teal bags.
|
||||
bright cyan bags contain 1 clear chartreuse bag, 1 striped brown bag, 5 light tomato bags, 4 dark coral bags.
|
||||
vibrant fuchsia bags contain 3 dull white bags, 1 dim purple bag, 5 shiny yellow bags.
|
||||
drab gold bags contain 5 wavy chartreuse bags.
|
||||
plaid yellow bags contain 4 faded plum bags, 1 faded indigo bag, 2 drab purple bags, 1 light purple bag.
|
||||
bright black bags contain 2 clear yellow bags, 1 dotted red bag, 4 dim white bags.
|
||||
pale maroon bags contain 2 vibrant tomato bags, 3 mirrored tomato bags.
|
||||
wavy gray bags contain 2 wavy cyan bags, 2 dark tomato bags, 4 vibrant orange bags, 5 pale silver bags.
|
||||
faded salmon bags contain 4 bright plum bags.
|
||||
shiny teal bags contain 4 dark magenta bags.
|
||||
dim bronze bags contain 5 striped olive bags, 5 dotted plum bags, 4 dark purple bags.
|
||||
dotted lavender bags contain 4 striped indigo bags, 2 mirrored red bags, 2 bright chartreuse bags, 4 bright teal bags.
|
||||
plaid beige bags contain 4 vibrant green bags, 3 striped violet bags, 5 vibrant blue bags.
|
||||
dull purple bags contain 1 dark beige bag, 1 drab silver bag, 4 faded fuchsia bags, 2 vibrant olive bags.
|
||||
bright olive bags contain 3 faded salmon bags, 1 wavy magenta bag, 5 dim yellow bags.
|
||||
mirrored maroon bags contain 3 bright magenta bags, 5 pale lime bags, 3 striped olive bags.
|
||||
clear brown bags contain 2 mirrored orange bags, 5 bright cyan bags.
|
||||
drab teal bags contain 3 dull olive bags.
|
||||
clear red bags contain 1 bright maroon bag.
|
||||
vibrant black bags contain 4 pale fuchsia bags, 3 clear lavender bags, 2 shiny blue bags, 3 dotted blue bags.
|
||||
faded white bags contain 3 wavy coral bags, 4 faded yellow bags, 5 shiny olive bags, 1 plaid orange bag.
|
||||
dotted aqua bags contain 1 wavy white bag, 3 dotted blue bags, 5 pale lavender bags, 4 clear aqua bags.
|
||||
pale blue bags contain 3 dim salmon bags, 3 muted cyan bags, 5 pale fuchsia bags.
|
||||
dim turquoise bags contain 4 vibrant chartreuse bags, 2 dark silver bags, 3 pale gold bags.
|
||||
dull magenta bags contain 3 muted salmon bags, 4 dotted gray bags, 3 light salmon bags.
|
||||
dotted coral bags contain 2 mirrored tomato bags, 1 vibrant teal bag, 3 dull crimson bags.
|
||||
dull beige bags contain 2 faded fuchsia bags.
|
||||
shiny gold bags contain 4 bright beige bags, 3 dull crimson bags, 4 mirrored maroon bags, 3 bright tomato bags.
|
||||
pale indigo bags contain 2 dotted teal bags, 3 faded teal bags, 4 wavy indigo bags.
|
||||
shiny magenta bags contain 5 bright tomato bags, 5 dull lime bags, 5 mirrored bronze bags, 2 dim black bags.
|
||||
muted cyan bags contain 2 dark bronze bags, 5 drab silver bags, 4 dotted chartreuse bags.
|
||||
plaid orange bags contain 4 light plum bags, 5 shiny salmon bags, 5 posh beige bags.
|
||||
shiny green bags contain 5 dotted tan bags, 5 mirrored olive bags, 1 dark teal bag.
|
||||
dull maroon bags contain 1 striped black bag, 4 clear green bags.
|
||||
drab aqua bags contain 1 striped indigo bag, 3 vibrant white bags.
|
||||
bright gold bags contain 4 mirrored beige bags, 4 mirrored yellow bags.
|
||||
plaid tan bags contain 5 shiny aqua bags.
|
||||
striped plum bags contain 4 clear magenta bags, 2 dark gold bags.
|
||||
vibrant teal bags contain 1 dim aqua bag, 4 vibrant violet bags, 3 plaid olive bags, 1 mirrored olive bag.
|
||||
posh bronze bags contain 5 dark tomato bags, 5 shiny silver bags.
|
||||
dim orange bags contain 4 dull salmon bags.
|
||||
striped indigo bags contain 4 drab magenta bags.
|
||||
vibrant yellow bags contain 4 drab olive bags, 4 wavy olive bags, 2 dark teal bags, 2 faded purple bags.
|
||||
striped purple bags contain 5 pale red bags.
|
||||
dim coral bags contain 1 plaid maroon bag, 2 pale magenta bags, 1 pale indigo bag, 2 dotted turquoise bags.
|
||||
muted silver bags contain 4 mirrored turquoise bags.
|
||||
posh cyan bags contain 3 dotted purple bags.
|
||||
plaid lavender bags contain 3 muted gray bags, 1 light plum bag.
|
||||
faded tan bags contain 1 mirrored cyan bag, 2 plaid crimson bags, 5 mirrored maroon bags.
|
||||
clear lavender bags contain 4 pale gold bags, 1 posh lime bag, 4 pale crimson bags.
|
||||
dull gray bags contain 5 shiny crimson bags, 5 wavy cyan bags, 3 posh lavender bags.
|
||||
dull green bags contain 1 faded bronze bag, 3 vibrant indigo bags, 2 muted fuchsia bags, 4 dotted silver bags.
|
||||
dark magenta bags contain 3 wavy white bags, 3 plaid plum bags, 4 wavy lavender bags, 3 drab magenta bags.
|
||||
plaid red bags contain 1 bright turquoise bag.
|
||||
dull coral bags contain 4 clear tomato bags.
|
||||
posh turquoise bags contain 5 dull gold bags, 4 mirrored chartreuse bags.
|
||||
drab crimson bags contain 2 dull tomato bags, 5 posh orange bags, 5 shiny violet bags.
|
||||
clear tan bags contain 1 pale fuchsia bag, 4 light aqua bags, 3 shiny blue bags, 3 bright turquoise bags.
|
||||
dotted brown bags contain 4 drab magenta bags, 5 plaid crimson bags, 2 posh beige bags.
|
||||
light silver bags contain 3 mirrored green bags, 5 mirrored maroon bags, 5 shiny blue bags.
|
||||
dotted gold bags contain 2 dim magenta bags.
|
||||
drab yellow bags contain 5 pale purple bags.
|
||||
faded lavender bags contain 5 muted cyan bags.
|
||||
vibrant beige bags contain 4 clear turquoise bags, 2 dark fuchsia bags, 1 pale gray bag, 5 dim beige bags.
|
||||
clear fuchsia bags contain 1 pale fuchsia bag, 1 wavy turquoise bag, 5 faded gray bags.
|
||||
shiny chartreuse bags contain 4 vibrant green bags, 1 dotted teal bag.
|
||||
dim purple bags contain 1 bright turquoise bag.
|
||||
clear indigo bags contain 4 light white bags, 3 vibrant orange bags.
|
||||
wavy turquoise bags contain 5 bright magenta bags.
|
||||
vibrant chartreuse bags contain 4 mirrored chartreuse bags, 2 muted tan bags, 2 plaid lime bags, 3 striped olive bags.
|
||||
dark chartreuse bags contain 5 shiny blue bags.
|
||||
clear plum bags contain 3 pale lime bags.
|
||||
dotted tomato bags contain 5 bright red bags, 2 bright olive bags, 5 drab silver bags, 4 clear magenta bags.
|
||||
mirrored beige bags contain 4 light violet bags, 5 mirrored salmon bags, 4 dim yellow bags, 5 bright yellow bags.
|
||||
posh teal bags contain 2 plaid turquoise bags, 3 pale salmon bags, 1 striped plum bag.
|
||||
dull chartreuse bags contain 5 pale lavender bags, 1 bright turquoise bag, 3 pale beige bags.
|
||||
mirrored lavender bags contain 4 vibrant tomato bags, 2 plaid tan bags, 5 bright magenta bags.
|
||||
dark gray bags contain 5 wavy turquoise bags, 4 wavy gray bags, 4 dark bronze bags, 4 pale aqua bags.
|
||||
dark white bags contain 4 clear maroon bags, 2 vibrant olive bags, 1 dull lime bag, 1 faded lime bag.
|
||||
dull indigo bags contain 4 clear fuchsia bags, 3 dotted tan bags, 1 plaid cyan bag.
|
||||
striped tan bags contain 3 pale brown bags.
|
||||
dull gold bags contain 2 dark yellow bags, 3 dull olive bags.
|
||||
light lavender bags contain 2 plaid red bags, 5 dotted purple bags, 1 bright beige bag, 3 pale beige bags.
|
||||
faded teal bags contain 4 mirrored olive bags.
|
||||
plaid salmon bags contain 1 dark bronze bag, 5 pale yellow bags, 1 striped cyan bag, 2 muted cyan bags.
|
||||
dotted purple bags contain 1 bright turquoise bag, 1 posh green bag.
|
||||
dull silver bags contain 3 striped salmon bags, 4 posh violet bags, 4 striped orange bags.
|
||||
drab chartreuse bags contain 4 pale lavender bags.
|
||||
striped coral bags contain 5 bright gray bags, 4 dark teal bags, 5 dotted purple bags.
|
||||
wavy olive bags contain no other bags.
|
||||
plaid olive bags contain 1 pale black bag, 3 clear plum bags.
|
||||
drab black bags contain 3 striped olive bags, 2 mirrored chartreuse bags, 5 pale silver bags.
|
||||
striped lime bags contain 3 dark chartreuse bags, 5 pale silver bags, 2 plaid crimson bags, 4 clear fuchsia bags.
|
||||
drab beige bags contain 4 dim black bags, 4 striped black bags, 4 dull crimson bags, 5 dark gray bags.
|
||||
muted tomato bags contain 3 light bronze bags, 3 pale salmon bags, 2 vibrant chartreuse bags.
|
||||
bright fuchsia bags contain 5 drab orange bags, 3 pale black bags, 3 mirrored white bags, 5 faded tomato bags.
|
||||
vibrant gray bags contain 4 posh lime bags, 2 dark purple bags, 4 clear aqua bags.
|
||||
shiny yellow bags contain 5 bright beige bags, 2 vibrant red bags, 5 dim yellow bags, 2 vibrant yellow bags.
|
||||
posh coral bags contain 5 drab indigo bags.
|
||||
muted fuchsia bags contain 5 shiny silver bags, 2 dotted salmon bags, 1 muted tan bag.
|
||||
muted brown bags contain 4 clear maroon bags, 5 dim purple bags, 4 wavy maroon bags, 2 muted red bags.
|
||||
posh chartreuse bags contain 5 muted tan bags, 3 drab teal bags.
|
||||
vibrant brown bags contain 1 wavy bronze bag, 5 bright red bags, 4 muted fuchsia bags, 4 clear fuchsia bags.
|
||||
posh purple bags contain 2 drab turquoise bags, 5 striped blue bags, 1 muted cyan bag.
|
||||
plaid lime bags contain 3 muted gray bags, 5 vibrant red bags, 1 wavy gray bag, 1 pale silver bag.
|
||||
posh violet bags contain 2 faded crimson bags, 1 shiny olive bag, 3 bright magenta bags, 1 drab silver bag.
|
||||
striped gold bags contain 5 faded salmon bags, 2 drab bronze bags, 2 dark plum bags.
|
||||
striped gray bags contain 2 mirrored crimson bags, 5 faded beige bags, 1 dull red bag.
|
||||
dim blue bags contain 2 dark coral bags, 3 dim yellow bags, 1 dull salmon bag.
|
||||
bright silver bags contain 2 mirrored tomato bags, 3 bright plum bags, 4 pale lavender bags, 1 clear tomato bag.
|
||||
striped red bags contain 4 light yellow bags, 5 mirrored white bags, 5 plaid gold bags.
|
||||
shiny maroon bags contain 3 wavy cyan bags, 1 mirrored tomato bag, 1 mirrored coral bag.
|
||||
mirrored brown bags contain 2 mirrored olive bags, 3 mirrored green bags, 1 dim tomato bag.
|
||||
striped olive bags contain no other bags.
|
||||
striped violet bags contain 5 bright tomato bags.
|
||||
mirrored aqua bags contain 4 dark gray bags, 5 shiny blue bags, 2 pale silver bags.
|
||||
plaid white bags contain 3 dim maroon bags, 2 dim tan bags.
|
||||
drab orange bags contain 5 striped olive bags.
|
||||
dark brown bags contain 2 mirrored bronze bags, 5 clear maroon bags, 2 dull lime bags.
|
||||
dotted silver bags contain 1 dark gold bag, 1 drab black bag, 3 pale aqua bags.
|
||||
pale plum bags contain 5 striped maroon bags, 5 dotted purple bags, 4 shiny magenta bags.
|
||||
faded indigo bags contain 1 posh cyan bag, 5 bright green bags.
|
||||
mirrored teal bags contain 3 muted indigo bags, 4 clear fuchsia bags, 4 vibrant teal bags, 5 drab violet bags.
|
||||
shiny lavender bags contain 5 striped beige bags, 2 dull magenta bags, 4 clear tan bags.
|
||||
pale beige bags contain 5 mirrored maroon bags.
|
||||
striped bronze bags contain 1 pale orange bag, 5 shiny cyan bags, 5 plaid purple bags, 1 vibrant chartreuse bag.
|
||||
faded gold bags contain 3 pale brown bags, 2 dull violet bags, 2 clear maroon bags, 4 dull lime bags.
|
||||
clear tomato bags contain 4 vibrant orange bags, 3 bright tomato bags, 3 wavy chartreuse bags, 5 wavy olive bags.
|
||||
pale red bags contain 5 wavy blue bags, 5 dark purple bags, 1 bright tomato bag, 4 dark tan bags.
|
||||
vibrant red bags contain 5 wavy gray bags, 5 dark tomato bags.
|
||||
dim salmon bags contain 2 faded crimson bags.
|
||||
shiny blue bags contain 4 muted tan bags, 2 vibrant orange bags.
|
||||
vibrant white bags contain 3 mirrored cyan bags.
|
||||
dark violet bags contain 5 vibrant blue bags, 3 wavy tomato bags.
|
||||
pale gold bags contain no other bags.
|
||||
dim silver bags contain 4 drab tan bags, 4 pale silver bags, 5 clear bronze bags, 4 drab maroon bags.
|
||||
drab blue bags contain 5 vibrant indigo bags, 3 muted turquoise bags.
|
||||
drab plum bags contain 2 dim turquoise bags, 2 drab violet bags, 1 light gray bag, 3 clear tan bags.
|
||||
bright plum bags contain 3 wavy olive bags.
|
||||
dark fuchsia bags contain 4 dotted indigo bags, 3 dark brown bags, 1 clear white bag.
|
||||
bright turquoise bags contain 1 posh lime bag, 2 wavy olive bags, 1 pale crimson bag.
|
||||
dotted turquoise bags contain 3 faded plum bags, 1 bright tomato bag.
|
||||
shiny indigo bags contain 1 wavy chartreuse bag.
|
||||
dark yellow bags contain 2 light gold bags.
|
||||
posh olive bags contain 2 shiny indigo bags.
|
||||
light chartreuse bags contain 5 drab turquoise bags, 2 faded purple bags, 3 faded gray bags.
|
||||
vibrant tomato bags contain 3 light olive bags, 4 shiny purple bags.
|
||||
posh brown bags contain 4 shiny green bags, 1 pale purple bag.
|
||||
bright chartreuse bags contain 3 light gold bags.
|
||||
dotted lime bags contain 5 wavy cyan bags.
|
||||
drab violet bags contain 4 dark beige bags, 1 plaid gold bag, 3 faded beige bags.
|
||||
drab green bags contain 4 dotted bronze bags, 5 clear silver bags, 4 faded salmon bags.
|
||||
wavy beige bags contain 2 clear cyan bags, 2 dim tomato bags.
|
||||
wavy yellow bags contain 4 pale green bags, 3 mirrored green bags, 5 faded brown bags, 1 clear orange bag.
|
||||
plaid tomato bags contain 3 dull yellow bags, 2 faded blue bags, 1 dull teal bag.
|
||||
dull red bags contain 4 posh green bags, 1 shiny salmon bag, 2 bright tomato bags, 4 vibrant red bags.
|
||||
striped salmon bags contain 4 dim bronze bags, 4 light gold bags, 3 posh beige bags.
|
||||
dim crimson bags contain 1 dull crimson bag, 4 drab silver bags.
|
||||
plaid silver bags contain 3 dull black bags, 5 shiny silver bags, 4 dark beige bags, 2 clear aqua bags.
|
||||
clear bronze bags contain 1 drab coral bag, 2 vibrant red bags.
|
||||
dotted gray bags contain 1 plaid plum bag, 2 dotted purple bags, 5 striped violet bags, 3 bright tomato bags.
|
||||
striped silver bags contain 2 plaid coral bags, 5 bright orange bags, 1 pale brown bag.
|
||||
shiny beige bags contain 4 dim turquoise bags.
|
||||
posh green bags contain no other bags.
|
||||
plaid gold bags contain 3 pale fuchsia bags, 5 dull lime bags, 5 wavy chartreuse bags, 5 dim tomato bags.
|
||||
dim teal bags contain 5 pale beige bags, 2 faded blue bags, 5 dotted tan bags, 5 vibrant tomato bags.
|
||||
bright red bags contain 4 drab lavender bags, 1 dark purple bag, 2 wavy violet bags.
|
||||
dotted teal bags contain 5 dull crimson bags.
|
||||
faded gray bags contain 4 mirrored red bags.
|
||||
pale purple bags contain 3 faded gray bags, 1 clear gold bag, 4 clear cyan bags.
|
||||
striped crimson bags contain 4 dim aqua bags, 3 pale magenta bags, 1 drab white bag, 1 vibrant purple bag.
|
||||
mirrored purple bags contain 3 muted gray bags.
|
||||
muted maroon bags contain 3 plaid crimson bags, 4 posh aqua bags.
|
||||
muted gold bags contain 3 pale fuchsia bags, 2 dotted teal bags, 3 dotted chartreuse bags, 4 vibrant lime bags.
|
||||
wavy silver bags contain 2 plaid beige bags, 3 dull aqua bags, 2 pale lavender bags.
|
||||
dim aqua bags contain 5 bright beige bags.
|
||||
dark tan bags contain 4 pale gold bags.
|
||||
light yellow bags contain 4 dotted gray bags, 5 pale teal bags.
|
||||
bright blue bags contain 3 shiny coral bags, 4 striped salmon bags.
|
||||
striped cyan bags contain 5 light turquoise bags.
|
||||
light gray bags contain 4 vibrant teal bags, 1 shiny turquoise bag, 1 wavy olive bag, 5 dim white bags.
|
||||
light cyan bags contain 3 dark gray bags, 5 clear lavender bags, 4 dark beige bags.
|
||||
light blue bags contain 5 dim black bags, 4 drab tomato bags, 2 dim turquoise bags.
|
||||
dull crimson bags contain 3 pale silver bags, 2 faded beige bags.
|
||||
dotted beige bags contain 2 dotted aqua bags.
|
||||
shiny olive bags contain 4 bright plum bags, 4 clear plum bags, 2 wavy green bags, 5 faded tomato bags.
|
||||
striped turquoise bags contain 1 drab black bag.
|
||||
pale chartreuse bags contain 5 dotted brown bags.
|
||||
mirrored turquoise bags contain 4 shiny gold bags, 3 dark chartreuse bags.
|
||||
posh beige bags contain 3 dotted tan bags.
|
||||
drab gray bags contain 3 vibrant aqua bags.
|
||||
shiny silver bags contain 4 plaid gold bags, 5 shiny green bags.
|
||||
bright crimson bags contain 5 faded yellow bags, 4 bright plum bags, 4 mirrored gold bags.
|
||||
dim yellow bags contain 2 plaid lime bags, 5 bright salmon bags, 4 mirrored bronze bags.
|
||||
dark crimson bags contain 4 dull blue bags, 2 light olive bags, 4 mirrored green bags.
|
||||
faded aqua bags contain 1 dotted chartreuse bag, 1 muted orange bag.
|
||||
pale turquoise bags contain 4 dull silver bags.
|
||||
clear orange bags contain 1 pale gray bag, 5 striped bronze bags, 5 dim aqua bags.
|
||||
mirrored red bags contain 1 muted purple bag.
|
||||
drab silver bags contain no other bags.
|
||||
faded silver bags contain 5 mirrored turquoise bags, 4 striped purple bags.
|
||||
wavy fuchsia bags contain 2 faded purple bags, 1 wavy cyan bag, 2 muted cyan bags.
|
||||
clear black bags contain 4 drab turquoise bags, 1 plaid lime bag.
|
||||
dim olive bags contain 5 bright chartreuse bags, 3 striped silver bags.
|
||||
mirrored tan bags contain 2 striped indigo bags, 3 wavy gray bags, 3 clear tan bags.
|
||||
mirrored yellow bags contain 2 plaid plum bags, 3 striped salmon bags, 4 dim maroon bags.
|
||||
shiny salmon bags contain 5 dotted plum bags, 5 pale crimson bags.
|
||||
dotted crimson bags contain 3 dull yellow bags.
|
||||
shiny fuchsia bags contain 5 plaid lime bags.
|
||||
drab turquoise bags contain 2 dull crimson bags.
|
||||
mirrored cyan bags contain 3 posh green bags, 5 striped olive bags, 5 vibrant red bags.
|
||||
faded crimson bags contain 3 muted silver bags, 4 shiny olive bags.
|
||||
light magenta bags contain 3 posh crimson bags, 5 pale purple bags.
|
||||
faded violet bags contain 3 vibrant lime bags, 1 dim magenta bag, 1 dull lime bag.
|
||||
dotted black bags contain 2 light gold bags, 2 dim bronze bags, 4 wavy turquoise bags.
|
||||
bright beige bags contain 4 vibrant orange bags, 4 dark chartreuse bags, 1 muted gray bag, 2 bright tomato bags.
|
||||
striped green bags contain 3 pale beige bags, 1 pale brown bag, 2 posh brown bags, 5 striped olive bags.
|
||||
dotted red bags contain 4 vibrant orange bags, 2 pale gold bags.
|
||||
plaid fuchsia bags contain 5 pale teal bags, 5 pale fuchsia bags, 4 faded gray bags.
|
||||
light beige bags contain 1 muted red bag, 5 dotted purple bags, 3 striped salmon bags.
|
||||
dim chartreuse bags contain 5 muted maroon bags, 4 wavy maroon bags.
|
||||
clear chartreuse bags contain 3 striped lavender bags, 2 clear blue bags.
|
||||
pale silver bags contain 2 dark teal bags.
|
||||
faded olive bags contain 4 dotted turquoise bags, 4 drab indigo bags, 5 drab violet bags, 3 shiny blue bags.
|
||||
clear blue bags contain 1 muted black bag.
|
||||
dull tan bags contain 5 clear crimson bags, 3 dim tomato bags.
|
||||
dark cyan bags contain 4 wavy magenta bags, 5 vibrant olive bags, 2 posh gray bags, 5 dull magenta bags.
|
||||
dotted white bags contain 1 bright magenta bag, 3 pale red bags.
|
||||
muted teal bags contain 5 posh fuchsia bags, 4 drab turquoise bags, 4 posh red bags.
|
||||
mirrored coral bags contain 1 faded purple bag, 2 bright magenta bags, 5 dark yellow bags, 3 light plum bags.
|
||||
dull orange bags contain 4 dotted blue bags, 5 clear gray bags, 3 vibrant red bags.
|
||||
bright aqua bags contain 4 muted lime bags, 2 wavy plum bags, 1 shiny olive bag.
|
||||
light maroon bags contain 1 shiny gold bag, 4 light beige bags, 1 drab black bag.
|
||||
dim green bags contain 4 dull brown bags.
|
||||
striped black bags contain 4 dotted crimson bags.
|
||||
mirrored bronze bags contain 4 mirrored chartreuse bags, 3 dull lime bags, 3 wavy turquoise bags.
|
||||
striped aqua bags contain 4 dark gray bags, 5 faded beige bags, 2 dull lime bags.
|
||||
shiny coral bags contain 5 mirrored white bags, 5 shiny blue bags.
|
||||
striped orange bags contain 4 pale silver bags, 4 pale olive bags, 4 shiny olive bags, 2 bright chartreuse bags.
|
||||
vibrant crimson bags contain 5 shiny olive bags, 5 striped violet bags, 2 posh beige bags.
|
||||
dotted chartreuse bags contain 5 bright turquoise bags, 5 bright magenta bags.
|
||||
vibrant purple bags contain 4 posh violet bags.
|
||||
vibrant violet bags contain 5 posh aqua bags, 4 mirrored white bags, 4 dotted tan bags, 4 mirrored purple bags.
|
||||
dotted violet bags contain 3 bright brown bags, 3 pale yellow bags, 4 light gray bags, 5 dark green bags.
|
||||
muted black bags contain 2 light violet bags, 5 muted bronze bags.
|
||||
mirrored orange bags contain 1 plaid magenta bag, 5 muted red bags, 3 pale lime bags.
|
||||
faded magenta bags contain 3 striped cyan bags, 4 muted silver bags.
|
||||
clear gray bags contain 4 muted gray bags, 2 wavy turquoise bags, 3 dotted plum bags.
|
||||
46
2020/Day7/main.py
Normal file
46
2020/Day7/main.py
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
def getParent(color):
|
||||
for i in raw:
|
||||
primcolor, others = i.split(" contain ")
|
||||
|
||||
others = others.split(", ")
|
||||
for j in range(0, len(others)):
|
||||
others[j] = others[j].replace(others[j][:2], "")
|
||||
if color in others:
|
||||
if primcolor not in containGold:
|
||||
containGold.append(primcolor)
|
||||
getParent(primcolor)
|
||||
|
||||
|
||||
def getChilds(color):
|
||||
result = 0
|
||||
for i in raw:
|
||||
primcolor, others = i.split(" contain ")
|
||||
|
||||
if primcolor == color:
|
||||
others = others.split(", ")
|
||||
for j in range(0, len(others)):
|
||||
times = others[j][:2]
|
||||
if times == "no":
|
||||
result = 1
|
||||
else:
|
||||
others[j] = others[j].replace(times, "")
|
||||
result += int(times) * getChilds(others[j])
|
||||
break
|
||||
return result
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
containGold = []
|
||||
GoldContains = 0
|
||||
with open("input.txt") as f:
|
||||
raw = f.read().split("\n")
|
||||
|
||||
for i in range(0, len(raw)):
|
||||
raw[i] = raw[i].replace(" bags", "").replace(" bag", "").replace(".", "")
|
||||
|
||||
getParent("shiny gold")
|
||||
|
||||
print("Aufgabe 1:", len(containGold))
|
||||
|
||||
GoldContains = getChilds("shiny gold")
|
||||
print("Aufgabe 2:", GoldContains+1)
|
||||
605
2020/Day8/input.txt
Normal file
605
2020/Day8/input.txt
Normal file
|
|
@ -0,0 +1,605 @@
|
|||
acc +14
|
||||
acc +11
|
||||
nop +422
|
||||
acc +14
|
||||
jmp +443
|
||||
acc +21
|
||||
nop +524
|
||||
acc -2
|
||||
jmp +279
|
||||
jmp +1
|
||||
acc +28
|
||||
acc +11
|
||||
jmp +576
|
||||
acc +32
|
||||
acc -12
|
||||
acc -8
|
||||
jmp +291
|
||||
nop +542
|
||||
acc +41
|
||||
jmp +320
|
||||
acc +40
|
||||
jmp +96
|
||||
jmp +85
|
||||
acc +38
|
||||
acc +8
|
||||
jmp +333
|
||||
acc +44
|
||||
nop +231
|
||||
acc +40
|
||||
jmp +323
|
||||
acc +18
|
||||
jmp +251
|
||||
acc -1
|
||||
jmp +385
|
||||
acc -9
|
||||
acc +48
|
||||
acc +20
|
||||
acc +34
|
||||
jmp +150
|
||||
nop +203
|
||||
acc +4
|
||||
acc +32
|
||||
acc +44
|
||||
jmp +168
|
||||
acc +26
|
||||
acc +46
|
||||
acc +40
|
||||
jmp -30
|
||||
jmp +182
|
||||
acc +18
|
||||
jmp +404
|
||||
nop +142
|
||||
jmp +84
|
||||
acc +30
|
||||
acc +10
|
||||
jmp +1
|
||||
acc +40
|
||||
jmp +370
|
||||
jmp +381
|
||||
jmp +239
|
||||
acc -2
|
||||
acc +47
|
||||
acc -4
|
||||
jmp +295
|
||||
jmp -38
|
||||
acc +40
|
||||
acc +44
|
||||
acc +4
|
||||
acc +4
|
||||
jmp +156
|
||||
acc +31
|
||||
acc +20
|
||||
acc +0
|
||||
acc -12
|
||||
jmp -48
|
||||
acc +32
|
||||
acc +38
|
||||
jmp +1
|
||||
acc -6
|
||||
jmp +375
|
||||
acc +33
|
||||
acc +27
|
||||
acc +28
|
||||
jmp +107
|
||||
acc +1
|
||||
acc +6
|
||||
nop +136
|
||||
jmp +85
|
||||
acc +31
|
||||
acc +49
|
||||
acc +46
|
||||
jmp +167
|
||||
acc +5
|
||||
acc -5
|
||||
jmp +148
|
||||
acc +22
|
||||
acc +44
|
||||
acc -8
|
||||
acc -2
|
||||
jmp -60
|
||||
nop +354
|
||||
jmp +59
|
||||
acc +48
|
||||
nop +473
|
||||
acc -7
|
||||
acc +4
|
||||
jmp +105
|
||||
jmp +456
|
||||
acc +16
|
||||
acc +33
|
||||
acc +24
|
||||
jmp -4
|
||||
acc +36
|
||||
acc +10
|
||||
nop +441
|
||||
jmp +268
|
||||
jmp +388
|
||||
acc +0
|
||||
acc +27
|
||||
acc -1
|
||||
jmp -60
|
||||
nop +90
|
||||
jmp -90
|
||||
acc +48
|
||||
acc +30
|
||||
jmp +284
|
||||
acc +4
|
||||
acc +6
|
||||
acc +1
|
||||
acc -10
|
||||
jmp +95
|
||||
acc +35
|
||||
jmp +235
|
||||
acc +31
|
||||
acc -19
|
||||
jmp -96
|
||||
jmp +326
|
||||
acc -7
|
||||
acc +0
|
||||
acc -1
|
||||
jmp +53
|
||||
acc +15
|
||||
acc -14
|
||||
jmp +450
|
||||
nop +8
|
||||
acc -2
|
||||
acc -1
|
||||
acc +17
|
||||
jmp -25
|
||||
nop +444
|
||||
jmp +65
|
||||
jmp -86
|
||||
acc +44
|
||||
acc +16
|
||||
acc +32
|
||||
acc -11
|
||||
jmp +32
|
||||
acc +14
|
||||
acc +28
|
||||
jmp +123
|
||||
jmp +127
|
||||
jmp -44
|
||||
acc +42
|
||||
acc +24
|
||||
acc -3
|
||||
acc +4
|
||||
jmp +219
|
||||
acc +28
|
||||
acc +30
|
||||
acc -14
|
||||
acc -11
|
||||
jmp +67
|
||||
acc +5
|
||||
acc +43
|
||||
acc +23
|
||||
nop +73
|
||||
jmp +176
|
||||
acc +28
|
||||
acc +8
|
||||
acc +42
|
||||
acc +44
|
||||
jmp +278
|
||||
acc +9
|
||||
acc +46
|
||||
acc +0
|
||||
acc +30
|
||||
jmp +72
|
||||
jmp +317
|
||||
jmp +352
|
||||
jmp +273
|
||||
jmp +137
|
||||
nop +364
|
||||
jmp +249
|
||||
nop +79
|
||||
jmp +1
|
||||
jmp -147
|
||||
acc -10
|
||||
acc -1
|
||||
acc +12
|
||||
acc +27
|
||||
jmp +147
|
||||
acc -5
|
||||
acc +7
|
||||
jmp +63
|
||||
acc +33
|
||||
acc +32
|
||||
nop +81
|
||||
jmp -185
|
||||
acc +44
|
||||
jmp +215
|
||||
jmp +187
|
||||
acc +14
|
||||
acc +38
|
||||
jmp -113
|
||||
jmp +267
|
||||
acc -9
|
||||
acc +21
|
||||
acc -5
|
||||
jmp +143
|
||||
nop -57
|
||||
nop +281
|
||||
jmp -170
|
||||
jmp +267
|
||||
nop -131
|
||||
jmp -83
|
||||
acc -6
|
||||
jmp -95
|
||||
acc -9
|
||||
acc -8
|
||||
jmp +184
|
||||
acc +32
|
||||
acc -16
|
||||
jmp +171
|
||||
acc +5
|
||||
acc +22
|
||||
acc -7
|
||||
acc +20
|
||||
jmp +45
|
||||
acc +48
|
||||
jmp +239
|
||||
acc -4
|
||||
jmp +75
|
||||
acc -18
|
||||
jmp -178
|
||||
nop +349
|
||||
acc -12
|
||||
nop +313
|
||||
jmp -57
|
||||
acc +7
|
||||
acc +6
|
||||
jmp -241
|
||||
acc +19
|
||||
jmp +320
|
||||
acc +13
|
||||
jmp -61
|
||||
acc +0
|
||||
nop +337
|
||||
jmp +66
|
||||
acc +27
|
||||
acc -11
|
||||
acc -7
|
||||
jmp +315
|
||||
acc +23
|
||||
acc +26
|
||||
acc -5
|
||||
jmp +132
|
||||
acc +45
|
||||
acc +21
|
||||
acc -12
|
||||
jmp +158
|
||||
acc +19
|
||||
jmp +176
|
||||
acc +43
|
||||
jmp +124
|
||||
nop +227
|
||||
nop -236
|
||||
acc +11
|
||||
jmp +1
|
||||
jmp -67
|
||||
acc +21
|
||||
jmp +161
|
||||
jmp +86
|
||||
acc +26
|
||||
acc +7
|
||||
jmp +246
|
||||
acc +0
|
||||
jmp +215
|
||||
jmp +1
|
||||
acc +16
|
||||
jmp -257
|
||||
acc +2
|
||||
jmp +281
|
||||
nop -10
|
||||
acc +46
|
||||
jmp +124
|
||||
acc +13
|
||||
acc +24
|
||||
jmp +204
|
||||
jmp +1
|
||||
acc +23
|
||||
jmp +225
|
||||
nop -243
|
||||
jmp +167
|
||||
jmp +1
|
||||
jmp -142
|
||||
acc -15
|
||||
jmp -113
|
||||
acc +27
|
||||
acc -18
|
||||
acc +12
|
||||
jmp -259
|
||||
nop +74
|
||||
acc +35
|
||||
acc +42
|
||||
acc -4
|
||||
jmp -166
|
||||
nop +87
|
||||
nop +86
|
||||
acc +18
|
||||
acc -2
|
||||
jmp +212
|
||||
acc -8
|
||||
jmp -313
|
||||
acc +36
|
||||
acc -11
|
||||
jmp -233
|
||||
jmp +237
|
||||
nop +67
|
||||
acc +16
|
||||
nop -57
|
||||
jmp -92
|
||||
acc +48
|
||||
acc +2
|
||||
acc +21
|
||||
jmp +33
|
||||
acc -15
|
||||
jmp +145
|
||||
acc +26
|
||||
jmp -254
|
||||
acc +30
|
||||
acc +4
|
||||
acc -1
|
||||
acc -14
|
||||
jmp -64
|
||||
acc +32
|
||||
acc +8
|
||||
jmp -131
|
||||
acc -13
|
||||
jmp +138
|
||||
acc +5
|
||||
acc +4
|
||||
jmp -4
|
||||
acc +37
|
||||
nop -278
|
||||
acc +28
|
||||
acc +17
|
||||
jmp -215
|
||||
jmp -104
|
||||
nop -241
|
||||
jmp -43
|
||||
jmp -2
|
||||
acc +5
|
||||
acc -1
|
||||
jmp +151
|
||||
jmp +1
|
||||
acc +21
|
||||
jmp +19
|
||||
acc +40
|
||||
jmp +91
|
||||
acc +50
|
||||
nop +202
|
||||
acc -12
|
||||
jmp -333
|
||||
nop -66
|
||||
acc +42
|
||||
acc +7
|
||||
jmp +1
|
||||
jmp +47
|
||||
acc +32
|
||||
acc +29
|
||||
acc +42
|
||||
nop -8
|
||||
jmp +52
|
||||
jmp -299
|
||||
jmp +40
|
||||
acc +36
|
||||
acc -5
|
||||
acc +39
|
||||
jmp -116
|
||||
acc +19
|
||||
acc +30
|
||||
acc +39
|
||||
acc -1
|
||||
jmp -276
|
||||
jmp -245
|
||||
acc +6
|
||||
jmp -185
|
||||
acc +50
|
||||
acc +14
|
||||
acc -7
|
||||
jmp -325
|
||||
acc +33
|
||||
jmp -279
|
||||
nop +173
|
||||
acc +15
|
||||
acc -17
|
||||
jmp -33
|
||||
acc +20
|
||||
jmp -101
|
||||
acc -17
|
||||
jmp -335
|
||||
nop -8
|
||||
jmp +22
|
||||
acc +0
|
||||
acc +4
|
||||
jmp -133
|
||||
nop -81
|
||||
jmp +64
|
||||
jmp -306
|
||||
acc -19
|
||||
acc +31
|
||||
acc +47
|
||||
acc +26
|
||||
jmp +55
|
||||
jmp -402
|
||||
acc +13
|
||||
jmp -375
|
||||
acc +6
|
||||
acc -1
|
||||
acc -6
|
||||
acc +49
|
||||
jmp -28
|
||||
acc -7
|
||||
jmp -203
|
||||
jmp -395
|
||||
acc +5
|
||||
acc +38
|
||||
acc +10
|
||||
jmp +130
|
||||
jmp +161
|
||||
jmp -382
|
||||
acc +45
|
||||
jmp +113
|
||||
acc +38
|
||||
acc +48
|
||||
acc +46
|
||||
jmp +126
|
||||
acc -1
|
||||
acc -10
|
||||
acc +4
|
||||
acc +2
|
||||
jmp -425
|
||||
acc +0
|
||||
jmp -80
|
||||
acc +4
|
||||
jmp -202
|
||||
acc +25
|
||||
acc +8
|
||||
jmp -398
|
||||
jmp -307
|
||||
acc +3
|
||||
jmp +17
|
||||
acc +13
|
||||
acc +33
|
||||
acc +7
|
||||
jmp -381
|
||||
acc +5
|
||||
acc +12
|
||||
jmp -308
|
||||
jmp +1
|
||||
acc +3
|
||||
acc -14
|
||||
acc +46
|
||||
jmp -415
|
||||
acc +31
|
||||
acc +7
|
||||
acc +28
|
||||
jmp -419
|
||||
jmp -175
|
||||
jmp +1
|
||||
jmp -141
|
||||
acc +20
|
||||
nop -35
|
||||
jmp -36
|
||||
acc -6
|
||||
jmp +108
|
||||
nop +1
|
||||
jmp +8
|
||||
jmp -49
|
||||
jmp -389
|
||||
acc +24
|
||||
nop -482
|
||||
acc +41
|
||||
acc +25
|
||||
jmp -167
|
||||
nop -26
|
||||
jmp -198
|
||||
nop -199
|
||||
acc +23
|
||||
acc -19
|
||||
jmp -202
|
||||
jmp +58
|
||||
acc +3
|
||||
jmp -237
|
||||
acc +44
|
||||
acc +42
|
||||
acc +22
|
||||
acc +5
|
||||
jmp -307
|
||||
acc +45
|
||||
nop -418
|
||||
acc +41
|
||||
nop -88
|
||||
jmp +63
|
||||
acc +12
|
||||
nop -56
|
||||
acc -19
|
||||
jmp +55
|
||||
acc -13
|
||||
acc -7
|
||||
jmp -213
|
||||
acc +42
|
||||
jmp -88
|
||||
acc +20
|
||||
jmp -115
|
||||
acc +6
|
||||
jmp -57
|
||||
acc +25
|
||||
acc +49
|
||||
jmp -43
|
||||
jmp -322
|
||||
jmp -456
|
||||
acc +7
|
||||
acc +40
|
||||
acc +35
|
||||
jmp -518
|
||||
nop -461
|
||||
acc +43
|
||||
acc +33
|
||||
jmp +7
|
||||
acc +27
|
||||
jmp +5
|
||||
acc -15
|
||||
acc -19
|
||||
acc -2
|
||||
jmp -238
|
||||
acc +49
|
||||
acc +48
|
||||
acc -16
|
||||
jmp +34
|
||||
acc -6
|
||||
acc +49
|
||||
acc -4
|
||||
acc +4
|
||||
jmp +1
|
||||
acc +35
|
||||
nop -264
|
||||
jmp -234
|
||||
jmp -365
|
||||
jmp -436
|
||||
acc +20
|
||||
acc +36
|
||||
jmp -426
|
||||
acc +39
|
||||
acc +20
|
||||
jmp -343
|
||||
nop -443
|
||||
jmp -325
|
||||
jmp -127
|
||||
nop -560
|
||||
acc +10
|
||||
jmp -511
|
||||
jmp -455
|
||||
acc -16
|
||||
acc +18
|
||||
jmp -61
|
||||
acc +26
|
||||
jmp -285
|
||||
jmp +1
|
||||
nop -397
|
||||
acc +12
|
||||
nop -67
|
||||
jmp -371
|
||||
acc +27
|
||||
acc +13
|
||||
jmp -395
|
||||
acc +44
|
||||
jmp -565
|
||||
acc +1
|
||||
jmp -21
|
||||
nop -428
|
||||
acc -4
|
||||
jmp -265
|
||||
acc +48
|
||||
acc +10
|
||||
acc +46
|
||||
jmp -202
|
||||
acc -4
|
||||
acc -10
|
||||
jmp -152
|
||||
acc +17
|
||||
acc -10
|
||||
acc +22
|
||||
acc +10
|
||||
jmp +1
|
||||
57
2020/Day8/main.py
Normal file
57
2020/Day8/main.py
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
import copy as cp
|
||||
|
||||
|
||||
def Part1():
|
||||
idx = 0
|
||||
checkedIdx = []
|
||||
acc = 0
|
||||
while True:
|
||||
operation, num = raw[idx].split()
|
||||
if idx not in checkedIdx:
|
||||
checkedIdx.append(idx)
|
||||
else:
|
||||
return acc
|
||||
|
||||
if operation == "jmp":
|
||||
idx += int(num)
|
||||
elif operation == "nop":
|
||||
idx += 1
|
||||
elif operation == "acc":
|
||||
acc += int(num)
|
||||
idx += 1
|
||||
|
||||
|
||||
def Part2():
|
||||
for i in range(len(raw)):
|
||||
newSequence = cp.deepcopy(raw)
|
||||
if newSequence[i].split()[0] == "jmp":
|
||||
newSequence[i] = newSequence[i].replace("jmp", "nop")
|
||||
elif newSequence[i].split()[0] == "nop":
|
||||
newSequence[i] = newSequence[i].replace("nop", "jmp")
|
||||
|
||||
idx = 0
|
||||
checkedIdx = []
|
||||
acc = 0
|
||||
while True:
|
||||
operation, num = newSequence[idx].split()
|
||||
if idx not in checkedIdx:
|
||||
checkedIdx.append(idx)
|
||||
else:
|
||||
break
|
||||
|
||||
if idx == len(newSequence)-1:
|
||||
return acc
|
||||
|
||||
if operation == "jmp":
|
||||
idx += int(num)
|
||||
elif operation == "nop":
|
||||
idx += 1
|
||||
elif operation == "acc":
|
||||
acc += int(num)
|
||||
idx += 1
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
with open("input.txt") as f:
|
||||
raw = f.read().splitlines()
|
||||
print(Part2())
|
||||
1000
2020/Day9/input.txt
Normal file
1000
2020/Day9/input.txt
Normal file
File diff suppressed because it is too large
Load diff
36
2020/Day9/main.py
Normal file
36
2020/Day9/main.py
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
def Part1():
|
||||
for i in range(len(raw)):
|
||||
isSum = False
|
||||
if i >= 25:
|
||||
last = []
|
||||
for roUnUdL in range(1, 26):
|
||||
last.append(int(raw[i - roUnUdL]))
|
||||
|
||||
for j in last:
|
||||
for k in last:
|
||||
if j + k == int(raw[i]):
|
||||
isSum = True
|
||||
|
||||
if not isSum:
|
||||
return int(raw[i])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
raw = []
|
||||
with open("input.txt") as f:
|
||||
for i in f.read().splitlines():
|
||||
raw.append(int(i))
|
||||
|
||||
invalid = Part1()
|
||||
beg = 0
|
||||
end = 0
|
||||
while end <= len(raw):
|
||||
nums = raw[beg:end]
|
||||
sumNums = sum(nums)
|
||||
if sumNums == invalid:
|
||||
print(max(nums) + min(nums))
|
||||
exit()
|
||||
elif sumNums > invalid:
|
||||
beg += 1
|
||||
elif sumNums < invalid:
|
||||
end += 1
|
||||
26
2021/Day1/Day1.py
Normal file
26
2021/Day1/Day1.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
if __name__ == '__main__':
|
||||
with open('input.txt', 'r') as f:
|
||||
input_data = f.readlines()
|
||||
|
||||
input_data = [int(x) for x in input_data]
|
||||
|
||||
# Part 1
|
||||
sol = 0
|
||||
for i in range(len(input_data)):
|
||||
if i>0 and input_data[i] > input_data[i-1]:
|
||||
sol+=1
|
||||
|
||||
print(sol)
|
||||
|
||||
# Part 2
|
||||
windows = []
|
||||
sol = 0
|
||||
for i in range(len(input_data)):
|
||||
if i < len(input_data)-2:
|
||||
windows.append(sum(input_data[i:i+3]))
|
||||
|
||||
for i in range(len(windows)):
|
||||
if i>0 and windows[i] > windows[i-1]:
|
||||
sol+=1
|
||||
|
||||
print(sol)
|
||||
2000
2021/Day1/input.txt
Normal file
2000
2021/Day1/input.txt
Normal file
File diff suppressed because it is too large
Load diff
0
2021/Day10/Day10.py
Normal file
0
2021/Day10/Day10.py
Normal file
0
2021/Day10/input.txt
Normal file
0
2021/Day10/input.txt
Normal file
0
2021/Day11/Day11.py
Normal file
0
2021/Day11/Day11.py
Normal file
0
2021/Day11/input.txt
Normal file
0
2021/Day11/input.txt
Normal file
0
2021/Day12/Day12.py
Normal file
0
2021/Day12/Day12.py
Normal file
0
2021/Day12/input.txt
Normal file
0
2021/Day12/input.txt
Normal file
0
2021/Day13/Day13.py
Normal file
0
2021/Day13/Day13.py
Normal file
0
2021/Day13/input.txt
Normal file
0
2021/Day13/input.txt
Normal file
0
2021/Day14/Day14.py
Normal file
0
2021/Day14/Day14.py
Normal file
0
2021/Day14/input.txt
Normal file
0
2021/Day14/input.txt
Normal file
0
2021/Day15/Day15.py
Normal file
0
2021/Day15/Day15.py
Normal file
0
2021/Day15/input.txt
Normal file
0
2021/Day15/input.txt
Normal file
0
2021/Day16/Day16.py
Normal file
0
2021/Day16/Day16.py
Normal file
0
2021/Day16/input.txt
Normal file
0
2021/Day16/input.txt
Normal file
0
2021/Day17/Day17.py
Normal file
0
2021/Day17/Day17.py
Normal file
0
2021/Day17/input.txt
Normal file
0
2021/Day17/input.txt
Normal file
0
2021/Day18/Day18.py
Normal file
0
2021/Day18/Day18.py
Normal file
0
2021/Day18/input.txt
Normal file
0
2021/Day18/input.txt
Normal file
0
2021/Day19/Day19.py
Normal file
0
2021/Day19/Day19.py
Normal file
0
2021/Day19/input.txt
Normal file
0
2021/Day19/input.txt
Normal file
51
2021/Day2/Day2.py
Normal file
51
2021/Day2/Day2.py
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
def part1():
|
||||
answer = 0
|
||||
horizontal = 0
|
||||
depth = 0
|
||||
|
||||
with open("input.txt", "r") as f:
|
||||
input = f.readlines()
|
||||
|
||||
for line in input:
|
||||
line = line.strip()
|
||||
line = line.split(" ")
|
||||
val = int(line[1])
|
||||
|
||||
if line[0] == "forward":
|
||||
horizontal += val
|
||||
if line[0] == "up":
|
||||
depth -= val
|
||||
if line[0] == "down":
|
||||
depth += val
|
||||
answer = horizontal*depth
|
||||
return answer
|
||||
|
||||
|
||||
def part2():
|
||||
answer = 0
|
||||
horizontal = 0
|
||||
aim = 0
|
||||
depth = 0
|
||||
|
||||
with open("input.txt", "r") as f:
|
||||
input = f.readlines()
|
||||
|
||||
for line in input:
|
||||
line = line.strip()
|
||||
line = line.split(" ")
|
||||
val = int(line[1])
|
||||
|
||||
if line[0] == "forward":
|
||||
horizontal += val
|
||||
depth += val*aim
|
||||
if line[0] == "up":
|
||||
aim -= val
|
||||
if line[0] == "down":
|
||||
aim += val
|
||||
answer = horizontal*depth
|
||||
return answer
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(part1())
|
||||
print(part2())
|
||||
1000
2021/Day2/input.txt
Normal file
1000
2021/Day2/input.txt
Normal file
File diff suppressed because it is too large
Load diff
0
2021/Day20/Day20.py
Normal file
0
2021/Day20/Day20.py
Normal file
0
2021/Day20/input.txt
Normal file
0
2021/Day20/input.txt
Normal file
0
2021/Day21/Day21.py
Normal file
0
2021/Day21/Day21.py
Normal file
0
2021/Day21/input.txt
Normal file
0
2021/Day21/input.txt
Normal file
0
2021/Day22/Day22.py
Normal file
0
2021/Day22/Day22.py
Normal file
0
2021/Day22/input.txt
Normal file
0
2021/Day22/input.txt
Normal file
0
2021/Day23/Day23.py
Normal file
0
2021/Day23/Day23.py
Normal file
0
2021/Day23/input.txt
Normal file
0
2021/Day23/input.txt
Normal file
0
2021/Day24/Day24.py
Normal file
0
2021/Day24/Day24.py
Normal file
0
2021/Day24/input.txt
Normal file
0
2021/Day24/input.txt
Normal file
0
2021/Day25/Day25.py
Normal file
0
2021/Day25/Day25.py
Normal file
0
2021/Day25/input.txt
Normal file
0
2021/Day25/input.txt
Normal file
100
2021/Day3/Day3.py
Normal file
100
2021/Day3/Day3.py
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
import copy
|
||||
|
||||
|
||||
def part1():
|
||||
with open('input.txt', 'r') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
onesNeeded = len(lines) / 2
|
||||
gamma = ""
|
||||
eps = ""
|
||||
|
||||
onesInBinaries = countOnesInBinaries(lines)
|
||||
|
||||
for i in range(len(onesInBinaries)):
|
||||
if onesInBinaries[i] >= onesNeeded:
|
||||
gamma += "1"
|
||||
eps += "0"
|
||||
else:
|
||||
gamma += "0"
|
||||
eps += "1"
|
||||
|
||||
return int(gamma, 2) * int(eps, 2)
|
||||
|
||||
|
||||
def part2():
|
||||
with open('input.txt', 'r') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
co2 = copy.deepcopy(lines)
|
||||
|
||||
onesInBinaries = countOnesInBinaries(lines)
|
||||
currpops = []
|
||||
|
||||
for i in range(len(lines[0].strip())):
|
||||
for j in range(len(lines)):
|
||||
onesNeeded = len(lines) / 2
|
||||
line = lines[j].strip()
|
||||
if onesInBinaries[i] >= onesNeeded:
|
||||
if line[i] == "0":
|
||||
currpops.append(j)
|
||||
# lines.pop(j)
|
||||
else:
|
||||
if line[i] == "1":
|
||||
# lines.pop(j)
|
||||
currpops.append(j)
|
||||
|
||||
if not len(currpops) is len(lines):
|
||||
currpops.reverse()
|
||||
for j in currpops:
|
||||
lines.pop(j)
|
||||
currpops = []
|
||||
else:
|
||||
lines = lines[-1]
|
||||
|
||||
if len(lines) == 1:
|
||||
break
|
||||
|
||||
for i in range(len(co2[0].strip())):
|
||||
for j in range(len(lines)):
|
||||
onesNeeded = len(lines) / 2
|
||||
line = co2[j].strip()
|
||||
if onesInBinaries[i] >= onesNeeded:
|
||||
if line[i] == "1":
|
||||
currpops.append(j)
|
||||
# co2.pop(j)
|
||||
else:
|
||||
if line[i] == "0":
|
||||
# co2.pop(j)
|
||||
currpops.append(j)
|
||||
|
||||
if not len(currpops) is len(co2):
|
||||
currpops.reverse()
|
||||
for j in currpops:
|
||||
co2.pop(j)
|
||||
currpops = []
|
||||
else:
|
||||
co2 = co2[-1]
|
||||
|
||||
if len(co2) == 1:
|
||||
break
|
||||
|
||||
return int(co2[0].strip(), 2) * int(lines[0].strip(), 2)
|
||||
|
||||
|
||||
def countOnesInBinaries(lines):
|
||||
onesInBinaries = [0 for _ in range(len(lines[0]) - 1)]
|
||||
|
||||
for line in lines:
|
||||
line = line.strip()
|
||||
for i in range(len(line)):
|
||||
num = int(line[i])
|
||||
if num == 1:
|
||||
onesInBinaries[i] += 1
|
||||
|
||||
return onesInBinaries
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(part1())
|
||||
print(part2())
|
||||
1000
2021/Day3/input.txt
Normal file
1000
2021/Day3/input.txt
Normal file
File diff suppressed because it is too large
Load diff
51
2021/Day4/Board.py
Normal file
51
2021/Day4/Board.py
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
import copy
|
||||
|
||||
|
||||
class BingoBoard:
|
||||
values = [[],
|
||||
[],
|
||||
[],
|
||||
[],
|
||||
[]]
|
||||
solved : bool
|
||||
|
||||
def __init__(self, values: list[str]):
|
||||
self.solved = False
|
||||
self.values = copy.deepcopy(self.values)
|
||||
for i in range(5):
|
||||
self.values[i] = [int(x) for x in values[i].split()]
|
||||
|
||||
def enterValue(self, value: int):
|
||||
for row in self.values:
|
||||
for i in range(len(row)):
|
||||
if row[i] == value:
|
||||
row[i] = 'X'
|
||||
return
|
||||
|
||||
def checkWin(self):
|
||||
for row in self.values:
|
||||
valid = ""
|
||||
for col in row:
|
||||
valid += str(col)
|
||||
if valid == 'XXXXX':
|
||||
self.solved = True
|
||||
return True
|
||||
|
||||
for col in range(5):
|
||||
valid = ""
|
||||
for row in self.values:
|
||||
valid += str(row[col])
|
||||
if valid == 'XXXXX':
|
||||
self.solved = True
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def sum(self):
|
||||
sum = 0
|
||||
for row in self.values:
|
||||
for num in row:
|
||||
if num != 'X':
|
||||
sum += int(num)
|
||||
|
||||
return sum
|
||||
42
2021/Day4/Day4.py
Normal file
42
2021/Day4/Day4.py
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
import copy
|
||||
|
||||
from Board import BingoBoard
|
||||
|
||||
if __name__ == '__main__':
|
||||
boards = []
|
||||
with open("input.txt", "r") as f:
|
||||
toPop = []
|
||||
inp = f.readlines()
|
||||
nums = [int(x) for x in inp[0].split(",")]
|
||||
inp.pop(0)
|
||||
for i in range(len(inp)):
|
||||
inp[i] = inp[i].strip()
|
||||
if inp[i] == "":
|
||||
toPop.append(i)
|
||||
|
||||
toPop.reverse()
|
||||
for i in toPop:
|
||||
inp.pop(i)
|
||||
|
||||
for board in range(len(inp) // 5):
|
||||
boards.append(BingoBoard(inp[board * 5:board * 5 + 5]))
|
||||
|
||||
# part1
|
||||
# for num in nums:
|
||||
# for board in boards:
|
||||
# board.enterValue(num)
|
||||
# if board.checkWin():
|
||||
# print(board.sum() * num)
|
||||
# exit()
|
||||
|
||||
# part2
|
||||
won = 0
|
||||
for num in nums:
|
||||
for board in boards:
|
||||
if not board.solved:
|
||||
board.enterValue(num)
|
||||
if board.checkWin():
|
||||
won += 1
|
||||
if won == len(boards):
|
||||
print(board.sum()*num)
|
||||
exit()
|
||||
601
2021/Day4/input.txt
Normal file
601
2021/Day4/input.txt
Normal file
|
|
@ -0,0 +1,601 @@
|
|||
1,76,38,96,62,41,27,33,4,2,94,15,89,25,66,14,30,0,71,21,48,44,87,73,60,50,77,45,29,18,5,99,65,16,93,95,37,3,52,32,46,80,98,63,92,24,35,55,12,81,51,17,70,78,61,91,54,8,72,40,74,68,75,67,39,64,10,53,9,31,6,7,47,42,90,20,19,36,22,43,58,28,79,86,57,49,83,84,97,11,85,26,69,23,59,82,88,34,56,13
|
||||
|
||||
85 23 65 78 93
|
||||
27 53 10 12 26
|
||||
5 34 83 25 6
|
||||
56 40 73 29 54
|
||||
33 68 41 32 82
|
||||
|
||||
8 31 14 70 91
|
||||
53 49 86 13 21
|
||||
66 28 76 78 93
|
||||
39 63 80 43 23
|
||||
56 25 60 67 72
|
||||
|
||||
67 78 36 64 14
|
||||
46 16 80 23 94
|
||||
22 47 51 65 57
|
||||
33 76 21 92 97
|
||||
31 95 54 27 20
|
||||
|
||||
1 77 86 43 30
|
||||
28 88 7 5 60
|
||||
66 24 3 57 33
|
||||
38 23 59 84 44
|
||||
74 47 17 29 85
|
||||
|
||||
21 50 86 2 70
|
||||
85 19 22 93 25
|
||||
99 38 74 30 65
|
||||
81 0 47 78 63
|
||||
34 11 51 88 64
|
||||
|
||||
45 15 29 81 30
|
||||
75 21 88 91 49
|
||||
39 20 4 17 78
|
||||
10 12 38 11 7
|
||||
98 6 65 69 86
|
||||
|
||||
36 20 31 44 69
|
||||
30 65 55 88 64
|
||||
74 85 82 61 5
|
||||
57 17 90 43 54
|
||||
58 83 52 23 7
|
||||
|
||||
42 16 82 86 76
|
||||
60 26 27 59 55
|
||||
7 53 22 78 5
|
||||
18 61 10 15 17
|
||||
28 46 14 87 77
|
||||
|
||||
21 43 15 47 61
|
||||
24 76 28 3 27
|
||||
19 62 69 82 93
|
||||
49 29 97 74 41
|
||||
92 36 37 99 40
|
||||
|
||||
31 4 3 62 51
|
||||
24 57 78 67 53
|
||||
13 5 76 38 55
|
||||
79 9 75 98 71
|
||||
65 1 39 18 47
|
||||
|
||||
59 4 38 95 99
|
||||
85 68 69 93 43
|
||||
83 57 48 42 15
|
||||
47 50 80 79 90
|
||||
56 87 78 64 25
|
||||
|
||||
21 37 14 67 95
|
||||
88 39 26 38 49
|
||||
89 83 54 77 96
|
||||
48 86 94 19 20
|
||||
43 41 8 74 58
|
||||
|
||||
1 36 12 90 91
|
||||
63 21 98 82 66
|
||||
39 86 7 52 77
|
||||
80 81 44 33 58
|
||||
78 30 11 51 28
|
||||
|
||||
81 74 7 33 96
|
||||
75 60 87 47 91
|
||||
39 73 30 50 13
|
||||
4 41 9 43 77
|
||||
34 82 72 48 12
|
||||
|
||||
93 63 74 25 57
|
||||
29 76 9 45 70
|
||||
98 77 71 16 41
|
||||
47 54 18 14 55
|
||||
31 89 67 87 83
|
||||
|
||||
8 72 45 93 68
|
||||
74 26 69 94 65
|
||||
28 9 20 47 41
|
||||
46 54 21 56 22
|
||||
84 62 18 15 48
|
||||
|
||||
20 51 81 40 69
|
||||
71 10 13 93 75
|
||||
44 86 0 95 37
|
||||
99 39 76 80 66
|
||||
14 64 49 62 27
|
||||
|
||||
75 7 51 86 79
|
||||
43 30 61 39 16
|
||||
85 63 90 28 96
|
||||
88 78 72 31 73
|
||||
98 87 23 19 58
|
||||
|
||||
20 95 47 97 12
|
||||
92 25 68 87 91
|
||||
37 10 78 23 63
|
||||
74 93 58 39 5
|
||||
76 51 48 72 16
|
||||
|
||||
37 18 32 34 85
|
||||
22 31 98 42 19
|
||||
29 72 48 76 25
|
||||
47 1 21 7 53
|
||||
79 82 86 52 78
|
||||
|
||||
20 16 47 78 92
|
||||
88 15 71 67 2
|
||||
5 52 90 70 9
|
||||
22 49 28 82 27
|
||||
6 19 61 73 48
|
||||
|
||||
71 26 7 11 79
|
||||
52 30 47 1 31
|
||||
17 75 94 91 28
|
||||
81 98 23 55 21
|
||||
77 15 39 24 16
|
||||
|
||||
5 75 44 88 65
|
||||
89 45 23 69 19
|
||||
41 61 67 52 54
|
||||
47 38 57 12 98
|
||||
62 70 26 87 53
|
||||
|
||||
50 4 65 77 25
|
||||
6 21 5 27 92
|
||||
39 63 97 75 79
|
||||
60 34 87 26 74
|
||||
99 24 44 85 2
|
||||
|
||||
13 64 38 78 21
|
||||
74 17 83 57 94
|
||||
25 39 69 53 4
|
||||
54 33 81 50 76
|
||||
42 75 19 77 26
|
||||
|
||||
63 31 70 19 39
|
||||
38 87 15 90 75
|
||||
61 98 6 29 86
|
||||
78 62 32 11 60
|
||||
55 97 13 73 82
|
||||
|
||||
51 63 68 84 36
|
||||
12 33 37 31 8
|
||||
18 41 34 74 23
|
||||
72 39 85 48 60
|
||||
24 19 29 88 0
|
||||
|
||||
46 51 17 23 13
|
||||
20 93 97 99 81
|
||||
57 47 33 84 44
|
||||
28 96 2 43 56
|
||||
68 36 62 15 5
|
||||
|
||||
81 99 5 30 10
|
||||
38 62 57 8 37
|
||||
7 86 98 3 54
|
||||
46 82 96 15 72
|
||||
83 1 75 25 50
|
||||
|
||||
47 57 11 61 27
|
||||
53 10 31 91 98
|
||||
76 85 55 38 23
|
||||
6 81 67 71 70
|
||||
35 29 17 50 56
|
||||
|
||||
24 65 15 1 89
|
||||
45 60 97 23 14
|
||||
84 56 58 5 54
|
||||
3 72 51 46 79
|
||||
67 70 78 34 77
|
||||
|
||||
38 11 54 23 2
|
||||
33 14 10 96 63
|
||||
43 5 36 20 30
|
||||
70 53 66 71 9
|
||||
91 90 21 7 88
|
||||
|
||||
94 44 4 86 26
|
||||
39 70 54 50 30
|
||||
55 40 12 72 71
|
||||
68 7 66 47 91
|
||||
31 24 13 1 96
|
||||
|
||||
79 14 40 87 68
|
||||
16 32 53 46 98
|
||||
38 95 21 89 69
|
||||
62 60 19 81 33
|
||||
70 52 28 83 0
|
||||
|
||||
62 42 38 48 64
|
||||
61 79 78 97 98
|
||||
89 7 3 29 68
|
||||
92 76 14 67 1
|
||||
41 99 72 47 60
|
||||
|
||||
5 75 18 42 33
|
||||
72 61 36 31 29
|
||||
19 58 1 34 94
|
||||
54 84 92 99 38
|
||||
76 68 79 53 37
|
||||
|
||||
14 91 37 5 98
|
||||
68 29 34 76 43
|
||||
75 0 67 33 69
|
||||
81 47 58 30 93
|
||||
88 92 42 77 54
|
||||
|
||||
64 24 28 54 53
|
||||
72 68 3 73 4
|
||||
83 6 59 66 94
|
||||
87 80 55 20 16
|
||||
13 82 74 31 70
|
||||
|
||||
63 92 71 0 83
|
||||
98 40 50 55 2
|
||||
88 5 85 30 23
|
||||
10 75 81 58 68
|
||||
51 31 14 89 1
|
||||
|
||||
67 93 94 54 53
|
||||
38 71 34 40 24
|
||||
31 63 30 99 75
|
||||
4 57 86 19 70
|
||||
60 49 87 68 74
|
||||
|
||||
56 94 79 53 7
|
||||
24 12 19 6 99
|
||||
82 51 41 46 43
|
||||
17 49 52 78 55
|
||||
75 48 61 70 87
|
||||
|
||||
14 55 32 21 31
|
||||
88 83 23 44 4
|
||||
1 77 45 90 85
|
||||
46 81 51 27 62
|
||||
60 24 29 18 0
|
||||
|
||||
95 92 91 27 26
|
||||
22 43 45 64 62
|
||||
83 23 25 85 94
|
||||
84 53 72 28 20
|
||||
75 60 52 18 73
|
||||
|
||||
95 41 7 21 32
|
||||
58 65 16 56 97
|
||||
68 25 91 83 24
|
||||
66 89 15 55 6
|
||||
2 30 84 10 90
|
||||
|
||||
58 86 44 19 74
|
||||
57 89 17 6 83
|
||||
77 35 60 32 13
|
||||
97 63 62 28 76
|
||||
55 31 11 0 52
|
||||
|
||||
33 39 59 42 45
|
||||
61 50 92 9 79
|
||||
15 0 28 5 72
|
||||
91 24 21 29 87
|
||||
86 76 43 31 93
|
||||
|
||||
63 11 86 45 85
|
||||
96 74 66 93 32
|
||||
95 30 99 23 18
|
||||
69 97 48 15 1
|
||||
42 87 47 83 80
|
||||
|
||||
93 5 40 64 2
|
||||
44 51 15 54 83
|
||||
69 77 90 58 11
|
||||
0 48 43 30 55
|
||||
25 72 38 73 52
|
||||
|
||||
89 58 71 68 15
|
||||
23 65 9 36 74
|
||||
21 29 42 79 98
|
||||
55 47 33 39 28
|
||||
16 75 91 69 57
|
||||
|
||||
13 79 12 71 2
|
||||
60 94 99 43 82
|
||||
84 89 29 91 87
|
||||
74 80 25 32 21
|
||||
70 14 68 92 11
|
||||
|
||||
78 1 16 51 87
|
||||
58 94 59 15 43
|
||||
79 41 50 47 39
|
||||
53 37 9 28 72
|
||||
34 63 89 35 18
|
||||
|
||||
31 67 70 42 43
|
||||
60 2 89 49 22
|
||||
56 17 81 24 74
|
||||
20 65 1 96 51
|
||||
68 7 0 38 25
|
||||
|
||||
59 14 29 53 19
|
||||
9 2 11 33 44
|
||||
81 6 10 47 58
|
||||
20 34 62 55 40
|
||||
71 38 69 45 78
|
||||
|
||||
59 36 70 42 21
|
||||
3 16 49 79 98
|
||||
74 25 8 84 19
|
||||
61 80 47 65 64
|
||||
91 62 52 9 40
|
||||
|
||||
1 85 63 7 2
|
||||
0 20 61 26 77
|
||||
99 37 74 42 76
|
||||
25 94 19 78 60
|
||||
79 72 95 22 11
|
||||
|
||||
51 21 79 76 32
|
||||
55 23 69 19 61
|
||||
71 54 94 47 92
|
||||
5 64 6 68 16
|
||||
91 81 9 99 30
|
||||
|
||||
61 69 82 86 68
|
||||
66 81 28 38 36
|
||||
26 29 31 11 8
|
||||
72 51 12 95 63
|
||||
18 30 88 17 32
|
||||
|
||||
34 8 14 42 67
|
||||
66 79 65 20 52
|
||||
37 87 74 24 3
|
||||
59 54 21 32 89
|
||||
31 4 62 76 30
|
||||
|
||||
11 93 8 92 55
|
||||
38 72 99 3 83
|
||||
12 75 0 41 46
|
||||
17 25 5 39 48
|
||||
14 18 86 29 84
|
||||
|
||||
6 20 41 51 48
|
||||
5 67 30 24 47
|
||||
3 8 92 22 39
|
||||
4 56 36 31 75
|
||||
2 45 85 81 96
|
||||
|
||||
47 43 72 22 3
|
||||
19 87 53 12 60
|
||||
29 40 56 68 18
|
||||
66 97 70 33 39
|
||||
85 37 0 90 98
|
||||
|
||||
61 35 81 84 94
|
||||
11 1 58 45 77
|
||||
6 99 67 36 43
|
||||
5 7 0 87 80
|
||||
44 78 39 70 20
|
||||
|
||||
58 34 49 29 75
|
||||
17 15 28 23 84
|
||||
59 25 92 48 0
|
||||
20 81 47 3 71
|
||||
68 60 5 22 87
|
||||
|
||||
90 32 41 39 6
|
||||
36 78 67 24 50
|
||||
55 72 52 75 44
|
||||
87 15 92 31 58
|
||||
83 89 68 19 43
|
||||
|
||||
99 44 53 68 25
|
||||
71 67 16 19 36
|
||||
35 58 14 86 48
|
||||
88 18 61 24 23
|
||||
87 9 91 37 15
|
||||
|
||||
37 5 63 68 28
|
||||
41 50 76 99 64
|
||||
34 92 78 94 71
|
||||
11 96 97 42 58
|
||||
33 45 0 93 48
|
||||
|
||||
33 68 9 12 81
|
||||
60 98 28 8 99
|
||||
14 17 6 82 15
|
||||
57 69 43 38 29
|
||||
47 84 76 22 18
|
||||
|
||||
79 70 92 38 47
|
||||
12 82 98 46 0
|
||||
76 15 53 59 97
|
||||
18 52 49 29 96
|
||||
44 64 68 89 24
|
||||
|
||||
95 14 17 27 42
|
||||
55 43 57 29 25
|
||||
34 73 86 50 16
|
||||
69 37 75 63 39
|
||||
78 79 3 4 30
|
||||
|
||||
27 31 15 92 46
|
||||
36 23 72 40 50
|
||||
51 99 55 89 21
|
||||
12 70 84 63 85
|
||||
78 88 77 75 0
|
||||
|
||||
15 67 40 39 28
|
||||
9 79 22 52 75
|
||||
96 65 86 98 14
|
||||
97 87 44 84 68
|
||||
36 26 89 43 27
|
||||
|
||||
79 59 48 27 36
|
||||
85 92 93 76 24
|
||||
2 25 7 42 90
|
||||
23 29 74 35 86
|
||||
58 60 31 75 57
|
||||
|
||||
10 43 83 75 8
|
||||
88 12 38 30 9
|
||||
60 67 59 76 6
|
||||
55 45 74 34 25
|
||||
97 49 65 96 69
|
||||
|
||||
59 86 15 3 19
|
||||
89 4 74 61 23
|
||||
52 98 8 79 39
|
||||
95 17 22 14 51
|
||||
50 18 94 30 84
|
||||
|
||||
19 63 58 72 67
|
||||
35 93 29 91 0
|
||||
39 26 43 84 21
|
||||
70 42 2 53 12
|
||||
59 99 8 1 86
|
||||
|
||||
23 86 34 22 65
|
||||
71 10 16 50 91
|
||||
66 89 49 81 43
|
||||
40 7 26 75 61
|
||||
62 59 2 46 95
|
||||
|
||||
24 21 0 49 25
|
||||
92 42 48 12 7
|
||||
81 93 59 68 3
|
||||
14 23 63 39 29
|
||||
35 43 6 44 89
|
||||
|
||||
67 74 95 34 10
|
||||
39 90 59 44 51
|
||||
17 16 97 24 62
|
||||
20 54 76 63 88
|
||||
87 66 14 78 82
|
||||
|
||||
96 86 67 59 79
|
||||
66 3 30 77 71
|
||||
2 91 99 82 31
|
||||
48 65 75 98 53
|
||||
63 54 64 76 1
|
||||
|
||||
85 96 40 98 24
|
||||
16 20 10 23 17
|
||||
79 59 53 42 65
|
||||
67 2 5 80 75
|
||||
62 38 19 74 73
|
||||
|
||||
43 10 79 92 8
|
||||
52 36 4 5 67
|
||||
56 29 33 24 97
|
||||
85 17 53 75 65
|
||||
62 64 1 21 83
|
||||
|
||||
93 92 79 17 12
|
||||
40 88 6 82 34
|
||||
90 96 53 25 43
|
||||
14 62 54 10 39
|
||||
49 68 41 16 44
|
||||
|
||||
67 99 24 58 76
|
||||
43 53 59 54 51
|
||||
47 6 61 8 2
|
||||
80 68 90 14 4
|
||||
29 46 94 89 50
|
||||
|
||||
14 45 19 33 43
|
||||
6 55 4 31 80
|
||||
51 2 69 68 61
|
||||
71 70 79 91 93
|
||||
66 18 54 13 87
|
||||
|
||||
8 45 61 54 30
|
||||
85 16 19 82 37
|
||||
56 39 11 47 4
|
||||
74 70 10 60 91
|
||||
21 63 95 53 72
|
||||
|
||||
71 21 63 86 27
|
||||
53 52 40 23 81
|
||||
2 47 92 68 15
|
||||
46 45 31 8 1
|
||||
34 80 37 11 69
|
||||
|
||||
96 0 15 90 66
|
||||
65 43 92 83 18
|
||||
3 47 19 8 32
|
||||
71 26 42 34 28
|
||||
62 99 55 5 12
|
||||
|
||||
37 99 30 21 3
|
||||
63 18 68 47 27
|
||||
57 0 65 85 20
|
||||
7 58 40 92 43
|
||||
15 19 5 4 53
|
||||
|
||||
46 16 45 95 68
|
||||
6 44 31 47 73
|
||||
84 82 71 75 94
|
||||
26 25 17 32 49
|
||||
18 96 13 58 9
|
||||
|
||||
71 36 13 68 10
|
||||
84 7 60 79 41
|
||||
1 83 43 81 97
|
||||
90 53 80 19 38
|
||||
48 25 32 42 29
|
||||
|
||||
37 68 86 44 78
|
||||
87 67 77 70 60
|
||||
45 34 27 15 47
|
||||
12 21 13 55 26
|
||||
81 41 63 40 74
|
||||
|
||||
24 50 93 94 57
|
||||
99 4 56 5 28
|
||||
42 31 22 6 76
|
||||
90 89 16 49 59
|
||||
9 7 43 71 54
|
||||
|
||||
69 75 94 38 46
|
||||
52 64 50 72 42
|
||||
76 63 13 60 10
|
||||
99 80 43 33 17
|
||||
25 31 4 89 22
|
||||
|
||||
88 57 22 66 34
|
||||
85 16 87 95 59
|
||||
73 2 46 5 29
|
||||
25 69 53 6 14
|
||||
96 77 19 91 43
|
||||
|
||||
46 99 52 47 76
|
||||
89 53 24 13 59
|
||||
45 5 1 30 19
|
||||
68 25 22 10 73
|
||||
42 27 31 0 94
|
||||
|
||||
42 44 98 89 87
|
||||
65 10 80 56 41
|
||||
3 35 95 48 43
|
||||
85 97 83 12 94
|
||||
50 38 93 47 17
|
||||
|
||||
16 73 18 81 89
|
||||
6 48 54 93 19
|
||||
35 52 88 49 31
|
||||
43 79 83 14 28
|
||||
50 62 98 26 22
|
||||
|
||||
38 47 7 20 35
|
||||
45 76 63 96 24
|
||||
98 53 2 87 80
|
||||
83 86 92 48 1
|
||||
73 60 26 94 6
|
||||
|
||||
80 50 29 53 92
|
||||
66 90 79 98 46
|
||||
40 21 58 38 60
|
||||
35 13 72 28 6
|
||||
48 76 51 96 12
|
||||
|
||||
79 80 24 37 51
|
||||
86 70 1 22 71
|
||||
52 69 10 83 13
|
||||
12 40 3 0 30
|
||||
46 50 48 76 5
|
||||
66
2021/Day5/Day5.py
Normal file
66
2021/Day5/Day5.py
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
from Line import Line
|
||||
|
||||
|
||||
def getHighestIndixes(lines: [Line]):
|
||||
currMaxX = 0
|
||||
currMaxY = 0
|
||||
for line in lines:
|
||||
currMaxX = max(currMaxX, max(line.start.x, line.end.x) + 1)
|
||||
currMaxY = max(currMaxX, max(line.start.y, line.end.y) + 1)
|
||||
return currMaxX, currMaxY
|
||||
|
||||
|
||||
def part1(lines: [Line], arraySize: []):
|
||||
area = []
|
||||
for x in range(arraySize[0]):
|
||||
area.append([])
|
||||
area[x] = []
|
||||
for y in range(arraySize[1]):
|
||||
area[x].append(0)
|
||||
|
||||
for line in lines:
|
||||
if line.axis == "X":
|
||||
for y in range(min(line.start.y, line.end.y), max(line.start.y, line.end.y) + 1):
|
||||
area[line.start.x][y] += 1
|
||||
elif line.axis == "Y":
|
||||
for x in range(min(line.start.x, line.end.x), max(line.start.x, line.end.x) + 1):
|
||||
area[x][line.start.y] += 1
|
||||
elif line.axis == "DIAG":
|
||||
if line.start.x > line.end.x:
|
||||
y = line.end.y
|
||||
else:
|
||||
y = line.start.y
|
||||
|
||||
if y < max(line.start.y, line.end.y):
|
||||
op = 1
|
||||
else:
|
||||
op = -1
|
||||
|
||||
for x in range(min(line.start.x, line.end.x), max(line.start.x, line.end.x) + 1):
|
||||
|
||||
area[x][y] += 1
|
||||
|
||||
y += op
|
||||
|
||||
danger = 0
|
||||
|
||||
for row in area:
|
||||
for val in row:
|
||||
if val > 1:
|
||||
danger += 1
|
||||
return danger
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
lines = []
|
||||
with open("input.txt", "r") as f:
|
||||
raw = [x.strip() for x in f.readlines()]
|
||||
|
||||
for i in raw:
|
||||
inp = i.replace(" -> ", ", ")
|
||||
vals = [int(x) for x in inp.split(",")]
|
||||
lines.append(Line(vals[0], vals[1], vals[2], vals[3]))
|
||||
if lines[-1].axis == "INVALID":
|
||||
lines.pop(-1)
|
||||
|
||||
print(part1(lines, getHighestIndixes(lines)))
|
||||
26
2021/Day5/Line.py
Normal file
26
2021/Day5/Line.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
class Point:
|
||||
x: int
|
||||
y: int
|
||||
|
||||
def __init__(self, x, y):
|
||||
self.x = x
|
||||
self.y = y
|
||||
|
||||
|
||||
class Line:
|
||||
start: Point
|
||||
end: Point
|
||||
axis: str
|
||||
|
||||
def __init__(self, x1, y1, x2, y2):
|
||||
self.start = Point(x1, y1)
|
||||
self.end = Point(x2, y2)
|
||||
|
||||
if x1 == x2:
|
||||
self.axis = "X"
|
||||
elif y1 == y2:
|
||||
self.axis = "Y"
|
||||
elif abs(x1 - x2) == abs(y1 - y2):
|
||||
self.axis = "DIAG"
|
||||
else:
|
||||
self.axis = "INVALID"
|
||||
500
2021/Day5/input.txt
Normal file
500
2021/Day5/input.txt
Normal file
|
|
@ -0,0 +1,500 @@
|
|||
284,294 -> 733,743
|
||||
625,347 -> 653,375
|
||||
561,848 -> 561,181
|
||||
836,102 -> 836,339
|
||||
946,941 -> 22,17
|
||||
18,954 -> 956,16
|
||||
370,142 -> 370,700
|
||||
990,966 -> 677,966
|
||||
366,603 -> 366,465
|
||||
728,942 -> 57,271
|
||||
615,493 -> 847,493
|
||||
584,281 -> 301,281
|
||||
125,356 -> 301,180
|
||||
941,569 -> 555,183
|
||||
151,116 -> 509,116
|
||||
41,18 -> 841,818
|
||||
627,670 -> 627,630
|
||||
965,472 -> 965,100
|
||||
93,404 -> 330,641
|
||||
475,963 -> 475,514
|
||||
389,389 -> 389,326
|
||||
842,565 -> 842,576
|
||||
454,700 -> 650,700
|
||||
73,810 -> 73,319
|
||||
450,212 -> 450,284
|
||||
316,392 -> 316,697
|
||||
915,592 -> 578,592
|
||||
622,485 -> 434,485
|
||||
109,853 -> 952,10
|
||||
305,73 -> 305,222
|
||||
27,489 -> 157,489
|
||||
191,979 -> 867,979
|
||||
527,329 -> 527,292
|
||||
301,645 -> 301,162
|
||||
639,730 -> 176,730
|
||||
46,964 -> 46,458
|
||||
727,422 -> 435,714
|
||||
28,552 -> 404,552
|
||||
33,108 -> 33,21
|
||||
227,249 -> 327,249
|
||||
414,903 -> 784,903
|
||||
69,422 -> 888,422
|
||||
422,924 -> 103,605
|
||||
793,353 -> 450,10
|
||||
714,682 -> 714,972
|
||||
201,745 -> 410,745
|
||||
408,713 -> 408,847
|
||||
174,842 -> 818,198
|
||||
863,353 -> 775,353
|
||||
199,780 -> 670,780
|
||||
877,947 -> 340,410
|
||||
163,202 -> 163,91
|
||||
955,919 -> 955,585
|
||||
836,271 -> 533,271
|
||||
258,366 -> 728,836
|
||||
582,749 -> 582,12
|
||||
80,40 -> 80,704
|
||||
287,213 -> 287,635
|
||||
390,546 -> 390,194
|
||||
837,511 -> 538,810
|
||||
473,281 -> 902,281
|
||||
851,865 -> 731,745
|
||||
918,59 -> 445,532
|
||||
796,215 -> 796,248
|
||||
875,111 -> 604,111
|
||||
660,805 -> 538,805
|
||||
507,850 -> 145,850
|
||||
585,861 -> 585,52
|
||||
426,74 -> 700,348
|
||||
206,405 -> 529,405
|
||||
418,333 -> 418,17
|
||||
368,457 -> 33,792
|
||||
186,81 -> 957,852
|
||||
505,283 -> 113,283
|
||||
20,878 -> 462,878
|
||||
750,237 -> 69,918
|
||||
15,280 -> 358,623
|
||||
798,981 -> 500,683
|
||||
965,970 -> 22,970
|
||||
950,970 -> 148,970
|
||||
660,392 -> 660,884
|
||||
862,405 -> 862,527
|
||||
801,283 -> 801,361
|
||||
71,837 -> 136,837
|
||||
651,438 -> 945,144
|
||||
524,607 -> 614,517
|
||||
348,955 -> 138,955
|
||||
957,164 -> 404,717
|
||||
531,581 -> 454,504
|
||||
710,185 -> 710,271
|
||||
822,86 -> 822,966
|
||||
745,233 -> 490,488
|
||||
350,823 -> 663,823
|
||||
824,67 -> 447,444
|
||||
846,667 -> 796,617
|
||||
666,24 -> 666,906
|
||||
640,39 -> 640,145
|
||||
654,481 -> 985,481
|
||||
581,894 -> 416,729
|
||||
443,11 -> 697,11
|
||||
318,627 -> 799,146
|
||||
113,78 -> 891,856
|
||||
181,149 -> 179,151
|
||||
451,74 -> 451,262
|
||||
458,726 -> 314,726
|
||||
218,662 -> 533,662
|
||||
965,108 -> 527,108
|
||||
782,481 -> 896,367
|
||||
557,927 -> 557,938
|
||||
506,242 -> 941,677
|
||||
948,778 -> 948,629
|
||||
567,816 -> 567,956
|
||||
323,773 -> 323,364
|
||||
864,980 -> 864,12
|
||||
611,699 -> 611,886
|
||||
613,392 -> 901,104
|
||||
528,905 -> 156,905
|
||||
632,206 -> 798,40
|
||||
338,237 -> 919,818
|
||||
256,889 -> 11,644
|
||||
835,52 -> 55,832
|
||||
464,144 -> 322,144
|
||||
254,747 -> 254,509
|
||||
866,892 -> 866,916
|
||||
827,946 -> 30,149
|
||||
899,84 -> 177,806
|
||||
134,634 -> 357,634
|
||||
781,492 -> 244,492
|
||||
817,762 -> 817,976
|
||||
818,749 -> 818,860
|
||||
262,480 -> 263,480
|
||||
409,576 -> 409,698
|
||||
242,151 -> 981,890
|
||||
149,519 -> 149,557
|
||||
42,990 -> 42,930
|
||||
687,974 -> 50,337
|
||||
758,382 -> 465,382
|
||||
760,861 -> 760,934
|
||||
17,835 -> 17,915
|
||||
645,923 -> 645,648
|
||||
702,116 -> 72,746
|
||||
153,162 -> 955,964
|
||||
185,101 -> 918,834
|
||||
554,179 -> 554,353
|
||||
879,673 -> 879,949
|
||||
368,13 -> 368,512
|
||||
582,105 -> 591,114
|
||||
146,291 -> 600,745
|
||||
609,538 -> 930,538
|
||||
320,604 -> 320,146
|
||||
566,698 -> 443,575
|
||||
167,708 -> 844,31
|
||||
712,630 -> 712,421
|
||||
912,930 -> 64,82
|
||||
980,931 -> 87,38
|
||||
23,893 -> 888,28
|
||||
640,435 -> 676,435
|
||||
701,516 -> 190,516
|
||||
684,145 -> 62,767
|
||||
127,471 -> 91,435
|
||||
685,197 -> 78,197
|
||||
103,493 -> 103,522
|
||||
309,986 -> 309,850
|
||||
938,270 -> 938,300
|
||||
295,72 -> 354,72
|
||||
948,889 -> 948,455
|
||||
254,733 -> 254,175
|
||||
95,329 -> 942,329
|
||||
19,672 -> 19,445
|
||||
206,807 -> 206,934
|
||||
886,961 -> 886,690
|
||||
117,386 -> 117,292
|
||||
199,59 -> 668,528
|
||||
299,263 -> 299,878
|
||||
28,295 -> 638,905
|
||||
10,140 -> 276,406
|
||||
279,526 -> 921,526
|
||||
485,128 -> 856,499
|
||||
418,398 -> 186,398
|
||||
296,577 -> 296,521
|
||||
514,261 -> 10,765
|
||||
691,673 -> 776,758
|
||||
131,430 -> 152,430
|
||||
858,85 -> 62,85
|
||||
394,846 -> 270,970
|
||||
827,913 -> 827,376
|
||||
634,669 -> 910,669
|
||||
12,53 -> 945,986
|
||||
782,467 -> 782,421
|
||||
159,832 -> 109,832
|
||||
793,807 -> 79,93
|
||||
120,584 -> 356,584
|
||||
645,16 -> 645,355
|
||||
526,685 -> 217,376
|
||||
296,305 -> 296,929
|
||||
954,144 -> 954,839
|
||||
748,88 -> 103,733
|
||||
523,804 -> 473,754
|
||||
524,316 -> 524,756
|
||||
696,183 -> 912,183
|
||||
288,564 -> 55,797
|
||||
568,103 -> 568,348
|
||||
468,626 -> 682,412
|
||||
163,163 -> 961,961
|
||||
762,824 -> 27,89
|
||||
623,625 -> 32,34
|
||||
865,343 -> 490,718
|
||||
259,458 -> 259,33
|
||||
944,660 -> 944,176
|
||||
781,804 -> 826,759
|
||||
15,702 -> 15,553
|
||||
403,310 -> 918,825
|
||||
438,734 -> 835,734
|
||||
825,13 -> 825,245
|
||||
129,611 -> 370,611
|
||||
49,939 -> 172,939
|
||||
687,906 -> 687,532
|
||||
629,482 -> 273,126
|
||||
727,218 -> 424,218
|
||||
447,451 -> 233,451
|
||||
142,779 -> 813,779
|
||||
527,27 -> 527,804
|
||||
482,55 -> 482,200
|
||||
39,264 -> 806,264
|
||||
884,636 -> 458,636
|
||||
467,121 -> 199,389
|
||||
856,925 -> 856,666
|
||||
666,359 -> 378,359
|
||||
11,946 -> 705,946
|
||||
491,281 -> 940,730
|
||||
86,112 -> 918,944
|
||||
974,807 -> 974,707
|
||||
445,67 -> 914,536
|
||||
953,394 -> 953,822
|
||||
468,398 -> 157,87
|
||||
231,620 -> 231,646
|
||||
979,869 -> 979,911
|
||||
450,330 -> 450,79
|
||||
675,659 -> 617,659
|
||||
66,181 -> 66,723
|
||||
181,406 -> 181,192
|
||||
908,334 -> 908,526
|
||||
254,891 -> 282,891
|
||||
777,791 -> 127,141
|
||||
469,58 -> 694,58
|
||||
954,957 -> 566,569
|
||||
957,957 -> 123,123
|
||||
741,359 -> 741,986
|
||||
763,526 -> 763,101
|
||||
857,427 -> 600,170
|
||||
527,756 -> 490,719
|
||||
625,249 -> 397,249
|
||||
798,702 -> 712,702
|
||||
868,75 -> 868,853
|
||||
332,296 -> 332,629
|
||||
211,829 -> 100,940
|
||||
12,139 -> 12,218
|
||||
655,978 -> 655,242
|
||||
99,852 -> 855,96
|
||||
486,267 -> 486,855
|
||||
474,90 -> 474,244
|
||||
948,491 -> 186,491
|
||||
896,59 -> 278,677
|
||||
295,732 -> 629,732
|
||||
860,936 -> 860,556
|
||||
143,790 -> 143,26
|
||||
371,847 -> 395,847
|
||||
739,301 -> 739,44
|
||||
384,716 -> 748,716
|
||||
848,423 -> 848,923
|
||||
855,23 -> 218,660
|
||||
381,805 -> 381,438
|
||||
451,610 -> 91,610
|
||||
906,957 -> 191,957
|
||||
118,675 -> 169,675
|
||||
836,818 -> 95,818
|
||||
368,945 -> 825,488
|
||||
165,299 -> 899,299
|
||||
392,327 -> 926,861
|
||||
663,16 -> 131,548
|
||||
630,302 -> 888,302
|
||||
206,869 -> 206,331
|
||||
979,413 -> 979,204
|
||||
894,860 -> 62,28
|
||||
444,897 -> 962,379
|
||||
550,158 -> 550,885
|
||||
845,736 -> 811,736
|
||||
846,857 -> 12,857
|
||||
981,730 -> 981,154
|
||||
694,835 -> 88,835
|
||||
21,101 -> 21,385
|
||||
19,960 -> 964,15
|
||||
283,721 -> 450,721
|
||||
59,136 -> 758,835
|
||||
287,313 -> 719,313
|
||||
471,252 -> 849,630
|
||||
682,189 -> 168,189
|
||||
10,921 -> 774,157
|
||||
884,598 -> 884,540
|
||||
207,615 -> 207,443
|
||||
627,408 -> 67,408
|
||||
285,36 -> 285,792
|
||||
116,585 -> 254,585
|
||||
183,86 -> 183,702
|
||||
220,138 -> 868,138
|
||||
833,68 -> 286,615
|
||||
367,534 -> 766,534
|
||||
907,514 -> 621,228
|
||||
133,593 -> 133,581
|
||||
164,727 -> 768,123
|
||||
566,227 -> 566,555
|
||||
983,988 -> 105,110
|
||||
620,177 -> 620,821
|
||||
612,413 -> 612,176
|
||||
168,889 -> 168,210
|
||||
871,487 -> 559,175
|
||||
399,870 -> 761,870
|
||||
236,976 -> 582,630
|
||||
699,216 -> 699,887
|
||||
153,745 -> 790,745
|
||||
444,749 -> 444,257
|
||||
808,165 -> 939,165
|
||||
546,525 -> 95,976
|
||||
583,179 -> 373,389
|
||||
235,816 -> 840,816
|
||||
744,89 -> 832,89
|
||||
425,317 -> 465,357
|
||||
267,235 -> 114,82
|
||||
887,59 -> 572,374
|
||||
808,237 -> 808,626
|
||||
431,352 -> 400,383
|
||||
815,376 -> 815,905
|
||||
249,218 -> 989,958
|
||||
120,435 -> 357,198
|
||||
807,551 -> 490,234
|
||||
910,524 -> 910,725
|
||||
802,304 -> 447,659
|
||||
789,228 -> 678,339
|
||||
229,322 -> 52,322
|
||||
658,393 -> 506,393
|
||||
378,438 -> 378,569
|
||||
163,981 -> 473,671
|
||||
537,984 -> 935,586
|
||||
58,945 -> 966,37
|
||||
132,696 -> 565,263
|
||||
136,813 -> 136,284
|
||||
606,656 -> 298,348
|
||||
533,572 -> 673,712
|
||||
872,912 -> 301,341
|
||||
16,287 -> 16,613
|
||||
571,541 -> 980,950
|
||||
117,495 -> 35,495
|
||||
85,79 -> 682,676
|
||||
425,431 -> 117,739
|
||||
982,984 -> 10,12
|
||||
28,75 -> 431,478
|
||||
259,529 -> 259,436
|
||||
762,267 -> 170,859
|
||||
323,135 -> 929,741
|
||||
81,238 -> 561,718
|
||||
128,213 -> 876,961
|
||||
649,466 -> 649,540
|
||||
715,863 -> 119,863
|
||||
830,624 -> 794,660
|
||||
123,968 -> 977,114
|
||||
489,466 -> 489,811
|
||||
27,10 -> 980,963
|
||||
255,732 -> 255,484
|
||||
574,829 -> 431,829
|
||||
548,743 -> 22,217
|
||||
903,297 -> 903,763
|
||||
684,774 -> 64,154
|
||||
260,823 -> 683,823
|
||||
422,211 -> 422,826
|
||||
10,196 -> 988,196
|
||||
108,802 -> 15,802
|
||||
104,70 -> 104,452
|
||||
885,59 -> 885,36
|
||||
68,854 -> 68,774
|
||||
731,935 -> 731,718
|
||||
657,986 -> 617,986
|
||||
732,292 -> 732,32
|
||||
841,56 -> 841,83
|
||||
74,108 -> 862,896
|
||||
654,895 -> 323,895
|
||||
374,952 -> 374,217
|
||||
90,723 -> 750,63
|
||||
246,89 -> 911,754
|
||||
453,301 -> 755,301
|
||||
983,988 -> 23,28
|
||||
81,705 -> 133,757
|
||||
752,743 -> 752,397
|
||||
53,243 -> 449,639
|
||||
451,811 -> 451,187
|
||||
26,672 -> 26,699
|
||||
254,861 -> 943,861
|
||||
643,740 -> 643,966
|
||||
486,655 -> 149,318
|
||||
375,146 -> 375,973
|
||||
76,293 -> 103,293
|
||||
246,398 -> 246,248
|
||||
324,392 -> 595,121
|
||||
130,577 -> 131,577
|
||||
380,623 -> 549,454
|
||||
224,181 -> 985,942
|
||||
310,223 -> 310,594
|
||||
23,982 -> 23,738
|
||||
19,858 -> 832,858
|
||||
726,531 -> 726,578
|
||||
730,433 -> 196,433
|
||||
606,599 -> 242,599
|
||||
444,832 -> 444,238
|
||||
198,870 -> 47,870
|
||||
944,473 -> 795,473
|
||||
737,386 -> 178,945
|
||||
328,902 -> 328,644
|
||||
422,851 -> 567,851
|
||||
674,781 -> 215,781
|
||||
920,757 -> 302,757
|
||||
225,932 -> 640,517
|
||||
359,337 -> 791,337
|
||||
935,430 -> 935,262
|
||||
772,850 -> 280,358
|
||||
175,829 -> 175,451
|
||||
938,204 -> 234,908
|
||||
253,749 -> 308,749
|
||||
704,458 -> 468,458
|
||||
222,95 -> 743,616
|
||||
968,840 -> 123,840
|
||||
491,619 -> 491,889
|
||||
979,580 -> 979,459
|
||||
901,193 -> 171,923
|
||||
246,155 -> 246,680
|
||||
711,755 -> 247,755
|
||||
671,734 -> 475,734
|
||||
803,783 -> 129,109
|
||||
145,890 -> 920,115
|
||||
463,521 -> 463,700
|
||||
782,99 -> 782,311
|
||||
547,467 -> 630,467
|
||||
14,88 -> 795,869
|
||||
653,899 -> 653,90
|
||||
488,874 -> 488,570
|
||||
93,879 -> 645,327
|
||||
320,658 -> 40,938
|
||||
611,246 -> 611,22
|
||||
258,935 -> 258,829
|
||||
931,436 -> 931,263
|
||||
252,460 -> 252,461
|
||||
490,382 -> 965,382
|
||||
242,89 -> 242,617
|
||||
271,111 -> 595,435
|
||||
462,706 -> 242,486
|
||||
557,328 -> 747,328
|
||||
486,99 -> 486,333
|
||||
156,40 -> 488,372
|
||||
323,482 -> 138,297
|
||||
595,539 -> 812,756
|
||||
923,861 -> 377,315
|
||||
934,952 -> 256,274
|
||||
314,777 -> 314,12
|
||||
508,47 -> 508,144
|
||||
888,807 -> 701,807
|
||||
745,774 -> 878,907
|
||||
740,716 -> 740,215
|
||||
62,43 -> 62,12
|
||||
571,196 -> 454,196
|
||||
568,107 -> 408,107
|
||||
549,676 -> 404,676
|
||||
595,573 -> 595,970
|
||||
148,168 -> 193,123
|
||||
763,71 -> 759,71
|
||||
797,64 -> 307,64
|
||||
959,984 -> 32,57
|
||||
457,562 -> 634,562
|
||||
127,521 -> 601,47
|
||||
112,296 -> 112,120
|
||||
148,755 -> 451,755
|
||||
636,494 -> 870,494
|
||||
910,242 -> 945,277
|
||||
912,911 -> 912,892
|
||||
759,815 -> 759,314
|
||||
391,285 -> 391,959
|
||||
455,460 -> 182,460
|
||||
112,78 -> 112,385
|
||||
842,179 -> 842,592
|
||||
236,424 -> 421,424
|
||||
508,907 -> 30,907
|
||||
637,219 -> 34,822
|
||||
503,375 -> 503,205
|
||||
570,533 -> 626,533
|
||||
658,11 -> 658,94
|
||||
179,286 -> 326,433
|
||||
918,214 -> 200,932
|
||||
339,887 -> 81,887
|
||||
794,91 -> 50,835
|
||||
225,356 -> 225,261
|
||||
80,160 -> 80,335
|
||||
148,64 -> 847,763
|
||||
595,393 -> 941,393
|
||||
27
2021/Day6/Day6.py
Normal file
27
2021/Day6/Day6.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
def calc(fish: {}, days):
|
||||
for i in range(256):
|
||||
toAdd = fish["0"]
|
||||
for key in "012345678":
|
||||
if key != "8":
|
||||
fish[key] = fish[str(int(key) + 1)]
|
||||
|
||||
fish["6"] = int(fish["6"]) + toAdd
|
||||
fish["8"] = toAdd
|
||||
|
||||
sum = 0
|
||||
for key in fish:
|
||||
sum += fish[key]
|
||||
|
||||
return sum
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
with open("input.txt", "r") as f:
|
||||
raw = f.read().strip().split(",")
|
||||
|
||||
fish = {"0": 0, "1": raw.count("1"), "2": raw.count("2"), "3": raw.count("3"), "4": raw.count("4"),
|
||||
"5": raw.count("5"),
|
||||
"6": raw.count("6"), "7": 0, "8": 0
|
||||
}
|
||||
|
||||
print(calc(fish, 256))
|
||||
1
2021/Day6/input.txt
Normal file
1
2021/Day6/input.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
5,3,2,2,1,1,4,1,5,5,1,3,1,5,1,2,1,4,1,2,1,2,1,4,2,4,1,5,1,3,5,4,3,3,1,4,1,3,4,4,1,5,4,3,3,2,5,1,1,3,1,4,3,2,2,3,1,3,1,3,1,5,3,5,1,3,1,4,2,1,4,1,5,5,5,2,4,2,1,4,1,3,5,5,1,4,1,1,4,2,2,1,3,1,1,1,1,3,4,1,4,1,1,1,4,4,4,1,3,1,3,4,1,4,1,2,2,2,5,4,1,3,1,2,1,4,1,4,5,2,4,5,4,1,2,1,4,2,2,2,1,3,5,2,5,1,1,4,5,4,3,2,4,1,5,2,2,5,1,4,1,5,1,3,5,1,2,1,1,1,5,4,4,5,1,1,1,4,1,3,3,5,5,1,5,2,1,1,3,1,1,3,2,3,4,4,1,5,5,3,2,1,1,1,4,3,1,3,3,1,1,2,2,1,2,2,2,1,1,5,1,2,2,5,2,4,1,1,2,4,1,2,3,4,1,2,1,2,4,2,1,1,5,3,1,4,4,4,1,5,2,3,4,4,1,5,1,2,2,4,1,1,2,1,1,1,1,5,1,3,3,1,1,1,1,4,1,2,2,5,1,2,1,3,4,1,3,4,3,3,1,1,5,5,5,2,4,3,1,4
|
||||
24
2021/Day7/Day7.py
Normal file
24
2021/Day7/Day7.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import sys
|
||||
|
||||
|
||||
def calcFuelCost(steps: int):
|
||||
total = 0
|
||||
for cost in range(1, steps + 1):
|
||||
total += cost
|
||||
|
||||
return total
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
with open("input.txt", "r") as f:
|
||||
crabs = [int(x) for x in f.read().strip().split(",")]
|
||||
|
||||
minFuel = sys.maxsize
|
||||
for i in crabs:
|
||||
totalfuelcost = 0
|
||||
for x in crabs:
|
||||
totalfuelcost += calcFuelCost(abs(x - i))
|
||||
|
||||
minFuel = min(totalfuelcost, minFuel)
|
||||
|
||||
print(minFuel)
|
||||
1
2021/Day7/input.txt
Normal file
1
2021/Day7/input.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,1247,39,529,198,497,33,1618,2,28,653,764,312,163,62,263,4,243,1277,8,432,324,564,44,56,745,0,534,558,1026,313,482,410,411,63,461,261,561,62,428,42,1806,251,1186,553,241,795,127,1004,94,183,382,194,890,1025,1153,1064,155,278,203,666,1098,678,228,12,530,226,680,476,74,122,136,64,515,630,137,187,146,249,77,879,1174,257,9,353,1496,239,131,21,330,922,110,5,804,2,1195,756,195,399,1306,1495,1088,687,102,901,222,3,717,853,1242,573,406,645,1211,193,319,35,302,677,704,42,69,228,247,420,401,1006,124,662,355,746,483,211,1484,146,104,314,154,170,932,215,1600,1250,20,134,1038,724,728,157,261,1373,1113,449,339,415,1165,172,956,466,327,1342,27,1031,1233,547,636,100,440,510,154,28,949,222,867,11,297,218,814,169,358,1088,1071,630,1360,1106,249,13,312,7,56,1667,948,69,767,279,1032,82,139,636,592,684,294,952,83,252,158,450,1250,78,548,1052,1,1231,888,253,533,637,694,955,448,1351,1569,1060,65,269,450,102,962,408,259,61,20,437,14,1676,16,533,90,1727,623,286,48,395,169,271,140,652,139,1497,356,98,60,362,964,880,934,544,140,322,428,80,215,192,300,431,126,46,109,780,209,776,203,443,60,889,21,882,22,127,476,694,174,226,1041,364,282,541,429,755,770,931,967,1346,1240,647,150,199,137,181,1177,571,150,1104,56,517,286,1204,346,619,1269,307,425,228,254,328,570,956,1567,810,356,196,77,31,429,1178,6,502,310,443,1221,119,571,583,18,256,460,694,650,799,200,121,119,125,894,1263,610,892,635,93,320,252,371,1416,150,664,154,344,381,610,819,591,536,1312,1521,148,1232,70,50,328,226,752,1685,729,449,31,963,402,62,1365,928,619,538,950,202,19,271,292,59,55,345,189,302,29,217,486,1576,62,1364,122,1667,388,62,182,1278,13,459,729,821,293,78,5,111,135,868,94,196,14,342,185,271,1055,350,363,235,137,142,31,30,466,922,436,1174,81,114,244,770,54,288,579,4,1287,36,321,849,751,1081,342,359,829,1147,1092,125,269,1652,493,22,456,193,49,70,288,4,954,1718,84,154,24,171,220,1033,66,289,395,1732,1553,616,411,899,1398,402,219,621,343,293,422,494,80,732,1210,449,72,236,307,541,10,620,1361,605,351,1304,475,215,989,153,8,1229,113,216,3,170,998,308,964,1755,223,1694,1937,60,41,1120,491,1270,766,501,326,236,632,163,880,963,1213,1030,444,229,425,239,834,59,66,580,488,303,475,457,1182,150,1273,53,22,53,224,536,945,824,56,694,187,586,555,1464,188,538,286,120,260,38,70,13,678,916,542,235,1138,34,259,12,280,178,45,213,1,580,268,114,1076,536,185,825,374,282,186,3,356,393,385,597,53,187,288,10,194,447,949,521,84,124,16,221,153,800,969,241,40,76,565,7,238,252,13,276,461,30,1034,129,204,657,793,630,1068,97,537,226,155,363,531,458,123,442,1155,371,196,1764,1049,73,258,853,2,653,923,189,472,1119,582,974,948,447,161,1737,765,93,369,48,293,762,58,2,1282,242,67,1310,129,468,425,116,471,768,291,878,1138,569,427,725,515,67,526,766,213,1307,288,1589,1304,3,287,1050,14,7,428,1684,479,355,72,1233,21,1449,284,11,27,315,274,181,215,486,247,946,59,158,432,231,178,1722,13,189,439,13,72,211,239,841,175,893,234,328,154,134,13,653,31,40,303,110,172,113,515,69,1009,1413,450,172,168,92,385,1555,216,1487,72,173,339,496,779,1696,153,49,342,1225,141,873,402,777,269,767,361,108,536,1432,343,23,380,716,1609,958,1512,743,246,315,220,1634,16,405,61,1150,350,620,1,13,749,9,738,1391,334,148,1142,220,662,1612,878,65,164,235,95,499,929,399,1675,886,86,452,238,487,354,103,7,372,428,971,419,41,56,613,126,819,354,170,1025,1183,2,1201,813,339,272,400,13,221,1021,182,192,1239,52,508,266,42,504,1281,779,1629,46,65,541,1004,115,384,922,89,372,56,211,419,420,149,316,670,1271,253,845,260,25,624,402,54,270,1366,831,170,47,11,235,106,757,854,1343,548,32,29,283,200,11,443,12,372,239,165,440,1099,104,686,335,656,1182,994,1126,14,503,508,766,634,744,660,102,56,449,227,96,357,23,83,653,519,144,9,59,892,253,984,777,178,629,82
|
||||
21
2021/Day8/Day8.py
Normal file
21
2021/Day8/Day8.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
if __name__ == '__main__':
|
||||
with open("input.txt", "r") as f:
|
||||
data = [x.split("|")[1].strip().split() for x in f.readlines()]
|
||||
|
||||
for d in range(len(data)):
|
||||
for entry in range(len(data[d])):
|
||||
data[d][entry] = "".join(sorted(data[d][entry]))
|
||||
|
||||
one = "cf"
|
||||
four = "bcdf"
|
||||
seven = "acf"
|
||||
eight = "abcdefg"
|
||||
|
||||
entries = 0
|
||||
|
||||
for d in data:
|
||||
for entry in d:
|
||||
if len(entry) == len(one) or len(entry) == len(four) or len(seven) == len(entry) or len(eight) == len(entry):
|
||||
entries += 1
|
||||
|
||||
print(entries)
|
||||
143
2021/Day8/Day8_2_Reddit.py
Normal file
143
2021/Day8/Day8_2_Reddit.py
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
def AOC_8_a():
|
||||
with open("src/input8.txt") as file:
|
||||
lines = file.read().splitlines()
|
||||
lines = [x.split(" | ")[1].split(' ') for x in lines]
|
||||
total = 0
|
||||
for line in lines:
|
||||
for item in line:
|
||||
if len(item) == 2 or len(item) == 3 or len(item) == 4 or len(item) == 7:
|
||||
total += 1
|
||||
print(total)
|
||||
|
||||
|
||||
def AOC_8_b():
|
||||
with open("input.txt") as file:
|
||||
lines = file.read().splitlines()
|
||||
lines = [x.split(" | ") for x in lines]
|
||||
total = 0
|
||||
for (lefthand, righthand) in lines:
|
||||
lefts = lefthand.split(' ')
|
||||
digits = fill_dict(lefts)
|
||||
digits["2"] = find_two(digits["1"], digits["len5"] + digits["len6"])
|
||||
digits["9"] = find_nine(digits["4"], digits["len6"])
|
||||
|
||||
digits["len6"].remove(digits["9"])
|
||||
|
||||
digits["5"] = find_five(digits["2"], digits["len5"])
|
||||
|
||||
digits["len5"].remove(digits["2"])
|
||||
digits["len5"].remove(digits["5"])
|
||||
|
||||
digits["3"] = find_three(digits["len5"])
|
||||
digits["6"] = find_six(digits["5"], digits["len6"])
|
||||
|
||||
digits["len6"].remove(digits["6"])
|
||||
|
||||
digits["0"] = find_zero(digits["len6"])
|
||||
|
||||
del digits["len5"]
|
||||
del digits["len6"]
|
||||
|
||||
number = ""
|
||||
for item in righthand.split(' '):
|
||||
item = "".join(sorted(item))
|
||||
for key, value in digits.items():
|
||||
if (value == item):
|
||||
number += key
|
||||
print(number)
|
||||
total += int(number)
|
||||
print(total)
|
||||
|
||||
|
||||
def pd(dict):
|
||||
for (key, value) in dict.items():
|
||||
print(key, ": ", value)
|
||||
|
||||
|
||||
# 0 is the last number to find, and is just the last remaining not used string
|
||||
def find_zero(candidates):
|
||||
return candidates[0]
|
||||
|
||||
|
||||
# 2 is the only digit that shares a unique single segment with 1 (5 and 6 also share
|
||||
# a single segment with 1, but they're thus not unique) among unknown digits. We need both len5 and len6
|
||||
# to check for this uniqueness.
|
||||
def find_two(segment, candidates):
|
||||
az = {x: shares_only_one_segment(x, segment) for x in candidates if shares_only_one_segment(x, segment) is not None}
|
||||
return least_frequent(az)
|
||||
|
||||
|
||||
# 3 will be the only len5 segment not assigned at this point
|
||||
def find_three(candidates):
|
||||
return candidates[0]
|
||||
|
||||
|
||||
# 5 is the only digit that shares three segments with 2
|
||||
def find_five(segment, candidates):
|
||||
for can in candidates:
|
||||
if (shares_x_segments(segment, can, 3)):
|
||||
return can
|
||||
|
||||
|
||||
# 6 is the only digit that shares five segments with 5
|
||||
def find_six(segment, candidates):
|
||||
for can in candidates:
|
||||
if (shares_x_segments(segment, can, 5)):
|
||||
return can
|
||||
|
||||
|
||||
# 9 is the only digit that shares four segments with 4
|
||||
def find_nine(segment, candidates):
|
||||
for can in candidates:
|
||||
if (shares_x_segments(segment, can, 4)):
|
||||
return can
|
||||
|
||||
|
||||
def least_frequent(dict):
|
||||
list = [value for (key, value) in dict.items()]
|
||||
lowest_value = min(set(list), key=list.count)
|
||||
|
||||
for key, value in dict.items():
|
||||
if (lowest_value == value):
|
||||
return key
|
||||
|
||||
|
||||
def shares_only_one_segment(segment, candidate):
|
||||
total = 0
|
||||
for a in segment:
|
||||
for b in candidate:
|
||||
if (a == b):
|
||||
total += 1
|
||||
shared = a
|
||||
return shared if total == 1 else None
|
||||
|
||||
|
||||
def shares_x_segments(segment, candidate, x):
|
||||
total = 0
|
||||
for seg in segment:
|
||||
for can in candidate:
|
||||
if (seg == can):
|
||||
total += 1
|
||||
return total == x
|
||||
|
||||
|
||||
def fill_dict(lefts):
|
||||
digits = {"len5": [], "len6": []}
|
||||
for num in lefts:
|
||||
num = "".join(sorted(num))
|
||||
if (len(num) == 2):
|
||||
digits["1"] = num
|
||||
if (len(num) == 4):
|
||||
digits["4"] = num
|
||||
if (len(num) == 3):
|
||||
digits["7"] = num
|
||||
if (len(num) == 7):
|
||||
digits["8"] = num
|
||||
if (len(num) == 5):
|
||||
digits["len5"].append(num)
|
||||
if (len(num) == 6):
|
||||
digits["len6"].append(num)
|
||||
return digits
|
||||
|
||||
if __name__ == '__main__':
|
||||
AOC_8_b()
|
||||
200
2021/Day8/input.txt
Normal file
200
2021/Day8/input.txt
Normal file
|
|
@ -0,0 +1,200 @@
|
|||
dbc gfecab afcdg dfebcag bd dgbe bcaeg dcefab ecgadb agcbd | acdgb gbcda gdecfba bacge
|
||||
bacdegf aefbdc ebf fdbcag edbfa gdaeb acfdb cdegbf face fe | ebf ecdabf fcbad afcdbg
|
||||
cabgde gd becgfd dgfe cebgf gfdeacb fdbac bcgaef bgdfc gdc | cbfad dg dgef ecfbdg
|
||||
adecgf egfdc cgeadb adbfce dafg bcfeg dge dg fadec dcbegaf | dg dcegf cdgafe gbacfed
|
||||
badeg gdbfcea acgef fgdc bgcaef cd ebcfda gadce edcgaf edc | dce efcga dbgea dc
|
||||
bgfec dbfgec ebgafc afegcdb fca af cgdabf aegf badce cfabe | caf ebacf bafgec cbfeag
|
||||
begacd bd cfadbeg fbecg begfd bgd cdfeag gbaedf fdba agefd | cbgfe fdab efbdg bd
|
||||
bg gfdebc beg gabd fcbae fgaeb afegd gafdce dacbfge efgbda | gdba dfgae dgba gb
|
||||
cfd edcfbg abfcg gfdcb gbcefda dgcbe defg df acebfd caedbg | agedcbf dgbfaec gbfecd cdf
|
||||
bdcag acgebfd eac ae bade abcdgf bdacge bcgea aedgcf efcbg | cfdagb degacb eac edab
|
||||
ga ebcadgf gdaf bga fgecb dfabcg adcfb gadecb fecdab gbacf | fgda gdaf agb gfda
|
||||
gbcdaf fabdceg gbe ebfgad bfdga eg cefabg fdge adegb cedba | ge fcaedbg ebg aecbdfg
|
||||
ab bdeag gbdefc cgafdb fgedb agb befa bagfdec ecgda agfedb | ab aefb abg ab
|
||||
fgceab fcgdb fdcebg cbf gafbd cegfd bced cb cadfge cbdgafe | ecbagf cbfdeg cb bc
|
||||
fgb eafdgcb cefg ebdgac fcbged fbade fg gbfed gbecd fcabdg | fg eadfcgb fgcbda gedcb
|
||||
ecgfda faebc cb fadeb adecbg edfgabc bfgc cab gecaf ecbfag | fcgb bca gbcf cgbf
|
||||
gfaed cg cgab abdcf fabcgd gcfda fgc fdgacbe cbdaef fcebdg | fgc cfdageb cbfgad degfa
|
||||
fbacd gedfac fadegbc gbf degb ecgdf gb bdecfg gcdbf efbcag | cgedfb gb bcdfa cfdagbe
|
||||
dceg deacbg acfbeg egdafbc ebfda dc bcd cgabe gbdafc dbace | cged fabegc febad ebgcfa
|
||||
gbdcae cfgade dc dgbface fdage cbgfa adc gdafc dcfe gbdaef | fedc adgcf fcde dgacbfe
|
||||
afdgbe cgfabe dcgeab aef feacb fbgcade bgace cgef bcafd fe | ebacf abfdegc dbfac facgeb
|
||||
fbeg dgfecba cfgabd eafcb gb edacg gecfab aebcdf ebcag gcb | cfadeb gecda bg gb
|
||||
bfcaeg gd fbagc fgad fgcaedb fdgbac cdaeb dgfecb cagdb bdg | cbfgda dg afcedgb egfacb
|
||||
gd dcafgb dacfbe edbgacf gfbdc fbceg dbg dfag bdfca begdac | aecfdb eagdcfb fdcbgea fgdbc
|
||||
gf dfgc ebfgac bfdace gabfd adgfbc acbfd ecfagbd bgf aedgb | dfgc fdcg gfb gbf
|
||||
gbdae ebadf dbcfag acfdb dfec feacdbg geafcb dcbafe fe fae | efa bdcfa eaf debacgf
|
||||
deafgc fbgedca gfd dcga dcgbef aecfg dg agfebc adgfe dfabe | dgf badgcef fgace cabefgd
|
||||
badcg bagdce bdafgce efgbc df cbgfda cfdbg edgfac fgd adbf | dfcbg df cgbdae bdfgc
|
||||
dgabe beagc gbd gfcbdae gd bdegfa bgfedc fbcdae bafde fagd | bcdfge bgd bcage dfga
|
||||
adgf adgfce aecfg cdega dbgaecf abcgfe egd egcdfb dg deabc | cdgae dafg dfag afdg
|
||||
fbadec afcbg begac be ebcgda dceag edgb efdcga ebdacgf cbe | adfcebg ecafbd debgac edcafg
|
||||
cbd dcga cagbf dcafb cd cdebfg dgafcb baefd cbfaeg cfdgeab | fcdab geacbf gfbdce dgcafb
|
||||
becd abfdc cgbaf efcda bd ebdcaf gdfaceb bdf bdgeaf cedfga | ebdc fbd bdf fbgdae
|
||||
gefacd adcg fedbc cdgfe egd dg dbfega cgbfeda aecfg bcefga | defbcga efcga afgced gdecf
|
||||
gfacbd fbcgde cefba efdcga bfgcead egcdf gfb gcfbe bg edgb | gb fdegc gfb fgb
|
||||
ag agfdcb egfad fag adefb fdgec bdfgcae acfegd gebfdc aecg | fga ag egafd fcgebd
|
||||
cadgbf cd gefbac cdfba fbead cedagb gdcf adc gacbf fgebcda | gcbafd bdcaf gfcd abdfe
|
||||
fgebda fd afceb fcdeb fcad cgbed gabfcde dcabfe def befagc | eacfb efd efagcb def
|
||||
beaf gfcaebd fdeag dae acdgeb gcdfa dgabef gbedf ea dcbgef | ae aed ae ade
|
||||
gb dgeca gecab gcdfaeb ceafb bgc fagb adfceb baegcf gebfdc | fgba bg fecgab bg
|
||||
daf gbfda afcedg geadfb fbcdg fgaebc ad dbagefc dbae aebgf | aebd eadcbgf dfa beda
|
||||
dcbaef cabfd efgcba cbdgfa aedfg abecfdg ace cbde dfcae ce | cbefag ebcd cdabgf cbfda
|
||||
bcgefa bgfcead cd fcbadg bdcga dac gbaed gafdce cfbd bcagf | cbfag acd cfbd bdfc
|
||||
dgfcb aebgd gadefc bgfdec cbafgd cgbad egbdafc ac acbf cga | ca ac cabf abcf
|
||||
cgaed gafbdec fgaedc ba baegcd edfbg agcb bcdeaf ebdag bea | gfceda ecabfgd defgacb aeb
|
||||
cbfag cgdaf dcefab bac ba bdfceg cfgeb eagb cbfgea abcfdge | ba bac gabe cfbeda
|
||||
efcgd ecbafdg fgabed edb ebcg adcfb be efcdgb dfcgae dbefc | dcgef ebd becg gdfaebc
|
||||
fgedabc dafeb eg ged aegfbd afbecd fbgdc edfgb egaf dacegb | gaecdb cbegad fega fega
|
||||
bgfcdae fbcda df eafd gbcaed bdeca gfbac gfdbce bfadce bdf | afcbdeg gabfcde deaf cbeda
|
||||
fcgebda fcga bgfcd ebdfcg degba baf bafgd dfagbc bfcade af | afb agfc af cfegabd
|
||||
cbfg bfd eabfdg facbdg edfcgab bf fcabd aedcf ebgdac badcg | eafdc bdf bf fbcg
|
||||
fbdgce eagbfd dbacfeg dagb geabf cdeaf ebd bd fgbcae afebd | defac bed edb db
|
||||
aegcd bad gdaebcf cabfg db ecbd gafdce gcabd gbcade faebdg | dab dba dba cgfba
|
||||
ecdba bedacfg cdgeba dagcb bdge gdbfac fcadeg ced de acfeb | ed badfgc beacf bcgdafe
|
||||
fg abdeg fgebdca agdceb gfbd gdfae fga cdefa efagbc febgad | fg bgaefc gf bgafcde
|
||||
beadc gcbfed fdc bacf fc cbadefg feadc dgfea dcbefa dcgeba | cdf gefda dfc fbca
|
||||
bd bgcedf decafg gafcdb acgdf agbce bafd gaefbcd cdb acbdg | fcdga afbd cbfdeg cafdgb
|
||||
dabe bgcda egcdb fcdage dcebga bcfge dafgebc gdafcb ed ecd | ebad deba de gcbde
|
||||
ga gadcb ebcfdg egbcd agebdc eagb afcedg dbfca dfceagb dga | dabgc ga agd adbcg
|
||||
cbfagde ecdgf eabgfc fbd egbdf fageb edba dacbgf bdaegf bd | beda deab abgfe cegfd
|
||||
gcdfa gfea ef bdacfeg aedbc efc gfebdc adgbcf fecad aefcdg | feadc fe efc fgcad
|
||||
gdcae fga af acegfb fbda gfead edfgbc agdfecb dbgafe fdbge | fabd gfaed efgbd dagce
|
||||
afdebg febc cdbae abe eb dbfcea dabcfeg aecgdf dabgc dafce | cefb cedgaf eab acefd
|
||||
fgc dcabg gbdefac dfeg ecfdgb bfgcd gebcaf beafdc fg edbfc | cdfeb fcagbe fgbdace febdc
|
||||
aegfbd gacdeb fdeacgb dea dgcefb faeg bdfac dgefb ae debaf | debfg dea ea ead
|
||||
acgedb cfgae egfcbda fdeac eacbfd fd bdagfe dabec def fdcb | fed fd fcbd fde
|
||||
dba bgcfde da cdaf acfbgde fbgdc fgadeb dcbag agbec acgfdb | gacbdef adfgbe bgcad fcdabge
|
||||
acdfe cfgdab cdgea afgcebd dcgbae daf gfea fa egdfac bedfc | fa fad fa cedga
|
||||
caedg bafgde egcba dabegc agd fecdbga bcfeag fecdg ad abdc | gad cbeag dag cabd
|
||||
adfebg fedcagb fagdc gda eadc degcf gdafec ad cdbfge facbg | da aedc cbfgdea ad
|
||||
ecfdba dg dgafec gcabdfe fbadg fadcb gbdfca gfd bgefa dgbc | cgbd dbcaf cgdb dbgcfa
|
||||
ebacg eb begd dcebaf cdgea gafdce ecb cagfb bfadcge egcdba | bgdaecf bedacg dbeg cbdgae
|
||||
ebdagcf cgbea fe agefbc abgdf agfeb egafdc bcef feg deabcg | cegabd ecgafbd ef fe
|
||||
cd cgebdfa fgeabd cbd cabed gfbdec adcf abgce eafbd fcebad | efabcdg bcefgd baedc abfde
|
||||
acfg gbacfd edgfabc bdcaf dca caebdg dafbe gbcdf ac dfbgec | bgcfed cda dbgfc acd
|
||||
agdbefc abdc ecd gfcae aedbf gbcdef ebafdg ecadbf efadc cd | afdeb cde dbafce bfadge
|
||||
begad de fged gfbea dbe gbdac ebfgdac efgabd cadfbe fegabc | de dgfe cgfaeb gadbc
|
||||
gefdc gdfb gdbcaef deb ebfcd gcebad bd dacefg gdcbef fabce | gfedabc deb gcfade fdgb
|
||||
bdec dagcf cefbg bfgace bgedfc edacfbg fgdec fde adgefb de | dbfaegc cedb edfabcg fcdeg
|
||||
eaf gabed cabegdf fe ecbgaf fadeg gadfc fcdega cfde cbgafd | adgef fced cgdbafe fae
|
||||
fcbaedg gadce abcg ceb bgedf adfbec decagf bc dbceg eabdcg | ceb bgafecd cabg acefbd
|
||||
dagb cfgde acgfeb fbgac fcgdb bd dbf cbfagd fcbeda bcefgad | db fegdbca dbceafg aedbfc
|
||||
edagb da dab fbdge cgdfbe acegb adfe abdgfce dfgeab bfgcad | abd dab gfbead eagbc
|
||||
bdfega dcbgf efcgabd ce fec fcegd agce fegad daebfc efdcga | ec ecf dgacef bfecad
|
||||
cdabgef bgdfe aecgb gcfa fc acgebf dcaebf dcbgae cfgeb efc | fc fcga bfecga faecbdg
|
||||
dfeac gdfcea fcg acdebf cdge cgefa bdcgaf cg fegbdac bfage | cfg cfg gfeca fegac
|
||||
bfad bcf bedcga cadeb bf bceafd bcegfd dbaegfc ecfga cfbae | efacdb afbd bcf fb
|
||||
aegfcd bcdeg abcefg gcfea bcgafed bga afbe bagec ab fbdgac | gceba gacbe gbacef gab
|
||||
dca ebda bdfaceg acgdb gbcdea begcd efbdcg efacgd bfagc ad | adcbeg ad cbfga cfbgeda
|
||||
fadebc gcfbea becgf gf fgc abfg ecgbd dfecabg fcedag eafcb | ebfgc gaedfc bgcef gedabfc
|
||||
fadg eafgb gbead bdaec ecagbf dg gdb agfebd aedcgfb cfgbde | bfecdag bgd badce gd
|
||||
egcd efadb gacbfd bcaeg ecadgb adc bacegf adecb dc agedcfb | fcgabe degc acd cd
|
||||
bedfcag gc fagdec gfabce bfgec acgb befac gfc bgdef aecfbd | cg ebfdg cfg gc
|
||||
aegbdf gfabced fadebc gfde ed bcaeg fbgda eadbg fgbacd bde | dbcefag bed afcbged aegdb
|
||||
agd fagec cfbgda bfceagd fgeacb cdae gdbef dagef da efcdga | edbgf gda gedaf cdgfaeb
|
||||
fgaec eb fcgbd agfdeb cedb fabcdeg egb febcg dfbgec cdfgab | fgbcde dbeafg egcfdba gcbfd
|
||||
gfe fdbae ge bfgdc dgfaec cgeb dcfgbe dabfgc fdegb eabgcdf | gebc gceb defbcag afbcedg
|
||||
dfce cgbed fbcagd bcdgf ged bdfgae ed bdfceg agebc fabdegc | fcde gde gecdbf de
|
||||
dba dcafbg gcdefb fbged dgeab bfegad gaecd ba aebf egafdcb | beadg cfdbage bgafde acdge
|
||||
bcgdef cbdgeaf ae fbdace afbde gcdabe gdbfa edbcf fcea bea | dgafb adbfce ea fbdecga
|
||||
afdg fgebc fdeacbg fd gadcb fdcgb gfacbd gbeacd acdfeb dfc | fd bdcafeg caefbd dafg
|
||||
dfebag defa bdgfa beafg agbcfd eab cbagefd cfgbe ea acbgde | abdcge abe ae fecbg
|
||||
ef bgfdeac bdcefg cfdba ecf dgecba gfae abgefc ecbga acefb | debcag afge efag fe
|
||||
cg gbfc gabcd bgade dgc gbecafd egdfac dfbac abdcfe gabfdc | gcbad degfabc cgafbd adbgcf
|
||||
edbcgf acgbf fbaedc cbfae gfc agcdb dagecfb fg fcgbea eagf | fg adcbef fbeac fadcgeb
|
||||
deacg daeb dagbce ecdbgf edc ed bgaefc gecba dagcf abdgecf | cdaeg abcge dec ecd
|
||||
fcgadb caged bedc cdabeg dfaecbg befag db dgb eagbd gacdef | fecagdb begad dgb db
|
||||
fbcdga fgcad fecdg gcedab bfca adc ac bfdga dbfega eafbcdg | adc cbgade fgcadb ceabgd
|
||||
cefdbg gde bgfeac ed begcd cbefg bfde aedcgf cbafegd gacbd | fegbdac gcbefd cbgef bgedc
|
||||
bfdagc afdc bagcf gbfdc begcd begdaf beafgc dbefgac gfd fd | fcda df dfac dcbfg
|
||||
gcbfe bfeacg cedbf ge bfcga gfe gfecda ecbgdfa bgfadc bage | feg eagb gef abfgc
|
||||
bgfec bac abecdfg ab gdcea ebgcfa fagb aebcg caebfd gfcbed | ab ab cba acgbe
|
||||
gdbcf cbedg ce ceg abcgde adbeg efgcab bdfegac adec adfbeg | gaecdfb bedga cge cead
|
||||
eafcb cfdbe aeb acfeg ab dcgbfe adfb fgacedb ecabgd fdbcae | fbcde aedfcbg bea edcbf
|
||||
ebdca egc cgabe fbge cgbfda ge bacfg geacbf afdgec gebacfd | badce cge bgfcea ge
|
||||
gdfecb bdge gdf dgbcaf aefbgc bfecg fgdec dg ecdbfga deacf | dgf fedcagb gd gcedf
|
||||
agdeb cfdbag gcabd ed dacegbf gebfa eagbdc acde efcgbd edb | ed eagdb de de
|
||||
feag cfgbed feacbdg cfgade efcdg fcgdab afd dfeac af abedc | cbagfde dbagfc faeg dgabcf
|
||||
cdg efgbcd decgfa dcegb dgbf gd ebdcfga adebc gbcfe cefagb | bfecg dgbf gdbf dg
|
||||
gab dfceag gdcb bg gbead agdefbc gcabef acged efdba agdceb | gdcb bgdc edbfa bag
|
||||
bgafde afdgc gcafed efgdc ceda gdcebfa gdbacf de gbcef edg | edg gde eadfcbg cade
|
||||
gdb egcfadb gdef abcfd dg ebfag gadbef abdgf aefbgc cbgaed | fedgba dbegfac bfeagd gefcdba
|
||||
gad bdcag becdg gceabd dceafbg fgdeca fcgab ad baed dfcbge | cfaegdb gda ad gaedcfb
|
||||
dafbeg eadgbfc fgd bagcf gedb abdfce gafdb fcdgea gd efbda | gebd fdg gaefcd deagcf
|
||||
cdbe adefb ecfgbad bfcgad bacdf agcefd efd cdeafb aegfb de | gacebdf bdce fbcagd dcefab
|
||||
cb acdgbe bce cdegabf bgdefa aegdb cdbg acbde fcebga fdace | ebc abfdecg ceb gbacdfe
|
||||
cg fcedg edfbag ceag fdbec gdc faedcg bdcefag gbafcd dfeag | geca dgfacb cgd cg
|
||||
bcafde defac dcage dgfbce gafc cgaedf cgd cg fgcedab gdeab | cdg ebadg aedgcf fagc
|
||||
bdec dagbf ecagfb decbfa aefdc aeb dcegfa adefcbg ebadf be | cdbe gfadb eadfc dcbe
|
||||
bcgeda fc badfe gbfdaec fcge cfd bedfc cedbg adfgbc dcgebf | cf ebacgfd fgce fdbceag
|
||||
gd fgbdea dbg badce gdcab fcagedb fbacg beacfg cgfd dcafbg | fcdg gdcbfa dbg gdfc
|
||||
cag cdfa cgade edgcbf fcebga begfcad gfdcae egabd defgc ac | ca agc fgbace gac
|
||||
ecabf geacfb eabdcf dec cd bgecfda gfdbce edcba cdaf adgeb | ced aedfgbc dc gbeda
|
||||
fbdac ea cadefg fae beag facbe bfgeacd cfdegb bgfec gfecba | agbe ea bafce egbdcf
|
||||
bdc dbega abcdg gbcfa dc gcde cgbaefd cdfbae eagdbf ebgadc | adefcb agcfb cdb gced
|
||||
ceb ce debfca abgdfe bdaeg cabegd caeg dbgec dcbfg bdecgfa | ce abegd gdfcb fcbdgae
|
||||
cafedgb dgf bcfd cgdfbe acedfg gbfed agedb aecgfb bfgec fd | fdgbec feacdg df bgcfe
|
||||
ef abgfc cagfeb gdebfc fbae bcadfg defgabc feg gefac gceda | degac gfbac gabfc gfcea
|
||||
bfdeca bd eabfgc degbcfa cgdb gefbc dbf ecfbgd gaedf edgfb | dbfge bdf egbfca db
|
||||
fac cbdfg eacfbg gaecfdb bacfd bfeda acgd ac gbfecd cgfadb | dagc ac dcga bedfa
|
||||
egfbca aegcf gdcfab fdc adce fcedg cd cfgead fdebg cedagbf | dcgfe fdgbcea aedc cfebga
|
||||
da bfged afedcb gcebdf gefda fedbga edgbfca gdba eagfc eda | ead dcfebg defcgb efgbcd
|
||||
adefgb ecgf gcedb fedacb bec fbecdg cdfaebg gedfb gcbad ce | dcbfeag cfbged efgbad bcdfage
|
||||
dfec gcd agdbe bdafgc afcbge bgecfad bgcde bgfce bgedfc cd | fbecag beagdfc cgd cedf
|
||||
edbc agcfbe adefg cd defca gfabdc cad dgabefc dfebac bceaf | dbce ebdc febcdga cdgbefa
|
||||
ecdb eb acgebdf ebf dcfebg bgdefa fcgbd gcdbaf feacg cfebg | bef ecfbg egdcbfa cdgfb
|
||||
ebfcgd aefcb bfadge efd ed adfcgb fbgdc bfedagc fcebd dcge | gced fbcgd edgc ed
|
||||
beagf cefbag ebafc gfce gdfeab fcaedbg ec dfcba ecb gbadec | ce acfdb dbgcafe ec
|
||||
abegfc fbcged bgfea fecabdg gef ge abdgf gaec afecb cfbdea | cbfaedg bface gfe efabgc
|
||||
bdg bacd edagb fbegac fgaed bdgcae cgbea dfbegc ecgafdb bd | gdeaf cfdgbe gbcaed bd
|
||||
fbce fdegca egafb aef egdcfba eabgc fe ecdabg agfbd ecgbaf | fadgb cbage bcgdea abfgec
|
||||
dbafge fedgcab efgdbc bc fbac fbdea gceda bfceda bdcea ebc | eadcb fcdeab cafb bdecgf
|
||||
cbgae fec aefgcb acfeg fe efgcbd bgceafd fbea cagbed dcfga | edbagfc acefg gbdface ecf
|
||||
cbfdga bae ebdf fbadge afdgb gfeac acbdge bdacfeg eb agfeb | edbf bea efdcbag aeb
|
||||
efdcgab bedgaf aecbgf cgfe gfaeb cbgea ecbfad ec gdcab ecb | cgfe eabfg eabgf ec
|
||||
bdefa dfebgca bfe eadfcb dcbage bfgad debca cgebaf ef cdfe | gacdbe eagcfbd afcgebd dfgbace
|
||||
gca ebdcfa fdcgea acedb bdcgf eabg gbacde bcgdeaf ga gacdb | ebag abge gac aecdb
|
||||
abcgf afgcbe baeg gbc ecdbgf gafce facbd cfgade bg egabdfc | aegb cgb bcdgef abcgf
|
||||
ecagbf bdfgca ecgfd gbe fecgb dafgecb bacfg bgadec efba eb | geb cadfebg beaf be
|
||||
agcdb bgcaf bf fadebgc daecbf gbdf fbc ebgcda afegc bgcafd | facgdeb dbfg fb bf
|
||||
fdbeag cgd bdefcag afegd eacgdf dc dgefc ebcagd gfebc facd | geadf dc dc cdg
|
||||
adcgfe cgebf acdbf abcedf dgfbaec edba cabef ea afe dfagcb | bfgec bfeca ae deba
|
||||
adegb bgcd cbdfgea dc cedba cagefd dcbgae gebdaf faebc ced | egadb ced dcbg dc
|
||||
fdeg gd fdbaec bfacg dgcfa ecfdga fadcegb fdcea dceabg gda | efgd eacdfb bcfadeg dag
|
||||
af ebgfda ecagdb febgc afe dabce cfda febcda baecf becafdg | fa dbfega fa bfeagd
|
||||
debagfc cbdgfe dcb fdbeg cegb fbced fcead cbdfga bc fabdeg | dcb efadgb dgcfeab ebafdg
|
||||
cgfdae bdef becfg gcbefa ed abcdg gedcb cgbdef bdcgefa ecd | cde dec bfed bfcgdea
|
||||
dcfegab becdg gcaedb egd bcdaef gcfdb eg eafcdg cdeab ageb | ged cegafbd egd eg
|
||||
ba eafcd fcbegda acfgbd bedcgf ebgcfa fabdc dcgfb bagd baf | ba cafed efdbcag efdac
|
||||
aebcdgf cd efbgac bfcgd cbfga gbefd bfdcga bcad geafcd dgc | fabcged fgaceb cbda dc
|
||||
cgbaedf fbceg eafbcd degcf gfdcae gdcfa dbagcf dgae edf ed | fcgeb efd ed gdea
|
||||
ac agfdcbe gcea dgecf fgdca efgcad dfbeac fca fdgba gcebfd | agbdf ca ac gbdfa
|
||||
gbedaf dbgfc cbg abdfgc geadbc fecbd ebcgafd cafg gc dafbg | cdbfg gcfbad gcbdea fadcegb
|
||||
bagfec efg bfcdga egac abfecdg afdbge dbefc ge cgbfe acfbg | fbdeag eg eg cbdfe
|
||||
edbgcf dgbac bdceag dbagf cgd ecagb bceagf cd adce cgbafed | aecd egdbca gacbe gcd
|
||||
bgfdc gdfbe afdbgc gc fbdac bacg gbafdec cdg cbdefa defagc | egdfb gcabdef cdbfa dgacfb
|
||||
adgcfb gcd dfecgb cgebfa bgcaf adgcf cdbafeg dg ecafd adbg | bcgaf fadcgeb gd cgbaedf
|
||||
bafgd cfaebg cefa cfbgead bcf bgcea defgcb bgacf ebcgda cf | fcbgae adfbg cdfgeb adgbf
|
||||
becfa bcgdf gbceadf gebcfa defa adbcge de dec cebdf bdefac | faed fdcagbe edc bfacge
|
||||
ebfgd gabd gd gfbcaed abgfec faegb dge aefdbg agdfec cfebd | faecdg cgaedf baefgd dcfeb
|
||||
ecabd ged aebgfc ecagd dg fdcegb afgce dgaf dcaegf cedbgaf | edcga gfda gd dge
|
||||
dfg fg eafdb aegdc faged gfba debafg ebgfcad gfbdce acedbf | fedagb edbfac gf fgd
|
||||
dbgca fedca bfgcad adgcf agdecb dgf cefdgba bgaedf fcgb gf | acefdgb beafdg gfd cfbg
|
||||
edgacf adegcb fd dbacgfe fabd dfbce egcfb edfbac cbeda fde | dafb bafd acefbd fd
|
||||
bcefa gbfd eadcgb bgfdae gedcfa abefd efd df gedba fbdgeac | bfdae fgeacdb bacfe gdceba
|
||||
bdcefg aefgcd gadcb gfb decbfag dfecg bfdgc defb cefagb fb | defb fbcged dbfegac egfdc
|
||||
fe cedgab cbfe dacbfge cedba fed gafcd dfaec edbfac efdgab | abgedf efcb bedac gefbad
|
||||
afcgbe cf fbc cegadb bfcdea fcgabed aebdc adfgb cedf cfadb | dafbc bfeagc bcf deacbgf
|
||||
ebcafdg ecfbg bae dgcabf bcaedg dfbeca ae ebcag gdacb dage | cadbeg gbacd bfdegca eba
|
||||
cadbe efgbc feacbg dgfecb bgd dg bgfcad ebdgc dgef gbdefca | aefcgb gd bfagced dgb
|
||||
edgcfa dgbecfa bgedac dfbaec acgdf dg abfgc egdf adcef gdc | cgd cbgfa eacgdb gcafd
|
||||
cad cfbead abceg edfa fadbcg becad edgfcb bgfaedc cdbfe da | egcab afde dcabfe ecfabd
|
||||
fgbdc be egb bcdefag ceba gedbac egcda dcfgae debcg gbdaef | ceba edgac eadcfg bcdaeg
|
||||
cg adcfgbe edbcga gbead cbdfa cga bgedaf faecdg dbacg cebg | gcdabfe fdacge cga bcgad
|
||||
gacf gf bgeafd gef gefbc efbagc bdceag fdebc acfbedg gbaec | bcgaedf egf gcefb cafdegb
|
||||
fgbadce cdbag agcfd faec acfegd fa fag cfged fdabeg dbfcge | agf bagefd edgfc gdbacef
|
||||
agcdb gcadfb dgfcb gfdbec adebg adc ac cfab beagdcf daecfg | ac ca bedga ca
|
||||
dfa abdcfg agbf cfabd dacgb dcebf eadgcb fa gbdafce ecfgad | af fa bcdaf bgaf
|
||||
ebdfc cgbaed eg edabfc gefb adfgc gdfec deg ebdfgc debgcaf | abfcde bfge gde dge
|
||||
dabfegc dfegb cbgf cf fdebgc dcbaef gcfed adecg fbdgea fce | cf gbfc fgcb begcadf
|
||||
0
2021/Day9/Day9.py
Normal file
0
2021/Day9/Day9.py
Normal file
0
2021/Day9/input.txt
Normal file
0
2021/Day9/input.txt
Normal file
6
2022/Day1/Day1.py
Normal file
6
2022/Day1/Day1.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
if __name__ == '__main__':
|
||||
with open("input.txt", "r") as f:
|
||||
weights = [sum([int(i) for i in nums.split("\n")]) for nums in f.read().split("\n\n")]
|
||||
|
||||
print(f"Solution 1: {max(weights)}")
|
||||
print(f"Solution 2: {sum(sorted(weights)[-3:])}")
|
||||
2256
2022/Day1/input.txt
Normal file
2256
2022/Day1/input.txt
Normal file
File diff suppressed because it is too large
Load diff
0
2022/Day10/Day10.py
Normal file
0
2022/Day10/Day10.py
Normal file
0
2022/Day10/input.txt
Normal file
0
2022/Day10/input.txt
Normal file
0
2022/Day11/Day11.py
Normal file
0
2022/Day11/Day11.py
Normal file
0
2022/Day11/input.txt
Normal file
0
2022/Day11/input.txt
Normal file
0
2022/Day12/Day12.py
Normal file
0
2022/Day12/Day12.py
Normal file
0
2022/Day12/input.txt
Normal file
0
2022/Day12/input.txt
Normal file
0
2022/Day13/Day13.py
Normal file
0
2022/Day13/Day13.py
Normal file
0
2022/Day13/input.txt
Normal file
0
2022/Day13/input.txt
Normal file
0
2022/Day14/Day14.py
Normal file
0
2022/Day14/Day14.py
Normal file
0
2022/Day14/input.txt
Normal file
0
2022/Day14/input.txt
Normal file
0
2022/Day15/Day15.py
Normal file
0
2022/Day15/Day15.py
Normal file
0
2022/Day15/input.txt
Normal file
0
2022/Day15/input.txt
Normal file
0
2022/Day16/Day16.py
Normal file
0
2022/Day16/Day16.py
Normal file
0
2022/Day16/input.txt
Normal file
0
2022/Day16/input.txt
Normal file
0
2022/Day17/Day17.py
Normal file
0
2022/Day17/Day17.py
Normal file
0
2022/Day17/input.txt
Normal file
0
2022/Day17/input.txt
Normal file
0
2022/Day18/Day18.py
Normal file
0
2022/Day18/Day18.py
Normal file
0
2022/Day18/input.txt
Normal file
0
2022/Day18/input.txt
Normal file
0
2022/Day19/Day19.py
Normal file
0
2022/Day19/Day19.py
Normal file
0
2022/Day19/input.txt
Normal file
0
2022/Day19/input.txt
Normal file
49
2022/Day2/Day2.py
Normal file
49
2022/Day2/Day2.py
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
if __name__ == '__main__':
|
||||
with open("input.txt", "r") as f:
|
||||
rounds = f.read()
|
||||
|
||||
signsWin = {
|
||||
"A": "Y",
|
||||
"B": "Z",
|
||||
"C": "X"
|
||||
}
|
||||
|
||||
signToSign = {
|
||||
"A": "X",
|
||||
"B": "Y",
|
||||
"C": "Z"
|
||||
}
|
||||
|
||||
signLoose = {
|
||||
"A": "Z",
|
||||
"B": "X",
|
||||
"C": "Y"
|
||||
}
|
||||
|
||||
signsToScore = {
|
||||
"X": 1,
|
||||
"Y": 2,
|
||||
"Z": 3
|
||||
}
|
||||
|
||||
score = rounds.count("X") + rounds.count("Y") * 2 + rounds.count("Z") * 3 + rounds.count("A Y") * 6 + rounds.count(
|
||||
"B Z") * 6 + rounds.count("C X") * 6 + rounds.count("A X") * 3 + rounds.count("B Y") * 3 + rounds.count(
|
||||
"C Z") * 3
|
||||
|
||||
print(f"Solution 1: {score}")
|
||||
|
||||
rounds = rounds.split("\n")
|
||||
score = 0
|
||||
for current in rounds:
|
||||
hisSymbol, result = current.split(" ")
|
||||
|
||||
if result == "X":
|
||||
score += signsToScore[signLoose[hisSymbol]]
|
||||
elif result == "Y":
|
||||
score += signsToScore[signToSign[hisSymbol]]
|
||||
score += 3
|
||||
elif result == "Z":
|
||||
score += signsToScore[signsWin[hisSymbol]]
|
||||
score += 6
|
||||
|
||||
print(f"Solution 2: {score}")
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue