From ffc5088813e2be2eb8f11671a801db738fc0a1c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Engl=C3=B6f=20Ytterstr=C3=B6m?= Date: Tue, 3 Dec 2024 20:26:39 +0100 Subject: [PATCH] Improve aoc helper script --- 2016-python2/aoc.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/2016-python2/aoc.py b/2016-python2/aoc.py index a7f6b48..3d8295b 100644 --- a/2016-python2/aoc.py +++ b/2016-python2/aoc.py @@ -29,11 +29,18 @@ if day_no and name: with open("output/day_{}.py".format(padded_no), "w") as s: s.write( f""" +import re +from collections import deque, Counter +from heapq import heappop, heappush +from itertools import compress, combinations, chain + from output import answer # , matrix, D, DD, ADJ, ints, mhd, mdbg, vdbg def solve(data): - return 1, 2 + p1 = 1 + p2 = 2 + return p1, p2 if __name__ == "__main__": @@ -57,8 +64,8 @@ if __name__ == "__main__": # uncomment and replace 0 with actual output to refactor code # and ensure nonbreaking changes - # assert a == 0 - # assert b == 0 + # assert p1 == 0 + # assert p2 == 0 """.strip() + "\n" )