From 796ff1a24400b8ea9924fb6ce384d81d35a4199e Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Fri, 5 Dec 2025 08:42:49 -0500 Subject: [PATCH] [p5] begin --- p5/p5.org | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 p5/p5.org diff --git a/p5/p5.org b/p5/p5.org new file mode 100644 index 0000000..8c93691 --- /dev/null +++ b/p5/p5.org @@ -0,0 +1,17 @@ +#+title: Solution to p5 + +First load the data as a list of cons cells (start . end) +#+begin_src emacs-lisp :results none + (with-temp-buffer + (insert-file-contents "input-test") + (advent/replace-multiple-regex-buffer + '( + ("^\\([0-9]*\\)-\\([0-9]*\\)$" . "(\\1 . \\2)") + ("^$" . ") ids '("))) + (goto-char (point-min)) + (insert "(setq ranges '(") + (goto-char (point-max)) + (insert "))") + (eval-buffer)) +#+end_src +