For problem statement at 2000-2999/2100-2199/2150-2159/2157/problemE.txt this is a correct solution, but verifier at 2000-2999/2100-2199/2150-2159/2157/verifierE.go ends with Test 6 FAILED
Input:
1
19 1
33 24 27 38 16 14 16 5 3 5 17 1 23 16 9 18 5 35 24
Expected: 4
Actual: 7
exit status 1 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 t int
fmt.Fscan(in, &t)
for ; t > 0; t-- {
var n, k int
fmt.Fscan(in, &n, &k)
a := make([]int, n)
maxA := 0
for i := 0; i < n; i++ {
fmt.Fscan(in, &a[i])
if a[i] > maxA {
maxA = a[i]
}
}
limit := maxA + n + 10
freq := make([]int, limit)
for _, v := range a {
freq[v]++
}
ans := 0
for x := 1; x < limit; x++ {
if freq[x] > k {
ans++
surplus := freq[x] - 1
if x+1 < limit {
freq[x+1] += surplus
}
}
}
fmt.Fprintln(out, ans)
}
}
```