diff --git a/2024/day25/solutions.py b/2024/day25/solutions.py new file mode 100644 index 0000000..221faa2 --- /dev/null +++ b/2024/day25/solutions.py @@ -0,0 +1,12 @@ +from itertools import combinations + +with open("input") as f: + gs = f.read().strip().split("\n\n") + +# Part 1 +print( + sum( + g1[0] != g2[0] and not any({x1, x2} == {"#"} for x1, x2 in zip(g1, g2)) + for g1, g2 in combinations(gs, 2) + ) +)