Given a collection of gates of the form arg0 (AND|OR|XOR) arg2 -> out and input values of form x** and y**, what is the value of z** interpreted as a binary number?
You are given the edges of an undirected graph. Count how many completesubgraphs of size three exist that contain one or more starting with the letter t.
Aside: Games with local (but not hotseat) multiplayer have gotten rather rarer over the years… how many people still know what a LAN party is/was?
But you cannot type directly. Instead, you can control a pointer on the keypad with arrow keys:
+---+---+
| ^ | A |
+---+---+---+
| < | v | > |
+---+---+---+
Whenever you type a ^ on the arrow keys, the pointer on the keypad will move up one, etc. When you type A, then the pointer on the keypad will type whatever it is pointing at.
But that’s not enough either. Add a second keypad. And then a third, that is the one you are actually controlling.
For each output sequence multiple the length of the minimum input sequence needed to generate it by the numeric value of the input sequence (ignoring any A); sum these.
Note: Moving off any keypad or into the blank spaces is an error.
Given a comma delimited list of substrings and a list of strings, count how many of the latter strings can be made up of any (repeating) combination of the former.
Implement a virtual machine. The machine will have 3 unbounded signed registers, 8 opcodes (see below), a variable parameter scheme (see below that). You will be given the initial values of the 3 registers and a program. Find the final output.
Instructions
Opcode
Instruction
Description
Notes
0
adv reg/val
A = A >> OP
1
bxl val
B = B ^ OP
2
bst reg/val
B = OP & 0b111
3
jnz val
If a =/= 0, jump to LIT
4
bxc ignore
B = B ^ C
Still takes param, but ignores it
5
out reg/val
Output b
Only outputs lowest 3 bits
6
bdv reg/val
B = A >> OP
Same as adv but writes to b
7
cdv reg/val
C = A >> OP
Same as adv but writes to c
Parameter specification
For instructions that can take reg/val, 0 to 3 (inclusive) are treated as literal values, 4 is register A, 5 is B, 6, is C, and 7 is an error (should never happen).
For instructions that only take val, it’s always a literal value in the range 0 to 7 (inclusive).