From 43d510ee222ad7d0c93f9c6616ca506ccb1da644 Mon Sep 17 00:00:00 2001 From: Ruediger Ludwig Date: Wed, 18 Jan 2023 20:18:39 +0100 Subject: [PATCH] debug info remove in day 16 --- advent/days/day16/solution.py | 7 ------- advent/days/day16/test_solution.py | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/advent/days/day16/solution.py b/advent/days/day16/solution.py index ac7ee09..3b85b26 100644 --- a/advent/days/day16/solution.py +++ b/advent/days/day16/solution.py @@ -296,25 +296,18 @@ class Network: )) min_pressure = 0 known: dict[str, int] = {} - ticks = 0 - drop_known = 0 - drop_pressure = 0 while not queue.empty(): - ticks += 1 current = queue.get() if current.time == 0: - print(f"{ticks=} {drop_known=} {drop_pressure=} {len(known)=}") return current.pressure info = current.info() prev_pressure = known.get(info) if prev_pressure is not None and prev_pressure >= current.pressure: - drop_known += 1 continue known[info] = current.pressure if min_pressure > current.max_potential_pressure(): - drop_pressure += 1 continue min_pressure = max(min_pressure, current.min_potential_pressure()) min_pressure = min_pressure diff --git a/advent/days/day16/test_solution.py b/advent/days/day16/test_solution.py index 1ac4983..0390eb0 100644 --- a/advent/days/day16/test_solution.py +++ b/advent/days/day16/test_solution.py @@ -11,7 +11,7 @@ def test_part1(): def test_part2(): - lines = input.read_lines(day_num, 'input.txt') + lines = input.read_lines(day_num, 'example01.txt') expected = 1707 result = part2(lines) assert result == expected