Compare commits

...

12 commits

47 changed files with 3780 additions and 8236 deletions

View file

@ -1,13 +1,17 @@
day%.out: out/types.o day%.cpp
g++-10 -std=c++2a $(flags) $(@:out=cpp) out/types.o -o $@
day%.out: out/types.o misc/main.cpp days/day%.cpp
g++-10 -O3 -std=c++2a $(flags) -Dcurrent_day=$(@:.out=) days/$(@:out=cpp) misc/main.cpp out/types.o -o $@
day%.cpp:
cp template.cpp $@
day%_test.out: out/types.o misc/main_test.cpp days/day%.cpp
g++-10 -O3 -std=c++2a $(flags) -DTEST_BUILD -Dcurrent_day=$(@:_test.out=) days/$(@:_test.out=.cpp) misc/main_test.cpp out/types.o -o $@
out/types.o: types.hpp types.cpp
days/day%.cpp:
cp 'misc/day.cpp.template' $@
sed -i -e "s/current_day/$(shell basename $@ | cut -f 1 -d '.')/g" $@
out/types.o: misc/types.hpp misc/types.cpp
mkdir -p out/
g++-10 -std=c++2a $(flags) -c types.cpp -o $@
g++-10 -std=c++2a $(flags) -c misc/types.cpp -o $@
.PHONY: clean
clean:
rm out/* day*.out day*.output
rm -f out/* day*.out day*.output

View file

@ -1,200 +0,0 @@
1587
1407
1717
1596
1566
1752
1925
1847
1716
1726
1611
1628
1853
1864
1831
1942
1634
1964
1603
1676
1256
1906
1655
1790
1666
1470
1540
1544
1100
1447
1384
1464
1651
1572
907
1653
1265
1510
1639
1818
376
1378
1132
1750
1491
1788
1882
1779
1640
1586
1525
1458
1994
1782
1412
1033
1416
1813
1520
1968
715
1396
1745
1506
1024
1798
1870
1615
1957
1718
1349
1983
1387
1738
1588
1321
1160
1907
1861
1940
1475
2004
1852
1760
1608
1028
1820
1495
1811
1737
1417
1316
1087
1803
1595
1346
1971
1692
1678
1330
1480
1097
1898
1973
1567
1733
1336
1381
1327
1670
1436
1989
1334
89
1862
1715
1743
1967
1765
1402
1729
1749
1671
1196
1650
1089
1814
1783
1225
1823
1746
2009
1886
1748
1481
1739
1912
1663
1668
1314
1594
705
1449
1731
1487
1648
1466
1317
1979
1799
1926
1703
1656
1978
2005
1865
1982
1951
1892
1713
1744
1598
1606
1583
1895
1804
1430
1816
1364
1575
1918
1431
1812
1471
1797
928
1934
1156
94
1563
1909
1453
1392
1427
1819
1524
1695
1866
2008
1413
1698
1051
1707
1904
1681
1541
1621
1421
1809
1576

View file

@ -1,96 +0,0 @@
133
157
39
74
108
136
92
55
86
46
111
58
80
115
84
67
98
30
40
61
71
114
17
9
123
142
49
158
107
139
104
132
155
96
91
15
11
23
54
6
63
126
3
10
116
87
68
72
109
62
134
103
1
16
101
117
35
120
151
102
85
145
135
79
2
147
33
41
93
52
48
64
81
29
20
110
129
43
148
36
53
26
42
156
154
77
88
73
27
34
12
146
78
47
28
97

View file

@ -1,95 +0,0 @@
LLLLLL.LL.LLLLLL.LLLLLLL.LLLLLL.LLLLL.LLLLLLLLLLLLLLLLLL.LLLL.L.LLL.LLLLLLLL.LLLLLLLL.LLLLL
LLLLLL.L.LL.LLLL.L.LLLL.LLLLLLL.LLLLL.LLLLLLLL.LLLLLL.LLLLLLL.LLLLLLLLLLLLLL.LLLLLLLL.LLLLL
LLLLLL.LLLL.LLLL.LLLLLLLLLLLLLL.LLLLL.LLLL.LLLLLLLLLLL.L.LLLL.LLLLL.LLL..LLL.LLLLLLLLLLLLLL
LLLLLL.LLLL.LLLLLLLLLL.L.LLLLLLLLLLLLLLLLLLL.L.LLLLLLL.L.L.LL.LLLLL..LLLLLLL.LLLLLLLL.LL.LL
LLLLLL.LLLL.LLLL.LLLLLLLLLLLLL..LLLLLLLLLLLLLL.LLLL.LL.LLLLLL.LLLLL.LLL.LLLL.LLLLLLLL.LLLLL
LLLL.L.LLLLLLLLLLLLLLLLLLLLLLLL.LLLLL.LLLLLLLL.LLLLLLL.LLL.L..LLLLL.LLLLLLLL.L.LLLLLL.LLLLL
LLLLLL..LLL.LLLL.LLLLLLLL.LLLLLLLLLLLLLLLLLL.L.LLLL.LLLLLL.LL.LLLLL.LLLLLLLLLLLLLLLLL.LLLLL
LLLLLL.LLL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.LLL.LLL.LLLLLLLLLLLLL.LL.LLLLL.LLLLLLL.LLLLL
LLLLLL.LLLL.LLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLL.LLLLLLL.LLLLLL.LLLLL.LLLLLLLL.LLLLLLLLLLLLLL
LLLLLLLLLLL.LLLL.LLLLLLL.LLLLLL..LLLL.LLLLLLLL.LLLLLLLLL.LLLLLLLLLL.LLLLLLLL.LLLLLLLL.LLLL.
LLLLLL.LLLLLLLLLLLLLL.LL.L.LLLLLLLLLL.LLL.LLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLL.LLL.L
LLLLLL.LLLLLLLLL.LLLLLLLLLLL.LLLLLLLL.LLLLL.LLLLLLLLLLLLLLLLL.LLLLL.LLLLLL.L.LLLLLLLLLLLLLL
LLLLLL.LLLLLLLLL.LLLLLLLLLLLLLL.LLLLL.LLLLLLLLLL.LLLLL.LLLLLL.LLLLLLLLLLLLLL.LLLLLLLL.LLLLL

File diff suppressed because it is too large Load diff

View file

@ -1,323 +0,0 @@
.....#............#....#####.##
.#.#....#......#....##.........
......#.#.#.....###.#.#........
......#...#.....#####....#..##.
...#............##...###.##....
#.....#...#....#......##....##.
#...#.#....#..#..##.##...#.....
.......#..........#..#..#.#....
.#.....#.#.......#..#...#....#.
#..#.##.#..................###.
...#.#.##...##.###.....#..#...#
..#.#...#............#.......#.
#..#.#..#.#....#...#.#.....#..#
#......##....#..#.#.#........#.
....#..#.#.#.##............#..#
....#..#..#...#.#.##......#...#
##...#...........#.....###.#...
..#...#.#...#.#.....#....##.##.
....##...##.#....#.....#.##....
#........##......#......#.#.#.#
....#.#.#.........##......#....
.#......#...#.....##..#....#..#
....#..#.#.....#..........#..#.
..##...#..##................#.#
.....#....#.#..#......#........
........#..#.#......#.#........
.....#.#....##.###....#...#....
...##.#.......#....###..#......
............##.#..#...#........
#..###..#.....#.####...........
.......##.....#......#......#..
#........##..#.....##.......#.#
#.##...#...#...#......##..#.#.#
......#....##.#.#...#...##....#
#..#....##.#......#.......##...
.#..........#..........#....#.#
#.....##......##....#..........
..#.#.....#.#...#........#.....
...#........#..#..#.##..##.....
......###.....#..#...#.###...##
.##.##.......#.......###...#...
#.#..#.#.#....#.....###..#...##
......#.##..........#.......##.
#..#.#.........#.....##...##...
..#...#....#....###.#......#...
.....#..#.######.....#..#.#....
..#.#.....#.....##.#....##.#.##
...#.#.#....#....##..#..#.#.##.
...........#.#...#..#..####....
.........#####.#.#.#...#.##.#..
.......#...#......#.##.#.##....
....#.....#.....###..........#.
.#.###....##.#..#..........#...
#...#.........##.....####....#.
##....##...#..........#........
...#.#.#.#....#..........#.....
.......#....#......##.......#..
.#.#..#.........#.#.##....#....
..#.............#..##.#.##..###
.#.##..............#..#..##..#.
..##.#..#......#...##..#.##...#
......#..#....#....#....##..#..
...#...##.............#..###...
...##....#.#.##........#.....##
....#.#.......#..###..#....####
#...#...##..#.####..#...##....#
.......#..#.##..#...#.#........
###.#......#..##..#......#.##..
#....#............#.....#......
..##...#..##......#..#....#....
.#..##...#....#.#...#...#..#..#
........#....###...#..##..###.#
.........#....#....#..#.#.#...#
.#....###.##...#.#...........##
..#..#.#..#.#.##..#...##.......
##..#.#.#....#...#..#..........
#..#.......#....#..##...####...
............#.#..........##.##.
#...#..#.#....#..#.#....##.....
......#...#...#.##............#
#.....##..###..#.#..#.#.##..#.#
#..#.#..#......#.......##.#....
##..#.#..#...#......#.##...###.
.#....#..............#....#.#..
..#.#..##....#....#..##........
.#.#...#..#.....#.#..##........
.....#..#.#......#....#.#..#.#.
....#.###...###.#.#.....#......
...........#.#....##....##.....
..#..#.##..........#...#...#..#
.....#.###.#..........#........
....#....##........###...#.....
.#.....##.......#....#..##..###
#.....#...............##......#
#..#.#..#.#.#.....#.#...#......
.##.###...#....#..........##...
.#.......#.....................
.#.#....#...##..#...#...##.....
.#.#...#.......#.......#...#...
....#.#..#.#..#...#....##......
....##.....#.##....#.##..##..##
..#............#...###.##..#...
.#..#.........#.##....#....#..#
.#..##..#..#........#.#.##.#.##
.###.#...#...............#...#.
...#.##.##.#......#...#....##.#
#......##.......##...###....#.#
#..##.....##......#.#.##....#.#
...#.#....#.#.#...........##..#
#.....##......##.#..........##.
###....#.#...#.#..####.........
.##.#.#...##..#.....#..#...#...
#.....#.#......#..........#.#..
..###.##.#...................#.
#.............#..#........#.##.
#.#.#.#..#.....##..##.#....#...
...#...#..#...#..##..##........
...##...##..#...##...........#.
.####..#.#.#.##.#.......#......
...#....#.......#......#.......
.....#.#...#...#..##..#..#.....
......#.....###.#..#..#.#..###.
.#....#....#..#..##.....##...#.
.#.............##.###.#...#.#..
#..#..#......#.###............#
##.#..##....#..........#.#.#...
......#........#...#.......##..
....#.#..#..........#.....#.#..
...#..#...#.#...#........#.....
.....##...#....#.........##.##.
....#...#...#.##.##...#....#...
.#..#.....##......#..#.#..#....
........##...##.##......#.#.#.#
.................#..#.....##.#.
...#.....#...#.........#..#.#.#
....##.#.....#........#...#..#.
#...............#..#.....#...#.
.....#..#....#...#.####.#.#....
####.#..#.##...#....#...##.....
#...##..#...####..#....#.#...#.
..#.......#.##..##...#.#.......
...........##.......#....#..#..
#.##....#...#.....#....##......
....##.#.......#..#...##.......
...#.........##.#..#......#.###
.#..#..#....#.#.##....###..###.
....#.#........##........##....
....########....#.#.#.###.#...#
...#.###.###.##......##.......#
.#...#.###.......#..........#..
..#..##.........#............#.
.......##.#...#...##...#...#..#
#.##....#.#...#.....#..#.#.....
..#........#..#.#.#.#....#.##..
...#...#.#.........#...#.#..##.
#....#......#.#...........#..##
...#.#.#..#...##...#...#...#...
###..........#.#..........#....
..#....#.#.#.#............#.#..
....#...#..###...#.#....#......
#...........####......##.#.....
..#..##.#...#.....#..#.......##
#.....#..###.....#...##..##....
##..###..##...........#.#...#..
.....#......#..............#...
#..#.##.###.......#.......#...#
#........#....##......#.#......
.#.#.#...#.......#........#.##.
#..#..##.....#...#.#.#.#..###..
.#.#....#..#..#.#....##.#.#....
..#.#.........####.#...#.#.###.
....##........##....#........#.
................#..........#...
..#...................###.##..#
.........#..#..#.#...#....#.#.#
......#.....###.....#.#..#...#.
.#.#.....#..##............##...
...##......##.#....#...........
...##..##..###.#...##..........
....###...#..#.#......#......#.
....##..............#..#..#.#..
####.......#...##.##..#.#......
.#......#.....#....###..#....#.
.#.......#...##...#..##.#......
#.......#.......#.#....#.#.#..#
........#..#..#............##.#
#.#...#.#..##..#.......##..#...
...#....#...#..........##..#...
#.#...#.##....###......##....#.
#..#...###........#..#....#..#.
#....#....###....#..#.......#..
....#.#........#.............#.
.#.##........##...#...#...#...#
#.....##.....#.......#.#.#.....
.#.##..........##..#....#......
.#..##.##.#...##....#.#....##..
........#.#.##.#....#.#..#....#
..#...........................#
.#...........#....#....#.#..#..
........##...........#...#...#.
..#.....#..#......#..##.......#
..#....###..###...#.#.#..#....#
#..#.#...#......##......#......
...........#...##..##....##....
#.#......###..#.....#.......#.#
#.....#....#....#.#...#...#....
....#...#.......#....##.#..#...
.####..##......##.#........#..#
..###..#.#.....#...........##..
..##.#.#..#....#..#..#.........
..........#.#.#####...#........
.###......##.#....#........#...
.....#..#..#.#..#.........#....
..#....#...#...#...##..........
....#..##.#.........##.#..##...
##.####..#...#.#...#.....#..###
..#..#...#...#.....##....#..#.#
#..##..#.....#....#.#.....##..#
...#...........##.....#......#.
......#...#.....#.#..###.......
.........#.....###.##..#...#...
.#...#.##...#..........#.#..##.
......#.......##.....#.....##..
........###..........#...#.....
##.......###..###...##...#.....
#.#.............#..#..#.#......
..##........#.###.....#....##..
......#...#......#....##......#
..#.....#...##...#.......#..#..
..#.###..##.##...#....#...##.#.
........##...#..#.#..##.....#.#
.......................#......#
..##.###......#.#.............#
....#...........###............
##...##.....#.......##.......#.
...#..##..##..#.#.###..#......#
........#........#.#..#..#.....
.#......#....##..........#...#.
.##...........##....#..........
.#..#....###.......#....#..##..
.....###..........#....#.#.#...
...#....###.#.#......#......#..
#.#.##.#.....#..#........#...#.
...#.##.........#..#.....#.....
.##...##......##...###...#.....
...#.....#.##..#...#..#........
........#............#.#.#..##.
###...#.....#...#..#........##.
##...#..#.....#.#....#.#.#.....
#..##.......#...#.#...##..#....
#...#.##.....#.#..#.##......#.#
..#......#.#.#.##.##..........#
..#.##......#.#.#..##..........
....#..#....#..#..............#
..........###.....##..#........
...#.....##.....#..#.#..#...##.
.#..##.#..#....#.#......#.##...
...#.....#..#.#...#..#.....#.#.
#...#.#......##...#..#...#....#
..#.......##...#..#.......#...#
#.....#...........##.#.........
.#......##.....####...#.......#
........#..#.....#.......#..#..
....#.#...##..##...#..#....#...
#.#......#...#.#.###.....#.....
..##...#.#........#.##....#.#.#
.#....#......#.#...###.#.......
.......#.#...##....#.#....#....
.....##..##...#..#.#.....##..#.
.##..#.#.#....##.#...#.....#...
.#..#..##....#.##.......#...#..
....#.##...#..##......#.....#..
.#..#....##....#...............
..##...#.....###...............
..............#.#.##........#.#
.#.#....#....#...#.#........#..
.##...#...#.#....#....#.#.....#
#..............#......#.####.#.
......#...........#..#.....##..
#.#..##.##.....#......#..#.#..#
##.##..#.##.#.............#...#
...#..#......#....#............
........###.#.#..#...#.....#.##
..#.......#.##.........#..#....
...##.#........##...#.#.##..#..
...#..#......#...#....#........
...........#..#..#...##...#....
...#.....#....#..####..##.....#
.......#..#..#......#.........#
#......#........###.....##....#
..#..#..#.#.#....##...##......#
#.#..#..###.#..#.....####......
.#................#####....#...
.#.........#...#.......#......#
..#.......#######........#.....
..#........#.....#..#...#..#..#
.#..#.#..#....#.#..##...#..#.#.
..#...........#.#...#.#.##.....
...#.#.#....##.###....#...####.
.....#..#.....#..#.#.........#.
......##...#...###............#
..#.#......###..####..#......#.
###.##.#..#......##.#..##.....#
....###...##............#.#....
..#.....##...#...##....#...#...
#.....#.....#...#...#.#..#.....
####..........##.#.#..#.....##.
...#..........#...#...##..##.#.
..........#.........#.#..#..#..
#....###.....#.#...#.......##.#
#..#.##.....#..........#...#...
...#.#.###.......##..#.....#...
#...#.#..#.............#..#.#..
#........#.................#..#
..#.#....#.#..##.#...#..#....#.
#...#..........#...###....#...#
......#.............#....#....#
#.#.......##.......#.#....##..#
##...#....#.............#..#...
........#...###.##.#..###.#...#
...##...#..#..#...##..##......#
..#.......##....#.#.##....#....
.....#....#..#.#...##.#.#.....#

File diff suppressed because it is too large Load diff

View file

@ -1,817 +0,0 @@
FBFFFFBRLL
FFBFFFFRLR
BFBBFFBRLL
FBBBBFFLLR
BFFFBFFLRL
FBBFBFFLRR
FBBFBFBLLL
BFFBFFFLRL
FBFFBBBLRR
BFFFFFBRRR
BFBBFFBRRL
FFBFFFBLRL
BBBFFFFLRR
BBFFBFBLRR
FBFBFFBRRR
FFBFFBBLLL
BFBFFFBRLR
BFFFFBFLLL
FFBBFFBRRL
BFBBBFBLRL
BFFBBFBLRL
FFBBBFBRRL
BFBBBFBLLR
BBFBFBBRRL
FFBBFBFRLR
BFBBFBBLLR
FFBBBBBRLL
FBFBFFFRLR
FBFBBBFRRL
FBFFBFFRLR
FBFBFBFRRL
BFBFFFFLRL
BFBFBFBRRR
FFBBBBBRRR
BFFFFBFRRR
FBBFBFBRRL
FFBFFBBLLR
FBBFFFBRRR
BFBFFBFLLL
BFFBBBBLLR
BFBFBFFRRR
BFBBFFFRLR
FBBFFBFLRR
BBFBFBBLRR
BBBFFFFLLL
FFFBBBFRRL
FFFBBFFRRL
BFFFBFBLRR
FFBBFFFRRR
BFFFBFFLLR
BBFFBBFLLR
BFFFBBFLRL
BBFBBFBRRL
FFBFFBBRLL
BFFFBBBLLR
FBBFFFFLRL
BFBFBFBRLL
FFBBFBFRLL
FBFFBBFLLR
FBFBBBFRRR
BFFFBBFRRR
FBFFBFBRRL
FBFBFBFLLR
FBBFFBBRRR
FBBBFFFRRR
BFBFBBFRLL
FBBFFFBLLL
FFBBFBBLLL
BFBFBBBRLR
FBBFFBFRLR
BFBFFBBLLR
BFFBBBFRRR
FBFBBBFLLL
BFFBFFBRLR
BBFFBFBLLL
FBBFFBFLLR
BFBFBBFRRL
FBBFFBBLL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bags contain 4 dark fuchsia bags, 1 shiny purple bag.
dotted olive bags contain 1 striped gray bag.
vibrant brown bags contain 4 dark tan bags, 4 mirrored gray bags.
shiny black bags contain 3 mirrored black bags.
dull bronze bags contain 2 plaid aqua bags, 4 shiny magenta bags, 2 faded green bags, 3 dotted gold bags.
wavy plum bags contain 5 dim indigo bags.
drab brown bags contain 5 clear fuchsia bags.
vibrant maroon bags contain 3 shiny coral bags, 1 dim indigo bag, 4 muted crimson bags, 5 clear black bags.
posh magenta bags contain no other bags.
dull brown bags contain 3 dim violet bags, 3 striped silver bags, 1 shiny purple bag.
pale gray bags contain 3 plaid magenta bags, 3 clear teal bags, 3 pale white bags.
plaid turquoise bags contain 4 bright orange bags, 5 drab white bags, 4 dotted coral bags.
dotted silver bags contain 2 pale silver bags, 4 dark teal bags, 5 posh gold bags, 1 bright orange bag.
light red bags contain 1 dark violet bag, 1 mirrored coral bag, 3 drab tan bags, 4 muted olive bags.
shiny brown bags contain 5 vibrant lavender bags, 4 dark lavender bags.
plaid plum bags contain 1 faded green bag.
vibrant lavender bags contain 4 bright chartreuse bags, 3 dark teal bags, 4 muted aqua bags.
muted yellow bags contain 5 posh yellow bags, 3 dim olive bags, 1 light cyan bag, 1 plaid gray bag.
light beige bags contain 2 wavy orange bags, 5 vibrant salmon bags, 2 dim brown bags.
muted indigo bags contain 3 dim brown bags, 3 drab brown bags.
dim bronze bags contain 4 dim black bags, 5 wavy turquoise bags, 5 bright violet bags, 2 dark bronze bags.
shiny teal bags contain 5 plaid chartreuse bags.
pale aqua bags contain 2 striped lime bags, 4 dark turquoise bags, 3 dull tomato bags, 2 mirrored lavender bags.
plaid violet bags contain 2 light olive bags.
dotted maroon bags contain 5 striped maroon bags, 2 shiny turquoise bags, 2 dull gold bags, 4 pale olive bags.
dim chartreuse bags contain 5 striped plum bags.
plaid gold bags contain 1 striped green bag, 3 plaid coral bags, 4 dotted violet bags.
faded tomato bags contain 2 dark indigo bags.
posh plum bags contain 1 wavy chartreuse bag, 4 vibrant blue bags.
drab bronze bags contain 2 mirrored gray bags, 3 vibrant plum bags.
muted blue bags contain 1 bright brown bag, 2 pale coral bags, 5 plaid purple bags, 4 dim lavender bags.
striped indigo bags contain 5 dark salmon bags.
shiny tan bags contain 2 faded bronze bags, 3 mirrored lavender bags, 2 mirrored cyan bags.
dim red bags contain 5 dull salmon bags, 3 dim purple bags, 2 striped crimson bags.
plaid gray bags contain 5 bright violet bags, 4 vibrant aqua bags, 4 dull tomato bags.
dotted white bags contain 1 drab brown bag, 5 light brown bags.
plaid tan bags contain 3 striped teal bags, 2 dotted brown bags.
vibrant black bags contain 3 plaid tan bags, 4 muted white bags, 4 drab orange bags, 5 muted aqua bags.
drab purple bags contain 5 muted violet bags, 2 vibrant blue bags, 4 pale olive bags.
mirrored beige bags contain 1 plaid gray bag, 2 mirrored lime bags, 3 dark brown bags.
vibrant olive bags contain 5 shiny indigo bags.
drab green bags contain 1 muted violet bag.
faded turquoise bags contain 2 striped brown bags, 3 vibrant white bags, 1 dull lavender bag, 5 bright olive bags.
shiny maroon bags contain 1 dim bronze bag.
dull white bags contain 1 muted salmon bag, 4 dim olive bags, 5 drab white bags, 1 dotted teal bag.
dim white bags contain 3 mirrored lavender bags.
clear beige bags contain 5 shiny cyan bags, 3 clear chartreuse bags.
plaid tomato bags contain 5 muted beige bags.
bright teal bags contain 5 shiny gold bags, 4 clear beige bags, 5 vibrant chartreuse bags.
dotted salmon bags contain 1 clear fuchsia bag, 2 muted maroon bags, 4 posh yellow bags, 1 drab chartreuse bag.
light gold bags contain 4 light maroon bags.
faded cyan bags contain 2 posh magenta bags, 2 dark violet bags.
drab cyan bags contain 5 faded purple bags, 4 striped crimson bags, 1 shiny maroon bag, 4 drab tomato bags.
dotted black bags contain 3 striped turquoise bags, 4 dark tan bags, 4 vibrant lavender bags.
faded purple bags contain 4 dull purple bags.
dim violet bags contain 2 clear blue bags.
wavy gray bags contain 4 muted crimson bags, 2 mirrored silver bags, 5 vibrant chartreuse bags.
posh tan bags contain 4 drab tan bags, 3 muted crimson bags, 2 striped crimson bags, 2 plaid fuchsia bags.
mirrored magenta bags contain 5 pale bronze bags.
plaid brown bags contain 1 bright chartreuse bag.
drab orange bags contain 4 drab teal bags, 1 dark bronze bag, 2 clear purple bags.
dim green bags contain 5 dull maroon bags, 1 dull green bag.
faded teal bags contain 2 bright yellow bags, 2 posh red bags, 2 posh indigo bags.
dim gray bags contain 4 wavy blue bags, 2 shiny maroon bags, 1 pale cyan bag.
light crimson bags contain 1 wavy plum bag, 3 muted magenta bags, 3 plaid aqua bags, 2 striped chartreuse bags.
clear white bags contain 2 posh magenta bags, 5 bright white bags, 5 drab bronze bags, 3 vibrant beige bags.
drab magenta bags contain 4 pale olive bags.
plaid silver bags contain 4 bright violet bags, 3 dim brown bags, 1 dark teal bag.
bright bronze bags contain 4 posh white bags, 3 dull salmon bags.
drab maroon bags contain 3 clear black bags, 2 dotted orange bags.
dark fuchsia bags contain 3 faded chartreuse bags, 5 clear green bags, 4 bright brown bags.
vibrant salmon bags contain 1 bright red bag, 5 clear black bags, 2 clear green bags.
shiny crimson bags contain 4 muted fuchsia bags, 2 plaid red bags, 3 clear green bags.
plaid crimson bags contain 4 bright gold bags, 2 clear turquoise bags, 3 faded magenta bags.
dim turquoise bags contain 3 drab brown bags, 5 plaid cyan bags, 3 plaid teal bags, 5 shiny silver bags.
clear crimson bags contain 3 plaid blue bags, 2 drab tomato bags, 2 dull cyan bags, 3 mirrored fuchsia bags.
pale tomato bags contain 1 dull yellow bag, 3 muted aqua bags.
dim orange bags contain 1 posh magenta bag, 2 wavy gray bags, 5 faded indigo bags.
mirrored orange bags contain 1 posh bronze bag, 2 faded white bags, 1 light orange bag, 2 posh red bags.
striped turquoise bags contain 5 muted salmon bags, 5 dark white bags, 1 mirrored purple bag, 3 pale chartreuse bags.
dotted coral bags contain 3 bright brown bags, 2 posh yellow bags, 3 drab maroon bags.
wavy maroon bags contain 2 clear lime bags.
mirrored indigo bags contain 1 mirrored cyan bag, 1 posh plum bag, 2 plaid silver bags.
wavy indigo bags contain 5 dark violet bags, 5 drab black bags, 4 dark orange bags, 5 muted green bags.
striped tomato bags contain 4 dark indigo bags, 5 light lavender bags.
pale lime bags contain 2 bright orange bags.
muted maroon bags contain 2 bright violet bags, 1 shiny coral bag, 1 posh gray bag.
drab lavender bags contain 1 muted magenta bag.
bright fuchsia bags contain 1 striped lime bag.
wavy beige bags contain 2 bright brown bags, 1 pale black bag, 1 drab tomato bag, 4 vibrant blue bags.
shiny olive bags contain 2 dim teal bags, 1 mirrored cyan bag, 4 dim yellow bags, 4 muted aqua bags.
posh coral bags contain no other bags.
dark green bags contain 2 posh brown bags, 2 muted white bags, 4 bright fuchsia bags.
shiny green bags contain 1 faded crimson bag, 3 striped purple bags, 4 shiny salmon bags, 2 dark bronze bags.
clear coral bags contain no other bags.
dull salmon bags contain 1 muted white bag.
dark lavender bags contain 2 plaid gray bags, 4 muted olive bags.
bright silver bags contain 5 pale black bags.
posh green bags contain 5 muted olive bags, 4 dotted crimson bags, 4 dotted brown bags.
dotted fuchsia bags contain 5 shiny chartreuse bags, 1 dotted coral bag, 1 shiny cyan bag.
dim fuchsia bags contain 1 striped orange bag, 1 clear crimson bag.
dotted cyan bags contain 5 muted olive bags, 3 shiny white bags.
dark beige bags contain 4 light teal bags, 4 drab teal bags, 5 wavy beige bags.
striped magenta bags contain 5 plaid purple bags, 3 dotted crimson bags, 2 dull tomato bags.
striped blue bags contain 3 dim aqua bags.
light silver bags contain 3 shiny green bags, 2 vibrant black bags, 1 wavy turquoise bag, 3 faded bronze bags.
pale indigo bags contain 4 pale silver bags, 3 dotted tomato bags, 1 dark violet bag, 3 clear lime bags.
mirrored turquoise bags contain 1 pale salmon bag, 2 dotted crimson bags, 1 drab tomato bag, 2 muted green bags.
striped beige bags contain 3 dotted tomato bags, 4 vibrant purple bags, 2 plaid tomato bags, 4 dark salmon bags.
pale silver bags contain 5 dark lavender bags, 4 drab tan bags, 5 clear yellow bags.
dark lime bags contain 3 pale aqua bags, 5 posh green bags.
faded coral bags contain 3 dull tomato bags, 4 dark bronze bags, 3 drab tomato bags, 2 bright white bags.
mirrored lavender bags contain 3 mirrored cyan bags.
bright crimson bags contain 2 mirrored silver bags.
striped gray bags contain 3 dotted coral bags, 4 muted maroon bags, 4 dark teal bags, 5 pale bronze bags.
dotted magenta bags contain 2 dim teal bags, 2 wavy turquoise bags, 5 dull turquoise bags.
posh white bags contain 4 drab tomato bags, 2 muted aqua bags.
striped red bags contain 2 plaid blue bags, 1 light plum bag, 3 bright white bags.
pale white bags contain 1 light purple bag.
shiny coral bags contain no other bags.
dark magenta bags contain 4 pale tan bags, 1 posh chartreuse bag, 2 pale yellow bags, 2 pale indigo bags.
light gray bags contain 4 pale green bags, 5 dotted green bags, 4 shiny gray bags.
dim gold bags contain 3 clear violet bags, 5 plaid aqua bags, 2 bright tomato bags, 2 wavy teal bags.
dim crimson bags contain 4 muted blue bags, 2 light tan bags.
wavy tan bags contain 1 posh plum bag, 3 mirrored gray bags, 1 muted purple bag.
posh brown bags contain 4 mirrored black bags.
bright plum bags contain 3 vibrant plum bags, 3 mirrored crimson bags.
faded black bags contain 1 pale lime bag, 2 pale tomato bags.
mirrored yellow bags contain 1 pale aqua bag, 4 dull aqua bags, 4 shiny white bags, 3 clear lime bags.
muted tan bags contain 2 clear brown bags.
drab white bags contain 5 dull coral bags, 2 drab green bags, 4 wavy tomato bags, 5 mirrored cyan bags.
dull black bags contain 4 vibrant tan bags, 1 shiny chartreuse bag, 5 pale gold bags.
posh maroon bags contain 5 dark coral bags, 5 faded yellow bags, 2 light lavender bags, 2 wavy teal bags.
drab coral bags contain 4 posh chartreuse bags, 2 dim red bags.
posh indigo bags contain 2 plaid brown bags, 4 muted green bags.
drab aqua bags contain 2 pale magenta bags, 2 posh orange bags.
drab crimson bags contain 2 pale bronze bags, 4 dotted blue bags, 2 dim silver bags.
drab silver bags contain 5 clear blue bags, 4 pale bronze bags.
clear salmon bags contain 2 pale aqua bags, 1 plaid gray bag, 1 clear coral bag.
wavy chartreuse bags contain no other bags.
dull plum bags contain 3 plaid gray bags, 3 plaid aqua bags, 2 mirrored beige bags, 2 wavy magenta bags.
faded gray bags contain 2 dull cyan bags, 3 light lime bags, 3 bright lavender bags, 5 wavy plum bags.
striped teal bags contain 4 drab maroon bags.
clear lavender bags contain 3 clear coral bags, 5 bright crimson bags, 5 drab brown bags, 2 dim indigo bags.
mirrored maroon bags contain 1 clear gray bag, 3 shiny salmon bags, 3 mirrored violet bags.
muted turquoise bags contain 2 drab teal bags, 2 plaid plum bags, 4 plaid coral bags, 2 wavy chartreuse bags.
dark white bags contain 4 bright fuchsia bags, 1 dull white bag, 3 shiny indigo bags, 3 dim white bags.
drab red bags contain 3 dotted teal bags, 2 striped purple bags.
muted teal bags contain 3 dark violet bags, 4 plaid chartreuse bags, 2 pale crimson bags.
wavy red bags contain 2 clear crimson bags.
striped olive bags contain 2 mirrored lavender bags.
dull teal bags contain 4 pale teal bags, 5 pale violet bags, 2 drab white bags.
light black bags contain 1 dark red bag, 2 plaid tan bags.
clear orange bags contain 5 bright cyan bags.
pale yellow bags contain 2 bright lavender bags.
posh cyan bags contain 4 clear coral bags.
drab tomato bags contain 4 vibrant blue bags, 5 faded beige bags, 3 clear coral bags, 2 mirrored white bags.
pale orange bags contain 2 light aqua bags.
dull tomato bags contain 5 plaid aqua bags, 2 posh magenta bags, 3 vibrant aqua bags.
pale turquoise bags contain 1 pale coral bag, 3 dim teal bags.
plaid maroon bags contain 5 posh maroon bags.
vibrant beige bags contain 5 dull coral bags.
bright purple bags contain 2 vibrant salmon bags, 5 dotted purple bags, 5 clear silver bags.
dull coral bags contain 4 vibrant aqua bags, 3 dotted brown bags, 4 shiny coral bags.
drab gray bags contain 4 vibrant lavender bags.
dull lavender bags contain 3 vibrant lavender bags, 1 posh red bag, 4 drab tan bags, 3 light purple bags.
striped maroon bags contain 3 bright silver bags.
mirrored silver bags contain 5 clear blue bags, 3 posh magenta bags, 2 bright brown bags.
faded yellow bags contain 2 muted maroon bags.
striped purple bags contain 2 dotted yellow bags, 1 clear cyan bag, 2 dark teal bags.
clear gray bags contain 5 dim black bags, 1 faded green bag, 5 muted crimson bags.
plaid cyan bags contain 2 dark teal bags, 1 pale lime bag, 1 wavy beige bag.
bright orange bags contain 5 mirrored brown bags, 2 dotted gold bags.
dotted turquoise bags contain 3 plaid gray bags, 3 clear chartreuse bags.
vibrant turquoise bags contain 1 muted brown bag, 3 dim purple bags, 1 posh gray bag, 5 pale bronze bags.
striped lime bags contain 1 shiny gold bag.
light violet bags contain 4 mirrored purple bags, 5 clear blue bags.
striped orange bags contain 3 light gold bags, 3 light olive bags, 3 muted crimson bags, 2 pale cyan bags.
drab turquoise bags contain 3 dim magenta bags, 4 pale black bags.
pale salmon bags contain 2 mirrored cyan bags, 4 vibrant blue bags.
shiny yellow bags contain 5 vibrant tomato bags, 3 muted salmon bags, 5 wavy tomato bags.
plaid lime bags contain 2 pale yellow bags, 2 shiny red bags, 3 muted crimson bags, 4 dull green bags.
muted cyan bags contain 4 bright green bags, 5 striped bronze bags, 1 vibrant lavender bag, 4 posh violet bags.
dull cyan bags contain 5 dark lavender bags, 5 drab green bags, 1 bright crimson bag, 4 mirrored silver bags.
pale beige bags contain 3 posh coral bags.
shiny chartreuse bags contain 4 mirrored silver bags.
dark silver bags contain 2 dull turquoise bags, 1 muted maroon bag, 5 vibrant magenta bags.
mirrored violet bags contain 4 dark brown bags.
clear aqua bags contain 2 striped beige bags, 1 dotted indigo bag, 5 faded violet bags, 5 vibrant violet bags.
plaid teal bags contain 3 mirrored lavender bags, 4 posh gray bags.
wavy olive bags contain 3 dull blue bags, 5 bright salmon bags, 5 shiny purple bags.
pale lavender bags contain 4 light purple bags, 2 dotted gray bags, 2 pale plum bags, 3 shiny silver bags.
shiny blue bags contain 2 vibrant white bags, 3 light gold bags, 3 mirrored lavender bags, 1 drab plum bag.
light coral bags contain 4 light teal bags, 1 striped chartreuse bag, 5 dotted chartreuse bags.
pale brown bags contain 2 dim gold bags, 2 clear turquoise bags, 3 bright cyan bags, 4 clear maroon bags.
vibrant tomato bags contain 3 dark brown bags, 1 vibrant blue bag.
dull olive bags contain 5 mirrored yellow bags, 2 shiny cyan bags.
light chartreuse bags contain 2 dull aqua bags, 4 dull brown bags, 1 clear fuchsia bag, 4 bright yellow bags.
posh gray bags contain 4 posh green bags, 1 mirrored gray bag.
bright yellow bags contain 4 pale aqua bags.
bright gold bags contain 3 pale indigo bags, 3 dull crimson bags.
dotted red bags contain 4 pale turquoise bags, 4 muted blue bags, 1 bright bronze bag, 2 light blue bags.
clear brown bags contain 1 mirrored yellow bag.
light plum bags contain 2 bright violet bags.
dim purple bags contain 3 faded chartreuse bags, 5 light teal bags.
dull yellow bags contain 5 muted aqua bags, 3 dotted coral bags, 2 drab maroon bags.
shiny gold bags contain 4 pale black bags, 4 dim violet bags, 3 muted yellow bags.
mirrored crimson bags contain 1 striped teal bag, 5 mirrored cyan bags.
shiny lavender bags contain 4 bright brown bags, 3 bright tan bags, 5 dotted crimson bags, 4 pale black bags.
vibrant cyan bags contain 1 dim yellow bag, 5 bright tan bags.
wavy gold bags contain 2 dark brown bags, 1 dull yellow bag.
dark cyan bags contain 4 dim white bags, 2 mirrored indigo bags, 4 muted white bags, 2 bright white bags.
posh lime bags contain 4 shiny plum bags, 3 plaid fuchsia bags.
posh purple bags contain 3 muted salmon bags.
pale magenta bags contain 1 drab gold bag, 1 dark white bag, 3 posh silver bags.
dim plum bags contain 4 dark chartreuse bags, 4 mirrored lavender bags.
plaid indigo bags contain 2 clear lime bags, 5 dull tomato bags.
dark blue bags contain 1 bright olive bag, 1 dull bronze bag, 1 shiny gold bag.
dull red bags contain 2 wavy teal bags, 3 wavy crimson bags, 1 faded olive bag.
striped yellow bags contain 4 drab salmon bags.
vibrant magenta bags contain 4 light beige bags, 2 dark red bags, 1 plaid magenta bag, 5 dim magenta bags.
plaid red bags contain 2 striped red bags, 4 light plum bags, 3 mirrored silver bags.
wavy orange bags contain 5 vibrant white bags, 1 posh coral bag, 5 muted purple bags, 2 light coral bags.
pale green bags contain 5 pale aqua bags, 1 clear gray bag.
dotted chartreuse bags contain 4 muted violet bags, 5 striped teal bags.
light turquoise bags contain 5 dull turquoise bags, 2 dark aqua bags, 1 dull teal bag.
shiny violet bags contain 2 pale indigo bags.
light white bags contain 3 mirrored indigo bags, 1 faded blue bag, 1 plaid white bag, 1 posh plum bag.
muted beige bags contain 4 drab gold bags.
faded silver bags contain 2 drab white bags, 5 pale white bags, 3 clear lime bags.
faded red bags contain 1 bright turquoise bag, 5 faded coral bags, 2 drab purple bags, 5 bright olive bags.
shiny bronze bags contain 4 plaid purple bags, 5 bright red bags, 1 muted white bag, 2 dull fuchsia bags.
dull gold bags contain 1 dotted orange bag.
muted olive bags contain 1 clear coral bag, 1 posh magenta bag, 2 bright violet bags, 1 wavy chartreuse bag.
dotted bronze bags contain 1 plaid beige bag, 3 clear olive bags, 2 light lime bags, 5 dull beige bags.
shiny orange bags contain 5 pale brown bags, 5 clear tomato bags.
wavy salmon bags contain 2 shiny maroon bags.
wavy crimson bags contain 5 bright violet bags, 3 plaid violet bags.
bright coral bags contain 1 dull bronze bag, 5 dotted gold bags, 1 posh gray bag.
dotted crimson bags contain 2 posh magenta bags, 4 mirrored white bags.
bright violet bags contain no other bags.
drab blue bags contain 5 shiny gold bags, 1 shiny brown bag, 4 dark silver bags.
posh salmon bags contain 4 dim purple bags, 1 striped lime bag, 1 muted gray bag, 2 drab gold bags.
dim coral bags contain 3 dark red bags, 2 faded crimson bags.
dark aqua bags contain 3 dotted salmon bags, 4 pale olive bags, 1 vibrant aqua bag, 5 dull lavender bags.
dark orange bags contain 4 mirrored teal bags, 5 clear salmon bags.
vibrant red bags contain 3 vibrant blue bags.
muted lime bags contain 1 dull silver bag.
clear tan bags contain 2 striped beige bags, 1 posh coral bag, 1 wavy teal bag, 2 faded plum bags.
vibrant coral bags contain 2 faded blue bags, 4 bright turquoise bags.
dark olive bags contain 2 dark indigo bags.
dotted blue bags contain 5 faded cyan bags, 4 striped aqua bags, 4 dotted gold bags.
bright maroon bags contain 1 dark bronze bag, 3 vibrant aqua bags, 4 dim magenta bags, 3 clear crimson bags.
bright cyan bags contain 2 wavy tomato bags.
plaid olive bags contain 3 striped indigo bags, 5 dim purple bags, 3 striped bronze bags, 2 light teal bags.
plaid chartreuse bags contain 3 plaid yellow bags, 1 faded brown bag, 1 vibrant tan bag, 4 wavy fuchsia bags.
dull maroon bags contain 3 muted yellow bags.
light fuchsia bags contain 5 drab maroon bags, 5 muted silver bags.
dull orange bags contain 4 dim indigo bags, 4 posh beige bags, 1 bright red bag.
dull blue bags contain 5 wavy yellow bags, 4 posh gray bags.
plaid yellow bags contain 1 bright fuchsia bag, 1 faded beige bag, 1 wavy beige bag, 4 light green bags.
clear black bags contain 1 dull tomato bag.
muted coral bags contain 5 drab indigo bags.
plaid magenta bags contain 3 posh salmon bags.
clear tomato bags contain 5 dotted brown bags, 3 dim tomato bags, 3 drab brown bags.
clear yellow bags contain 3 clear black bags, 2 mirrored black bags.
dark gray bags contain 5 light bronze bags, 4 dotted coral bags, 4 dim chartreuse bags.
light magenta bags contain 4 wavy turquoise bags, 1 mirrored green bag, 2 plaid chartreuse bags.
shiny indigo bags contain 1 bright silver bag, 2 pale tomato bags, 4 light teal bags, 4 posh coral bags.
muted gray bags contain 3 faded beige bags, 1 dark teal bag, 3 muted violet bags, 3 muted white bags.
wavy lavender bags contain 1 clear chartreuse bag, 2 clear maroon bags, 5 dull plum bags.
faded olive bags contain 4 mirrored yellow bags, 4 vibrant tomato bags, 5 muted olive bags.
muted crimson bags contain 1 mirrored gray bag, 4 dim violet bags.
drab chartreuse bags contain 1 pale olive bag, 1 vibrant plum bag.
wavy cyan bags contain 2 mirrored coral bags.
mirrored plum bags contain 3 bright turquoise bags, 3 dark beige bags, 4 mirrored beige bags.
plaid lavender bags contain 1 drab white bag.
muted gold bags contain 1 clear black bag, 2 light orange bags, 4 dotted red bags, 4 dull silver bags.
faded bronze bags contain 4 posh plum bags.
clear turquoise bags contain 1 light gold bag, 1 clear beige bag, 2 striped chartreuse bags.
vibrant gray bags contain 1 plaid white bag.
bright tan bags contain 3 drab silver bags, 2 faded yellow bags, 2 bright green bags.
pale bronze bags contain 5 posh coral bags, 4 clear coral bags, 1 dotted orange bag, 4 wavy chartreuse bags.
clear plum bags contain 1 dim plum bag, 4 light gold bags.
posh turquoise bags contain 3 wavy bronze bags, 4 shiny purple bags.
posh teal bags contain 2 striped magenta bags, 3 dark magenta bags, 5 faded silver bags, 5 mirrored chartreuse bags.
dim yellow bags contain 4 pale bronze bags, 3 shiny tan bags.
faded lavender bags contain 3 dull white bags, 3 striped teal bags.
wavy magenta bags contain 2 pale aqua bags, 4 shiny indigo bags.
dim brown bags contain 2 bright brown bags, 3 striped chartreuse bags, 5 dull purple bags, 1 light cyan bag.
light lime bags contain 5 clear crimson bags, 4 plaid indigo bags, 1 pale silver bag.
striped silver bags contain 3 posh green bags, 3 muted violet bags, 1 drab green bag.
bright brown bags contain no other bags.
vibrant fuchsia bags contain 4 dull olive bags, 2 mirrored gold bags, 3 mirrored bronze bags, 1 posh crimson bag.
plaid purple bags contain 3 faded beige bags, 1 drab green bag, 2 striped chartreuse bags.
wavy violet bags contain 2 vibrant gray bags, 5 wavy fuchsia bags.
dark maroon bags contain 5 pale chartreuse bags, 5 striped brown bags.
pale coral bags contain 3 vibrant plum bags.
dark black bags contain 4 striped salmon bags, 4 dim bronze bags.
plaid bronze bags contain 2 mirrored black bags, 1 drab bronze bag, 4 plaid purple bags, 5 dull tomato bags.
faded orange bags contain 5 plaid indigo bags.
light lavender bags contain 2 shiny magenta bags, 5 dim lavender bags, 1 dotted crimson bag.
dull chartreuse bags contain 4 clear lime bags.
dark gold bags contain 4 light magenta bags.
dim black bags contain 4 shiny silver bags, 1 dull tomato bag.
plaid salmon bags contain 3 light magenta bags, 4 dull fuchsia bags, 2 striped salmon bags.
vibrant bronze bags contain 5 mirrored white bags, 1 dull coral bag.
wavy brown bags contain 1 light gold bag, 4 drab purple bags, 3 muted violet bags, 4 muted fuchsia bags.
dotted lavender bags contain 4 dotted indigo bags, 2 dull lavender bags.
dotted gold bags contain 1 posh magenta bag, 2 posh yellow bags.
faded brown bags contain 4 muted blue bags, 3 wavy teal bags.
light yellow bags contain 3 clear black bags, 1 dotted crimson bag.
striped salmon bags contain 1 dull yellow bag, 5 mirrored gray bags, 5 light lavender bags, 5 mirrored brown bags.
light blue bags contain 5 mirrored purple bags, 3 dim violet bags, 2 pale tomato bags.
faded gold bags contain 3 plaid gray bags.
shiny aqua bags contain 1 striped crimson bag, 5 pale black bags.
shiny lime bags contain 4 dark green bags.
vibrant tan bags contain 3 clear silver bags, 3 pale white bags.
vibrant aqua bags contain no other bags.
vibrant teal bags contain 3 wavy tan bags.
light maroon bags contain 3 vibrant silver bags.
faded crimson bags contain 3 plaid red bags.
light teal bags contain 2 dark teal bags, 1 faded beige bag, 4 dull cyan bags.
mirrored coral bags contain 2 vibrant plum bags.
muted black bags contain 2 drab magenta bags, 1 mirrored gray bag, 4 drab tan bags, 1 dim indigo bag.
striped gold bags contain 1 dark lavender bag, 4 drab brown bags, 2 bright silver bags, 2 striped teal bags.
light purple bags contain 3 posh gray bags.
dull silver bags contain 2 clear chartreuse bags, 3 plaid silver bags, 1 drab salmon bag, 2 wavy teal bags.
clear bronze bags contain 4 dull red bags.
wavy yellow bags contain 3 dull tomato bags, 2 posh green bags, 4 plaid aqua bags, 2 faded purple bags.
muted purple bags contain 5 pale black bags, 2 muted salmon bags, 2 muted yellow bags.
plaid aqua bags contain no other bags.
drab plum bags contain 3 drab turquoise bags.
muted orange bags contain 1 faded blue bag, 5 plaid brown bags, 4 mirrored chartreuse bags.
dim silver bags contain 4 dark fuchsia bags, 2 clear cyan bags, 2 dark green bags, 4 dotted silver bags.
pale tan bags contain 5 shiny silver bags, 5 drab indigo bags.
wavy tomato bags contain 4 clear black bags, 4 plaid gray bags.
posh bronze bags contain 4 drab green bags.
clear blue bags contain 3 bright brown bags, 5 dull tomato bags, 1 clear black bag, 5 bright violet bags.
striped plum bags contain 4 plaid yellow bags, 3 dark teal bags, 2 mirrored lavender bags, 1 dotted salmon bag.
muted salmon bags contain 1 dull cyan bag, 2 clear coral bags, 1 posh coral bag.
light aqua bags contain 4 clear maroon bags, 4 striped black bags.
bright blue bags contain 4 drab violet bags, 4 light indigo bags, 3 muted indigo bags.
light brown bags contain 5 striped lavender bags.
light salmon bags contain 1 drab beige bag, 5 faded orange bags, 4 plaid coral bags, 5 light chartreuse bags.
posh beige bags contain 1 shiny red bag.
dotted orange bags contain 2 dotted brown bags, 3 mirrored silver bags, 1 dull tomato bag.
wavy purple bags contain 1 mirrored green bag, 1 clear maroon bag.
dark coral bags contain 5 bright chartreuse bags, 4 clear lime bags.
dim lime bags contain 3 bright olive bags, 3 dull gold bags.
pale plum bags contain 1 light orange bag, 3 drab orange bags, 5 mirrored purple bags.
dim beige bags contain 5 pale fuchsia bags, 4 mirrored fuchsia bags, 4 plaid teal bags, 1 shiny orange bag.
drab tan bags contain 5 plaid silver bags, 3 muted crimson bags, 1 clear salmon bag.
posh blue bags contain 4 plaid aqua bags, 2 drab salmon bags, 4 pale teal bags, 2 drab gold bags.
drab violet bags contain 3 shiny white bags.
shiny plum bags contain 3 mirrored green bags, 2 dark yellow bags, 3 pale salmon bags.
pale fuchsia bags contain 5 faded violet bags.
clear fuchsia bags contain 2 dark lavender bags, 3 posh green bags.
mirrored lime bags contain 3 light bronze bags.
plaid white bags contain 1 dim lavender bag, 4 dim olive bags, 3 clear yellow bags.
striped violet bags contain 4 plaid plum bags, 3 plaid black bags, 4 pale teal bags, 5 wavy magenta bags.
dark purple bags contain 2 shiny gold bags, 3 faded blue bags.
mirrored blue bags contain 1 drab fuchsia bag, 4 posh white bags, 3 wavy red bags.
pale black bags contain 2 dim olive bags, 5 bright brown bags.
dark brown bags contain 5 dotted purple bags, 2 striped silver bags.
muted lavender bags contain 3 posh brown bags, 2 clear yellow bags, 3 posh coral bags, 1 shiny tan bag.
muted bronze bags contain 1 drab teal bag, 5 drab tomato bags, 1 drab magenta bag, 5 posh maroon bags.
posh violet bags contain 5 bright white bags, 5 vibrant tan bags.
clear green bags contain 3 mirrored silver bags, 2 dotted orange bags.
dotted plum bags contain 3 plaid yellow bags, 1 wavy yellow bag, 1 drab cyan bag.
drab olive bags contain 1 shiny indigo bag.
wavy turquoise bags contain 3 muted yellow bags.
dark violet bags contain 2 bright crimson bags, 4 bright fuchsia bags, 2 dull blue bags.
posh gold bags contain 3 drab teal bags.
dim cyan bags contain 5 clear olive bags, 4 bright turquoise bags, 1 pale gray bag.
posh red bags contain 1 bright salmon bag.
dull tan bags contain 4 plaid cyan bags.
faded indigo bags contain 3 light gold bags, 5 dotted brown bags, 3 dotted cyan bags, 2 drab teal bags.
clear violet bags contain 1 wavy turquoise bag, 1 vibrant chartreuse bag, 1 dark violet bag, 3 bright bronze bags.
clear indigo bags contain 1 mirrored tan bag, 4 faded indigo bags.
bright turquoise bags contain 1 drab teal bag, 4 dull salmon bags, 4 pale olive bags, 2 faded chartreuse bags.
muted tomato bags contain 1 dark purple bag, 3 striped tan bags.
posh silver bags contain 4 muted gray bags.
mirrored olive bags contain 5 bright lavender bags, 2 clear blue bags, 5 dotted crimson bags, 5 pale black bags.
shiny tomato bags contain 1 mirrored purple bag, 4 posh gold bags, 3 vibrant plum bags.
striped coral bags contain 5 clear orange bags, 3 muted coral bags, 4 bright green bags, 1 clear chartreuse bag.
mirrored chartreuse bags contain 4 clear blue bags.
pale maroon bags contain 1 muted indigo bag.
striped black bags contain 3 striped gray bags, 1 striped lime bag, 4 bright cyan bags, 4 light orange bags.
dim maroon bags contain 4 dull cyan bags.
bright beige bags contain 2 pale fuchsia bags, 5 vibrant beige bags, 1 light lavender bag.
shiny gray bags contain 2 striped lime bags, 1 pale black bag, 4 wavy tomato bags, 2 vibrant brown bags.
drab lime bags contain 5 muted bronze bags, 2 posh indigo bags.
dull gray bags contain 2 dull plum bags, 4 dim white bags, 2 shiny purple bags.
light olive bags contain 4 clear salmon bags, 1 dim indigo bag.
vibrant violet bags contain 5 striped tan bags, 1 pale lime bag, 4 posh plum bags, 4 mirrored black bags.
posh lavender bags contain 4 pale tomato bags.
plaid coral bags contain 3 mirrored olive bags, 2 muted black bags, 3 light plum bags.
vibrant blue bags contain 4 mirrored silver bags.
dim aqua bags contain 5 dim maroon bags.
wavy bronze bags contain 5 wavy plum bags, 1 bright cyan bag, 2 drab chartreuse bags.
muted plum bags contain 3 plaid silver bags, 5 faded black bags, 3 drab maroon bags.
dull turquoise bags contain 4 plaid silver bags.
plaid blue bags contain 3 plaid purple bags.
dotted tan bags contain 5 plaid chartreuse bags, 4 dotted coral bags, 4 posh green bags, 1 striped turquoise bag.
plaid black bags contain 2 drab salmon bags, 5 posh maroon bags.
light cyan bags contain 2 dotted orange bags, 5 drab green bags, 1 bright lavender bag.
dull fuchsia bags contain 2 posh red bags, 4 mirrored beige bags, 2 dull salmon bags, 4 striped purple bags.
dark turquoise bags contain 4 drab tomato bags, 3 dotted chartreuse bags, 5 muted salmon bags, 4 posh magenta bags.
vibrant silver bags contain 3 dark brown bags, 2 wavy beige bags, 5 dull turquoise bags, 2 drab tan bags.
dotted tomato bags contain 3 drab tan bags, 2 striped magenta bags, 5 dim violet bags, 4 wavy tomato bags.
vibrant white bags contain 5 bright crimson bags, 2 mirrored white bags, 5 mirrored indigo bags, 4 wavy teal bags.
shiny fuchsia bags contain 1 pale lime bag.
wavy fuchsia bags contain 4 clear cyan bags.
dotted gray bags contain 3 striped chartreuse bags, 1 dark fuchsia bag.
bright tomato bags contain 4 wavy orange bags, 2 dotted salmon bags, 1 striped gray bag, 3 pale tomato bags.
clear chartreuse bags contain 3 clear purple bags.
dim teal bags contain 3 faded silver bags, 5 vibrant silver bags, 2 wavy fuchsia bags.
dotted yellow bags contain 5 bright bronze bags, 4 drab teal bags.
dark indigo bags contain 5 plaid red bags, 5 dim purple bags.
wavy black bags contain 5 shiny tomato bags, 2 clear gray bags, 4 dim lavender bags, 3 clear blue bags.
striped green bags contain 3 light crimson bags, 5 mirrored cyan bags, 2 mirrored maroon bags, 2 faded yellow bags.
dull lime bags contain 3 pale yellow bags.
faded chartreuse bags contain 2 wavy teal bags, 3 dim olive bags, 2 dull purple bags, 5 vibrant plum bags.
dark yellow bags contain 2 muted brown bags.
plaid beige bags contain 3 pale green bags, 3 bright purple bags, 5 faded black bags, 1 drab brown bag.
faded maroon bags contain 5 drab tomato bags.
muted silver bags contain 3 striped lime bags, 3 dim orange bags, 3 muted aqua bags, 1 plaid black bag.
pale violet bags contain 1 mirrored gray bag, 1 dull gold bag, 1 wavy crimson bag, 1 pale magenta bag.
dim olive bags contain no other bags.
mirrored bronze bags contain 2 drab white bags.
dull green bags contain 1 striped silver bag, 2 bright orange bags, 4 dull yellow bags, 4 dotted chartreuse bags.
bright gray bags contain 1 striped gray bag, 5 dull teal bags, 4 light beige bags, 2 vibrant orange bags.
light indigo bags contain 1 dim maroon bag, 4 dark indigo bags, 1 dark brown bag, 2 muted beige bags.
bright magenta bags contain 2 muted lime bags.
posh crimson bags contain 4 pale indigo bags, 2 faded green bags.
vibrant plum bags contain 1 posh gray bag, 3 mirrored silver bags, 4 bright brown bags, 2 posh magenta bags.
wavy lime bags contain 4 wavy black bags, 4 shiny cyan bags, 5 striped aqua bags, 4 plaid gray bags.
shiny silver bags contain 5 dotted crimson bags, 2 wavy turquoise bags, 1 shiny coral bag.
dark tan bags contain 5 clear silver bags.
mirrored brown bags contain 1 dotted brown bag, 2 plaid gray bags, 5 dull tomato bags, 5 clear black bags.
muted brown bags contain 3 drab magenta bags, 4 plaid aqua bags, 5 dim black bags.
posh black bags contain 2 bright turquoise bags, 3 mirrored maroon bags, 1 dull white bag.
wavy aqua bags contain 3 drab green bags, 3 clear magenta bags.
vibrant chartreuse bags contain 3 muted violet bags.
wavy silver bags contain 2 muted yellow bags, 4 plaid violet bags.
shiny salmon bags contain 1 clear yellow bag.
clear purple bags contain 2 posh green bags, 2 muted gray bags.
clear cyan bags contain 5 posh gray bags, 5 plaid aqua bags, 1 wavy tomato bag, 1 dim lavender bag.
wavy coral bags contain 5 dim yellow bags, 3 clear yellow bags.
wavy green bags contain 4 plaid bronze bags, 4 dull coral bags.
mirrored gold bags contain 5 bright lavender bags.
muted fuchsia bags contain 1 dotted purple bag.
clear maroon bags contain 3 muted gray bags, 2 bright chartreuse bags, 3 dotted gold bags.
faded salmon bags contain 5 clear green bags.
striped aqua bags contain 5 pale yellow bags, 1 dotted salmon bag, 1 wavy teal bag, 1 muted yellow bag.
plaid fuchsia bags contain 2 dim olive bags.
pale chartreuse bags contain 3 posh magenta bags, 3 mirrored yellow bags.
shiny beige bags contain 1 mirrored indigo bag.
posh aqua bags contain 3 pale silver bags, 3 shiny tan bags, 5 striped blue bags, 5 dull salmon bags.
dull magenta bags contain 5 dotted lime bags, 4 bright plum bags, 5 vibrant turquoise bags.
posh tomato bags contain 5 shiny tan bags, 1 wavy salmon bag.
clear red bags contain 5 clear black bags.
dotted aqua bags contain 1 clear black bag.
clear olive bags contain 1 plaid gray bag, 3 clear cyan bags.
dotted green bags contain 3 light red bags.
clear teal bags contain 5 faded coral bags, 3 wavy plum bags, 5 bright orange bags, 1 clear purple bag.
plaid orange bags contain 4 pale chartreuse bags, 1 dark silver bag, 2 drab tomato bags.
pale teal bags contain 1 drab black bag.
posh chartreuse bags contain 1 dotted gold bag, 4 bright salmon bags.
pale red bags contain 2 vibrant plum bags, 4 wavy cyan bags, 2 dotted white bags, 1 posh silver bag.
faded violet bags contain 1 mirrored white bag, 4 muted green bags, 5 mirrored olive bags, 1 dim brown bag.
faded fuchsia bags contain 2 dark brown bags.
dotted brown bags contain 4 clear blue bags.
dark teal bags contain 5 dull cyan bags.
bright salmon bags contain 2 pale black bags, 5 dotted chartreuse bags, 2 striped chartreuse bags.
pale blue bags contain 4 shiny gold bags, 2 clear white bags, 1 dotted coral bag.
dim tan bags contain 3 plaid yellow bags, 5 clear blue bags, 2 clear cyan bags.
dull beige bags contain 5 shiny maroon bags, 4 mirrored bronze bags, 4 dark plum bags.
clear magenta bags contain 5 dim bronze bags, 5 wavy olive bags.
bright black bags contain 2 bright bronze bags, 5 mirrored gold bags, 4 dark yellow bags.
muted aqua bags contain 2 dark teal bags.
faded blue bags contain 4 clear salmon bags, 1 light cyan bag, 5 wavy tomato bags.
dotted indigo bags contain 2 shiny maroon bags, 2 wavy tan bags, 4 dim tomato bags, 1 posh plum bag.
striped chartreuse bags contain 2 dotted orange bags, 3 bright lavender bags.
dim indigo bags contain 4 shiny coral bags, 4 mirrored olive bags.
dotted purple bags contain 4 mirrored white bags, 1 posh yellow bag, 5 drab maroon bags.
muted chartreuse bags contain 5 bright silver bags, 2 bright brown bags.
shiny purple bags contain 3 dim maroon bags, 2 mirrored lime bags, 2 light lavender bags, 3 dotted salmon bags.
faded white bags contain 3 vibrant white bags, 5 muted gray bags.
muted red bags contain 3 posh coral bags.
mirrored tan bags contain 1 dotted gold bag, 2 dark coral bags, 3 light purple bags.
dim blue bags contain 3 dull blue bags, 4 posh plum bags.
bright indigo bags contain 1 muted white bag, 1 wavy fuchsia bag.
striped crimson bags contain 3 dotted coral bags.
light orange bags contain 3 striped chartreuse bags, 4 bright silver bags, 5 clear cyan bags.
posh yellow bags contain 3 bright brown bags.
dotted beige bags contain 1 plaid red bag.
faded aqua bags contain 3 drab tan bags.
shiny red bags contain 3 striped lime bags, 5 wavy teal bags, 2 muted olive bags, 1 shiny chartreuse bag.
light tomato bags contain 4 muted green bags.
bright olive bags contain 4 shiny maroon bags, 1 striped tan bag, 2 drab teal bags, 3 mirrored chartreuse bags.
mirrored white bags contain 4 vibrant aqua bags, 4 clear blue bags, 4 bright violet bags, 1 muted olive bag.
posh olive bags contain 2 shiny maroon bags, 3 faded coral bags, 1 dark turquoise bag.
vibrant lime bags contain 1 light lime bag, 5 bright lime bags, 4 vibrant olive bags.
striped brown bags contain 3 clear chartreuse bags, 4 drab magenta bags.
striped lavender bags contain 1 wavy plum bag.
wavy white bags contain 4 dotted red bags.
dark bronze bags contain 2 posh green bags, 1 dotted crimson bag, 5 bright lavender bags, 1 shiny coral bag.
mirrored black bags contain 3 muted salmon bags.
shiny magenta bags contain 4 dotted orange bags, 4 bright silver bags, 3 posh coral bags.
light bronze bags contain 3 dotted coral bags.
mirrored gray bags contain 1 muted olive bag, 1 bright violet bag.
bright lavender bags contain 1 dull tomato bag, 2 clear blue bags.
drab yellow bags contain 3 dim tomato bags, 3 striped green bags.
dark chartreuse bags contain 5 vibrant violet bags, 4 shiny tan bags, 4 dark orange bags, 1 dull tan bag.
vibrant indigo bags contain 3 mirrored violet bags, 3 light teal bags, 2 dim red bags.
plaid green bags contain 3 wavy blue bags, 4 wavy yellow bags, 1 dull lavender bag.
mirrored purple bags contain 5 vibrant silver bags.
vibrant yellow bags contain 4 plaid brown bags, 3 drab bronze bags, 5 posh bronze bags, 3 mirrored lime bags.
pale gold bags contain 4 shiny indigo bags, 4 clear maroon bags.
shiny cyan bags contain 3 dim olive bags.
dim salmon bags contain 5 faded beige bags, 2 faded orange bags, 2 shiny purple bags.
dark crimson bags contain 3 dull aqua bags, 1 wavy olive bag, 3 posh plum bags, 3 bright brown bags.
vibrant gold bags contain 3 wavy gray bags, 4 clear white bags, 1 faded salmon bag, 3 drab aqua bags.
faded magenta bags contain 5 plaid aqua bags, 4 faded purple bags, 5 wavy bronze bags.
drab black bags contain 3 pale aqua bags, 2 clear coral bags, 2 mirrored silver bags, 5 dark cyan bags.
bright green bags contain 1 shiny aqua bag, 5 drab salmon bags, 5 wavy tomato bags, 4 faded beige bags.
bright aqua bags contain 2 vibrant magenta bags, 3 dim indigo bags, 5 dark fuchsia bags.
pale olive bags contain 1 dotted brown bag.
mirrored fuchsia bags contain 1 dull brown bag, 3 light cyan bags.
mirrored red bags contain 3 plaid lavender bags.
wavy blue bags contain 5 wavy turquoise bags, 3 light green bags, 4 dim indigo bags, 3 posh coral bags.
clear silver bags contain 4 plaid gray bags.
muted white bags contain 2 dotted salmon bags, 4 mirrored white bags, 3 clear cyan bags, 2 muted chartreuse bags.
dim tomato bags contain 3 drab white bags, 1 posh gray bag, 3 dark cyan bags, 5 posh green bags.
drab beige bags contain 1 light orange bag, 3 bright salmon bags, 3 pale silver bags.
clear gold bags contain 2 vibrant white bags, 2 plaid yellow bags.
vibrant orange bags contain 5 muted chartreuse bags.
striped tan bags contain 1 wavy gold bag, 3 mirrored black bags, 1 shiny aqua bag, 5 vibrant red bags.
bright lime bags contain 4 dim indigo bags, 3 dull tomato bags.
bright red bags contain 5 drab magenta bags, 1 clear salmon bag.
vibrant green bags contain 4 plaid tomato bags.
light tan bags contain 5 muted green bags.
striped white bags contain 1 faded silver bag, 2 vibrant red bags.
dull violet bags contain 5 dull turquoise bags.
drab salmon bags contain 3 posh magenta bags, 1 dark teal bag.
mirrored cyan bags contain 2 dim violet bags, 1 plaid aqua bag, 1 vibrant blue bag, 1 posh magenta bag.
wavy teal bags contain 1 bright crimson bag, 2 light cyan bags, 4 striped silver bags.
vibrant purple bags contain 5 shiny magenta bags, 1 dotted orange bag, 2 wavy teal bags.
faded beige bags contain 1 posh green bag, 5 clear coral bags.
faded lime bags contain 1 wavy gray bag, 1 light orange bag, 5 clear bronze bags.
mirrored green bags contain 5 drab bronze bags, 3 muted violet bags, 1 clear blue bag.
light green bags contain 5 mirrored lavender bags, 3 drab gold bags.
pale crimson bags contain 3 pale chartreuse bags.
mirrored aqua bags contain 4 drab plum bags.
dull crimson bags contain 2 bright white bags, 5 drab olive bags, 5 pale salmon bags.
dull purple bags contain 1 posh magenta bag, 3 mirrored brown bags.
bright white bags contain 4 vibrant blue bags, 3 dull brown bags, 4 drab green bags.
drab indigo bags contain 2 bright salmon bags, 2 muted maroon bags, 2 clear gray bags.
striped fuchsia bags contain 2 drab gold bags, 4 mirrored white bags, 3 muted black bags, 1 dark teal bag.
dark tomato bags contain 3 muted fuchsia bags, 1 dotted lavender bag, 4 drab turquoise bags.
mirrored tomato bags contain 5 dark olive bags, 4 light black bags, 4 dark magenta bags.
dark plum bags contain 4 wavy yellow bags, 4 shiny salmon bags.
dark salmon bags contain 1 dim bronze bag, 4 pale indigo bags, 5 dotted chartreuse bags.
dotted lime bags contain 1 shiny brown bag, 3 faded lavender bags.
dark red bags contain 3 posh green bags, 1 vibrant bronze bag, 2 dull maroon bags.
dim lavender bags contain 2 dark turquoise bags.
striped cyan bags contain 1 clear chartreuse bag.
dull indigo bags contain 5 shiny brown bags.
faded green bags contain 1 drab maroon bag.
drab fuchsia bags contain 2 clear olive bags, 1 bright cyan bag.
drab gold bags contain 2 dull turquoise bags, 5 dim lavender bags, 4 light teal bags.
dotted violet bags contain 3 drab tomato bags, 5 dark lavender bags, 4 bright fuchsia bags.
shiny turquoise bags contain 4 light black bags.
muted green bags contain 3 vibrant bronze bags, 4 dim olive bags, 2 posh yellow bags, 2 dull cyan bags.
pale purple bags contain 2 drab yellow bags, 3 bright crimson bags.
posh fuchsia bags contain 1 dull tan bag, 2 dim orange bags.
drab teal bags contain 1 dim violet bag, 2 drab green bags, 5 mirrored lavender bags, 2 faded purple bags.
mirrored teal bags contain 4 vibrant aqua bags, 2 dull turquoise bags, 4 vibrant bronze bags, 3 mirrored olive bags.
muted violet bags contain 3 wavy chartreuse bags.
mirrored salmon bags contain 3 clear cyan bags, 5 posh plum bags, 1 shiny coral bag.
vibrant crimson bags contain 4 dotted chartreuse bags, 2 wavy yellow bags, 3 drab green bags.
dotted teal bags contain 3 clear black bags, 1 faded blue bag, 1 clear beige bag, 4 striped brown bags.
posh orange bags contain 1 dim olive bag.
striped bronze bags contain 1 dull salmon bag, 4 wavy teal bags, 1 pale salmon bag, 2 dim aqua bags.
clear lime bags contain 1 dim lavender bag, 1 drab magenta bag.
muted magenta bags contain 1 shiny indigo bag, 4 mirrored cyan bags, 4 shiny cyan bags, 2 posh bronze bags.
bright chartreuse bags contain 5 drab white bags, 3 dotted purple bags.
dim magenta bags contain 2 dull turquoise bags, 1 dull coral bag, 3 dark violet bags, 4 muted crimson bags.
pale cyan bags contain 5 dotted coral bags, 4 drab chartreuse bags, 4 dull plum bags.
shiny white bags contain 2 drab salmon bags, 3 shiny silver bags.
faded tan bags contain 4 posh magenta bags, 1 pale teal bag.

View file

@ -1,610 +0,0 @@
acc +0
jmp +516
acc -16
nop +326
jmp +366
jmp +400
jmp +494
acc -5
jmp +475
acc +29
nop +24
jmp +186
jmp -5
acc +50
acc +49
acc +49
nop +507
jmp +236
acc -4
acc +50
acc +48
jmp +293
jmp +461
acc +48
acc +2
jmp +241
acc +38
jmp +544
jmp +1
jmp +382
acc -4
acc -10
acc +44
jmp +444
jmp +1
acc +20
acc -1
acc +25
jmp +332
acc +18
jmp +184
acc +1
acc +20
acc -7
acc -12
jmp +84
acc +30
jmp -19
nop +491
acc +37
acc +44
jmp +220
acc +3
acc +19
jmp +485
jmp +222
nop +264
acc +4
jmp +151
nop -36
acc +48
jmp +356
acc +28
acc +29
nop +397
jmp +168
nop +115
acc -13
acc -11
jmp +470
jmp +201
acc +48
acc -6
acc -18
acc -13
jmp +442
jmp +266
acc +10
acc +30
acc -7
acc -8
jmp +380
acc +1
nop +106
acc +9
acc -11
jmp -79
jmp +166
acc -9
jmp +300
acc +39
acc +1
acc +27
acc +26
jmp +367
jmp +291
acc +18
jmp +100
acc +25
acc +43
acc -8
acc -12
jmp +475
acc +15
jmp +492
acc -5
acc -12
acc +35
acc +25
jmp +360
nop +301
acc +32
acc -1
jmp +436
acc +21
jmp +109
acc +1
nop +230
jmp -113
acc +24
acc +12
acc +13
acc +27
jmp -52
jmp +476
acc +15
acc -18
acc -13
jmp +323
acc -10
acc +35
acc -6
nop +377
jmp +8
jmp +430
nop +50
acc +33
acc -1
jmp -72
acc -19
jmp -92
jmp +1
jmp -87
nop -120
nop -34
jmp +159
jmp +183
jmp +1
acc -4
acc +49
acc -4
jmp +73
acc -18
acc +34
acc -8
jmp +403
acc +32
acc +0
acc +0
jmp +390
acc +19
jmp +305
acc -15
jmp +176
acc +3
jmp +36
acc +29
acc +21
jmp +1
acc -17
jmp +144
acc +16
acc +4
acc +49
acc -7
jmp -65
acc +28
acc +2
acc +23
acc +46
jmp +278
jmp +424
acc +45
acc +7
jmp -49
jmp -50
acc -11
nop -121
jmp -140
jmp +1
acc -8
jmp +206
acc -7
jmp +1
acc +20
acc +30
jmp +375
nop +312
jmp +111
acc +23
jmp -15
acc +27
acc +46
acc +36
jmp +360
acc +1
acc +25
acc +29
jmp -137
jmp +177
acc +15
acc -13
acc +48
acc +29
jmp +76
nop -174
acc +27
jmp +214
acc +4
jmp +120
nop -165
acc -16
jmp +2
jmp +238
jmp +224
jmp -154
acc +12
jmp +162
acc +31
acc +26
acc -13
acc +18
jmp +173
acc +38
jmp +1
jmp +199
jmp -202
jmp +127
acc -12
jmp -42
acc -12
acc +36
acc -4
acc +24
jmp +343
acc -17
nop +277
acc +13
jmp +56
jmp +41
nop +92
acc +32
jmp +182
nop +111
acc +0
acc +29
jmp +219
nop -234
acc +0
acc +31
acc +49
jmp +216
jmp +247
acc +24
acc -10
jmp +218
acc +14
acc -19
acc +14
jmp +11
jmp +82
acc +5
acc +28
acc +35
jmp -93
acc +24
jmp -210
acc +39
jmp -107
jmp -150
acc -7
jmp -185
acc +25
acc -15
jmp +63
acc +14
acc +50
jmp -7
acc +13
jmp +298
nop +69
jmp -268
acc -5
jmp +66
jmp +48
nop -1
acc +38
acc +3
acc +46
jmp +259
nop +235
acc +4
jmp -186
jmp +94
acc -16
acc +6
jmp +287
acc -19
jmp -221
jmp -69
acc +8
nop -102
acc +31
jmp +204
jmp -81
acc +12
acc +21
acc -8
nop +151
jmp -155
acc +50
nop +145
acc -6
acc +0
jmp -296
acc +16
acc +30
acc +11
jmp +254
acc +0
acc -8
nop +162
acc -17
jmp -144
acc +6
acc +2
acc +32
acc -5
jmp +21
jmp -77
acc +38
jmp +117
acc +27
acc -11
nop -203
jmp +201
jmp -305
acc +40
nop -330
acc -7
jmp -279
jmp +60
nop -163
jmp -53
nop +115
acc +24
jmp +1
acc +45
jmp -92
acc +0
acc +13
jmp -302
acc +25
jmp +208
nop -293
jmp +5
jmp +1
acc -13
nop -272
jmp +62
acc -4
acc +32
acc +49
jmp -124
acc -19
nop -246
jmp -353
nop -349
acc +13
acc +21
jmp -165
acc +14
acc +37
nop +28
acc +7
jmp -308
acc +11
jmp +71
jmp -139
nop -19
acc -7
acc -3
jmp -302
acc -2
acc +1
nop -43
jmp -280
acc +10
acc +9
jmp -358
acc +39
acc +16
acc -11
jmp +1
jmp +142
acc -15
acc -17
acc +9
acc +11
jmp -172
jmp -90
nop +135
acc -1
jmp -379
acc +39
acc -13
jmp -57
acc -3
acc -7
jmp +1
jmp +80
acc +7
acc +11
acc +30
nop +69
jmp -140
acc +11
acc +7
acc +3
jmp -417
jmp -314
acc -6
jmp -6
jmp -224
acc +0
jmp -131
acc +7
acc +33
jmp +20
acc +32
acc -14
nop -375
jmp -394
acc +8
acc +47
acc +29
acc -6
jmp -381
acc -8
jmp -353
jmp -108
acc -16
acc +21
jmp -329
acc +13
acc +0
acc +0
jmp -402
acc -8
jmp -307
jmp -308
jmp -358
acc +38
acc -19
acc +33
jmp -276
jmp -114
acc -6
jmp +55
acc +16
jmp -244
nop +22
acc -7
acc +19
jmp -154
jmp +18
jmp -50
acc +31
acc +50
acc +2
jmp -260
acc -16
jmp -135
acc +50
acc -9
acc +50
acc +27
jmp -323
acc +26
nop -249
acc +46
acc +3
jmp -474
acc +50
acc -7
jmp -78
jmp +1
acc -6
acc +6
jmp +94
acc +47
acc -3
acc +13
jmp -485
nop -499
acc +35
acc +35
acc -1
jmp -259
nop -486
acc +48
acc -4
jmp +23
acc +33
acc +37
acc +10
jmp +61
acc -1
jmp +1
jmp +1
acc -8
jmp +61
jmp -237
jmp -164
acc +39
acc +38
nop -302
jmp -468
acc -15
jmp -6
acc -9
acc +1
acc +41
acc +48
jmp -285
acc +1
acc +24
jmp -111
jmp -90
acc +46
acc +21
acc +43
jmp -103
acc -9
nop -5
jmp -274
acc -13
jmp -262
jmp -39
acc +43
nop -463
acc +15
acc +23
jmp -176
nop -305
acc +2
acc +28
jmp -198
acc +15
acc -18
jmp -473
acc -13
acc +9
jmp -46
acc +1
acc +43
acc +6
jmp +10
acc +24
acc -3
jmp -424
acc -1
acc +47
jmp +1
acc +20
jmp -17
jmp -59
nop -19
acc +42
acc +47
jmp -9
jmp -576
nop -148
acc +0
jmp +12
acc -15
jmp -209
acc +13
jmp -442
nop -548
nop -62
acc +22
jmp -92
jmp -516
acc +8
jmp -301
acc +1
jmp -146
acc -15
jmp -366
jmp -440
acc +17
acc +25
acc +28
jmp -240
acc -2
acc +25
nop -68
acc +14
jmp +1

File diff suppressed because it is too large Load diff

View file

@ -30,7 +30,8 @@
#include <iostream>
#include <fstream>
#include "types.hpp"
#include "../misc/types.hpp"
#include "../misc/print.hpp"
// Find 2 numbers that sum to 2020
auto find_2020_x2(const std::vector<i32> & list) -> void {
@ -44,7 +45,7 @@ auto find_2020_x2(const std::vector<i32> & list) -> void {
--end;
}
}
std::cout << (list[begin] * list[end]) << std::endl;
print((list[begin] * list[end]));
}
// Find 3 numbers that sum to 2020
@ -53,13 +54,13 @@ auto find_2020_x3(const std::vector<i32> & list) -> void {
for (auto n1 = 1; n1 < list.size() - 1; ++n1) {
auto low = n0 + 1;
auto high = n1;
while (low < high) {
auto n2 = (low + high) / 2;
while (low < high - 1) {
auto sum = 0;
if ((sum = list[n0] + list[n1] + list[n2]) == 2020) {
std::cout << (list[n0] * list[n1] * list[n2]) << std::endl;
print((list[n0] * list[n1] * list[n2]));
return;
} else if (sum > 2020) {
} else if (sum < 2020) {
low = n2 + 1;
} else {
high = n2;
@ -69,11 +70,11 @@ auto find_2020_x3(const std::vector<i32> & list) -> void {
}
}
auto main(i32 argc, char * argv[]) -> i32 {
auto day1() -> void {
auto list = std::vector<i32>();
{
auto line = std::string();
auto file = std::ifstream("day1.input");
auto file = std::ifstream("inputs/day1.input");
while (getline(file, line)) {
list.push_back(std::stoi(line));
}
@ -82,6 +83,4 @@ auto main(i32 argc, char * argv[]) -> i32 {
find_2020_x2(list);
find_2020_x3(list);
return 0;
}

View file

@ -29,7 +29,8 @@
#include <iostream>
#include <fstream>
#include "types.hpp"
#include "../misc/types.hpp"
#include "../misc/print.hpp"
struct Pair {
u64 jolt;
@ -40,11 +41,11 @@ auto operator<(const Pair & left, const Pair & right) -> bool {
return left.jolt < right.jolt;
}
auto main(i32 argc, char * argv[]) -> i32 {
auto day10() -> void {
auto jolts = std::vector<Pair>{{ 0, 1 }};
{
auto line = std::string();
auto file = std::ifstream("day10.input");
auto file = std::ifstream("inputs/day10.input");
while (getline(file, line)) {
jolts.push_back({ (u64) std::stoll(line), 0 });
}
@ -59,7 +60,7 @@ auto main(i32 argc, char * argv[]) -> i32 {
else if (jolts[i + 1].jolt - jolts[i].jolt == 3) ++dif3;
}
std::cout << (dif1 * dif3) << std::endl;
print((dif1 * dif3));
for (auto i = i32(0); i < jolts.size() - 1; ++i) {
for (auto j = i + 1; j < jolts.size(); ++j) {
@ -70,7 +71,5 @@ auto main(i32 argc, char * argv[]) -> i32 {
}
}
}
std::cout << jolts[jolts.size() - 1].count << std::endl;
return 0;
print(jolts[jolts.size() - 1].count);
}

View file

@ -30,7 +30,8 @@
#include <iostream>
#include <fstream>
#include "types.hpp"
#include "../misc/types.hpp"
#include "../misc/print.hpp"
template <typename Lambda>
auto iterate_seats(const auto & seats, Lambda callback) {
@ -62,12 +63,12 @@ auto count_seats(const auto & seats) -> usize {
return occupied;
}
auto main(i32 argc, char * argv[]) -> i32 {
auto day11() -> void {
auto bit = u8(0b1);
auto seats = std::array<std::vector<std::string>, 2>();
{
auto line = std::string();
auto file = std::ifstream("day11.input");
auto file = std::ifstream("inputs/day11.input");
while (getline(file, line)) {
seats[bit].push_back(line);
}
@ -94,7 +95,7 @@ auto main(i32 argc, char * argv[]) -> i32 {
}
while (!seats_equal(seats));
std::cout << count_seats(seats[0]) << std::endl;
print(count_seats(seats[0]));
iterate_seats(seats[0], [&seats](i32 i, i32 j) {
seats[0][i][j] = seats[1][i][j] = 'L';
@ -129,7 +130,5 @@ auto main(i32 argc, char * argv[]) -> i32 {
});
} while (!seats_equal(seats));
std::cout << count_seats(seats[0]) << std::endl;
return 0;
print(count_seats(seats[0]));
}

104
2020/days/day12.cpp Normal file
View file

@ -0,0 +1,104 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include "../misc/types.hpp"
#include "../misc/print.hpp"
struct Instruction{ char op; i32 num; };
auto day12() -> void {
auto instructions = std::vector<Instruction>();
{
auto line = std::string();
auto file = std::ifstream("inputs/day12.input");
while (getline(file, line)) {
instructions.push_back({ line[0], std::stoi(line.substr(1, line.size() - 1)) });
if (line[0] == 'L' || line[0] == 'R') {
instructions[instructions.size() - 1].num /= 90;
}
}
}
{
auto ship_x = i32(0);
auto ship_y = i32(0);
auto direction = i32(2);
for (const auto & instruction : instructions) {
switch (instruction.op) {
case 'N': ship_y += instruction.num; break;
case 'E': ship_x += instruction.num; break;
case 'S': ship_y -= instruction.num; break;
case 'W': ship_x -= instruction.num; break;
case 'R': direction = (direction - instruction.num + 4) % 4; break;
case 'L': direction = (direction + instruction.num ) % 4; break;
case 'F':
ship_x += ((direction - 1) % 2) * instruction.num;
ship_y += ((direction - 2) % 2) * instruction.num;
break;
}
}
print((std::abs(ship_x) + std::abs(ship_y)));
}
{
auto ship_x = i32(0);
auto ship_y = i32(0);
auto waypoint_x = i32(10);
auto waypoint_y = i32( 1);
for (const auto & instruction : instructions) {
switch (instruction.op) {
case 'N': waypoint_y += instruction.num; break;
case 'E': waypoint_x += instruction.num; break;
case 'S': waypoint_y -= instruction.num; break;
case 'W': waypoint_x -= instruction.num; break;
case 'R':
for (auto i = i32(0); i < instruction.num; ++i) {
auto copy = waypoint_x;
waypoint_x = waypoint_y;
waypoint_y = -copy;
}
break;
case 'L':
for (auto i = i32(0); i < instruction.num; ++i) {
auto copy = waypoint_x;
waypoint_x = -waypoint_y;
waypoint_y = copy;
}
break;
case 'F':
ship_x += waypoint_x * instruction.num;
ship_y += waypoint_y * instruction.num;
break;
}
}
print((std::abs(ship_x) + std::abs(ship_y)));
}
}

103
2020/days/day13.cpp Normal file
View file

@ -0,0 +1,103 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include "../misc/types.hpp"
#include "../misc/print.hpp"
struct Pair{ i64 id; usize index; };
// f = a + n0 * b = c + n1 * d
// f = req_base + n0 * req_loop = new_base + n1 * new_loop
// Solve for the smallest integer value f such that this holds true
auto find_least(i64 new_base, i64 new_loop, i64 req_base, i64 req_loop, i64 iter) -> i64 {
while ((req_base - new_base + ++iter * req_loop) % new_loop != 0);
return req_base + iter * req_loop;
}
auto day13() -> void {
auto ready = usize(0);
auto buses = std::vector<Pair>();
{
auto line = std::string();
auto file = std::ifstream("inputs/day13.input");
getline(file, line);
ready = std::stoi(line);
getline(file, line);
auto start = usize(0);
auto end = usize(0);
auto index = usize(0);
auto id = std::string();
while ((end = line.find(',', start)) != std::string::npos) {
id = line.substr(start, end - start);
if (id != "x") {
buses.push_back({ i64(std::stoi(line.substr(start, end - start))), index });
}
start = end + 1;
++index;
}
end = line.size();
id = line.substr(start, end - start);
if (id != "x") {
buses.push_back({ i64(std::stoi(line.substr(start, end - start))), index });
}
}
auto id = buses[0].id;
auto minutes = buses[0].id - (ready % buses[0].id);
for (auto i = usize(1); i < buses.size(); ++i) {
auto local_minutes = buses[i].id - (ready % buses[i].id);
if (local_minutes < minutes) {
id = buses[i].id;
minutes = local_minutes;
}
}
print((id * minutes));
auto req_base = usize(buses[0].index);
auto req_loop = usize(buses[0].id );
for (auto i = usize(1); i < buses.size(); ++i) {
req_base = find_least(-buses[i].index, buses[i].id, req_base, req_loop, -1);
if (i < buses.size() - 1) {
req_loop = find_least(0, buses[i].id, 0, req_loop, 0);
}
/*
required_base (rqb), required_loop (rql)
base_loop (bl), repeat_loop (rl)
rqb + a0 * rql = bl + a1 * rl < minimize and store in required loop
a0 = (bl + a1 * rl - rqb) / rql
b0 * rql = b1 * rl < minimize and store in required loop
*/
}
print(req_base);
}

