From c95723952a479ed35347cbd196dc1986be932732 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 10 Dec 2021 07:34:52 +0100 Subject: Add a sed/sh solution --- 2021/10/puzzle-1.sed | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 2021/10/puzzle-1.sed (limited to '2021/10/puzzle-1.sed') diff --git a/2021/10/puzzle-1.sed b/2021/10/puzzle-1.sed new file mode 100644 index 0000000..e2e1204 --- /dev/null +++ b/2021/10/puzzle-1.sed @@ -0,0 +1,13 @@ +:top +s/()// +s/\[\]// +s/{}// +s/<>// +t top + +/[])}>]/!d + +s/^[(\[{<]*).*/3/ +s/^[(\[{<]*\].*/57/ +s/^[(\[{<]*}.*/1197/ +s/^[(\[{<]*>.*/25137/ -- cgit v1.2.3