For problem statement at 1000-1999/1900-1999/1950-1959/1958/problemI.txt this is a correct solution, but verifier at 1000-1999/1900-1999/1950-1959/1958/verifierI.go ends with all tests passed can you fix the verifier? ```go
package main
import (
"bufio"
"fmt"
"math/bits"
"os"
)
func main() {
reader := bufio.NewReader(os.Stdin)
var n int
if _, err := fmt.Fscan(reader, &n); err != nil {
return
}
a := make([]int, n+1)
b := make([]int, n+1)
for i := 2; i <= n; i++ {
fmt.Fscan(reader, &a[i])
}
for i := 2; i <= n; i++ {
fmt.Fscan(reader, &b[i])
}
anc1 := make([][]bool, n+1)
for i := 1; i <= n; i++ {
anc1[i] = make([]bool, n+1)
curr := i
for curr != 1 {
curr = a[curr]
anc1[i][curr] = true
}
}
anc2 := make([][]bool, n+1)
for i := 1; i <= n; i++ {
anc2[i] = make([]bool, n+1)
curr := i
for curr != 1 {
curr = b[curr]
anc2[i][curr] = true
}
}
V := n - 1
if V == 0 {
fmt.Println(0)
return
}
adj := make([]int, V)
for i := 0; i < V; i++ {
u := i + 2
for j := i + 1; j < V; j++ {
v := j + 2
if anc1[u][v] != anc2[u][v] || anc1[v][u] != anc2[v][u] {
adj[i] |= (1 << j)
adj[j] |= (1 << i)
}
}
}
L := V / 2
R := V - L
adj_L := make([]int, L)
adj_R_from_L := make([]int, L)
for i := 0; i < L; i++ {
adj_L[i] = adj[i] & ((1 << L) - 1)
adj_R_from_L[i] = adj[i] >> L
}
adj_R_only := make([]int, R)
for i := 0; i < R; i++ {
adj_R_only[i] = adj[L+i] >> L
}
dp_R := make([]int, 1<<R)
dp_R[0] = 0
for mask := 1; mask < (1 << R); mask++ {
v := bits.TrailingZeros(uint(mask))
prevMask := mask & (mask - 1)
opt1 := dp_R[prevMask]
opt2 := 1 + dp_R[prevMask&^adj_R_only[v]]
if opt1 > opt2 {
dp_R[mask] = opt1
} else {
dp_R[mask] = opt2
}
}
max_indep := 0
var solve_left func(allowed_L int, current_size int, valid_R int)
solve_left = func(allowed_L int, current_size int, valid_R int) {
if allowed_L == 0 {
cand := current_size + dp_R[valid_R]
if cand > max_indep {
max_indep = cand
}
return
}
idx := bits.TrailingZeros(uint(allowed_L))
prevAllowed := allowed_L & (allowed_L - 1)
solve_left(prevAllowed, current_size, valid_R)
new_allowed_L := prevAllowed &^ adj_L[idx]
new_valid_R := valid_R &^ adj_R_from_L[idx]
solve_left(new_allowed_L, current_size+1, new_valid_R)
}
solve_left((1<<L)-1, 0, (1<<R)-1)
ans := 2*n - 2*(max_indep+1)
fmt.Println(ans)
}
```