From 42ad4d421900217eb28877a72e3bd50e46f6a67c Mon Sep 17 00:00:00 2001 From: isaiahliu Date: Sun, 8 Dec 2024 00:11:15 +0800 Subject: [PATCH] 1 --- src/main/kotlin/p07xx/Problem0782.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/p07xx/Problem0782.kt b/src/main/kotlin/p07xx/Problem0782.kt index 8ae590ec..1ec2e596 100644 --- a/src/main/kotlin/p07xx/Problem0782.kt +++ b/src/main/kotlin/p07xx/Problem0782.kt @@ -89,7 +89,7 @@ fun main() { } } - return arrayOf(0, 1).mapNotNull { dupBoard.moveRow(it) }.map { it + result }.minOrNull() + return arrayOf(0, 1).mapNotNull { dupBoard.moveRow(it) }.minOfOrNull { it + result } } return arrayOf(moveColumn(0), moveColumn(1)).filterNotNull().minOrNull() ?: -1