2021 Day 22
This commit is contained in:
parent
29b74f2b16
commit
cb067ecef9
193
2021/22/README.md
Normal file
193
2021/22/README.md
Normal file
@ -0,0 +1,193 @@
|
||||
# 2021 Day 22: Reactor Reboot
|
||||
Copyright (c) Eric Wastl
|
||||
#### [Direct Link](https://adventofcode.com/2021/day/22)
|
||||
|
||||
## Part 1
|
||||
|
||||
Operating at these extreme ocean depths has overloaded the submarine's reactor; it needs to be rebooted.
|
||||
|
||||
The reactor core is made up of a large 3-dimensional grid made up entirely of cubes, one cube per integer 3-dimensional coordinate (`x,y,z`). Each cube can be either **on** or **off**; at the start of the reboot process, they are all **off**. (Could it be an old model of a reactor you've seen [before](https://adventofcode.com/2020/day/17)?)
|
||||
|
||||
To reboot the reactor, you just need to set all of the cubes to either **on** or **off** by following a list of **reboot steps** (your puzzle input). Each step specifies a [cuboid](https://en.wikipedia.org/wiki/Cuboid) (the set of all cubes that have coordinates which fall within ranges for `x`, `y`, and `z`) and whether to turn all of the cubes in that cuboid **on** or **off**.
|
||||
|
||||
For example, given these reboot steps:
|
||||
|
||||
```
|
||||
on x=10..12,y=10..12,z=10..12
|
||||
on x=11..13,y=11..13,z=11..13
|
||||
off x=9..11,y=9..11,z=9..11
|
||||
on x=10..10,y=10..10,z=10..10
|
||||
```
|
||||
|
||||
The first step (`on x=10..12,y=10..12,z=10..12`) turns **on** a 3x3x3 cuboid consisting of 27 cubes:
|
||||
|
||||
- `10,10,10`
|
||||
- `10,10,11`
|
||||
- `10,10,12`
|
||||
- `10,11,10`
|
||||
- `10,11,11`
|
||||
- `10,11,12`
|
||||
- `10,12,10`
|
||||
- `10,12,11`
|
||||
- `10,12,12`
|
||||
- `11,10,10`
|
||||
- `11,10,11`
|
||||
- `11,10,12`
|
||||
- `11,11,10`
|
||||
- `11,11,11`
|
||||
- `11,11,12`
|
||||
- `11,12,10`
|
||||
- `11,12,11`
|
||||
- `11,12,12`
|
||||
- `12,10,10`
|
||||
- `12,10,11`
|
||||
- `12,10,12`
|
||||
- `12,11,10`
|
||||
- `12,11,11`
|
||||
- `12,11,12`
|
||||
- `12,12,10`
|
||||
- `12,12,11`
|
||||
- `12,12,12`
|
||||
|
||||
The second step (`on x=11..13,y=11..13,z=11..13`) turns **on** a 3x3x3 cuboid that overlaps with the first. As a result, only 19 additional cubes turn on; the rest are already on from the previous step:
|
||||
|
||||
- `11,11,13`
|
||||
- `11,12,13`
|
||||
- `11,13,11`
|
||||
- `11,13,12`
|
||||
- `11,13,13`
|
||||
- `12,11,13`
|
||||
- `12,12,13`
|
||||
- `12,13,11`
|
||||
- `12,13,12`
|
||||
- `12,13,13`
|
||||
- `13,11,11`
|
||||
- `13,11,12`
|
||||
- `13,11,13`
|
||||
- `13,12,11`
|
||||
- `13,12,12`
|
||||
- `13,12,13`
|
||||
- `13,13,11`
|
||||
- `13,13,12`
|
||||
- `13,13,13`
|
||||
|
||||
The third step (`off x=9..11,y=9..11,z=9..11`) turns **off** a 3x3x3 cuboid that overlaps partially with some cubes that are on, ultimately turning off 8 cubes:
|
||||
|
||||
- `10,10,10`
|
||||
- `10,10,11`
|
||||
- `10,11,10`
|
||||
- `10,11,11`
|
||||
- `11,10,10`
|
||||
- `11,10,11`
|
||||
- `11,11,10`
|
||||
- `11,11,11`
|
||||
|
||||
The final step (`on x=10..10,y=10..10,z=10..10`) turns **on** a single cube, `10,10,10`. After this last step, **`39`** cubes are **on**.
|
||||
|
||||
The initialization procedure only uses cubes that have x, y, and z positions of at least `-50` and at most `50`. For now, ignore cubes outside this region.
|
||||
|
||||
Here is a larger example:
|
||||
|
||||
```
|
||||
on x=-20..26,y=-36..17,z=-47..7
|
||||
on x=-20..33,y=-21..23,z=-26..28
|
||||
on x=-22..28,y=-29..23,z=-38..16
|
||||
on x=-46..7,y=-6..46,z=-50..-1
|
||||
on x=-49..1,y=-3..46,z=-24..28
|
||||
on x=2..47,y=-22..22,z=-23..27
|
||||
on x=-27..23,y=-28..26,z=-21..29
|
||||
on x=-39..5,y=-6..47,z=-3..44
|
||||
on x=-30..21,y=-8..43,z=-13..34
|
||||
on x=-22..26,y=-27..20,z=-29..19
|
||||
off x=-48..-32,y=26..41,z=-47..-37
|
||||
on x=-12..35,y=6..50,z=-50..-2
|
||||
off x=-48..-32,y=-32..-16,z=-15..-5
|
||||
on x=-18..26,y=-33..15,z=-7..46
|
||||
off x=-40..-22,y=-38..-28,z=23..41
|
||||
on x=-16..35,y=-41..10,z=-47..6
|
||||
off x=-32..-23,y=11..30,z=-14..3
|
||||
on x=-49..-5,y=-3..45,z=-29..18
|
||||
off x=18..30,y=-20..-8,z=-3..13
|
||||
on x=-41..9,y=-7..43,z=-33..15
|
||||
on x=-54112..-39298,y=-85059..-49293,z=-27449..7877
|
||||
on x=967..23432,y=45373..81175,z=27513..53682
|
||||
```
|
||||
|
||||
The last two steps are fully outside the initialization procedure area; all other steps are fully within it. After executing these steps in the initialization procedure region, **`590784`** cubes are **on**.
|
||||
|
||||
Execute the reboot steps. Afterward, considering only cubes in the region `x=-50..50,y=-50..50,z=-50..50`, how many cubes are on?
|
||||
|
||||
## Part 2
|
||||
|
||||
Now that the initialization procedure is complete, you can reboot the reactor.
|
||||
|
||||
Starting with all cubes **off**, run all of the **reboot steps** for all cubes in the reactor.
|
||||
|
||||
Consider the following reboot steps:
|
||||
|
||||
```
|
||||
on x=-5..47,y=-31..22,z=-19..33
|
||||
on x=-44..5,y=-27..21,z=-14..35
|
||||
on x=-49..-1,y=-11..42,z=-10..38
|
||||
on x=-20..34,y=-40..6,z=-44..1
|
||||
off x=26..39,y=40..50,z=-2..11
|
||||
on x=-41..5,y=-41..6,z=-36..8
|
||||
off x=-43..-33,y=-45..-28,z=7..25
|
||||
on x=-33..15,y=-32..19,z=-34..11
|
||||
off x=35..47,y=-46..-34,z=-11..5
|
||||
on x=-14..36,y=-6..44,z=-16..29
|
||||
on x=-57795..-6158,y=29564..72030,z=20435..90618
|
||||
on x=36731..105352,y=-21140..28532,z=16094..90401
|
||||
on x=30999..107136,y=-53464..15513,z=8553..71215
|
||||
on x=13528..83982,y=-99403..-27377,z=-24141..23996
|
||||
on x=-72682..-12347,y=18159..111354,z=7391..80950
|
||||
on x=-1060..80757,y=-65301..-20884,z=-103788..-16709
|
||||
on x=-83015..-9461,y=-72160..-8347,z=-81239..-26856
|
||||
on x=-52752..22273,y=-49450..9096,z=54442..119054
|
||||
on x=-29982..40483,y=-108474..-28371,z=-24328..38471
|
||||
on x=-4958..62750,y=40422..118853,z=-7672..65583
|
||||
on x=55694..108686,y=-43367..46958,z=-26781..48729
|
||||
on x=-98497..-18186,y=-63569..3412,z=1232..88485
|
||||
on x=-726..56291,y=-62629..13224,z=18033..85226
|
||||
on x=-110886..-34664,y=-81338..-8658,z=8914..63723
|
||||
on x=-55829..24974,y=-16897..54165,z=-121762..-28058
|
||||
on x=-65152..-11147,y=22489..91432,z=-58782..1780
|
||||
on x=-120100..-32970,y=-46592..27473,z=-11695..61039
|
||||
on x=-18631..37533,y=-124565..-50804,z=-35667..28308
|
||||
on x=-57817..18248,y=49321..117703,z=5745..55881
|
||||
on x=14781..98692,y=-1341..70827,z=15753..70151
|
||||
on x=-34419..55919,y=-19626..40991,z=39015..114138
|
||||
on x=-60785..11593,y=-56135..2999,z=-95368..-26915
|
||||
on x=-32178..58085,y=17647..101866,z=-91405..-8878
|
||||
on x=-53655..12091,y=50097..105568,z=-75335..-4862
|
||||
on x=-111166..-40997,y=-71714..2688,z=5609..50954
|
||||
on x=-16602..70118,y=-98693..-44401,z=5197..76897
|
||||
on x=16383..101554,y=4615..83635,z=-44907..18747
|
||||
off x=-95822..-15171,y=-19987..48940,z=10804..104439
|
||||
on x=-89813..-14614,y=16069..88491,z=-3297..45228
|
||||
on x=41075..99376,y=-20427..49978,z=-52012..13762
|
||||
on x=-21330..50085,y=-17944..62733,z=-112280..-30197
|
||||
on x=-16478..35915,y=36008..118594,z=-7885..47086
|
||||
off x=-98156..-27851,y=-49952..43171,z=-99005..-8456
|
||||
off x=2032..69770,y=-71013..4824,z=7471..94418
|
||||
on x=43670..120875,y=-42068..12382,z=-24787..38892
|
||||
off x=37514..111226,y=-45862..25743,z=-16714..54663
|
||||
off x=25699..97951,y=-30668..59918,z=-15349..69697
|
||||
off x=-44271..17935,y=-9516..60759,z=49131..112598
|
||||
on x=-61695..-5813,y=40978..94975,z=8655..80240
|
||||
off x=-101086..-9439,y=-7088..67543,z=33935..83858
|
||||
off x=18020..114017,y=-48931..32606,z=21474..89843
|
||||
off x=-77139..10506,y=-89994..-18797,z=-80..59318
|
||||
off x=8476..79288,y=-75520..11602,z=-96624..-24783
|
||||
on x=-47488..-1262,y=24338..100707,z=16292..72967
|
||||
off x=-84341..13987,y=2429..92914,z=-90671..-1318
|
||||
off x=-37810..49457,y=-71013..-7894,z=-105357..-13188
|
||||
off x=-27365..46395,y=31009..98017,z=15428..76570
|
||||
off x=-70369..-16548,y=22648..78696,z=-1892..86821
|
||||
on x=-53470..21291,y=-120233..-33476,z=-44150..38147
|
||||
off x=-93533..-4276,y=-16170..68771,z=-104985..-24507
|
||||
```
|
||||
|
||||
After running the above reboot steps, **`2758514936282235`** cubes are on. (Just for fun, `474140` of those are also in the initialization procedure region.)
|
||||
|
||||
Starting again with all cubes **off**, execute all reboot steps. Afterward, considering all cubes, **how many cubes are on?**
|
64
2021/22/code.py
Normal file
64
2021/22/code.py
Normal file
@ -0,0 +1,64 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Copyright (c) 2021 Akumatic
|
||||
#
|
||||
# https://adventofcode.com/2021/day/22
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
def parse_line(line: str) -> str:
|
||||
state = True if line.startswith("on") else False
|
||||
coords = line[3 if state else 4:].split(",")
|
||||
return [state] + [(int(p[0]), int(p[1])) for p in (pos[2:].split("..") for pos in coords)]
|
||||
|
||||
def read_file(filename: str = "input.txt") -> defaultdict:
|
||||
with open(f"{__file__.rstrip('code.py')}{filename}", "r") as f:
|
||||
return [parse_line(line) for line in f.read().strip().split("\n")]
|
||||
|
||||
def areas_overlapping(a: tuple, b: tuple) -> bool:
|
||||
return a[0][0] <= b[0][1] and a[0][1] >= b[0][0] \
|
||||
and a[1][0] <= b[1][1] and a[1][1] >= b[1][0] \
|
||||
and a[2][0] <= b[2][1] and a[2][1] >= b[2][0]
|
||||
|
||||
def calculate_overlap(a: tuple, b: tuple) -> tuple:
|
||||
return ((max(a[0][0], b[0][0]), min(a[0][1], b[0][1])),
|
||||
(max(a[1][0], b[1][0]), min(a[1][1], b[1][1])),
|
||||
(max(a[2][0], b[2][0]), min(a[2][1], b[2][1])))
|
||||
|
||||
def cubes_in_cuboid(cuboid: tuple) -> int:
|
||||
return (cuboid[0][1] - cuboid[0][0] + 1) * \
|
||||
(cuboid[1][1] - cuboid[1][0] + 1) * (cuboid[2][1] - cuboid[2][0] + 1)
|
||||
|
||||
def changes_adding_cuboid(cuboids: list, state: bool, cuboid: tuple) -> list:
|
||||
changes = []
|
||||
signum = 1 if state else -1
|
||||
for cub, sig in cuboids:
|
||||
if areas_overlapping(cub, cuboid):
|
||||
changes.append((calculate_overlap(cub, cuboid), -sig))
|
||||
if signum == 1:
|
||||
changes.append((cuboid, 1))
|
||||
return changes
|
||||
|
||||
def part1(instructions: list) -> int:
|
||||
reactor = defaultdict(bool)
|
||||
area = ((-50, 50), (-50, 50), (-50, 50))
|
||||
for state, x, y, z in instructions:
|
||||
cur = (x, y, z)
|
||||
if not areas_overlapping(cur, area):
|
||||
continue
|
||||
a, b, c = calculate_overlap(cur, area)
|
||||
cubes = [(u, v, w) for u in range(a[0], a[1]+1) for v in range(b[0], b[1]+1) for w in range(c[0], c[1]+1)]
|
||||
for cube in cubes:
|
||||
reactor[cube] = state
|
||||
return sum(reactor.values())
|
||||
|
||||
def part2(instructions: list) -> int:
|
||||
cuboids = list()
|
||||
for state, x, y, z in instructions:
|
||||
cuboids += changes_adding_cuboid(cuboids, state, (x, y, z))
|
||||
return sum(cubes_in_cuboid(cub) * sig for cub, sig in cuboids)
|
||||
|
||||
if __name__ == "__main__":
|
||||
vals = read_file()
|
||||
print(f"Part 1: {part1(vals)}")
|
||||
print(f"Part 2: {part2(vals)}")
|
||||
|
420
2021/22/input.txt
Normal file
420
2021/22/input.txt
Normal file
@ -0,0 +1,420 @@
|
||||
on x=-24..25,y=-36..8,z=-15..31
|
||||
on x=-3..41,y=-15..30,z=-26..18
|
||||
on x=0..45,y=-13..41,z=-13..32
|
||||
on x=-48..-4,y=-6..39,z=-49..-1
|
||||
on x=-40..12,y=-11..33,z=-24..28
|
||||
on x=-40..7,y=-6..40,z=-25..20
|
||||
on x=-16..29,y=-43..3,z=-23..25
|
||||
on x=-20..33,y=-6..39,z=-2..49
|
||||
on x=-46..5,y=-8..46,z=-1..44
|
||||
on x=-29..18,y=-27..17,z=-32..22
|
||||
off x=-39..-20,y=-32..-18,z=36..47
|
||||
on x=-22..27,y=-5..42,z=-45..0
|
||||
off x=-23..-6,y=29..40,z=-43..-26
|
||||
on x=-29..21,y=-25..23,z=-9..38
|
||||
off x=-45..-29,y=-6..12,z=-31..-19
|
||||
on x=-12..35,y=-7..43,z=-21..27
|
||||
off x=30..46,y=20..29,z=-3..15
|
||||
on x=-11..37,y=0..44,z=-39..7
|
||||
off x=17..35,y=-48..-38,z=-30..-21
|
||||
on x=-18..27,y=-46..2,z=-5..48
|
||||
on x=-55714..-36261,y=-45582..-17672,z=-64784..-38144
|
||||
on x=20420..30990,y=5859..23990,z=-81923..-58134
|
||||
on x=51733..60384,y=19512..31007,z=-54353..-43527
|
||||
on x=-38494..-1715,y=49823..80956,z=32219..42883
|
||||
on x=-83080..-64432,y=-9426..19690,z=10101..30711
|
||||
on x=-20725..-15861,y=-40621..-6268,z=54269..75365
|
||||
on x=-94372..-65353,y=-18033..4056,z=-29538..-20817
|
||||
on x=-70683..-61419,y=13964..24514,z=-40268..-29845
|
||||
on x=59524..74677,y=-17158..10596,z=-45128..-19042
|
||||
on x=-28431..-15623,y=-31191..-14766,z=61175..81362
|
||||
on x=-27591..-4105,y=-22406..1837,z=-78369..-57026
|
||||
on x=40887..54323,y=38641..64864,z=-36950..-24803
|
||||
on x=49100..74692,y=36627..64301,z=-44928..-31364
|
||||
on x=21497..32658,y=-44701..-21082,z=-86865..-65876
|
||||
on x=-17578..1694,y=-59751..-36678,z=-85632..-66396
|
||||
on x=26500..46019,y=18298..36049,z=-80657..-58918
|
||||
on x=-74816..-55918,y=735..17540,z=34836..54873
|
||||
on x=-14356..3149,y=-81903..-74430,z=-1790..30440
|
||||
on x=-22970..-17845,y=48427..59161,z=-66745..-37643
|
||||
on x=-73008..-46471,y=26383..53800,z=13928..39666
|
||||
on x=-24306..9139,y=-76013..-49332,z=45385..70270
|
||||
on x=64490..73910,y=-7097..14205,z=24913..39837
|
||||
on x=32000..46487,y=40044..41349,z=-61713..-52404
|
||||
on x=61299..95889,y=897..15308,z=6717..28213
|
||||
on x=18191..40446,y=-11534..6761,z=75267..94301
|
||||
on x=23917..28493,y=-47690..-35425,z=56930..71075
|
||||
on x=-23102..3183,y=23791..45146,z=-73813..-65608
|
||||
on x=-25061..3725,y=53151..90834,z=-37191..-10533
|
||||
on x=19734..43046,y=20259..52367,z=-69278..-60632
|
||||
on x=-56868..-33736,y=-26795..5018,z=46047..67401
|
||||
on x=-33074..-11410,y=22431..38827,z=-82435..-54313
|
||||
on x=8370..42897,y=67312..78701,z=-4518..3751
|
||||
on x=-92665..-54632,y=-34937..-29756,z=-3003..10061
|
||||
on x=-51112..-39070,y=-65673..-56881,z=13272..38285
|
||||
on x=-11791..5760,y=6605..18151,z=-79937..-66958
|
||||
on x=-78745..-53478,y=-6384..21603,z=33328..43447
|
||||
on x=-11647..4297,y=-51297..-39620,z=-68835..-51630
|
||||
on x=44957..74738,y=-52107..-31591,z=-50754..-20193
|
||||
on x=49128..66486,y=40384..49348,z=37811..57000
|
||||
on x=-9415..11612,y=62138..77250,z=-39808..-19225
|
||||
on x=43022..48265,y=-29270..-18003,z=54912..72609
|
||||
on x=61073..75942,y=23772..50779,z=-18443..-8471
|
||||
on x=19711..37825,y=-86663..-66575,z=-44099..-11539
|
||||
on x=-70625..-51166,y=-51005..-31200,z=-1065..17742
|
||||
on x=-4010..27420,y=-51049..-30136,z=-81071..-57607
|
||||
on x=39539..53358,y=48896..72499,z=-37961..-18276
|
||||
on x=-69744..-55405,y=3016..16773,z=31059..59244
|
||||
on x=72645..90830,y=9662..35184,z=-11778..8330
|
||||
on x=-85951..-63514,y=-6673..6796,z=7451..38117
|
||||
on x=7471..20251,y=61529..76452,z=-39012..-9818
|
||||
on x=-69078..-50527,y=-43522..-4588,z=38725..53374
|
||||
on x=-57745..-28854,y=11505..29893,z=43025..64123
|
||||
on x=45049..64089,y=-9047..11687,z=-65374..-33700
|
||||
on x=-58574..-28971,y=-65419..-36298,z=20545..38072
|
||||
on x=31144..49945,y=20576..45081,z=45353..68069
|
||||
on x=43485..47058,y=-15819..8239,z=47656..71281
|
||||
on x=30310..64068,y=-52330..-49189,z=20615..58823
|
||||
on x=10985..39489,y=-37486..-4416,z=56402..75593
|
||||
on x=-49434..-36878,y=-23836..-11446,z=56306..74921
|
||||
on x=-314..10948,y=-76148..-60466,z=33412..51559
|
||||
on x=-21095..-5170,y=44156..67554,z=39335..58437
|
||||
on x=35054..50608,y=-17207..9945,z=57478..77562
|
||||
on x=76700..94111,y=3239..31169,z=-9233..11309
|
||||
on x=19172..47556,y=42859..54265,z=48636..74657
|
||||
on x=12514..34984,y=-95139..-67590,z=-12881..18464
|
||||
on x=43248..59716,y=48461..69547,z=14418..36210
|
||||
on x=-53537..-34709,y=-4236..21125,z=-68850..-48516
|
||||
on x=51576..70978,y=34564..57647,z=-7582..14033
|
||||
on x=55929..73186,y=30815..60318,z=1123..8161
|
||||
on x=-49430..-33130,y=53498..83636,z=5961..21504
|
||||
on x=-25058..-10934,y=8130..16032,z=59535..88291
|
||||
on x=54508..63719,y=-38792..-3505,z=41594..54442
|
||||
on x=-83008..-67579,y=16401..38784,z=559..32684
|
||||
on x=51088..71350,y=34194..46279,z=-25672..-20520
|
||||
on x=33192..66483,y=53523..77440,z=8893..34380
|
||||
on x=10432..38321,y=44981..59642,z=-78613..-57165
|
||||
on x=-75386..-39959,y=36274..70905,z=-3534..18822
|
||||
on x=37284..54024,y=-48605..-25043,z=38178..57400
|
||||
on x=43666..60904,y=-69573..-50313,z=1228..14022
|
||||
on x=44836..52239,y=-73812..-44628,z=8747..11476
|
||||
on x=12567..30462,y=-50987..-38548,z=-75490..-45187
|
||||
on x=-3743..17885,y=14797..33449,z=74302..87427
|
||||
on x=-10131..1059,y=10431..33871,z=60830..94445
|
||||
on x=74241..82642,y=10664..30287,z=-39666..-16361
|
||||
on x=-47571..-37590,y=-72880..-46837,z=26914..36238
|
||||
on x=-20634..-15664,y=-81386..-55314,z=38252..57212
|
||||
on x=-10769..25632,y=-38330..-25479,z=-86469..-51846
|
||||
on x=-52366..-31532,y=-38951..-19701,z=-68200..-48096
|
||||
on x=-91391..-73383,y=-6226..-2393,z=-23459..-13884
|
||||
on x=-66453..-48137,y=-16047..12247,z=52033..58205
|
||||
on x=-78002..-59686,y=-26863..1342,z=-37935..-25825
|
||||
on x=57412..72462,y=4209..10034,z=42905..59241
|
||||
on x=-39824..-13789,y=74572..83799,z=-9126..938
|
||||
on x=-87318..-62046,y=-4112..16146,z=-48468..-18506
|
||||
on x=52062..81928,y=-44777..-16022,z=-32842..-10092
|
||||
on x=4080..28535,y=23345..46084,z=53861..72105
|
||||
on x=-66979..-45871,y=-68147..-42671,z=7566..31133
|
||||
on x=-38515..-26129,y=48888..77629,z=40991..51729
|
||||
on x=43159..57248,y=-76355..-55745,z=-15613..3855
|
||||
on x=-76030..-55106,y=-11889..20052,z=-53825..-23308
|
||||
on x=-7699..17496,y=61322..85822,z=-9796..6871
|
||||
on x=64070..86192,y=4059..36745,z=7329..27615
|
||||
on x=-84271..-63368,y=-6021..15316,z=-33204..-3399
|
||||
on x=61526..82302,y=-50902..-14904,z=-23178..7919
|
||||
on x=32189..46588,y=9646..30937,z=55611..78681
|
||||
on x=47017..75376,y=15373..38681,z=21408..61169
|
||||
on x=11771..34462,y=-42097..-22034,z=-76227..-56146
|
||||
on x=27679..50992,y=31806..43377,z=-64943..-40121
|
||||
on x=-42568..-18600,y=-66508..-32270,z=-68428..-56085
|
||||
on x=-38559..-25978,y=-74373..-49507,z=38153..43644
|
||||
on x=54506..79657,y=-886..31672,z=25668..48126
|
||||
on x=9873..30581,y=-72158..-39754,z=33711..70305
|
||||
on x=60584..81760,y=-25395..-14305,z=-4689..6933
|
||||
on x=-61583..-39671,y=61876..78264,z=5996..29134
|
||||
on x=-11227..4420,y=-88290..-75775,z=3808..31201
|
||||
on x=-32012..-12442,y=62534..87155,z=22450..46606
|
||||
on x=-30304..-6601,y=59633..78721,z=-16517..6028
|
||||
on x=34564..44476,y=-10753..22234,z=52694..86520
|
||||
on x=59169..66998,y=27756..44785,z=-43080..-3583
|
||||
on x=-27084..-12634,y=-63506..-53448,z=35814..64722
|
||||
on x=-30261..-24473,y=71776..74470,z=-38078..-6129
|
||||
on x=-76680..-59242,y=-5625..23186,z=-38628..-31779
|
||||
on x=-24354..-1094,y=65524..74870,z=-46947..-28760
|
||||
on x=6381..19205,y=-21832..-134,z=63608..91042
|
||||
on x=-77406..-67325,y=-20866..3544,z=-32513..-15701
|
||||
on x=50739..67600,y=-48357..-29266,z=-35782..-13620
|
||||
on x=-26498..3497,y=-68467..-33238,z=-82068..-60526
|
||||
on x=5303..17328,y=-69256..-39732,z=-65003..-43949
|
||||
on x=30811..38275,y=-5244..28156,z=-89920..-66878
|
||||
on x=49983..66724,y=-5700..17938,z=43926..67644
|
||||
on x=48153..65342,y=1443..18137,z=38195..74140
|
||||
on x=-3371..24272,y=-39975..-23884,z=-73872..-68667
|
||||
on x=30479..52748,y=8131..25801,z=45267..64868
|
||||
on x=-35613..-6735,y=-87508..-56803,z=14685..34487
|
||||
on x=-66310..-39666,y=14520..33374,z=-68537..-39707
|
||||
on x=17951..52025,y=-8160..-5345,z=-79138..-61496
|
||||
on x=-1671..3805,y=71825..94226,z=-11540..13961
|
||||
on x=-71567..-54379,y=-4284..16740,z=-49494..-35565
|
||||
on x=71079..92964,y=-23492..11151,z=-8224..17310
|
||||
on x=28796..45041,y=-61839..-34861,z=34857..61503
|
||||
on x=19616..32719,y=-22919..-8428,z=59689..91717
|
||||
on x=15504..42899,y=-56230..-24121,z=52605..77115
|
||||
on x=-46427..-13850,y=62173..85906,z=-39193..-27967
|
||||
on x=-1655..11432,y=-66359..-36716,z=53026..70510
|
||||
on x=-93500..-60433,y=-30491..-19220,z=-31229..7390
|
||||
on x=15158..35070,y=-67724..-63611,z=-55273..-41077
|
||||
on x=-3879..33093,y=63097..89650,z=-24701..-8538
|
||||
on x=-42357..-28886,y=-49679..-36984,z=50959..69326
|
||||
on x=-67920..-50177,y=29562..45206,z=-28055..-4767
|
||||
on x=-51930..-29074,y=9566..13838,z=-73091..-65590
|
||||
on x=-91732..-71534,y=-1122..13959,z=89..26097
|
||||
on x=-11629..11373,y=27134..54329,z=-71569..-65324
|
||||
on x=28686..31495,y=-24896..-8526,z=69386..76193
|
||||
on x=-25898..-17740,y=16297..30293,z=-82095..-63517
|
||||
on x=19891..49170,y=1640..19388,z=-83115..-67337
|
||||
on x=-59053..-35968,y=50405..63352,z=-12441..-1627
|
||||
on x=-44391..-30528,y=71461..85157,z=12939..24554
|
||||
on x=-82526..-54436,y=22445..37378,z=15340..23433
|
||||
on x=-21979..3903,y=-44779..-23865,z=59478..87253
|
||||
on x=-87494..-66262,y=-23909..-17222,z=3558..22311
|
||||
on x=-77940..-58402,y=-30029..495,z=-64622..-29724
|
||||
on x=14709..29901,y=-16722..-914,z=-94879..-66533
|
||||
on x=61478..75898,y=44399..49547,z=-15944..-1037
|
||||
on x=-9..13538,y=-23689..-1309,z=58940..95323
|
||||
on x=-9215..21382,y=-81729..-72116,z=29904..45795
|
||||
on x=-37777..-16044,y=-72607..-52593,z=7987..27375
|
||||
on x=-16900..-9231,y=6330..23131,z=-93978..-67446
|
||||
on x=-13299..5260,y=66662..88206,z=-48497..-16352
|
||||
on x=54138..60848,y=49718..64461,z=-28411..-12051
|
||||
on x=9063..12208,y=43714..57296,z=-64191..-51897
|
||||
on x=17239..26271,y=48738..64892,z=51926..72290
|
||||
on x=-18599..4626,y=-79543..-66159,z=5171..22775
|
||||
on x=64417..73146,y=-46421..-27026,z=-11977..5226
|
||||
on x=-40054..-18944,y=-55048..-41738,z=45428..68649
|
||||
on x=-65611..-54177,y=28337..67817,z=-1491..15419
|
||||
on x=-30117..-9940,y=57564..83609,z=14438..22712
|
||||
on x=-13164..6165,y=61972..81267,z=-47467..-39663
|
||||
on x=-2173..28245,y=75188..91046,z=556..16876
|
||||
on x=-4..12849,y=-85689..-67413,z=-34162..-14875
|
||||
on x=-11527..5326,y=-63674..-55001,z=-67662..-44192
|
||||
on x=52029..61177,y=16625..47606,z=27090..56949
|
||||
on x=19858..45619,y=-8130..-1116,z=-87000..-51951
|
||||
on x=43717..72304,y=6327..18235,z=58169..75006
|
||||
on x=63833..80302,y=-30616..-8105,z=11024..36696
|
||||
on x=-45572..-16059,y=35612..71738,z=-53693..-37289
|
||||
on x=-16077..-4950,y=-17904..13223,z=71249..95474
|
||||
on x=52599..73253,y=16815..34639,z=-60697..-27949
|
||||
on x=-41732..-31077,y=-11037..13451,z=-73093..-54774
|
||||
on x=53309..66643,y=8304..19193,z=-66902..-43757
|
||||
on x=-59715..-29107,y=-39147..-16955,z=48402..67889
|
||||
on x=29285..52214,y=51860..67940,z=-25929..-9268
|
||||
on x=-16348..7210,y=69946..89391,z=-41857..-18421
|
||||
on x=2698..23210,y=59762..80189,z=-6455..9730
|
||||
on x=25914..47727,y=-37594..-4161,z=57532..85025
|
||||
on x=-44900..-40581,y=18628..27968,z=-73311..-53222
|
||||
on x=-50711..-22413,y=-13753..10014,z=65728..84385
|
||||
on x=-32509..-20107,y=-49733..-29413,z=-75164..-62928
|
||||
on x=53276..62570,y=-67165..-37653,z=25917..40730
|
||||
on x=-68935..-61669,y=34458..53039,z=3272..40994
|
||||
on x=-40954..-6666,y=-497..19030,z=-91459..-58759
|
||||
on x=-20953..10033,y=-33710..-12044,z=-78318..-64257
|
||||
off x=65172..88719,y=18292..33463,z=-17289..13667
|
||||
on x=-81689..-47210,y=-51292..-39161,z=12239..18630
|
||||
on x=10674..27779,y=64781..93057,z=-12847..15033
|
||||
off x=39381..59141,y=-53867..-33869,z=-39320..-32369
|
||||
on x=11509..16649,y=61436..83173,z=-24404..-1309
|
||||
off x=-84235..-64867,y=-40299..-21340,z=-423..17121
|
||||
on x=28703..60717,y=5866..35207,z=56237..83480
|
||||
on x=-10016..7016,y=-68319..-44113,z=-75242..-40162
|
||||
on x=-83871..-49706,y=4896..23706,z=27867..51976
|
||||
on x=21894..45090,y=-66881..-46774,z=41161..61093
|
||||
off x=-62532..-54799,y=-13198..5554,z=38616..64779
|
||||
on x=27655..50554,y=-67141..-53031,z=-42723..-27481
|
||||
off x=64418..79284,y=-37561..-23573,z=-46944..-21319
|
||||
off x=-51161..-14654,y=-76354..-54783,z=-48356..-20513
|
||||
off x=-42010..-26446,y=-33941..-8781,z=62481..80092
|
||||
off x=47932..71695,y=-28741..-12969,z=43875..70370
|
||||
on x=-47783..-15943,y=72073..89936,z=-12302..25107
|
||||
on x=54099..73531,y=-25166..-8103,z=29622..38828
|
||||
on x=-12110..9328,y=27821..51352,z=-80606..-70867
|
||||
on x=-31368..-4092,y=-500..34976,z=-87386..-75947
|
||||
on x=18493..53336,y=40904..49118,z=35477..61315
|
||||
on x=-80008..-57206,y=-14580..4805,z=-54640..-31294
|
||||
on x=-32490..-16053,y=-58155..-38625,z=43694..71086
|
||||
on x=-10446..7685,y=56844..75668,z=23039..31796
|
||||
off x=-76403..-52174,y=10374..31289,z=39907..57503
|
||||
off x=-26055..-4386,y=-81087..-68859,z=-22915..-2143
|
||||
off x=-4280..9653,y=57774..86757,z=-904..38154
|
||||
on x=-41376..-26231,y=-89287..-51816,z=-5937..20376
|
||||
off x=-7948..3204,y=-87582..-61875,z=-26876..-12952
|
||||
on x=-18434..9410,y=-72877..-62275,z=22779..44958
|
||||
off x=-55286..-31084,y=8442..18459,z=63430..85422
|
||||
off x=46159..58401,y=58001..65987,z=-6474..2217
|
||||
off x=-32868..-32193,y=-77036..-54350,z=-917..27006
|
||||
on x=48668..66652,y=-26976..5182,z=35663..58610
|
||||
off x=38087..64878,y=-24672..-4653,z=-68258..-59477
|
||||
off x=-53244..-39319,y=252..29359,z=52725..84195
|
||||
on x=141..27199,y=44490..73922,z=-55944..-29456
|
||||
on x=-84450..-63805,y=-40926..-20894,z=4677..17596
|
||||
off x=39425..66117,y=19007..46505,z=-58489..-38804
|
||||
on x=53467..60154,y=2617..5892,z=51003..78171
|
||||
off x=19966..42245,y=13558..19380,z=59455..86402
|
||||
on x=21300..38763,y=73252..90242,z=-19055..3136
|
||||
on x=-71417..-48663,y=33111..54219,z=25931..36276
|
||||
on x=-67157..-51626,y=2163..11911,z=-69440..-41965
|
||||
off x=42596..62690,y=-59813..-39876,z=16046..45998
|
||||
on x=-82036..-67846,y=-42461..-10926,z=-16260..-3847
|
||||
on x=-13454..5032,y=-10314..6090,z=76506..83510
|
||||
off x=-21588..7122,y=-79335..-57762,z=-1279..21971
|
||||
on x=-11735..19084,y=-31299..-3107,z=68498..89486
|
||||
off x=-71467..-56250,y=-26934..5137,z=35054..50529
|
||||
off x=39576..77579,y=33834..65473,z=-3744..20619
|
||||
on x=12739..14479,y=-13240..13626,z=-89272..-64415
|
||||
off x=-63543..-35059,y=60140..67181,z=-11563..-6727
|
||||
on x=-15517..5456,y=983..21630,z=-80320..-68386
|
||||
off x=7811..14617,y=71578..98257,z=-474..15243
|
||||
on x=-7774..29003,y=-27431..-2908,z=73893..86951
|
||||
on x=63736..81572,y=15807..49952,z=-32605..-1562
|
||||
on x=49724..57359,y=-72171..-46890,z=-18144..-4030
|
||||
on x=-49068..-19251,y=-28646..-15251,z=56881..87240
|
||||
on x=62815..67986,y=18515..40814,z=22891..43899
|
||||
on x=30739..56402,y=55701..77539,z=4292..40862
|
||||
on x=35024..59505,y=-63928..-51167,z=15405..34767
|
||||
off x=39106..46794,y=-68583..-63616,z=-399..17775
|
||||
on x=-70229..-58803,y=26355..47987,z=15672..37067
|
||||
on x=-6511..8398,y=-63315..-40491,z=-66501..-51987
|
||||
on x=-78593..-55090,y=-8028..9544,z=31422..37894
|
||||
on x=-79412..-70298,y=19753..28627,z=5571..36416
|
||||
on x=-89561..-60633,y=16496..22162,z=-32917..-6897
|
||||
off x=-23104..-11350,y=-76163..-61981,z=-40336..-23381
|
||||
on x=-85805..-48591,y=29020..58858,z=-23434..-19341
|
||||
on x=69290..91036,y=17261..37103,z=-15132..-9877
|
||||
off x=-44440..-24696,y=17723..51873,z=-68818..-54989
|
||||
off x=43772..59030,y=-17927..3064,z=55335..78596
|
||||
on x=-5180..4036,y=-60894..-39546,z=58601..77994
|
||||
off x=-44960..-26540,y=38654..49428,z=-62327..-48025
|
||||
off x=-74687..-41990,y=5981..26340,z=42962..57900
|
||||
off x=55493..88116,y=-17045..8808,z=9731..39020
|
||||
on x=-24814..1407,y=-78117..-59571,z=-36156..-26352
|
||||
on x=-83605..-59634,y=-30003..-11802,z=10051..23746
|
||||
on x=-18750..712,y=76566..88144,z=-4441..17547
|
||||
on x=-11785..-4018,y=64493..85862,z=-55751..-31406
|
||||
on x=-74186..-55121,y=14817..23915,z=-41641..-23761
|
||||
off x=5992..33894,y=-90670..-53716,z=9612..29671
|
||||
off x=-40543..-26092,y=-84192..-54871,z=14275..33818
|
||||
on x=2486..34070,y=-79407..-48278,z=-59230..-41785
|
||||
off x=31470..48508,y=-2451..14244,z=54809..82900
|
||||
on x=-19855..-3955,y=67769..81251,z=-6898..10397
|
||||
on x=60768..97450,y=-15032..8514,z=-9176..8109
|
||||
off x=-433..15414,y=54977..88477,z=-37513..-14435
|
||||
on x=30798..57438,y=60545..83101,z=-4736..16030
|
||||
off x=45847..70333,y=-20401..5745,z=-53475..-35483
|
||||
on x=-94597..-62644,y=-22131..-6260,z=-3361..23192
|
||||
on x=-6949..23262,y=68737..84594,z=32672..52233
|
||||
on x=-103..6616,y=70184..87574,z=22795..52965
|
||||
off x=-73655..-61464,y=-50996..-25604,z=-1589..9963
|
||||
on x=-55460..-51518,y=-68780..-38230,z=22381..38918
|
||||
on x=-81286..-58909,y=2050..12715,z=21579..33288
|
||||
off x=-74128..-64082,y=-11151..4421,z=-54504..-35345
|
||||
off x=-82050..-58102,y=16008..37063,z=-57455..-28440
|
||||
off x=-48935..-32720,y=-65357..-55002,z=33430..44066
|
||||
on x=-58688..-25435,y=55044..79401,z=24759..35341
|
||||
on x=-59328..-46068,y=-55349..-37872,z=-47613..-39008
|
||||
off x=53812..77978,y=-21871..-5635,z=-54951..-44718
|
||||
on x=35210..53097,y=-67155..-57873,z=-25088..8942
|
||||
on x=68476..96029,y=-18829..17901,z=-24375..-4292
|
||||
off x=-58133..-42806,y=-15734..-2625,z=45814..75426
|
||||
off x=923..36206,y=34426..39751,z=62306..84272
|
||||
on x=-3795..2999,y=5692..34082,z=56908..88089
|
||||
off x=-28687..-8938,y=50077..55834,z=-72947..-51911
|
||||
on x=17572..33049,y=-12608..13871,z=64041..80084
|
||||
off x=23004..46612,y=626..18493,z=-77533..-72175
|
||||
off x=-11296..6738,y=55113..72504,z=35830..68101
|
||||
on x=-87318..-72234,y=13939..28545,z=9367..32229
|
||||
on x=-4903..7740,y=-5776..16649,z=72654..82239
|
||||
off x=21724..37965,y=3232..30800,z=-83510..-51450
|
||||
on x=43256..64634,y=45840..71859,z=-19655..15838
|
||||
on x=35402..50139,y=-63773..-44546,z=-66313..-51025
|
||||
off x=-47203..-24639,y=-24938..5990,z=-83540..-55282
|
||||
on x=48830..87050,y=-60568..-26778,z=-14105..10986
|
||||
off x=-17727..7121,y=-89461..-61150,z=34482..52375
|
||||
on x=-13528..11467,y=-34429..-25025,z=-88524..-59175
|
||||
on x=39947..70910,y=45941..55768,z=-29269..6512
|
||||
on x=-57443..-40902,y=-54344..-30702,z=-67147..-33819
|
||||
on x=43698..58730,y=-8086..12623,z=-64645..-52484
|
||||
on x=-86516..-60070,y=4701..29233,z=-42210..-26002
|
||||
off x=-12564..13809,y=57954..79924,z=33734..52972
|
||||
on x=-91205..-60724,y=-19260..4299,z=14948..33107
|
||||
off x=9430..36004,y=-47248..-32931,z=-78412..-59231
|
||||
off x=5464..23019,y=69146..89993,z=14523..52775
|
||||
on x=69092..89480,y=-18263..-5255,z=-56056..-24436
|
||||
on x=-78979..-63119,y=-28030..4471,z=-3442..1095
|
||||
on x=-40742..-11522,y=-67931..-50625,z=30872..54565
|
||||
on x=11200..31162,y=56276..81907,z=-38674..-23276
|
||||
off x=28090..50485,y=32391..54717,z=42405..68490
|
||||
off x=62000..96016,y=-12785..10045,z=-40559..-9853
|
||||
off x=-77111..-65043,y=-4182..9946,z=7700..29317
|
||||
off x=4021..35324,y=54155..81764,z=13952..43096
|
||||
on x=38831..66415,y=41293..51680,z=-36105..-30486
|
||||
off x=-42209..-7965,y=-73605..-55906,z=-26801..-15432
|
||||
off x=69895..80368,y=-30219..-4026,z=-51683..-32477
|
||||
on x=34133..59680,y=-37589..-18165,z=55539..65839
|
||||
off x=59099..84713,y=-8186..21590,z=-35085..-22984
|
||||
on x=-68703..-46847,y=-54965..-36640,z=-44900..-28240
|
||||
on x=60059..78605,y=21782..40949,z=13470..26429
|
||||
off x=18158..42949,y=15953..34973,z=68917..82582
|
||||
off x=66650..68484,y=-44088..-36424,z=-14932..3832
|
||||
off x=-68951..-46350,y=-54590..-47375,z=-35451..-18201
|
||||
on x=-51118..-28325,y=-89830..-51709,z=-29326..2472
|
||||
on x=34071..61762,y=38942..63058,z=-37770..-20793
|
||||
off x=-21803..8058,y=59489..67631,z=-58454..-31005
|
||||
off x=18618..38459,y=-49926..-34627,z=-77416..-43266
|
||||
off x=52621..58415,y=3978..16040,z=48121..67965
|
||||
on x=-84919..-59330,y=963..24944,z=-23669..-4029
|
||||
on x=7048..18504,y=19827..42119,z=-77713..-71923
|
||||
off x=17349..46710,y=68184..85521,z=-19492..-10865
|
||||
on x=57808..67714,y=-6890..11149,z=48859..61826
|
||||
off x=-37787..-16255,y=-84155..-64960,z=-16962..13437
|
||||
off x=-47712..-22804,y=-6956..-1446,z=53309..84030
|
||||
off x=-79417..-63459,y=-63881..-43934,z=-12315..3049
|
||||
off x=-20800..332,y=-81856..-62781,z=-19387..1453
|
||||
on x=-16101..18477,y=11949..24232,z=57910..86506
|
||||
off x=58744..70461,y=50236..65473,z=6870..15136
|
||||
off x=-28383..-1268,y=6187..14201,z=73853..85906
|
||||
off x=-14830..-2177,y=73475..96200,z=-12288..-8227
|
||||
off x=-55531..-26102,y=-40611..-9588,z=60023..66074
|
||||
on x=-29047..7282,y=30034..54033,z=-69351..-58996
|
||||
on x=-56717..-42768,y=-37528..-20235,z=-76181..-51568
|
||||
off x=-22648..12027,y=10239..18040,z=68871..84453
|
||||
on x=71843..78578,y=17090..31651,z=-29255..4046
|
||||
off x=-5332..8529,y=-80409..-57885,z=-34912..-11922
|
||||
on x=8130..15975,y=-85824..-63915,z=-15569..-2050
|
||||
on x=-24703..2376,y=-63863..-47928,z=54448..74373
|
||||
on x=57985..69487,y=-49162..-35448,z=-12451..5037
|
||||
on x=45251..53043,y=-25237..-7481,z=57517..73228
|
||||
off x=13704..26376,y=-51898..-28036,z=-70924..-57468
|
||||
off x=-11101..10921,y=-97386..-65516,z=11205..33803
|
||||
on x=-28595..-1831,y=-69153..-55942,z=-64754..-35489
|
||||
off x=-73177..-60126,y=30788..51362,z=7072..32128
|
||||
on x=-63584..-43963,y=30054..35783,z=35239..48673
|
||||
on x=14885..22528,y=-69221..-49535,z=-56213..-39035
|
||||
on x=47036..69580,y=-47386..-35040,z=-34293..-26206
|
||||
on x=-6011..13690,y=-88824..-61431,z=12453..28051
|
||||
on x=-32732..-2753,y=-77746..-64445,z=-39101..-13631
|
||||
off x=-75895..-62847,y=-7868..-1442,z=18543..39903
|
||||
off x=-28939..7818,y=-92499..-69292,z=-15478..1721
|
||||
off x=44329..56950,y=37643..63858,z=27046..41904
|
||||
off x=-36770..-31601,y=-42713..-14541,z=50003..75515
|
||||
on x=-62543..-40929,y=45076..65249,z=-30890..-13694
|
||||
off x=-39137..-7500,y=-48254..-37046,z=-73303..-46696
|
||||
on x=-45395..-19405,y=-80105..-55197,z=1396..14117
|
||||
on x=-46841..-27814,y=37090..63817,z=35021..69243
|
||||
on x=-33219..-17593,y=11082..22501,z=-79892..-68599
|
||||
on x=48420..67442,y=-17135..7993,z=44169..61033
|
||||
on x=-23786..-11155,y=16157..38374,z=-76684..-68602
|
||||
off x=10664..26915,y=65400..82759,z=24496..52855
|
||||
off x=-15800..584,y=19286..38938,z=52914..78654
|
||||
on x=-48190..-15289,y=42982..66053,z=-49276..-26564
|
||||
off x=-18136..-10686,y=33123..48632,z=51138..74719
|
||||
off x=18924..37949,y=-14489..3903,z=-89594..-67799
|
2
2021/22/solution.txt
Normal file
2
2021/22/solution.txt
Normal file
@ -0,0 +1,2 @@
|
||||
Part 1: 580012
|
||||
Part 2: 1334238660555542
|
18
2021/22/test_code.py
Normal file
18
2021/22/test_code.py
Normal file
@ -0,0 +1,18 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Copyright (c) 2021 Akumatic
|
||||
|
||||
from code import *
|
||||
|
||||
def test():
|
||||
instructions = [read_file(f"test_input_{i}.txt") for i in range(1, 4)]
|
||||
assert part1(instructions[0]) == 39
|
||||
print("Passed short Part 1")
|
||||
assert part1(instructions[1]) == 590784
|
||||
print("Passed long Part 1")
|
||||
assert part2(instructions[0]) == 39
|
||||
assert part1(instructions[2]) == 474140
|
||||
assert part2(instructions[2]) == 2758514936282235
|
||||
print("Passed Part 2")
|
||||
|
||||
if __name__ == "__main__":
|
||||
test()
|
4
2021/22/test_input_1.txt
Normal file
4
2021/22/test_input_1.txt
Normal file
@ -0,0 +1,4 @@
|
||||
on x=10..12,y=10..12,z=10..12
|
||||
on x=11..13,y=11..13,z=11..13
|
||||
off x=9..11,y=9..11,z=9..11
|
||||
on x=10..10,y=10..10,z=10..10
|
22
2021/22/test_input_2.txt
Normal file
22
2021/22/test_input_2.txt
Normal file
@ -0,0 +1,22 @@
|
||||
on x=-20..26,y=-36..17,z=-47..7
|
||||
on x=-20..33,y=-21..23,z=-26..28
|
||||
on x=-22..28,y=-29..23,z=-38..16
|
||||
on x=-46..7,y=-6..46,z=-50..-1
|
||||
on x=-49..1,y=-3..46,z=-24..28
|
||||
on x=2..47,y=-22..22,z=-23..27
|
||||
on x=-27..23,y=-28..26,z=-21..29
|
||||
on x=-39..5,y=-6..47,z=-3..44
|
||||
on x=-30..21,y=-8..43,z=-13..34
|
||||
on x=-22..26,y=-27..20,z=-29..19
|
||||
off x=-48..-32,y=26..41,z=-47..-37
|
||||
on x=-12..35,y=6..50,z=-50..-2
|
||||
off x=-48..-32,y=-32..-16,z=-15..-5
|
||||
on x=-18..26,y=-33..15,z=-7..46
|
||||
off x=-40..-22,y=-38..-28,z=23..41
|
||||
on x=-16..35,y=-41..10,z=-47..6
|
||||
off x=-32..-23,y=11..30,z=-14..3
|
||||
on x=-49..-5,y=-3..45,z=-29..18
|
||||
off x=18..30,y=-20..-8,z=-3..13
|
||||
on x=-41..9,y=-7..43,z=-33..15
|
||||
on x=-54112..-39298,y=-85059..-49293,z=-27449..7877
|
||||
on x=967..23432,y=45373..81175,z=27513..53682
|
60
2021/22/test_input_3.txt
Normal file
60
2021/22/test_input_3.txt
Normal file
@ -0,0 +1,60 @@
|
||||
on x=-5..47,y=-31..22,z=-19..33
|
||||
on x=-44..5,y=-27..21,z=-14..35
|
||||
on x=-49..-1,y=-11..42,z=-10..38
|
||||
on x=-20..34,y=-40..6,z=-44..1
|
||||
off x=26..39,y=40..50,z=-2..11
|
||||
on x=-41..5,y=-41..6,z=-36..8
|
||||
off x=-43..-33,y=-45..-28,z=7..25
|
||||
on x=-33..15,y=-32..19,z=-34..11
|
||||
off x=35..47,y=-46..-34,z=-11..5
|
||||
on x=-14..36,y=-6..44,z=-16..29
|
||||
on x=-57795..-6158,y=29564..72030,z=20435..90618
|
||||
on x=36731..105352,y=-21140..28532,z=16094..90401
|
||||
on x=30999..107136,y=-53464..15513,z=8553..71215
|
||||
on x=13528..83982,y=-99403..-27377,z=-24141..23996
|
||||
on x=-72682..-12347,y=18159..111354,z=7391..80950
|
||||
on x=-1060..80757,y=-65301..-20884,z=-103788..-16709
|
||||
on x=-83015..-9461,y=-72160..-8347,z=-81239..-26856
|
||||
on x=-52752..22273,y=-49450..9096,z=54442..119054
|
||||
on x=-29982..40483,y=-108474..-28371,z=-24328..38471
|
||||
on x=-4958..62750,y=40422..118853,z=-7672..65583
|
||||
on x=55694..108686,y=-43367..46958,z=-26781..48729
|
||||
on x=-98497..-18186,y=-63569..3412,z=1232..88485
|
||||
on x=-726..56291,y=-62629..13224,z=18033..85226
|
||||
on x=-110886..-34664,y=-81338..-8658,z=8914..63723
|
||||
on x=-55829..24974,y=-16897..54165,z=-121762..-28058
|
||||
on x=-65152..-11147,y=22489..91432,z=-58782..1780
|
||||
on x=-120100..-32970,y=-46592..27473,z=-11695..61039
|
||||
on x=-18631..37533,y=-124565..-50804,z=-35667..28308
|
||||
on x=-57817..18248,y=49321..117703,z=5745..55881
|
||||
on x=14781..98692,y=-1341..70827,z=15753..70151
|
||||
on x=-34419..55919,y=-19626..40991,z=39015..114138
|
||||
on x=-60785..11593,y=-56135..2999,z=-95368..-26915
|
||||
on x=-32178..58085,y=17647..101866,z=-91405..-8878
|
||||
on x=-53655..12091,y=50097..105568,z=-75335..-4862
|
||||
on x=-111166..-40997,y=-71714..2688,z=5609..50954
|
||||
on x=-16602..70118,y=-98693..-44401,z=5197..76897
|
||||
on x=16383..101554,y=4615..83635,z=-44907..18747
|
||||
off x=-95822..-15171,y=-19987..48940,z=10804..104439
|
||||
on x=-89813..-14614,y=16069..88491,z=-3297..45228
|
||||
on x=41075..99376,y=-20427..49978,z=-52012..13762
|
||||
on x=-21330..50085,y=-17944..62733,z=-112280..-30197
|
||||
on x=-16478..35915,y=36008..118594,z=-7885..47086
|
||||
off x=-98156..-27851,y=-49952..43171,z=-99005..-8456
|
||||
off x=2032..69770,y=-71013..4824,z=7471..94418
|
||||
on x=43670..120875,y=-42068..12382,z=-24787..38892
|
||||
off x=37514..111226,y=-45862..25743,z=-16714..54663
|
||||
off x=25699..97951,y=-30668..59918,z=-15349..69697
|
||||
off x=-44271..17935,y=-9516..60759,z=49131..112598
|
||||
on x=-61695..-5813,y=40978..94975,z=8655..80240
|
||||
off x=-101086..-9439,y=-7088..67543,z=33935..83858
|
||||
off x=18020..114017,y=-48931..32606,z=21474..89843
|
||||
off x=-77139..10506,y=-89994..-18797,z=-80..59318
|
||||
off x=8476..79288,y=-75520..11602,z=-96624..-24783
|
||||
on x=-47488..-1262,y=24338..100707,z=16292..72967
|
||||
off x=-84341..13987,y=2429..92914,z=-90671..-1318
|
||||
off x=-37810..49457,y=-71013..-7894,z=-105357..-13188
|
||||
off x=-27365..46395,y=31009..98017,z=15428..76570
|
||||
off x=-70369..-16548,y=22648..78696,z=-1892..86821
|
||||
on x=-53470..21291,y=-120233..-33476,z=-44150..38147
|
||||
off x=-93533..-4276,y=-16170..68771,z=-104985..-24507
|
@ -36,7 +36,7 @@ Collect stars by solving puzzles. Two puzzles will be made available on each day
|
||||
| 19 | :white_check_mark: | :white_check_mark: | [Solution](19/code.py) | [Day 19](https://adventofcode.com/2021/day/19) |
|
||||
| 20 | :white_check_mark: | :white_check_mark: | [Solution](20/code.py) | [Day 20](https://adventofcode.com/2021/day/20) |
|
||||
| 21 | :white_check_mark: | :white_check_mark: | [Solution](21/code.py) | [Day 21](https://adventofcode.com/2021/day/21) |
|
||||
| 22 | | | | |
|
||||
| 22 | :white_check_mark: | :white_check_mark: | [Solution](22/code.py) | [Day 22](https://adventofcode.com/2021/day/22) |
|
||||
| 23 | | | | |
|
||||
| 24 | | | | |
|
||||
| 25 | | | | |
|
||||
|
Loading…
x
Reference in New Issue
Block a user