-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cddd053
commit f7193b3
Showing
4 changed files
with
1,103 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
"aoc2023/utils" | ||
) | ||
|
||
func D12P2() { | ||
lines := utils.ReadLines("inputs/12.txt") | ||
springs, groups := parseSprings(lines, true) | ||
|
||
permutationTotal := 0 | ||
for i := 0; i < len(springs); i++ { | ||
permutationTotal += calculatePermutations(springs[i], groups[i]) | ||
} | ||
|
||
fmt.Printf("Total possible spring arrangements: %d\n", permutationTotal) | ||
} |
Oops, something went wrong.