aboutsummaryrefslogtreecommitdiff
path: root/2015/15
diff options
context:
space:
mode:
Diffstat (limited to '2015/15')
-rw-r--r--2015/15/Makefile4
-rw-r--r--2015/15/puzzles.py3
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,