112
2020/days/day14.cpp Normal file
View file

@ -0,0 +1,112 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#include <vector>
#include <map>
#include <string>
#include <bitset>
#include <iostream>
#include <fstream>
#include "../misc/types.hpp"
#include "../misc/print.hpp"
struct Op{ u8 op; u64 num1; u64 num2; };
auto set_memory(std::map<u64, u64> & map, u64 addr, const std::vector<bool> & maskX, usize index, u64 value) -> void {
while (++index < maskX.size() && !maskX[index]);
if (index == maskX.size()) {
map.insert_or_assign(addr, value);
} else {
set_memory(map, addr, maskX, index, value);
set_memory(map, addr ^ (u64(1) << (maskX.size() - index - 1)), maskX, index, value);
}
}
auto day14() -> void {
auto ops = std::vector<Op>();
{
auto line = std::string();
auto file = std::ifstream("inputs/day14.input");
while (getline(file, line)) {
if (line.find("mask") != std::string::npos) {
auto mask0 = u64(-1);
auto mask1 = u64( 0);
for (auto i = usize(7); i < line.size(); ++i) {
if (line[i] == '0') {
mask0 ^= (u64(1) << (42 - i));
} else if (line[i] == '1') {
mask1 ^= (u64(1) << (42 - i));
}
}
ops.push_back({ 0, mask0, mask1 });
} else {
auto value = line.find("=") + 2;
ops.push_back({
1,
u64(std::stoll(line.substr(4, line.find("]") - 4))),
u64(std::stoll(line.substr(value, line.size() - value)))
});
}
}
}
auto mask0 = u64(-1);
auto mask1 = u64( 0);
auto memory = std::map<u64, u64>();
for (auto op : ops) {
if (op.op == 0) {
mask0 = op.num1;
mask1 = op.num2;
} else {
memory.insert_or_assign(op.num1, (op.num2 & mask0) | mask1);
}
}
auto sum = u64(0);
for(auto mem : memory) {
sum += mem.second;
}
print(sum);
mask1 = u64(0);
memory = std::map<u64, u64>();
auto maskX = std::vector<bool>(36);
for (auto op : ops) {
if (op.op == 0) {
mask1 = op.num2;
for (auto i = usize(0); i < maskX.size(); ++i) {
auto bit = u64(1) << u64(35 - i);
maskX[i] = (op.num1 & bit) && !(op.num2 & bit);
}
} else {
set_memory(memory, op.num1 | mask1, maskX, -1, op.num2);
}
}
sum = u64(0);
for(auto mem : memory) {
sum += mem.second;
}
print(sum);
}

