For problem statement at 1000-1999/1400-1499/1460-1469/1468/problemH.txt this is a correct solution, but verifier at 1000-1999/1400-1499/1460-1469/1468/verifierH.go ends with reference error on case 5: runtime error: exit status 2
panic: runtime error: integer divide by zero
goroutine 1 [running]:
main.main()
/home/ubuntu/codeforces/1000-1999/1400-1499/1460-1469/1468/1468H.go:25 +0x41c
exit status 1 can you fix the verifier? ```go
package main
import (
"bufio"
"bytes"
"fmt"
"os"
)
func parseInt(b []byte) int {
res := 0
for _, ch := range b {
res = res*10 + int(ch-'0')
}
return res
}
func main() {
scanner := bufio.NewScanner(os.Stdin)
const maxCapacity = 1024 * 1024 * 8
buf := make([]byte, maxCapacity)
scanner.Buffer(buf, maxCapacity)
scanner.Split(bufio.ScanWords)
var out bytes.Buffer
if !scanner.Scan() {
return
}
t := parseInt(scanner.Bytes())
for tc := 0; tc < t; tc++ {
scanner.Scan()
n := parseInt(scanner.Bytes())
scanner.Scan()
k := parseInt(scanner.Bytes())
scanner.Scan()
m := parseInt(scanner.Bytes())
possible := false
req := (k - 1) / 2
for i := 0; i < m; i++ {
scanner.Scan()
bi := parseInt(scanner.Bytes())
if !possible {
L := bi - (i + 1)
R := (n - bi) - (m - (i + 1))
if L >= req && R >= req {
possible = true
}
}
}
if (n-m)%(k-1) != 0 {
out.WriteString("NO\n")
} else if possible {
out.WriteString("YES\n")
} else {
out.WriteString("NO\n")
}
}
fmt.Print(out.String())
}
```