From f74ed68a4c7b0349383c7f36da591ba8feac6de6 Mon Sep 17 00:00:00 2001 From: Neil Smith Date: Mon, 11 Dec 2017 10:00:26 +0000 Subject: [PATCH] Day 11 problem saved --- problems/day11.html | 152 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 problems/day11.html diff --git a/problems/day11.html b/problems/day11.html new file mode 100644 index 0000000..eee9d64 --- /dev/null +++ b/problems/day11.html @@ -0,0 +1,152 @@ + + + + +Day 11 - Advent of Code 2017 + + + + + + + +

Advent of Code

Neil Smith (AoC++) 22*

   0xffff&2017

+ + + +
+

--- Day 11: Hex Ed ---

Crossing the bridge, you've barely reached the other side of the stream when a program comes up to you, clearly in distress. "It's my child process," she says, "he's gotten lost in an infinite grid!"

+

Fortunately for her, you have plenty of experience with infinite grids.

+

Unfortunately for you, it's a hex grid.

+

The hexagons ("hexes") in this grid are aligned such that adjacent hexes can be found to the north, northeast, southeast, south, southwest, and northwest:

+
  \ n  /
+nw +--+ ne
+  /    \
+-+      +-
+  \    /
+sw +--+ se
+  / s  \
+
+

You have the path the child process took. Starting where he started, you need to determine the fewest number of steps required to reach him. (A "step" means to move from the hex you are in to any adjacent hex.)

+

For example:

+
    +
  • ne,ne,ne is 3 steps away.
  • +
  • ne,ne,sw,sw is 0 steps away (back where you started).
  • +
  • ne,ne,s,s is 2 steps away (se,se).
  • +
  • se,sw,se,sw,sw is 3 steps away (s,s,sw).
  • +
+
+

Your puzzle answer was 670.

--- Part Two ---

How many steps away is the furthest he ever got from his starting position?

+
+

Your puzzle answer was 1426.

Both parts of this puzzle are complete! They provide two gold stars: **

+

At this point, you should return to your advent calendar and try another puzzle.

+

If you still want to see it, you can get your puzzle input.

+

You can also this puzzle.

+
+ + + + + + \ No newline at end of file -- 2.34.1