We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7578361 commit 4ee8910Copy full SHA for 4ee8910
2024/day25/solutions.py
@@ -0,0 +1,13 @@
1
+from itertools import combinations
2
+
3
+with open("input") as f:
4
+ gs = [g.split("\n") for g in f.read().strip().split("\n\n")]
5
6
+# Part 1
7
+print(
8
+ sum(
9
+ g1[0][0] != g2[0][0]
10
+ and not any({g1[i][j], g2[i][j]} == {"#"} for i in range(7) for j in range(5))
11
+ for g1, g2 in combinations(gs, 2)
12
+ )
13
+)
0 commit comments