Skip to content

Commit

Permalink
🎄 Add solution to 2024-12-25
Browse files Browse the repository at this point in the history
  • Loading branch information
fuglede committed Dec 26, 2024
1 parent 7578361 commit 4ee8910
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions 2024/day25/solutions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from itertools import combinations

with open("input") as f:
gs = [g.split("\n") for g in f.read().strip().split("\n\n")]

# Part 1
print(
sum(
g1[0][0] != g2[0][0]
and not any({g1[i][j], g2[i][j]} == {"#"} for i in range(7) for j in range(5))
for g1, g2 in combinations(gs, 2)
)
)

0 comments on commit 4ee8910

Please sign in to comment.