Advent of Code: Day 24

Source

Part 1: Split a list of integers into three groups of equal sum. Find the grouping such that the smallest group has the least items, breaking ties by the smallest product for that group.

read more...


Advent of Code: Day 23

Source

Part 1: Create a simple virtual machine with two registers (a and b, non-negative integers) and six instructions:

  • hlf (a|b) - divide the given register by half, round down
  • tpl (a|b) - triple the given register
  • inc (a|b) - add 1 to the given register
  • jmp [+-]\d+ - jump forward/backwards by the given number of instructions
  • jie (a|b), [+-]\d+ - if the given register is even, jump
  • jio (a|b), [+-]\d+ - if the given register equals one, jump

read more...