← Home
For problem statement at 0-999/400-499/410-419/411/problemB.txt this is a correct solution, but verifier at 0-999/400-499/410-419/411/verifierB.go ends with All tests passed can you fix the verifier? ```go
package main

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

func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()

	var n, m, k int
	fmt.Fscan(in, &n, &m, &k)

	instructions := make([][]int, n)
	for i := 0; i < n; i++ {
		instructions[i] = make([]int, m)
		for j := 0; j < m; j++ {
			fmt.Fscan(in, &instructions[i][j])
		}
	}

	coreLockedAt := make([]int, n)
	cellLocked := make([]bool, k+1)

	for t := 1; t <= m; t++ {
		requests := make(map[int][]int)
		for i := 0; i < n; i++ {
			if coreLockedAt[i] != 0 {
				continue
			}
			target := instructions[i][t-1]
			if target != 0 {
				requests[target] = append(requests[target], i)
			}
		}

		newlyLockedCores := make([]int, 0)
		newlyLockedCells := make([]int, 0)

		for cell, cores := range requests {
			if cellLocked[cell] {
				newlyLockedCores = append(newlyLockedCores, cores...)
			} else {
				if len(cores) > 1 {
					newlyLockedCores = append(newlyLockedCores, cores...)
					newlyLockedCells = append(newlyLockedCells, cell)
				}
			}
		}

		for _, core := range newlyLockedCores {
			if coreLockedAt[core] == 0 {
				coreLockedAt[core] = t
			}
		}
		for _, cell := range newlyLockedCells {
			cellLocked[cell] = true
		}
	}

	for i := 0; i < n; i++ {
		fmt.Fprintln(out, coreLockedAt[i])
	}
}
```