adventofcode/2015/day16/problem

100 lines
3.3 KiB
Plaintext
Raw Permalink Normal View History

2018-03-15 16:24:23 +00:00
Advent of Code
2016-12-16 22:21:15 +00:00
--- Day 16: Aunt Sue ---
2018-03-15 16:24:23 +00:00
Your Aunt Sue has given you a wonderful gift, and you'd like to send her a
thank you card. However, there's a small problem: she signed it "From, Aunt
Sue".
2016-12-16 22:21:15 +00:00
You have 500 Aunts named "Sue".
2018-03-15 16:24:23 +00:00
So, to avoid sending the card to the wrong person, you need to figure out
which Aunt Sue (which you conveniently number 1 to 500, for sanity) gave you
the gift. You open the present and, as luck would have it, good ol' Aunt Sue
got you a My First Crime Scene Analysis Machine! Just what you wanted. Or
needed, as the case may be.
2016-12-16 22:21:15 +00:00
2018-03-15 16:24:23 +00:00
The My First Crime Scene Analysis Machine (MFCSAM for short) can detect a
few specific compounds in a given sample, as well as how many distinct kinds
of those compounds there are. According to the instructions, these are what
the MFCSAM can detect:
2016-12-16 22:21:15 +00:00
 children, by human DNA age analysis.
2018-03-15 16:24:23 +00:00
2016-12-16 22:21:15 +00:00
 cats. It doesn't differentiate individual breeds.
2018-03-15 16:24:23 +00:00
 Several seemingly random breeds of dog: samoyeds, pomeranians, akitas,
and vizslas.
2016-12-16 22:21:15 +00:00
 goldfish. No other kinds of fish.
2018-03-15 16:24:23 +00:00
2016-12-16 22:21:15 +00:00
 trees, all in one group.
2018-03-15 16:24:23 +00:00
2016-12-16 22:21:15 +00:00
 cars, presumably by exhaust or gasoline or something.
2018-03-15 16:24:23 +00:00
2016-12-16 22:21:15 +00:00
 perfumes, which is handy, since many of your Aunts Sue wear a few kinds.
2018-03-15 16:24:23 +00:00
In fact, many of your Aunts Sue have many of these. You put the wrapping
from the gift into the MFCSAM. It beeps inquisitively at you a few times and
then prints out a message on ticker tape:
2016-12-16 22:21:15 +00:00
children: 3
cats: 7
samoyeds: 2
pomeranians: 3
akitas: 0
vizslas: 0
goldfish: 5
trees: 3
cars: 2
perfumes: 1
2018-03-15 16:24:23 +00:00
You make a list of the things you can remember about each Aunt Sue. Things
missing from your list aren't zero - you simply don't remember the value.
2016-12-16 22:21:15 +00:00
What is the number of the Sue that got you the gift?
Your puzzle answer was 373.
--- Part Two ---
2018-03-15 16:24:23 +00:00
As you're about to send the thank you note, something in the MFCSAM's
instructions catches your eye. Apparently, it has an outdated
retroencabulator, and so the output from the machine isn't exact values -
some of them indicate ranges.
2016-12-16 22:21:15 +00:00
2018-03-15 16:24:23 +00:00
In particular, the cats and trees readings indicates that there are greater
than that many (due to the unpredictable nuclear decay of cat dander and
tree pollen), while the pomeranians and goldfish readings indicate that
there are fewer than that many (due to the modial interaction of
magnetoreluctance).
2016-12-16 22:21:15 +00:00
What is the number of the real Aunt Sue?
Your puzzle answer was 260.
Both parts of this puzzle are complete! They provide two gold stars: **
2018-03-15 16:24:23 +00:00
At this point, you should return to your advent calendar and try another
puzzle.
2016-12-16 22:21:15 +00:00
If you still want to see it, you can get your puzzle input.
References
Visible links
. http://adventofcode.com/
. http://adventofcode.com/about
. http://adventofcode.com/stats
. http://adventofcode.com/leaderboard
. http://adventofcode.com/settings
. http://adventofcode.com/auth/logout
. https://en.wikipedia.org/wiki/Samoyed_%28dog%29
. https://en.wikipedia.org/wiki/Pomeranian_%28dog%29
. https://en.wikipedia.org/wiki/Akita_%28dog%29
. https://en.wikipedia.org/wiki/Vizsla
. https://en.wikipedia.org/wiki/Ticker_tape
. https://www.youtube.com/watch?v=RXJKdh1KZ0w
. http://adventofcode.com/
. http://adventofcode.com/day/16/input