← Home
For problem statement at 0-999/100-199/150-159/153/problemE.txt this is a correct solution, but verifier at 0-999/100-199/150-159/153/verifierE.go ends with All 100 tests passed can you fix the verifier? package main

import (
	"fmt"
	"math"
)

func main() {
	var n int
	fmt.Scan(&n)

	x := make([]float64, n)
	y := make([]float64, n)

	for i := 0; i < n; i++ {
		fmt.Scan(&x[i], &y[i])
	}

	maxDist := 0.0
	for i := 0; i < n; i++ {
		for j := i + 1; j < n; j++ {
			dx := x[i] - x[j]
			dy := y[i] - y[j]
			dist := math.Sqrt(dx*dx + dy*dy)
			if dist > maxDist {
				maxDist = dist
			}
		}
	}

	fmt.Printf("%.9f\n", maxDist)
}