← Home
For problem statement at 2000-2999/2000-2099/2000-2009/2000/problemC.txt this is a correct solution, but verifier at 2000-2999/2000-2099/2000-2009/2000/verifierC.go ends with All 205 tests passed can you fix the verifier? ```go
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	read := func() string {
		sc.Scan()
		return sc.Text()
	}
	t, _ := strconv.Atoi(read())
	for i := 0; i < t; i++ {
		n, _ := strconv.Atoi(read())
		a := make([]int64, n)
		for i := 0; i < n; i++ {
			val, _ := strconv.ParseInt(read(), 10, 64)
			a[i] = val
		}
		m, _ := strconv.Atoi(read())
		for j := 0; j < m; j++ {
			s := read()
			if len(s) != n {
				fmt.Println("NO")
				continue
			}
			a2c := make(map[int64]byte)
			c2a := make(map[byte]int64)
			ok := true
			for i := 0; i < n; i++ {
				val := a[i]
				ch := s[i]
				if prev, ex := a2c[val]; ex && prev != ch {
					ok = false
					break
				}
				a2c[val] = ch
				if prev, ex := c2a[ch]; ex && prev != val {
					ok = false
					break
				}
				c2a[ch] = val
			}
			if ok {
				fmt.Println("YES")
			} else {
				fmt.Println("NO")
			}
		}
	}
}
```