For problem statement at 1000-1999/1500-1599/1570-1579/1574/problemB.txt this is a correct solution, but verifier at 1000-1999/1500-1599/1570-1579/1574/verifierB.go ends with All tests passed can you fix the verifier? package main
import (
"bufio"
"fmt"
"os"
)
func max3(a, b, c int64) int64 {
if a < b {
a = b
}
if a < c {
a = c
}
return a
}
func main() {
in := bufio.NewReaderSize(os.Stdin, 1<<20)
out := bufio.NewWriterSize(os.Stdout, 1<<20)
defer out.Flush()
var t int
fmt.Fscan(in, &t)
for ; t > 0; t-- {
var a, b, c, m int64
fmt.Fscan(in, &a, &b, &c, &m)
mx := max3(a, b, c)
sum := a + b + c
low := mx - (sum-mx) - 1
if low < 0 {
low = 0
}
high := sum - 3
if m >= low && m <= high {
fmt.Fprintln(out, "YES")
} else {
fmt.Fprintln(out, "NO")
}
}
}