71
2020/days/day15.cpp Normal file
View file

@ -0,0 +1,71 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#include <unordered_map>
#include <string>
#include <iostream>
#include <fstream>
#include "../misc/types.hpp"
#include "../misc/print.hpp"
struct Pair{ u64 num; usize last; };
auto day15() -> void {
auto last = usize(0);
auto index = usize(0);
auto sequence = std::unordered_map<u64, u64>();
{
auto line = std::string();
auto file = std::ifstream("inputs/day15.input");
getline(file, line);
auto start = usize(0);
auto end = usize(0);
auto num = std::string();
while ((end = line.find(',', start)) != std::string::npos) {
num = line.substr(start, end - start);
sequence.insert_or_assign(u64(std::stoll(num)), ++index);
start = end + 1;
}
end = line.size();
num = line.substr(start, end - start);
sequence.insert_or_assign(u64(std::stoll(num)), ++index);
}
while (++index < 30000000) {
if (index == 2020) {
print(last);
}
if (sequence.contains(last)) {
auto new_last = index - sequence[last];
sequence[last] = index;
last = new_last;
} else {
sequence.insert_or_assign(last, index);
last = 0;
}
}
print(last);
}

209
2020/days/day16.cpp Normal file
View file

@ -0,0 +1,209 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include "../misc/types.hpp"
#include "../misc/print.hpp"
struct Rule { u64 r11; u64 r12; u64 r21; u64 r22; };
auto read_ticket(std::vector<u64> & ticket, const std::string & line) -> void {
auto start = usize(0);
auto end = usize(0);
while ((end = line.find(",", end + 1)) != std::string::npos) {
ticket.push_back(std::stoll(line.substr(start, end - start)));
start = end + 1;
}
end = line.size();
ticket.push_back(std::stoll(line.substr(start, end - start)));
}
auto matches_rule(const Rule & rule, u64 field) -> bool {
return (rule.r11 <= field && field <= rule.r12) || (rule.r21 <= field && field <= rule.r22);
}
auto remove_if_exists(std::vector<u64> & v, u64 search) -> bool {
auto low = usize(0);
auto high = v.size();
while (low < high) {
auto index = (low + high) / 2;
if (v[index] == search) {
v.erase(v.begin() + index);
return true;
} else if (search > v[index]) {
low = index + 1;
} else {
high = index;
}
}
return false;
}
auto contains(std::vector<u64> & v, u64 search) -> bool {
auto low = usize(0);
auto high = v.size();
while (low < high) {
auto index = (low + high) / 2;
if (v[index] == search) {
return true;
} else if (search > v[index]) {
low = index + 1;
} else {
high = index;
}
}
return false;
}
auto day16() -> void {
auto find = std::vector<u64>();
auto rules = std::vector<Rule>();
auto your_ticket = std::vector<u64>();
auto tickets = std::vector<std::vector<u64>>();
{
auto line = std::string();
auto file = std::ifstream("inputs/day16.input");
auto index = usize(0);
while (getline(file, line) && line != "") {
auto rule = Rule();
auto start = line.find(":") + 2;
auto end = line.find("-");
rule.r11 = std::stoll(line.substr(start, end - start));
start = end + 1;
end = line.find(" ", end);
rule.r12 = std::stoll(line.substr(start, end - start));
start = end + 4;
end = line.find("-", end);
rule.r21 = std::stoll(line.substr(start, end - start));
start = end + 1;
end = line.size();
rule.r22 = std::stoll(line.substr(start, end - start));
rules.push_back(rule);
if (line.find("departure") != std::string::npos) {
find.push_back(index);
}
++index;
}
getline(file, line);
getline(file, line);
read_ticket(your_ticket, line);
getline(file, line);
getline(file, line);
while (getline(file, line)) {
auto ticket = std::vector<u64>();
read_ticket(ticket, line);
tickets.push_back(std::move(ticket));
}
}
auto valid = std::vector<std::vector<u64>>();
{
auto foo = std::vector<u64>(your_ticket.size());
for (auto i = usize(0); i < your_ticket.size(); ++i) {
foo[i] = i;
}
for (auto i = usize(0); i < rules.size(); ++i) {
valid.push_back(foo);
}
}
auto sum = u64(0);
for (auto k = usize(0); k < tickets.size(); ++k) {
const auto & ticket = tickets[k];
auto invalid_ticket = false;
for (auto i = usize(0); i < ticket.size(); ++i) {
auto invalid_field = true;
for (auto j = usize(0); invalid_field && j < rules.size(); ++j) {
if (matches_rule(rules[j], ticket[i])) {
invalid_field = false;
}
}
if (invalid_field) {
sum += ticket[i];
}
invalid_ticket = invalid_ticket || invalid_field;
}
if (invalid_ticket) {
tickets.erase(tickets.begin() + k);
--k;
}
}
print(sum);
for (auto i = usize(0); i < tickets.size(); ++i) {
const auto & ticket = tickets[i];
for (auto j = usize(0); j < valid.size(); ++j) {
auto & v = valid[j];
for (auto k = usize(0); k < v.size(); ++k) {
if (!matches_rule(rules[j], ticket[v[k]])) {
v.erase(v.begin() + k);
--k;
}
}
}
}
for (auto i = usize(0); i < your_ticket.size(); ++i) {
auto cont_index = usize(0);
auto contained = usize(0);
for (auto j = usize(0); j < valid.size(); ++j) {
if (contains(valid[j], i)) {
cont_index = j;
++contained;
}
}
if (contained == 1) {
for (auto j = usize(0); j < valid[cont_index].size(); ++j) {
if (valid[cont_index][j] != i) {
valid[cont_index].erase(valid[cont_index].begin() + j);
--j;
}
}
}
}
auto loop = true;
while (loop) {
loop = false;
for (auto i = usize(0); i < valid.size(); ++i) {
if (valid[i].size() == 1) {
for (auto j = usize(0); j < valid.size(); ++j) {
if (j != i) {
auto temp = remove_if_exists(valid[j], valid[i][0]);
loop = temp || loop;
}
}
}
}
}
auto product = u64(1);
for (auto i = usize(0); i < find.size(); ++i) {
product *= your_ticket[valid[find[i]][0]];
}
print(product);
}

