← Home
For problem statement at 1000-1999/1700-1799/1790-1799/1798/problemB.txt this is a correct solution, but verifier at 1000-1999/1700-1799/1790-1799/1798/verifierB.go ends with reference failed: exec: "refB_bin": executable file not found in $PATH can you fix the verifier?  ```go
package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	buf := make([]byte, 0, 1024*1024)
	scanner.Buffer(buf, 1024*1024)
	scanner.Split(bufio.ScanWords)

	nextInt := func() int {
		scanner.Scan()
		v, _ := strconv.Atoi(scanner.Text())
		return v
	}

	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()

	t := nextInt()
	for tc := 0; tc < t; tc++ {
		m := nextInt()
		days := make([][]int, m)
		for i := 0; i < m; i++ {
			n := nextInt()
			participants := make([]int, n)
			for j := 0; j < n; j++ {
				participants[j] = nextInt()
			}
			days[i] = participants
		}

		forbidden := make(map[int]struct{})
		result := make([]int, m)
		ok := true

		for i := m - 1; i >= 0; i-- {
			found := -1
			for _, x := range days[i] {
				if _, exists := forbidden[x]; !exists {
					found = x
					break
				}
			}
			if found == -1 {
				ok = false
				break
			}
			result[i] = found
			for _, x := range days[i] {
				forbidden[x] = struct{}{}
			}
		}

		if !ok {
			out.WriteString("-1\n")
		} else {
			for i := 0; i < m; i++ {
				if i > 0 {
					out.WriteByte(' ')
				}
				out.WriteString(strconv.Itoa(result[i]))
			}
			out.WriteByte('\n')
		}
	}
}
```