Advent of Code: Day 15

Source

Part 1: Input is a list of ingredients of the form:

Frosting: capacity 4, durability -2, flavor 0, texture 0, calories 5
Candy: capacity 0, durability 5, flavor -1, texture 0, calories 8

A recipe score is a product of the positive quantity scores (ignoring calories), where each quantity score is the product of the quantity and that product for each product.

For example, 4 Frosting and 2 Candy above, would have a score of of -2 * 4 + 5 * 2 = 2 for durability and 0 * 4 + -1 * 2 = -2 (and thus ignored as we only accept positive scores) for a total thus far of 2.

read more...


Advent of Code: Day 14

Source

Part 1: Given a list of running patterns of the form Comet can fly 14 km/s for 10 seconds, but then must rest for 127 seconds., determine who will be in the lead after 2503 seconds.

read more...


Advent of Code: Day 13

Source

Part 1: Given a list of seating preferences of the form Alice would gain 54 happiness units by sitting next to Bob. find the seating arrangement which maximizes total happiness.

read more...


Advent of Code: Day 9

Source

Part 1: Given a list of distances between cities of the form London to Dublin = 464, calculate the shortest route that visits each city exactly once.

read more...


Advent of Code: Day 8

Source

Part 1: Given an escaped string of the form "\xa8br\x8bjr\"", convert it to the escaped form: br js. Calculate the total difference of lengths between the former (16) and the latter (5).

read more...


Advent of Code: Day 6

Source

Part 1: Given a 1000 by 1000 grid of lights and a list of instructions of the form (turn on|turn off|toggle) 5,10 through 15,20, determine how many lights are on.

read more...


Advent of Code: Day 5

Source

Part 1: A ‘nice’ string contains at least three vowels, one double letter (such as xx), and none of the strings ab, cd, pq, or xy. Count nice strings.

read more...