Solutions for 2022, as well as 2015-2018 and 2019 up to day 11
This commit is contained in:
commit
1895197c49
722 changed files with 375457 additions and 0 deletions
62
2017/day25-the_halting_problem/tests/challenge_input
Normal file
62
2017/day25-the_halting_problem/tests/challenge_input
Normal file
|
@ -0,0 +1,62 @@
|
|||
Begin in state A.
|
||||
Perform a diagnostic checksum after 12667664 steps.
|
||||
|
||||
In state A:
|
||||
If the current value is 0:
|
||||
- Write the value 1.
|
||||
- Move one slot to the right.
|
||||
- Continue with state B.
|
||||
If the current value is 1:
|
||||
- Write the value 0.
|
||||
- Move one slot to the left.
|
||||
- Continue with state C.
|
||||
|
||||
In state B:
|
||||
If the current value is 0:
|
||||
- Write the value 1.
|
||||
- Move one slot to the left.
|
||||
- Continue with state A.
|
||||
If the current value is 1:
|
||||
- Write the value 1.
|
||||
- Move one slot to the right.
|
||||
- Continue with state D.
|
||||
|
||||
In state C:
|
||||
If the current value is 0:
|
||||
- Write the value 0.
|
||||
- Move one slot to the left.
|
||||
- Continue with state B.
|
||||
If the current value is 1:
|
||||
- Write the value 0.
|
||||
- Move one slot to the left.
|
||||
- Continue with state E.
|
||||
|
||||
In state D:
|
||||
If the current value is 0:
|
||||
- Write the value 1.
|
||||
- Move one slot to the right.
|
||||
- Continue with state A.
|
||||
If the current value is 1:
|
||||
- Write the value 0.
|
||||
- Move one slot to the right.
|
||||
- Continue with state B.
|
||||
|
||||
In state E:
|
||||
If the current value is 0:
|
||||
- Write the value 1.
|
||||
- Move one slot to the left.
|
||||
- Continue with state F.
|
||||
If the current value is 1:
|
||||
- Write the value 1.
|
||||
- Move one slot to the left.
|
||||
- Continue with state C.
|
||||
|
||||
In state F:
|
||||
If the current value is 0:
|
||||
- Write the value 1.
|
||||
- Move one slot to the right.
|
||||
- Continue with state D.
|
||||
If the current value is 1:
|
||||
- Write the value 1.
|
||||
- Move one slot to the right.
|
||||
- Continue with state A.
|
22
2017/day25-the_halting_problem/tests/sample_input
Normal file
22
2017/day25-the_halting_problem/tests/sample_input
Normal file
|
@ -0,0 +1,22 @@
|
|||
Begin in state A.
|
||||
Perform a diagnostic checksum after 6 steps.
|
||||
|
||||
In state A:
|
||||
If the current value is 0:
|
||||
- Write the value 1.
|
||||
- Move one slot to the right.
|
||||
- Continue with state B.
|
||||
If the current value is 1:
|
||||
- Write the value 0.
|
||||
- Move one slot to the left.
|
||||
- Continue with state B.
|
||||
|
||||
In state B:
|
||||
If the current value is 0:
|
||||
- Write the value 1.
|
||||
- Move one slot to the left.
|
||||
- Continue with state A.
|
||||
If the current value is 1:
|
||||
- Write the value 1.
|
||||
- Move one slot to the right.
|
||||
- Continue with state A.
|
Loading…
Add table
Add a link
Reference in a new issue