From 4fcbe72a62529745a85011552ae1a6659d770f93 Mon Sep 17 00:00:00 2001 From: Martin Ashby Date: Mon, 5 Dec 2022 22:46:27 +0000 Subject: day5 Not super happy with this, fell back to iterative programming pretty heavily (: Also a ton of .unwrap(), but this is an artifical problem not a real world --- input/day5.txt | 513 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ input/day5_ex.txt | 9 + 2 files changed, 522 insertions(+) create mode 100644 input/day5.txt create mode 100644 input/day5_ex.txt (limited to 'input') diff --git a/input/day5.txt b/input/day5.txt new file mode 100644 index 0000000..23e3650 --- /dev/null +++ b/input/day5.txt @@ -0,0 +1,513 @@ +[T] [P] [J] +[F] [S] [T] [R] [B] +[V] [M] [H] [S] [F] [R] +[Z] [P] [Q] [B] [S] [W] [P] +[C] [Q] [R] [D] [Z] [N] [H] [Q] +[W] [B] [T] [F] [L] [T] [M] [F] [T] +[S] [R] [Z] [V] [G] [R] [Q] [N] [Z] +[Q] [Q] [B] [D] [J] [W] [H] [R] [J] + 1 2 3 4 5 6 7 8 9 + +move 3 from 8 to 2 +move 3 from 1 to 5 +move 3 from 1 to 4 +move 2 from 7 to 4 +move 3 from 7 to 4 +move 8 from 5 to 7 +move 2 from 1 to 8 +move 7 from 3 to 2 +move 1 from 5 to 2 +move 1 from 6 to 7 +move 2 from 5 to 9 +move 1 from 9 to 1 +move 3 from 9 to 6 +move 5 from 6 to 2 +move 10 from 7 to 2 +move 3 from 8 to 9 +move 7 from 9 to 2 +move 1 from 1 to 2 +move 1 from 9 to 6 +move 1 from 4 to 1 +move 1 from 8 to 2 +move 11 from 4 to 2 +move 1 from 7 to 9 +move 1 from 4 to 6 +move 1 from 9 to 7 +move 1 from 1 to 3 +move 1 from 7 to 5 +move 1 from 4 to 9 +move 1 from 5 to 2 +move 1 from 3 to 8 +move 1 from 6 to 9 +move 1 from 8 to 6 +move 11 from 2 to 1 +move 1 from 6 to 8 +move 7 from 2 to 1 +move 14 from 2 to 7 +move 1 from 6 to 3 +move 1 from 8 to 2 +move 1 from 3 to 9 +move 7 from 7 to 1 +move 1 from 6 to 5 +move 5 from 7 to 6 +move 4 from 2 to 8 +move 3 from 6 to 7 +move 3 from 7 to 8 +move 9 from 1 to 3 +move 8 from 3 to 7 +move 1 from 3 to 1 +move 2 from 2 to 3 +move 1 from 6 to 7 +move 2 from 1 to 7 +move 7 from 1 to 6 +move 1 from 3 to 5 +move 2 from 5 to 3 +move 7 from 6 to 3 +move 9 from 7 to 5 +move 1 from 9 to 1 +move 4 from 8 to 5 +move 7 from 1 to 5 +move 4 from 7 to 2 +move 1 from 7 to 8 +move 1 from 6 to 4 +move 10 from 5 to 3 +move 8 from 5 to 1 +move 2 from 8 to 3 +move 2 from 8 to 9 +move 8 from 2 to 7 +move 4 from 9 to 8 +move 13 from 3 to 7 +move 1 from 5 to 3 +move 6 from 3 to 9 +move 10 from 1 to 9 +move 1 from 3 to 4 +move 6 from 9 to 7 +move 1 from 5 to 8 +move 14 from 7 to 6 +move 14 from 6 to 1 +move 13 from 1 to 8 +move 1 from 1 to 2 +move 9 from 8 to 9 +move 6 from 8 to 5 +move 2 from 4 to 6 +move 1 from 8 to 1 +move 2 from 2 to 1 +move 2 from 8 to 6 +move 3 from 1 to 2 +move 3 from 3 to 9 +move 16 from 9 to 1 +move 3 from 2 to 4 +move 3 from 7 to 2 +move 6 from 5 to 4 +move 5 from 7 to 3 +move 4 from 6 to 1 +move 10 from 2 to 9 +move 13 from 9 to 1 +move 5 from 7 to 2 +move 2 from 4 to 6 +move 1 from 9 to 1 +move 2 from 9 to 5 +move 2 from 6 to 8 +move 2 from 5 to 3 +move 1 from 8 to 3 +move 31 from 1 to 7 +move 2 from 1 to 5 +move 12 from 7 to 3 +move 11 from 3 to 2 +move 1 from 8 to 4 +move 6 from 4 to 5 +move 1 from 3 to 4 +move 8 from 3 to 2 +move 5 from 5 to 6 +move 2 from 6 to 7 +move 4 from 7 to 3 +move 1 from 6 to 9 +move 13 from 7 to 6 +move 13 from 2 to 3 +move 1 from 4 to 8 +move 10 from 2 to 3 +move 3 from 7 to 3 +move 2 from 2 to 1 +move 1 from 8 to 2 +move 2 from 4 to 7 +move 1 from 9 to 2 +move 3 from 7 to 3 +move 1 from 5 to 1 +move 2 from 5 to 2 +move 15 from 6 to 7 +move 4 from 1 to 9 +move 22 from 3 to 9 +move 7 from 3 to 9 +move 4 from 3 to 8 +move 4 from 9 to 4 +move 3 from 2 to 4 +move 5 from 7 to 1 +move 7 from 4 to 7 +move 2 from 8 to 4 +move 1 from 4 to 8 +move 3 from 1 to 5 +move 2 from 1 to 4 +move 1 from 2 to 9 +move 2 from 5 to 7 +move 1 from 5 to 9 +move 3 from 8 to 6 +move 8 from 7 to 1 +move 6 from 7 to 1 +move 10 from 1 to 9 +move 3 from 6 to 2 +move 2 from 1 to 3 +move 2 from 3 to 6 +move 3 from 7 to 4 +move 2 from 7 to 1 +move 1 from 2 to 5 +move 13 from 9 to 5 +move 12 from 9 to 3 +move 6 from 5 to 3 +move 2 from 9 to 1 +move 11 from 9 to 3 +move 1 from 4 to 6 +move 2 from 5 to 3 +move 1 from 1 to 8 +move 24 from 3 to 5 +move 2 from 9 to 3 +move 2 from 2 to 4 +move 1 from 9 to 2 +move 2 from 6 to 8 +move 5 from 3 to 5 +move 2 from 8 to 9 +move 1 from 9 to 8 +move 4 from 1 to 4 +move 1 from 9 to 4 +move 1 from 8 to 4 +move 1 from 8 to 4 +move 7 from 4 to 5 +move 1 from 1 to 8 +move 1 from 6 to 5 +move 35 from 5 to 4 +move 18 from 4 to 3 +move 6 from 4 to 3 +move 8 from 5 to 8 +move 8 from 8 to 1 +move 2 from 4 to 9 +move 23 from 3 to 1 +move 1 from 8 to 5 +move 1 from 9 to 1 +move 1 from 5 to 1 +move 1 from 9 to 4 +move 11 from 1 to 2 +move 16 from 4 to 5 +move 3 from 3 to 5 +move 9 from 2 to 5 +move 1 from 4 to 1 +move 2 from 2 to 6 +move 1 from 2 to 9 +move 1 from 6 to 2 +move 1 from 3 to 5 +move 1 from 3 to 9 +move 1 from 2 to 9 +move 23 from 1 to 5 +move 1 from 6 to 9 +move 1 from 9 to 8 +move 27 from 5 to 1 +move 1 from 9 to 3 +move 18 from 5 to 8 +move 6 from 5 to 7 +move 1 from 5 to 6 +move 1 from 9 to 8 +move 12 from 8 to 3 +move 1 from 1 to 4 +move 6 from 7 to 8 +move 1 from 6 to 3 +move 1 from 4 to 2 +move 2 from 1 to 8 +move 1 from 2 to 9 +move 8 from 3 to 2 +move 2 from 9 to 7 +move 5 from 2 to 7 +move 7 from 7 to 2 +move 2 from 8 to 2 +move 3 from 1 to 9 +move 5 from 1 to 2 +move 3 from 9 to 8 +move 3 from 8 to 7 +move 5 from 2 to 5 +move 2 from 7 to 6 +move 12 from 8 to 9 +move 12 from 1 to 4 +move 9 from 9 to 3 +move 4 from 5 to 8 +move 12 from 3 to 8 +move 1 from 7 to 9 +move 3 from 9 to 2 +move 1 from 4 to 7 +move 3 from 1 to 7 +move 7 from 4 to 6 +move 3 from 6 to 2 +move 2 from 7 to 9 +move 18 from 8 to 1 +move 2 from 4 to 7 +move 1 from 2 to 8 +move 1 from 8 to 2 +move 10 from 2 to 3 +move 3 from 9 to 8 +move 2 from 6 to 7 +move 13 from 3 to 1 +move 2 from 8 to 9 +move 28 from 1 to 8 +move 1 from 5 to 2 +move 1 from 4 to 3 +move 4 from 7 to 6 +move 5 from 6 to 7 +move 7 from 2 to 6 +move 1 from 9 to 6 +move 2 from 2 to 4 +move 1 from 9 to 1 +move 4 from 1 to 2 +move 3 from 2 to 5 +move 3 from 4 to 9 +move 3 from 5 to 7 +move 1 from 1 to 4 +move 6 from 7 to 6 +move 1 from 2 to 6 +move 1 from 4 to 1 +move 1 from 1 to 8 +move 3 from 9 to 4 +move 18 from 6 to 3 +move 4 from 3 to 6 +move 1 from 7 to 9 +move 1 from 6 to 9 +move 2 from 3 to 6 +move 1 from 9 to 6 +move 1 from 9 to 2 +move 6 from 6 to 8 +move 3 from 4 to 7 +move 2 from 7 to 2 +move 35 from 8 to 7 +move 3 from 3 to 1 +move 26 from 7 to 2 +move 10 from 3 to 9 +move 6 from 9 to 4 +move 3 from 1 to 2 +move 1 from 4 to 3 +move 4 from 4 to 1 +move 1 from 3 to 6 +move 1 from 8 to 3 +move 1 from 6 to 2 +move 1 from 3 to 2 +move 13 from 7 to 3 +move 3 from 1 to 4 +move 4 from 3 to 1 +move 3 from 1 to 9 +move 2 from 1 to 9 +move 10 from 2 to 9 +move 19 from 2 to 9 +move 6 from 3 to 9 +move 2 from 3 to 4 +move 2 from 2 to 6 +move 17 from 9 to 8 +move 1 from 2 to 8 +move 2 from 9 to 3 +move 2 from 6 to 7 +move 8 from 9 to 3 +move 5 from 4 to 5 +move 14 from 9 to 4 +move 1 from 2 to 3 +move 1 from 7 to 2 +move 2 from 9 to 3 +move 1 from 2 to 7 +move 5 from 5 to 1 +move 1 from 2 to 1 +move 1 from 3 to 1 +move 1 from 9 to 7 +move 3 from 7 to 2 +move 3 from 3 to 7 +move 1 from 2 to 4 +move 1 from 3 to 8 +move 1 from 2 to 4 +move 4 from 3 to 4 +move 16 from 8 to 9 +move 3 from 1 to 4 +move 21 from 4 to 6 +move 1 from 7 to 2 +move 1 from 8 to 2 +move 1 from 1 to 3 +move 6 from 6 to 7 +move 3 from 1 to 9 +move 3 from 7 to 3 +move 1 from 4 to 6 +move 1 from 4 to 7 +move 2 from 2 to 6 +move 1 from 8 to 6 +move 13 from 6 to 7 +move 1 from 2 to 3 +move 15 from 9 to 8 +move 6 from 6 to 3 +move 13 from 8 to 3 +move 4 from 9 to 4 +move 5 from 4 to 8 +move 19 from 3 to 9 +move 3 from 3 to 1 +move 5 from 8 to 9 +move 17 from 9 to 7 +move 1 from 1 to 8 +move 4 from 9 to 6 +move 3 from 3 to 8 +move 1 from 1 to 2 +move 3 from 3 to 1 +move 36 from 7 to 6 +move 1 from 1 to 2 +move 7 from 8 to 2 +move 24 from 6 to 5 +move 2 from 6 to 7 +move 1 from 3 to 2 +move 4 from 6 to 8 +move 19 from 5 to 1 +move 8 from 6 to 4 +move 7 from 2 to 5 +move 3 from 2 to 8 +move 15 from 1 to 6 +move 2 from 9 to 5 +move 2 from 7 to 8 +move 3 from 4 to 1 +move 4 from 5 to 6 +move 1 from 9 to 7 +move 1 from 8 to 3 +move 3 from 6 to 1 +move 2 from 4 to 7 +move 13 from 1 to 8 +move 1 from 3 to 7 +move 1 from 4 to 5 +move 19 from 8 to 6 +move 1 from 7 to 3 +move 8 from 5 to 8 +move 1 from 6 to 8 +move 3 from 5 to 9 +move 1 from 6 to 4 +move 3 from 4 to 7 +move 1 from 3 to 9 +move 4 from 7 to 9 +move 20 from 6 to 3 +move 1 from 8 to 4 +move 2 from 9 to 4 +move 2 from 9 to 2 +move 2 from 9 to 3 +move 13 from 6 to 9 +move 9 from 9 to 8 +move 2 from 6 to 3 +move 8 from 8 to 2 +move 2 from 7 to 3 +move 5 from 9 to 3 +move 12 from 3 to 5 +move 1 from 4 to 7 +move 8 from 2 to 4 +move 8 from 4 to 7 +move 2 from 2 to 6 +move 2 from 8 to 9 +move 2 from 6 to 8 +move 2 from 9 to 6 +move 2 from 6 to 9 +move 2 from 4 to 8 +move 2 from 9 to 2 +move 6 from 3 to 1 +move 2 from 2 to 9 +move 3 from 9 to 3 +move 8 from 7 to 2 +move 6 from 1 to 2 +move 8 from 3 to 8 +move 1 from 7 to 3 +move 5 from 3 to 8 +move 6 from 2 to 7 +move 3 from 7 to 6 +move 2 from 7 to 9 +move 1 from 7 to 8 +move 8 from 5 to 7 +move 7 from 2 to 1 +move 7 from 1 to 6 +move 7 from 7 to 9 +move 1 from 7 to 6 +move 2 from 3 to 9 +move 2 from 8 to 5 +move 25 from 8 to 5 +move 5 from 5 to 1 +move 1 from 6 to 4 +move 17 from 5 to 4 +move 5 from 5 to 4 +move 23 from 4 to 7 +move 2 from 5 to 2 +move 4 from 6 to 3 +move 6 from 3 to 7 +move 1 from 5 to 2 +move 1 from 1 to 7 +move 2 from 2 to 8 +move 2 from 2 to 9 +move 1 from 5 to 7 +move 4 from 1 to 6 +move 2 from 8 to 3 +move 2 from 9 to 4 +move 1 from 4 to 8 +move 7 from 9 to 1 +move 2 from 3 to 5 +move 28 from 7 to 4 +move 4 from 6 to 2 +move 2 from 6 to 2 +move 3 from 7 to 4 +move 2 from 5 to 6 +move 4 from 2 to 6 +move 9 from 6 to 5 +move 4 from 1 to 7 +move 1 from 6 to 2 +move 3 from 2 to 3 +move 1 from 8 to 6 +move 1 from 7 to 4 +move 2 from 3 to 4 +move 1 from 7 to 4 +move 2 from 1 to 6 +move 1 from 7 to 9 +move 1 from 7 to 9 +move 1 from 6 to 2 +move 7 from 5 to 8 +move 1 from 3 to 9 +move 1 from 5 to 2 +move 7 from 8 to 7 +move 4 from 4 to 8 +move 2 from 8 to 4 +move 2 from 2 to 7 +move 1 from 1 to 7 +move 1 from 5 to 6 +move 32 from 4 to 7 +move 2 from 6 to 5 +move 2 from 8 to 2 +move 1 from 2 to 1 +move 2 from 5 to 4 +move 1 from 2 to 5 +move 1 from 1 to 4 +move 4 from 4 to 3 +move 1 from 6 to 4 +move 1 from 5 to 4 +move 5 from 9 to 1 +move 4 from 3 to 5 +move 3 from 1 to 6 +move 2 from 9 to 5 +move 2 from 1 to 3 +move 15 from 7 to 1 +move 5 from 5 to 3 +move 1 from 5 to 2 +move 3 from 4 to 5 +move 2 from 5 to 9 +move 3 from 3 to 6 +move 3 from 3 to 4 +move 1 from 3 to 8 +move 1 from 9 to 3 +move 2 from 4 to 9 +move 1 from 5 to 3 +move 2 from 9 to 6 +move 1 from 8 to 1 +move 1 from 3 to 2 +move 1 from 4 to 9 +move 2 from 9 to 3 +move 9 from 1 to 3 +move 5 from 3 to 4 +move 2 from 1 to 3 +move 4 from 1 to 5 +move 1 from 2 to 8 +move 3 from 4 to 9 \ No newline at end of file diff --git a/input/day5_ex.txt b/input/day5_ex.txt new file mode 100644 index 0000000..e98aba4 --- /dev/null +++ b/input/day5_ex.txt @@ -0,0 +1,9 @@ + [D] +[N] [C] +[Z] [M] [P] + 1 2 3 + +move 1 from 2 to 1 +move 3 from 1 to 3 +move 2 from 2 to 1 +move 1 from 1 to 2 \ No newline at end of file -- cgit v1.2.3-ZIG