← Home
For problem statement at 1000-1999/1100-1199/1160-1169/1166/problemE.txt this is a correct solution, but verifier at 1000-1999/1100-1199/1160-1169/1166/verifierE.go ends with All tests passed can you fix the verifier? ```go
package main

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

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

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

	if !scanner.Scan() {
		return
	}
	m, _ := strconv.Atoi(scanner.Text())
	n := scanInt()

	D_stores := make([][]int, m)
	D := make([][]bool, m)
	for i := 0; i < m; i++ {
		D[i] = make([]bool, n+1)
		s := scanInt()
		D_stores[i] = make([]int, s)
		for j := 0; j < s; j++ {
			store := scanInt()
			D[i][store] = true
			D_stores[i][j] = store
		}
	}

	intersect := make([][]bool, m)
	subset := make([][]bool, m)
	for i := 0; i < m; i++ {
		intersect[i] = make([]bool, m)
		subset[i] = make([]bool, m)
		for j := 0; j < m; j++ {
			inter := false
			isSub := true
			for _, k := range D_stores[i] {
				if D[j][k] {
					inter = true
				} else {
					isSub = false
				}
			}
			intersect[i][j] = inter
			subset[i][j] = isSub
		}
	}

	active := make([]bool, m)
	for i := 0; i < m; i++ {
		active[i] = true
	}

	for {
		found := false
		for i := 0; i < m; i++ {
			if !active[i] {
				continue
			}

			intersectsAll := true
			for j := 0; j < m; j++ {
				if active[j] && !intersect[i][j] {
					intersectsAll = false
					break
				}
			}

			if intersectsAll {
				for j := 0; j < m; j++ {
					if active[j] && subset[i][j] {
						active[j] = false
					}
				}
				found = true
				break
			}
		}

		if !found {
			break
		}
	}

	for i := 0; i < m; i++ {
		if active[i] {
			fmt.Println("impossible")
			return
		}
	}

	fmt.Println("possible")
}
```