1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! # Day 23: Opening the Turing Lock
//!
//! Little Jane Marie just got her very first computer for Christmas from some unknown benefactor.
//! It comes with instructions and an example program, but the computer itself seems to be
//! malfunctioning. She's curious what the program does, and would like you to help her run it.
//!
//! The manual explains that the computer supports two [registers] and six [instructions] (truly, it
//! goes on to remind the reader, a state-of-the-art technology). The registers are named `a` and
//! `b`, can hold any [non-negative integer], and begin with a value of `0`. The instructions are as
//! follows:
//!
//! - `hlf r` sets register `r` to **half** its current value, then continues with the next
//!   instruction.
//! - `tpl r` sets register `r` to **triple** its current value, then continues with the next
//!   instruction.
//! - `inc r` **increments** register `r`, adding `1` to it, then continues with the next
//!   instruction.
//! - `jmp offset` is a **jump**; it continues with the instruction `offset` away **relative to
//!   itself**.
//! - `jie r, offset` is like `jmp`, but only jumps if register `r` is **even** ("jump if even").
//! - `jio r, offset` is like `jmp`, but only jumps if register `r` is `1` ("jump if **one**", not
//!   odd).
//!
//! All three jump instructions work with an **offset** relative to that instruction. The offset is
//! always written with a prefix `+` or `-` to indicate the direction of the jump (forward or
//! backward, respectively). For example, `jmp +1` would simply continue with the next instruction,
//! while `jmp +0` would continuously jump back to itself forever.
//!
//! The program exits when it tries to run an instruction beyond the ones defined.
//!
//! For example, this program sets `a` to `2`, because the `jio` instruction causes it to skip the
//! `tpl` instruction:
//!
//! ```txt
//! inc a
//! jio a, +2
//! tpl a
//! inc a
//! ```
//!
//! What is **the value in register `b`** when the program in your puzzle input is finished
//! executing?
//!
//! [registers]: https://en.wikipedia.org/wiki/Processor_register
//! [instructions]: https://en.wikipedia.org/wiki/Instruction_set
//! [non-negative integer]: https://en.wikipedia.org/wiki/Natural_number

use anyhow::Result;

pub const INPUT: &str = include_str!("d23.txt");

pub fn solve_part_one(input: &str) -> Result<i64> {
    Ok(0)
}

pub fn solve_part_two(input: &str) -> Result<i64> {
    Ok(0)
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn part_one() {}

    #[test]
    fn part_two() {}
}