For problem statement at 0-999/0-99/60-69/64/problemH.txt this is a correct solution, but verifier at 0-999/0-99/60-69/64/verifierH.go ends with All tests passed can you fix the verifier? package main
import (
"bufio"
"fmt"
"os"
"sort"
"strconv"
)
type Participant struct {
name string
score int
}
func main() {
in := bufio.NewReader(os.Stdin)
out := bufio.NewWriter(os.Stdout)
defer out.Flush()
var n int
fmt.Fscan(in, &n)
a := make([]Participant, n)
for i := 0; i < n; i++ {
fmt.Fscan(in, &a[i].name, &a[i].score)
}
sort.Slice(a, func(i, j int) bool {
if a[i].score != a[j].score {
return a[i].score > a[j].score
}
return a[i].name < a[j].name
})
pos := 1
for i := 0; i < n; {
j := i
for j < n && a[j].score == a[i].score {
j++
}
m := j - i
place := strconv.Itoa(pos)
if m > 1 {
place = fmt.Sprintf("%d-%d", pos, pos+m-1)
}
for k := i; k < j; k++ {
fmt.Fprintf(out, "%s %s\n", place, a[k].name)
}
pos += m
i = j
}
}