163
2020/days/day17.cpp Normal file
View file

@ -0,0 +1,163 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#include <vector>
#include <array>
#include <string>
#include <iostream>
#include <fstream>
#include "../misc/types.hpp"
#include "../misc/print.hpp"
constexpr auto CYCLES = 6;
constexpr auto BUFFER = CYCLES + 1;
auto neighbor3d_count(const auto & pocket, i32 x, i32 y, i32 z) -> usize {
auto count = usize(0);
for (auto i = i32(-1); i < 2; ++i) {
for (auto j = i32(-1); j < 2; ++j) {
for (auto k = i32(-1); k < 2; ++k) {
count += (i != 0 || j != 0 || k != 0) && pocket[x + i][y + j][z + k];
}
}
}
return count;
}
auto neighbor4d_count(const auto & pocket, i32 w, i32 x, i32 y, i32 z) -> usize {
auto count = usize(0);
for (auto i = i32(-1); i < 2; ++i) {
for (auto j = i32(-1); j < 2; ++j) {
for (auto k = i32(-1); k < 2; ++k) {
for (auto l = i32(-1); l < 2; ++l) {
count += (i != 0 || j != 0 || k != 0 || l != 0) && pocket[w + l][x + i][y + j][z + k];
}
}
}
}
return count;
}
auto day17() -> void {
auto pocket = std::vector<std::vector<std::vector<std::vector<bool>>>>();
{
auto lines = std::vector<std::string>();
auto line = std::string();
auto file = std::ifstream("inputs/day17.input");
while (getline(file, line)) {
lines.push_back(line);
}
pocket = std::vector<std::vector<std::vector<std::vector<bool>>>>(BUFFER * 2 + 1);
for (auto w = usize(0); w < pocket.size(); ++w) {
pocket[w] = std::vector<std::vector<std::vector<bool>>>(lines[0].size() + BUFFER * 2);
for (auto i = usize(0); i < pocket[0].size(); ++i) {
auto vec = std::vector<std::vector<bool>>(lines.size() + BUFFER * 2);
for (auto j = usize(0); j < vec.size(); ++j) {
vec[j] = std::vector<bool>(BUFFER * 2 + 1);
if (w == BUFFER && i >= BUFFER && i < BUFFER + lines[0].size() && j >= BUFFER && j < BUFFER + lines.size()) {
vec[j][BUFFER] = lines[j - BUFFER][i - BUFFER] == '#';
}
}
pocket[w][i] = std::move(vec);
}
}
}
{
auto pockets = std::array<std::vector<std::vector<std::vector<bool>>>, 2>{ pocket[BUFFER], pocket[BUFFER] };
auto bit = false;
for (auto i = usize(0); i < CYCLES; ++i) {
auto & read = pockets[bit];
auto & write = pockets[bit = !bit];
for (auto x = i32(1); x < read.size() - 1; ++x) {
for (auto y = i32(1); y < read[0].size() - 1; ++y) {
for (auto z = i32(1); z < read[0][0].size() - 1; ++z) {
auto neighbors = neighbor3d_count(read, x, y, z);
if (read[x][y][z] && (neighbors < 2 || neighbors > 3)) {
write[x][y][z] = false;
} else if (!read[x][y][z] && neighbors == 3) {
write[x][y][z] = true;
} else {
write[x][y][z] = read[x][y][z];
}
}
}
}
}
auto & pocket = pockets[bit];
auto count = usize(0);
for (auto i = usize(0); i < pocket.size(); ++i) {
for (auto j = usize(0); j < pocket[0].size(); ++j) {
for (auto k = usize(0); k < pocket[0][0].size(); ++k) {
count += pocket[i][j][k];
}
}
}
print(count);
}
{
auto pockets = std::array<std::vector<std::vector<std::vector<std::vector<bool>>>>, 2>{ pocket, pocket };
auto bit = false;
for (auto i = usize(0); i < CYCLES; ++i) {
auto & read = pockets[bit];
auto & write = pockets[bit = !bit];
for (auto w = i32(1); w < read.size() - 1; ++w) {
for (auto x = i32(1); x < read[0].size() - 1; ++x) {
for (auto y = i32(1); y < read[0][0].size() - 1; ++y) {
for (auto z = i32(1); z < read[0][0][0].size() - 1; ++z) {
auto neighbors = neighbor4d_count(read, w, x, y, z);
if (read[w][x][y][z] && (neighbors < 2 || neighbors > 3)) {
write[w][x][y][z] = false;
} else if (!read[w][x][y][z] && neighbors == 3) {
write[w][x][y][z] = true;
} else {
write[w][x][y][z] = read[w][x][y][z];
}
}
}
}
}
}
auto & pocket = pockets[bit];
auto count = usize(0);
for (auto i = usize(0); i < pocket.size(); ++i) {
for (auto j = usize(0); j < pocket[0].size(); ++j) {
for (auto k = usize(0); k < pocket[0][0].size(); ++k) {
for (auto l = usize(0); l < pocket[0][0][0].size(); ++l) {
count += pocket[i][j][k][l];
}
}
}
}
print(count);
}
}

