From 8e6440d8fd69caedc11192dca02a6ae28f5248cf Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 2 Dec 2021 10:05:22 +0100 Subject: Improve the makeshift macros --- 2015/15/Makefile | 4 ++-- 2015/15/puzzles.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to '2015/15') diff --git a/2015/15/Makefile b/2015/15/Makefile index 8ada60c..b01f411 100644 --- a/2015/15/Makefile +++ b/2015/15/Makefile @@ -1,6 +1,6 @@ all: - m4 -D GROUPS=5 puzzles.py | sed '/# START PART 2/,/# END PART 2/d' >puzzle-1.py - m4 -D GROUPS=6 puzzles.py | sed '/# START PART 1/,/# END PART 1/d' >puzzle-2.py + m4 -D GROUPS=5 puzzles.py | sed '/START PART 2/,/END PART 2/d' >puzzle-1.py + m4 -D GROUPS=6 puzzles.py | sed '/START PART 1/,/END PART 1/d' >puzzle-2.py chmod +x puzzle-[12].py .PHONY: clean diff --git a/2015/15/puzzles.py b/2015/15/puzzles.py index 506e11f..5c3be94 100644 --- a/2015/15/puzzles.py +++ b/2015/15/puzzles.py @@ -12,8 +12,7 @@ def main() -> None: m = re.match( # START PART 1 r"[^\-0-9]+([\-0-9]+)[^\-0-9]+([\-0-9]+)[^\-0-9]+([\-0-9]+)[^\-0-9]+([\-0-9]+)", - # END PART 1 - # START PART 2 + # END PART 1 START PART 2 r"[^\-0-9]+([\-0-9]+)[^\-0-9]+([\-0-9]+)[^\-0-9]+([\-0-9]+)[^\-0-9]+([\-0-9]+)[^\-0-9]+([0-9]+)", # END PART 2 line, -- cgit v1.2.3