diff options
author | Thomas Voss <thomasvoss@live.com> | 2021-12-02 10:05:22 +0100 |
---|---|---|
committer | Thomas Voss <thomasvoss@live.com> | 2021-12-02 10:05:22 +0100 |
commit | 8e6440d8fd69caedc11192dca02a6ae28f5248cf (patch) | |
tree | 3a99cb992870acbea9d887523f42378d9b1b28a2 /2015/15 | |
parent | 00b67942fed9961bd8d46d6f4fdae97dd074bb4e (diff) |
Improve the makeshift macros
Diffstat (limited to '2015/15')
-rw-r--r-- | 2015/15/Makefile | 4 | ||||
-rw-r--r-- | 2015/15/puzzles.py | 3 |
2 files changed, 3 insertions, 4 deletions
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, |