aboutsummaryrefslogtreecommitdiffstats
path: root/src/19/part2
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-04-07 17:18:18 -0400
committerLouis Burda <quent.burda@gmail.com>2023-04-07 17:19:39 -0400
commit87ab487d59fa85dbe2afa55cc841b02805ae42ca (patch)
treecd90ab715e1b5b5803674045dbafd6d51d27ac90 /src/19/part2
parent1bcc82c5bfbde87edd03c01ffdf9ee5934681592 (diff)
downloadaoc2018-python-87ab487d59fa85dbe2afa55cc841b02805ae42ca.tar.gz
aoc2018-python-87ab487d59fa85dbe2afa55cc841b02805ae42ca.zip
Reorder days into src
Diffstat (limited to 'src/19/part2')
-rw-r--r--src/19/part258
1 files changed, 58 insertions, 0 deletions
diff --git a/src/19/part2 b/src/19/part2
new file mode 100644
index 0000000..3bfe430
--- /dev/null
+++ b/src/19/part2
@@ -0,0 +1,58 @@
+--- Part Two ---
+
+You aren't sure how large Santa's ship is. You aren't even sure if you'll need to use this thing on
+Santa's ship, but it doesn't hurt to be prepared. You figure Santa's ship might fit in a
+100x100 square.
+
+The beam gets wider as it travels away from the emitter; you'll need to be a minimum distance away
+to fit a square of that size into the beam fully. (Don't rotate the square; it should be aligned to
+the same axes as the drone grid.)
+
+For example, suppose you have the following tractor beam readings:
+
+#.......................................
+.#......................................
+..##....................................
+...###..................................
+....###.................................
+.....####...............................
+......#####.............................
+......######............................
+.......#######..........................
+........########........................
+.........#########......................
+..........#########.....................
+...........##########...................
+...........############.................
+............############................
+.............#############..............
+..............##############............
+...............###############..........
+................###############.........
+................#################.......
+.................########OOOOOOOOOO.....
+..................#######OOOOOOOOOO#....
+...................######OOOOOOOOOO###..
+....................#####OOOOOOOOOO#####
+.....................####OOOOOOOOOO#####
+.....................####OOOOOOOOOO#####
+......................###OOOOOOOOOO#####
+.......................##OOOOOOOOOO#####
+........................#OOOOOOOOOO#####
+.........................OOOOOOOOOO#####
+..........................##############
+..........................##############
+...........................#############
+............................############
+.............................###########
+
+In this example, the 10x10 square closest to the emitter that fits entirely within the tractor beam
+has been marked O. Within it, the point closest to the emitter (the only highlighted O) is at X=25,
+Y=20.
+
+Find the 100x100 square closest to the emitter that fits entirely within the tractor beam; within
+that square, find the point closest to the emitter. What value do you get if you take that point's
+X coordinate, multiply it by 10000, then add the point's Y coordinate? (In the example above, this
+would be 250020.)
+
+