From 06a08dd5326d9a33ef28b264993515428d4c9e0f Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Tue, 15 Dec 2015 11:51:22 -0500 Subject: [PATCH] Day 7, Part 2 --- advent-of-code.org | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/advent-of-code.org b/advent-of-code.org index fc9bb65..921931f 100644 --- a/advent-of-code.org +++ b/advent-of-code.org @@ -3703,3 +3703,20 @@ input), what signal is ultimately provided to *wire a*? #+RESULTS[0e096ea6071516679cc36a305883d2bdd808c930]: : 956 +** Part 2 +Now, take the signal you got on wire =a=, override wire =b= to that +signal, and reset the other wires (including wire =a=). What new +signal is ultimately provided to wire =a=? + +---------------------------------------------------------------------- + +#+BEGIN_SRC emacs-lisp :var input=7-input :exports both + (let* ((connection-strings (split-string input "\n" t)) + (circuit (day7/make-circuit connection-strings))) + (day7/circuit-put circuit 'b 956) + (day7/evaluate circuit 'a)) +#+END_SRC + +#+RESULTS[61e8544d7d4f32d111e9a666de842ecc4248e390]: +: 40149 +