Bit of debugging2
Some checks failed
Solve / example-action (push) Failing after 36s

This commit is contained in:
Logiar 2024-12-05 15:11:22 +01:00
parent 143679ec7e
commit a36d0efd4b
Signed by: Logiar
SSH Key Fingerprint: SHA256:tq77C31em1ZG4oELIHC3k62wq5UzPSXmhqH8g62whIY
2 changed files with 6 additions and 0 deletions

View File

@ -39,6 +39,7 @@ fun findXmas(y: Int, x: Int): Int {
for (searchOffset in xMasSearchOffsets) { for (searchOffset in xMasSearchOffsets) {
val last = searchOffset.last() val last = searchOffset.last()
if ((y+last.first) !in ycoordinates.indices || (x+last.second) !in ycoordinates[y].indices){ if ((y+last.first) !in ycoordinates.indices || (x+last.second) !in ycoordinates[y].indices){
if (x == 1 && y == 139) println("skipping x: (${x+last.second}, y: ${y+last.first})")
continue continue
} }
var match = true var match = true

View File

@ -3772,6 +3772,11 @@ x: 131, y: 138
x: 136, y: 138 x: 136, y: 138
x: 139, y: 138 x: 139, y: 138
x: 1, y: 139 x: 1, y: 139
skipping x: (1, y: 142)
skipping x: (-2, y: 139)
skipping x: (4, y: 142)
skipping x: (-2, y: 136)
skipping x: (-2, y: 142)
x: 11, y: 139 x: 11, y: 139
x: 20, y: 139 x: 20, y: 139
x: 23, y: 139 x: 23, y: 139