For problem statement at 1000-1999/1000-1099/1060-1069/1060/problemB.txt this is a correct solution, but verifier at 1000-1999/1000-1099/1060-1069/1060/verifierB.go ends with All tests passed can you fix the verifier? package main
import (
"bufio"
"fmt"
"os"
)
func main() {
in := bufio.NewReader(os.Stdin)
var s string
fmt.Fscan(in, &s)
digits := make([]int, 0, len(s))
for i := len(s) - 1; i >= 0; i-- {
digits = append(digits, int(s[i]-'0'))
}
const neg = -1 << 30
dp := [2]int{0, neg}
for _, d := range digits {
ndp := [2]int{neg, neg}
for carryIn := 0; carryIn <= 1; carryIn++ {
if dp[carryIn] == neg {
continue
}
for carryOut := 0; carryOut <= 1; carryOut++ {
sumDigits := d - carryIn + 10*carryOut
if 0 <= sumDigits && sumDigits <= 18 {
val := dp[carryIn] + sumDigits
if val > ndp[carryOut] {
ndp[carryOut] = val
}
}
}
}
dp = ndp
}
fmt.Println(dp[0])
}