Source: Permutation Promenade
Part 1: Running on the string
a...p
apply a series of the following commands:
sX
rotates the string right byX
positionsxX/Y
swaps positionsX
andY
pA/B
swaps the lettersA
andB
no matter their positions
Part 1: Running on the string
a...p
apply a series of the following commands:
sX
rotates the string right byX
positionsxX/Y
swaps positionsX
andY
pA/B
swaps the lettersA
andB
no matter their positions
Part 1: Create a pair of generators
A
andB
where:
- A_n = 16807 A_{n-1} \mod 2147483647
- B_n = 48271 B_{n-1} \mod 2147483647
How many of the first 40 million values have matching values for the low 16 bits of each generator?
Part 1: Create a 128x128 grid. Generate each row by taking the knot hash of
salt-{index}
. The bits of the hash represent if a tile in the grid isfree
(0
) orused
(1
).
Given your salt as input, how many squares are
used
?
Part 1: Multiple layers are defined with rules of the form:
- {index}: {depth}
Each layer will start at position 0, then once per tick will advance towards depth. Once it hits
depth-1
, it will return to position 0, taking2*depth-1
per full cycle.
Calculate the sum of
index * depth
for any scanners that are at position0
when you pass through them given an initial starting time.
Part 1: A network of nodes is defined by a list of lines formatted as such:
2 <-> 0, 3, 4
Part 1: Starting with a list of the numbers from
1
ton
and a list oflengths
(as input):
- Initialize
current_position
andskip_size
to0
- For each
length
element in thelengths
list:- Reverse the first
length
elements of the list (starting atcurrent_position
)- Move forward by
length
plusskip_size
- Increment
skip_size
by 1
After applying the above algorithm, what is the product of the first two elements in the list (from the original first position, not the
current_position
)?
Part 1: An input stream can contain:
groups
are delimited by{
and}
,groups
are nestable and may containgarbage
or data (objects within agroup
are comma delimited)garbage
is delimited by<
and>
,groups
cannot be nested withingarbage
, a!
withingarbage
is an escape character:!>
does not end a garbage segment
The score of a single group is equal to how many times it is nested (the innermost group of
{{{}}}
has score3
).
The score of a stream is the sum of the scores of all groups in that stream.
What is the total score of your input?
Part 1: Given a set of registers initialized to 0, interpret a series of instruction of the form:
{register} (inc|dec) {number|register} if {number|register} (<|<=|=|!=|=>|>) {number|register}
What is the largest value in any register?
Part 1: A tree is defined as such:
node (weight) -> child1, child2, ...
node (weight)
Where a
node
always has a weight, but may or may not have child nodes.
What is the name of the root
node
of the tree (the node without a parent)?