For problem statement at 1000-1999/1200-1299/1260-1269/1265/problemB.txt this is a correct solution, but verifier at 1000-1999/1200-1299/1260-1269/1265/verifierB.go ends with All tests passed can you fix the verifier? package main
import (
"bufio"
"fmt"
"io"
"os"
)
func main() {
data, _ := io.ReadAll(os.Stdin)
idx := 0
nextInt := func() int {
for idx < len(data) && (data[idx] < '0' || data[idx] > '9') {
idx++
}
val := 0
for idx < len(data) && data[idx] >= '0' && data[idx] <= '9' {
val = val*10 + int(data[idx]-'0')
idx++
}
return val
}
t := nextInt()
out := bufio.NewWriterSize(os.Stdout, 1<<20)
defer out.Flush()
for ; t > 0; t-- {
n := nextInt()
pos := make([]int, n+1)
for i := 1; i <= n; i++ {
x := nextInt()
pos[x] = i
}
ans := make([]byte, n)
mn, mx := n+1, 0
for m := 1; m <= n; m++ {
if pos[m] < mn {
mn = pos[m]
}
if pos[m] > mx {
mx = pos[m]
}
if mx-mn+1 == m {
ans[m-1] = '1'
} else {
ans[m-1] = '0'
}
}
fmt.Fprintln(out, string(ans))
}
}