128
2020/days/day18.cpp Normal file
View file

@ -0,0 +1,128 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include "../misc/types.hpp"
#include "../misc/print.hpp"
auto evaluate_part1(const std::string & equation, usize & index) -> u64 {
auto value = u64(0);
auto operation = 0;
while (equation[index] != ')') {
if ('0' <= equation[index] && equation[index] <= '9') {
auto end = index;
while ('0' <= equation[++end] && equation[end] <= '9');
if (operation == 0) {
value += std::stoll(equation.substr(index, end - index));
} else {
value *= std::stoll(equation.substr(index, end - index));
}
index = end;
} else if (equation[index] == '+') {
operation = 0;
index += 2;
} else if (equation[index] == '*') {
operation = 1;
index += 2;
} else if (equation[index] == '(') {
if (operation == 0) {
value += evaluate_part1(equation, ++index);
} else {
value *= evaluate_part1(equation, ++index);
}
} else if (equation[index] == ' ') {
++index;
}
}
++index;
return value;
}
auto evaluate_part2(const std::string & equation, usize & index) -> u64;
auto evaluate_part2_addition(const std::string & equation, usize & index) -> u64;
auto evaluate_part2_factor(const std::string & equation, usize & index) -> u64;
auto evaluate_part2(const std::string & equation, usize & index) -> u64 {
auto value1 = evaluate_part2_addition(equation, index);
if (++index < equation.size() && equation[index] == '*') {
auto value2 = evaluate_part2(equation, index += 2);
return value1 * value2;
}
--index;
return value1;
}
auto evaluate_part2_addition(const std::string & equation, usize & index) -> u64 {
auto value1 = evaluate_part2_factor(equation, index);
if (++index < equation.size() && equation[index] == '+') {
auto value2 = evaluate_part2_addition(equation, index += 2);
return value1 + value2;
}
--index;
return value1;
}
auto evaluate_part2_factor(const std::string & equation, usize & index) -> u64 {
auto value = u64(0);
if (equation[index] == '(') {
value = evaluate_part2(equation, ++index);
++index;
} else {
auto end = index;
while ('0' <= equation[++end] && equation[end] <= '9');
value = std::stoll(equation.substr(index, end - index));
index = end;
}
return value;
}
auto day18() -> void {
auto equations = std::vector<std::string>();
{
auto line = std::string();
auto file = std::ifstream("inputs/day18.input");
while (getline(file, line)) {
equations.push_back(line + ')');
}
}
auto sum = u64(0);
for (auto i = usize(0); i < equations.size(); ++i) {
auto index = usize(0);
sum += evaluate_part1(equations[i], index);
}
print(sum);
sum = u64(0);
for (auto i = usize(0); i < equations.size(); ++i) {
auto index = usize(0);
sum += evaluate_part2_factor('(' + equations[i], index);
}
print(sum);
}

