From a28fd3fe0c4619e0c4f29b83a241c903802e42f8 Mon Sep 17 00:00:00 2001 From: Brian Buller Date: Thu, 1 Dec 2016 09:29:32 -0600 Subject: [PATCH] Day 1 Complete Saved the wrong thing as the problem --- day01/problem | 177 +++++++++++++++++--------------------------------- 1 file changed, 59 insertions(+), 118 deletions(-) diff --git a/day01/problem b/day01/problem index c0fa364..e3d22df 100644 --- a/day01/problem +++ b/day01/problem @@ -1,145 +1,86 @@ - - - - -Day 1 - Advent of Code 2016 - - - - - - -

Advent of Code

br0xen (AoC++) 1*

       λy.2016

- - - -
-

--- Day 1: No Time for a Taxicab ---

Santa's sleigh uses a very high-precision clock to guide its movements, and the clock's oscillator is regulated by stars. Unfortunately, the stars have been stolen... by the Easter Bunny. To save Christmas, Santa needs you to retrieve all fifty stars by December 25th.

-

Collect stars by solving puzzles. Two puzzles will be made available on each day in the advent calendar; the second puzzle is unlocked when you complete the first. Each puzzle grants one star. Good luck!

-

You're airdropped near Easter Bunny Headquarters in a city somewhere. "Near", unfortunately, is as close as you can get - the instructions on the Easter Bunny Recruiting Document the Elves intercepted start here, and nobody had time to work them out further.

-

The Document indicates that you should start at the given coordinates (where you just landed) and face North. Then, follow the provided sequence: either turn left (L) or right (R) 90 degrees, then walk forward the given number of blocks, ending at a new intersection.

-

There's no time to follow such ridiculous instructions on foot, though, so you take a moment and work out the destination. Given that you can only walk on the street grid of the city, how far is the shortest path to the destination?

-

For example:

-
    -
  • Following R2, L3 leaves you 2 blocks East and 3 blocks North, or 5 blocks away.
  • -
  • R2, R2, R2 leaves you 2 blocks due South of your starting position, which is 2 blocks away.
  • -
  • R5, L5, R5, R3 leaves you 12 blocks away.
  • -
-

How many blocks away is Easter Bunny HQ?

-
-

Your puzzle answer was 243.

The first half of this puzzle is complete! It provides one gold star: *

-

--- Part Two ---

Then, you notice the instructions continue on the back of the Recruiting Document. Easter Bunny HQ is actually at the first location you visit twice.

-

For example, if your instructions are R8, R4, R4, R8, the first location you visit twice is 4 blocks away, due East.

-

How many blocks away is the first location you visit twice?

-
-

Although it hasn't changed, you can still get your puzzle input.

-

Answer:

-

You can also this puzzle.

-
- - - - - - \ No newline at end of file + Visible links + . http://adventofcode.com/ + . http://adventofcode.com/2016/about + . http://adventofcode.com/2016/support + . http://adventofcode.com/2016/events + . http://adventofcode.com/2016/settings + . http://adventofcode.com/2016/auth/logout + . http://adventofcode.com/2016 + . http://adventofcode.com/2016 + . http://adventofcode.com/2016/leaderboard + . http://adventofcode.com/2016/stats + . http://adventofcode.com/2016/sponsors + . http://adventofcode.com/2016/sponsors + . https://www.detroitlabs.com/careers + . https://en.wikipedia.org/wiki/Taxicab_geometry + . http://adventofcode.com/2016 + . http://adventofcode.com/2016/day/1/input + . https://twitter.com/intent/tweet?text=I%27ve+completed+%22No+Time+for+a+Taxicab%22+%2D+Day+1+%2D+Advent+of+Code+2016&url=http%3A%2F%2Fadventofcode%2Ecom%2F2016%2Fday%2F1&related=ericwastl&hashtags=AdventOfCode + . https://plus.google.com/share?url=http%3A%2F%2Fadventofcode%2Ecom%2F2016%2Fday%2F1 + . http://www.reddit.com/submit?url=http%3A%2F%2Fadventofcode%2Ecom%2F2016%2Fday%2F1&title=I%27ve+completed+%22No+Time+for+a+Taxicab%22+%2D+Day+1+%2D+Advent+of+Code+2016