← Home
For problem statement at 1000-1999/1700-1799/1770-1779/1773/problemE.txt this is a correct solution, but verifier at 1000-1999/1700-1799/1770-1779/1773/verifierE.go ends with reference runtime error: exec: "ref1773E.bin": executable file not found in $PATH can you fix the verifier? ```go
package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)

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

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

	towers := make([][]int, n)
	// Hint capacity with approximate size, though append handles growth
	allValues := make([]int, 0, 10000)

	for i := 0; i < n; i++ {
		k := scanInt()
		towers[i] = make([]int, k)
		for j := 0; j < k; j++ {
			val := scanInt()
			towers[i][j] = val
			allValues = append(allValues, val)
		}
	}

	// Sort all block values to determine the target order
	sort.Ints(allValues)

	// Map each block value to its rank (0-based index in the sorted sequence)
	rank := make(map[int]int, len(allValues))
	for i, v := range allValues {
		rank[v] = i
	}

	splits := 0
	// Check each tower for "bad bonds" that need to be split
	for _, tower := range towers {
		for j := 0; j < len(tower)-1; j++ {
			u := tower[j]
			v := tower[j+1]
			// In the sorted tower, the block v below u must satisfy rank[v] == rank[u] + 1
			if rank[v] != rank[u]+1 {
				splits++
			}
		}
	}

	// Initial towers + splits created = total components
	// To merge K components into 1, we need K-1 combine operations
	combines := n + splits - 1

	fmt.Printf("%d %d\n", splits, combines)
}
```