195
2020/days/day19.cpp Normal file
View file

@ -0,0 +1,195 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#include <vector>
#include <unordered_map>
#include <string>
#include <iostream>
#include <fstream>
#include "../misc/types.hpp"
#include "../misc/print.hpp"
enum RuleType { Char, Sequence, Alternator };
struct Rule {
RuleType type;
char c;
std::vector<u64> list;
std::vector<std::vector<u64>> or_list;
explicit Rule(char c) noexcept : type(Char), c(c) {}
explicit Rule(std::vector<u64> && list) noexcept : type(Sequence), list(std::move(list)) {}
explicit Rule(std::vector<std::vector<u64>> && or_list) noexcept : type(Alternator), or_list(std::move(or_list)) {}
};
auto extract_numbers(const std::string & list) -> std::vector<u64> {
auto nums = std::vector<u64>();
auto end = usize(0);
auto start = usize(0);
while ((end = list.find(" ", ++end)) != std::string::npos) {
nums.push_back(std::stoll(list.substr(start, end - start)));
start = end + 1;
}
return std::move(nums);
}
auto matches(const std::string & string, usize & index, std::unordered_map<u64, Rule> & rules, u64 rule_id, bool sub) -> bool;
auto matches_list(const std::string & string, usize & index, std::unordered_map<u64, Rule> & rules, const std::vector<u64> & rule_ids, bool sub) -> bool {
auto local_index = index;
for (auto i = usize(0); i < rule_ids.size(); ++i) {
if (!matches(string, local_index, rules, rule_ids[i], true)) {
return false;
}
}
index = local_index;
return (sub || index == string.size());
}
auto matches(const std::string & string, usize & index, std::unordered_map<u64, Rule> & rules, u64 rule_id, bool sub) -> bool {
if (index >= string.size()) {
return false;
}
auto & rule = rules.find(rule_id)->second;
switch (rule.type) {
case Char: {
if (string[index] == rule.c) {
++index;
return (sub || index == string.size());
} else {
return false;
}
}
case Sequence: {
return matches_list(string, index, rules, rule.list, sub);
}
case Alternator: {
for (auto i = usize(0); i < rule.or_list.size(); ++i) {
auto local_index = index;
if (matches_list(string, local_index, rules, rule.or_list[i], sub)) {
index = local_index;
return true;
}
}
return false;
}
}
// むだmakes the compiler happy though
return false;
}
auto min_length(std::unordered_map<u64, Rule> & rules, u64 rule_id) -> usize;
auto min_length_list(std::unordered_map<u64, Rule> & rules, const std::vector<u64> & rule_ids) -> usize {
auto len = usize(0);
for (auto i = usize(0); i < rule_ids.size(); ++i) {
len += min_length(rules, rule_ids[i]);
}
return len;
}
auto min_length(std::unordered_map<u64, Rule> & rules, u64 rule_id) -> usize {
auto & rule = rules.find(rule_id)->second;
switch (rule.type) {
case Char: return 1;
case Sequence: return min_length_list(rules, rule.list);
case Alternator: {
auto min = min_length_list(rules, rule.or_list[0]);
for (auto i = usize(1); i < rule.or_list.size(); ++i) {
auto len = min_length_list(rules, rule.or_list[i]);
if (len < min) {
min = len;
}
}
return min;
}
}
// このもむだ!
return 0;
}
auto day19() -> void {
auto rules = std::unordered_map<u64, Rule>();
auto strings = std::vector<std::string>();
{
auto line = std::string();
auto file = std::ifstream("inputs/day19.input");
getline(file, line);
while (line != "") {
auto end = line.find(":");
auto id = std::stoll(line.substr(0, end));
if ((end = line.find("\"")) != std::string::npos) {
rules.insert_or_assign(id, Rule(line[end + 1]));
} else if (line.find("|") != std::string::npos) {
end = line.find(":") + 2;
line = line.substr(end, line.size() - end) + " |";
auto sequences = std::vector<std::vector<u64>>();
end = usize(0);
auto start = usize(0);
while ((end = line.find("|", ++end)) != std::string::npos) {
sequences.push_back(extract_numbers(line.substr(start, end - start)));
start = end + 2;
}
rules.insert_or_assign(id, Rule(std::move(sequences)));
} else {
end = line.find(":") + 2;
rules.insert_or_assign(id, Rule(extract_numbers(line.substr(end, line.size() - end) + ' ')));
}
getline(file, line);
}
while (getline(file, line)) {
strings.push_back(std::move(line));
}
}
auto successful = usize(0);
for (auto i = usize(0); i < strings.size(); ++i) {
auto index = usize(0);
successful += matches(strings[i], index, rules, 0, false);
}
print(successful);
successful = usize(0);
auto min_length42 = min_length(rules, 42);
auto min_length31 = min_length(rules, 31);
for (auto i = usize(0); i < strings.size(); ++i) {
auto unsuccessful = true;
auto base = min_length42 * 2 + min_length31;
auto list = std::vector<u64>{ 42, 42, 31 };
for (auto j = usize(0); unsuccessful && j * min_length42 + base <= strings[i].size(); ++j) {
auto copy = list;
for (auto k = usize(0); unsuccessful && k <= j; ++k) {
auto index = usize(0);
unsuccessful = !matches_list(strings[i], index, rules, copy, false);
copy.push_back(31);
}
list.insert(list.begin(), 42);
}
successful += !unsuccessful;
}
print(successful);
}

