Skip to content

Commit

Permalink
day20: added 20 picoseconds limit
Browse files Browse the repository at this point in the history
result is too low yet
  • Loading branch information
fxnn committed Dec 22, 2024
1 parent 403ad31 commit 67e1e67
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions day20/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ func findCheats(course [][]byte, moves []util.Point, startIdx int, minSaving int
for len(recents) > 0 {
var found = make(map[util.Point]int)
for p1, cost := range recents {
if cost == 20 {
continue
}
for _, d := range directions {
var p2 = p1.Add(d)
if !p2.IsInBounds(len(course), len(course[p1.Y])) {
Expand Down

0 comments on commit 67e1e67

Please sign in to comment.