For problem statement at 1000-1999/1100-1199/1150-1159/1158/problemE.txt this is a correct solution, but verifier at 1000-1999/1100-1199/1150-1159/1158/verifierE.go ends with Problem E is interactive and cannot be automatically verified. can you fix the verifier? package main
import (
"fmt"
"os"
"strings"
)
func main() {
var n int
if _, err := fmt.Scan(&n); err != nil {
return
}
if n <= 1 {
fmt.Println("!")
os.Stdout.Sync()
return
}
edges := make(map[[2]int]bool)
for i := 1; i <= n; i++ {
if len(edges) == n-1 {
break
}
d := make([]string, n)
for j := 0; j < n; j++ {
if j+1 == i {
d[j] = "1"
} else {
d[j] = "0"
}
}
fmt.Printf("? %s\n", strings.Join(d, " "))
os.Stdout.Sync()
var resp string
fmt.Scan(&resp)
for j, ch := range resp {
if ch == '1' {
u := i
v := j + 1
if u > v {
u, v = v, u
}
if u != v {
edges[[2]int{u, v}] = true
}
}
}
}
fmt.Println("!")
for e := range edges {
fmt.Printf("%d %d\n", e[0], e[1])
}
os.Stdout.Sync()
}