View file

@ -29,7 +29,8 @@
#include <iostream>
#include <fstream>
#include "types.hpp"
#include "../misc/types.hpp"
#include "../misc/print.hpp"
struct Password {
u32 min;
@ -72,11 +73,11 @@ auto count_valid_toboggan(const std::vector<Password> & passwords) -> u32 {
return valid;
}
auto main(i32 argc, char * argv[]) -> i32 {
auto day2() -> void {
auto passwords = std::vector<Password>();
{
auto line = std::string();
auto file = std::ifstream("day2.input");
auto file = std::ifstream("inputs/day2.input");
while (getline(file, line)) {
auto index = usize(0);
auto password = Password{};
@ -88,8 +89,6 @@ auto main(i32 argc, char * argv[]) -> i32 {
}
}
std::cout << count_valid_sled(passwords) << std::endl;
std::cout << count_valid_toboggan(passwords) << std::endl;
return 0;
print(count_valid_sled(passwords) );
print(count_valid_toboggan(passwords));
}

105
2020/days/day23.cpp Normal file
View file

@ -0,0 +1,105 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#include <vector>
#include <array>
#include <string>
#include <iostream>
#include <fstream>
#include "../misc/types.hpp"
#include "../misc/print.hpp"
constexpr auto CUP_COUNT = 9;
auto day23() -> void {
auto start = usize(0);
auto nums = std::array<usize, CUP_COUNT>();
auto big_nums = std::vector<usize>(1000000);
{
auto line = std::string();
auto file = std::ifstream("inputs/day23.input");
getline(file, line);
for (auto i = usize(0); i < CUP_COUNT; ++i) {
nums[line[i] - '1'] = line[(i + 1) % CUP_COUNT] - '1';
}
start = line[0] - '1';
for (auto i = usize(0); i < CUP_COUNT; ++i) {
if (nums[i] != start) {
big_nums[i] = nums[i];
} else {
big_nums[i] = CUP_COUNT;
}
}
for (auto i = CUP_COUNT; i < big_nums.size() - 1; ++i) {
big_nums[i] = i + 1;
}
big_nums[big_nums.size() - 1] = start;
}
auto begin = usize(0);
auto end = usize(0);
// Part 1
auto current = start;
for (auto i = usize(0); i < 100; ++i) {
begin = nums[current];
end = nums[nums[begin]];
nums[current] = nums[end];
auto destination = current;
while (
begin == (destination = (destination + CUP_COUNT - 1) % CUP_COUNT)
|| nums[begin] == destination
|| end == destination
);
nums[end] = nums[destination];
nums[destination] = begin;
current = nums[current];
}
auto out = std::array<c8, CUP_COUNT + 1>{ 0 };
for (auto i = nums[0], j = usize(0); i != 0; i = nums[i], ++j) {
out[j] = (i + '1');
}
print(&out[0]);
// Part 2
current = start;
for (auto i = usize(0); i < 10000000; ++i) {
begin = big_nums[current];
end = big_nums[big_nums[begin]];
big_nums[current] = big_nums[end];
auto destination = current;
while (
begin == (destination = (destination + big_nums.size() - 1) % big_nums.size())
|| big_nums[begin] == destination
|| end == destination
);
big_nums[end] = big_nums[destination];
big_nums[destination] = begin;
current = big_nums[current];
}
print(((big_nums[0] + 1) * (big_nums[big_nums[0]] + 1)));
}

View file

@ -29,40 +29,53 @@
#include <iostream>
#include <fstream>
#include "types.hpp"
#include "../misc/types.hpp"
#include "../misc/print.hpp"
auto read_field_and_count_trees(std::vector<std::string> & trees, usize horizontal_increment, usize vertical_increment) -> u64 {
auto tree_count = u64(0);
struct TreeVector{ usize horz; usize vert; };
struct Coordinate{ usize x_index; usize y_index; };
auto x_index = usize(-horizontal_increment);
auto y_index = usize(-1);
auto line = std::string();
auto file = std::ifstream("day3.input");
while (getline(file, line)) {
auto vertical_check = (++y_index % vertical_increment == 0);
tree_count += vertical_check * (line[(x_index += (vertical_check * horizontal_increment)) % line.size()] == '#');
auto read_field_and_count_trees(const std::vector<TreeVector> & vectors) -> std::vector<u64> {
auto tree_counts = std::vector<u64>(vectors.size());
auto coords = std::vector<Coordinate>(vectors.size());
for (auto i = usize(0); i < coords.size(); ++i) {
coords[i] = { usize(-vectors[i].horz), usize(-1) };
}
return tree_count;
auto line = std::string();
auto file = std::ifstream("inputs/day3.input");
while (getline(file, line)) {
for (auto i = usize(0); i < vectors.size(); ++i) {
auto & vector = vectors[i];
auto & coord = coords[i];
auto vertical_check = (++coord.y_index % vector.vert == 0);
tree_counts[i] += vertical_check * (line[(coord.x_index += (vertical_check * vector.horz)) % line.size()] == '#');
}
}
return std::move(tree_counts);
}
auto main(i32 argc, char ** argv) -> i32 {
auto day3() -> void {
auto trees = std::vector<std::string>();
auto tree_counts = std::vector<u64>();
auto tree_counts = read_field_and_count_trees(
std::vector<TreeVector>{
{ 3, 1 },
{ 1, 1 },
{ 5, 1 },
{ 7, 1 },
{ 1, 2 },
}
);
tree_counts.push_back(read_field_and_count_trees(trees, 3, 1));
std::cout << tree_counts[0] << std::endl;
print(tree_counts[0]);
tree_counts.push_back(read_field_and_count_trees(trees, 1, 1));
tree_counts.push_back(read_field_and_count_trees(trees, 5, 1));
tree_counts.push_back(read_field_and_count_trees(trees, 7, 1));
tree_counts.push_back(read_field_and_count_trees(trees, 1, 2));
auto tree_count_product = u64(1);
for (auto tree_count : tree_counts) {
tree_count_product *= tree_count;
}
std::cout << tree_count_product << std::endl;
return 0;
print(tree_count_product);
}

View file

@ -29,7 +29,8 @@
#include <fstream>
#include <iostream>
#include "types.hpp"
#include "../misc/types.hpp"
#include "../misc/print.hpp"
struct KeyValue {
std::string key;
@ -46,13 +47,13 @@ auto try_num(const std::string & passport, usize index) -> bool {
return Min <= num && num <= Max;
};
auto main(i32 argc, char * argv[]) -> i32 {
auto day4() -> void {
auto valid_count1 = usize(0);
auto valid_count2 = usize(0);
auto passport = std::string();
auto line = std::string();
auto file = std::ifstream("day4.input");
auto file = std::ifstream("inputs/day4.input");
while (getline(file, line)) {
if (line == "") {
auto elements = std::vector<KeyValue>{
@ -108,7 +109,6 @@ auto main(i32 argc, char * argv[]) -> i32 {
}
}
std::cout << valid_count1 << ", " << valid_count2 << std::endl;
return 0;
print(valid_count1);
print(valid_count2);
}

View file

@ -30,12 +30,13 @@
#include <iostream>
#include <fstream>
#include "types.hpp"
#include "../misc/types.hpp"
#include "../misc/print.hpp"
auto main(i32 argc, char * argv[]) -> i32 {
auto day5() -> void {
auto seat = usize(0);
auto line = std::string();
auto file = std::ifstream("day5.input");
auto file = std::ifstream("inputs/day5.input");
auto seats = std::vector<usize>();
@ -49,16 +50,14 @@ auto main(i32 argc, char * argv[]) -> i32 {
}
seats.push_back(local_seat);
}
std::cout << seat << std::endl;
print(seat);
std::sort(seats.begin(), seats.end());
for (auto i = usize(0); i < seats.size() - 1; ++i) {
if (seats[i] + 2 == seats[i + 1]) {
std::cout << (seats[i] + 1) << std::endl;
print((seats[i] + 1));
break;
}
}
return 0;
}

View file

@ -29,12 +29,13 @@
#include <iostream>
#include <fstream>
#include "types.hpp"
#include "../misc/types.hpp"
#include "../misc/print.hpp"
auto main(i32 argc, char * argv[]) -> i32 {
auto day6() -> void {
{
auto line = std::string();
auto file = std::ifstream("day6.input");
auto file = std::ifstream("inputs/day6.input");
auto answers = std::vector<u32>(26);
@ -57,8 +58,7 @@ auto main(i32 argc, char * argv[]) -> i32 {
}
}
}
std::cout << sum_1 << ", " << sum_2 << std::endl;
print(sum_1);
print(sum_2);
}
return 0;
}

View file

@ -32,7 +32,8 @@
#include <iostream>
#include <fstream>
#include "types.hpp"
#include "../misc/types.hpp"
#include "../misc/print.hpp"
struct SubBag { std::string type; u32 count; };
@ -60,11 +61,11 @@ auto count_to(const std::string & search, std::map<std::string, Edges> & map) ->
return counted;
}
auto main(i32 argc, char * argv[]) -> i32 {
auto day7() -> void {
auto bag_graph = std::map<std::string, Edges>();
{
auto line = std::string();
auto file = std::ifstream("day7.input");
auto file = std::ifstream("inputs/day7.input");
while (getline(file, line)) {
auto find = line.find("bag") - 1;
auto bag_type = line.substr(0, line.find("bag") - 1);
@ -96,9 +97,7 @@ auto main(i32 argc, char * argv[]) -> i32 {
}
}
}
std::cout << seen.size() << std::endl;
print(seen.size());
std::cout << (count_to("shiny gold", bag_graph) - 1) << std::endl;
return 0;
print((count_to("shiny gold", bag_graph) - 1));
}

View file

@ -29,7 +29,8 @@
#include <iostream>
#include <fstream>
#include "types.hpp"
#include "../misc/types.hpp"
#include "../misc/print.hpp"
enum OpCode { Acc, Jmp, Nop };
struct Op{ OpCode code; i32 num; bool executed; };
@ -81,11 +82,11 @@ auto attempt_swap(State & state, std::vector<Op> & ops) -> bool {
return false;
}
auto main(i32 argc, char * argv[]) -> i32 {
auto day8() -> void {
auto ops = std::vector<Op>();
{
auto line = std::string();
auto file = std::ifstream("day8.input");
auto file = std::ifstream("inputs/day8.input");
while (getline(file, line)) {
ops.push_back(extract_op(line));
}
@ -95,18 +96,16 @@ auto main(i32 argc, char * argv[]) -> i32 {
while (!ops[state.isp].executed) {
execute(state, ops);
}
std::cout << state.acc << std::endl;
print(state.acc);
for (auto & op : ops) { op.executed = false; }
state = State{ 0, 0 };
for (;;) {
if (attempt_swap(state, ops)) {
std::cout << state.acc << std::endl;
print(state.acc);
break;
}
execute(state, ops);
}
return 0;
}

View file

@ -29,7 +29,8 @@
#include <iostream>
#include <fstream>
#include "types.hpp"
#include "../misc/types.hpp"
#include "../misc/print.hpp"
auto find_sum(usize index, std::vector<u64> xmas) {
for (auto i = index - 25; i < index - 1; ++i) {
@ -42,10 +43,10 @@ auto find_sum(usize index, std::vector<u64> xmas) {
return false;
}
auto main(i32 argc, char * argv[]) -> i32 {
auto day9() -> void {
auto xmas = std::vector<u64>();
auto line = std::string();
auto file = std::ifstream("day9.input");
auto file = std::ifstream("inputs/day9.input");
while (getline(file, line)) {
xmas.push_back(std::stoll(line));
}
@ -53,7 +54,7 @@ auto main(i32 argc, char * argv[]) -> i32 {
auto invalid = u64(0);
for (auto i = usize(25); i < xmas.size(); ++i) {
if (!find_sum(i, xmas)) {
std::cout << (invalid = xmas[i]) << std::endl;
print((invalid = xmas[i]));
break;
}
}
@ -82,7 +83,5 @@ auto main(i32 argc, char * argv[]) -> i32 {
max = xmas[i];
}
}
std::cout << (min + max) << std::endl;
return 0;
print((min + max));
}

View file

@ -29,16 +29,15 @@
#include <iostream>
#include <fstream>
#include "types.hpp"
#include "../misc/types.hpp"
#include "../misc/print.hpp"
auto main(i32 argc, char * argv[]) -> i32 {
auto current_day() -> void {
{
auto line = std::string();
auto file = std::ifstream("dayNUM.input");
auto file = std::ifstream("inputs/current_day.input");
while (getline(file, line)) {
}
}
return 0;
}

36
2020/misc/main.cpp Normal file
View file

@ -0,0 +1,36 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#include "types.hpp"
extern auto current_day() -> void;
auto main(i32 argc, char * argv[]) -> i32 {
current_day();
return 0;
}

66
2020/misc/main_test.cpp Normal file
View file

@ -0,0 +1,66 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#include <iostream>
#include <string>
#include <chrono>
#include "types.hpp"
extern auto current_day() -> void;
auto main(i32 argc, char * argv[]) -> i32 {
auto TEST_CYCLES = 1;
if (argc >= 2) {
TEST_CYCLES = std::stoi(argv[1]);
}
std::cout << "Starting test with " << TEST_CYCLES << " iterations..." << std::endl;
auto begin1 = std::chrono::high_resolution_clock::now();
for (auto i = usize(0); i < TEST_CYCLES; ++i) {
current_day();
}
auto end1 = std::chrono::high_resolution_clock::now();
if (argc >= 3) {
if (argv[2] == std::string("millis")) {
std::cout << "Tests completed in " << std::chrono::duration_cast<std::chrono::milliseconds>(end1 - begin1).count() << " milliseconds"<< std::endl;
} else if (argv[2] == std::string("nanos")) {
std::cout << "Tests completed in " << std::chrono::duration_cast<std::chrono::nanoseconds>(end1 - begin1).count() << " nanoseconds"<< std::endl;
} else if (argv[2] == std::string("micros")) {
std::cout << "Tests completed in " << std::chrono::duration_cast<std::chrono::microseconds>(end1 - begin1).count() << " microsenconds"<< std::endl;
} else {
std::cout << "Unkown time scale '" << argv[2] << "'" << std::endl;
}
} else {
std::cout << "Tests completed in " << std::chrono::duration_cast<std::chrono::microseconds>(end1 - begin1).count() << " microseconds"<< std::endl;
}
return 0;
}

31
2020/misc/print.hpp Normal file
View file

@ -0,0 +1,31 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#ifndef TEST_BUILD
#define print(x) std::cout << (x) << std::endl
#else
#define print(x)
#endif

17
2021/Makefile Normal file
View file

@ -0,0 +1,17 @@
day%.out: out/types.o misc/main.cpp days/day%.cpp
g++ -O3 -std=c++2a $(flags) -Dcurrent_day=$(@:.out=) days/$(@:out=cpp) misc/main.cpp out/types.o -o $@
day%_test.out: out/types.o misc/main_test.cpp days/day%.cpp
g++ -O3 -std=c++2a $(flags) -DTEST_BUILD -Dcurrent_day=$(@:_test.out=) days/$(@:_test.out=.cpp) misc/main_test.cpp out/types.o -o $@
days/day%.cpp:
cp 'misc/day.cpp.template' $@
sed -i -e "s/current_day/$(shell basename $@ | cut -f 1 -d '.')/g" $@
out/types.o: misc/types.hpp misc/types.cpp
mkdir -p out/
g++ -std=c++2a $(flags) -c misc/types.cpp -o $@
.PHONY: clean
clean:
rm -f out/* day*.out day*.output

54
2021/days/day1.cpp Normal file
View file

@ -0,0 +1,54 @@
/*****************************
*
* Copyright (c) 2021 Gnarwhal
*
*****************************/
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include "../misc/types.hpp"
#include "../misc/print.hpp"
auto current_day() -> void {
{
auto line = std::string();
auto file = std::ifstream("inputs/day1.input");
getline(file, line);
auto value = stoi(line);
auto increases = 0;
while (getline(file, line)) {
auto new_value = stoi(line);
increases += new_value > value;
value = new_value;
}
std::cout << increases << std::endl;
}
{
auto line = std::string();
auto file = std::ifstream("inputs/day1.input");
getline(file, line);
auto index = 2;
auto values = std::vector<i32>{ 0, 0 };
while (getline(file, line)) {
auto new_value = stoi(line);
values.push_back(0);
values[index - 2] += new_value;
values[index - 1] += new_value;
values[index ] += new_value;
++index;
}
auto increases = 0;
for (auto i = 3; i < values.size(); ++i) {
increases += values[i - 1] < values[i];
}
std::cout << increases << std::endl;
}
}

2000
2021/inputs/day1.input Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,23 @@
/*****************************
*
* Copyright (c) 2020 Gnarwhal
*
*****************************/
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include "../misc/types.hpp"
#include "../misc/print.hpp"
auto current_day() -> void {
{
auto line = std::string();
auto file = std::ifstream("inputs/current_day.input");
while (getline(file, line)) {
}
}
}

36
2021/misc/main.cpp Normal file
View file

@ -0,0 +1,36 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#include "types.hpp"
extern auto current_day() -> void;
auto main(i32 argc, char * argv[]) -> i32 {
current_day();
return 0;
}

66
2021/misc/main_test.cpp Normal file
View file

@ -0,0 +1,66 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#include <iostream>
#include <string>
#include <chrono>
#include "types.hpp"
extern auto current_day() -> void;
auto main(i32 argc, char * argv[]) -> i32 {
auto TEST_CYCLES = 1;
if (argc >= 2) {
TEST_CYCLES = std::stoi(argv[1]);
}
std::cout << "Starting test with " << TEST_CYCLES << " iterations..." << std::endl;
auto begin1 = std::chrono::high_resolution_clock::now();
for (auto i = usize(0); i < TEST_CYCLES; ++i) {
current_day();
}
auto end1 = std::chrono::high_resolution_clock::now();
if (argc >= 3) {
if (argv[2] == std::string("millis")) {
std::cout << "Tests completed in " << std::chrono::duration_cast<std::chrono::milliseconds>(end1 - begin1).count() << " milliseconds"<< std::endl;
} else if (argv[2] == std::string("nanos")) {
std::cout << "Tests completed in " << std::chrono::duration_cast<std::chrono::nanoseconds>(end1 - begin1).count() << " nanoseconds"<< std::endl;
} else if (argv[2] == std::string("micros")) {
std::cout << "Tests completed in " << std::chrono::duration_cast<std::chrono::microseconds>(end1 - begin1).count() << " microsenconds"<< std::endl;
} else {
std::cout << "Unkown time scale '" << argv[2] << "'" << std::endl;
}
} else {
std::cout << "Tests completed in " << std::chrono::duration_cast<std::chrono::microseconds>(end1 - begin1).count() << " microseconds"<< std::endl;
}
return 0;
}

31
2021/misc/print.hpp Normal file
View file

@ -0,0 +1,31 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#ifndef TEST_BUILD
#define print(x) std::cout << (x) << std::endl
#else
#define print(x)
#endif

47
2021/misc/types.cpp Normal file
View file

@ -0,0 +1,47 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#include "types.hpp"
constexpr auto operator "" _u8 (unsigned long long int num) noexcept -> u8 { return u8(num); }
constexpr auto operator "" _i8 (unsigned long long int num) noexcept -> i8 { return u8(num); }
constexpr auto operator "" _u16 (unsigned long long int num) noexcept -> u16 { return u16(num); }
constexpr auto operator "" _i16 (unsigned long long int num) noexcept -> i16 { return i16(num); }
constexpr auto operator "" _u32 (unsigned long long int num) noexcept -> u32 { return u32(num); }
constexpr auto operator "" _i32 (unsigned long long int num) noexcept -> i32 { return i32(num); }
constexpr auto operator "" _u64 (unsigned long long int num) noexcept -> u64 { return u64(num); }
constexpr auto operator "" _i64 (unsigned long long int num) noexcept -> i64 { return i64(num); }
constexpr auto operator "" _usize(unsigned long long int num) noexcept -> usize { return usize(num); }
constexpr auto operator "" _c8 (char c) noexcept -> c8 { return c8(c); }
constexpr auto operator "" _c16(char c) noexcept -> c16 { return c16(c); }
constexpr auto operator "" _c32(char c) noexcept -> c32 { return c32(c); }
constexpr auto operator "" _c8 (unsigned long long int c) noexcept -> c8 { return c8(c); }
constexpr auto operator "" _c16(unsigned long long int c) noexcept -> c16 { return c16(c); }
constexpr auto operator "" _c32(unsigned long long int c) noexcept -> c32 { return c32(c); }
constexpr auto operator "" _f32(long double num) noexcept -> f32 { return (f32) num; }
constexpr auto operator "" _f64(long double num) noexcept -> f64 { return (f64) num; }

70
2021/misc/types.hpp Normal file
View file

@ -0,0 +1,70 @@
/*******************************************************************************
*
* Copyright (c) 2020 Gnarwhal
*
* -----------------------------------------------------------------------------
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files(the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*******************************************************************************/
#ifndef GNARWHAL_REDWOOD_TYPES
#define GNARWHAL_REDWOOD_TYPES
#include <cstddef>
#include <cstdint>
using u8 = std::uint8_t;
using i8 = std::int8_t;
using u16 = std::uint16_t;
using i16 = std::int16_t;
using u32 = std::uint32_t;
using i32 = std::int32_t;
using u64 = std::uint64_t;
using i64 = std::int64_t;
using usize = std::size_t;
constexpr auto operator "" _u8 (unsigned long long int num) noexcept -> u8;
constexpr auto operator "" _i8 (unsigned long long int num) noexcept -> i8;
constexpr auto operator "" _u16 (unsigned long long int num) noexcept -> u16;
constexpr auto operator "" _i16 (unsigned long long int num) noexcept -> i16;
constexpr auto operator "" _u32 (unsigned long long int num) noexcept -> u32;
constexpr auto operator "" _i32 (unsigned long long int num) noexcept -> i32;
constexpr auto operator "" _u64 (unsigned long long int num) noexcept -> u64;
constexpr auto operator "" _i64 (unsigned long long int num) noexcept -> i64;
constexpr auto operator "" _usize(unsigned long long int num) noexcept -> usize;
using c8 = u8;
using c16 = u16;
using c32 = u32;
constexpr auto operator "" _c8 (char c) noexcept -> c8;
constexpr auto operator "" _c16(char c) noexcept -> c16;
constexpr auto operator "" _c32(char c) noexcept -> c32;
constexpr auto operator "" _c8 (unsigned long long int c) noexcept -> c8;
constexpr auto operator "" _c16(unsigned long long int c) noexcept -> c16;
constexpr auto operator "" _c32(unsigned long long int c) noexcept -> c32;
using f32 = float;
using f64 = double;
constexpr auto operator "" _f32(long double num) noexcept -> f32;
constexpr auto operator "" _f64(long double num) noexcept -> f64;
#endif // GNARWHAL_REDWOOD_TYPES