adventofcode/2018/day06-1.go

24 lines
339 B
Go
Raw Permalink Normal View History

2018-12-06 07:23:45 +00:00
package main
import (
"fmt"
"internal/day06"
2018-12-06 07:23:45 +00:00
"internal/util"
)
func main() {
data := util.ReadInput()
points := day06.ParsePoints(data)
2018-12-06 07:23:45 +00:00
day06.ComputeRectilinearAreas(points)
2018-12-06 07:23:45 +00:00
biggest := points[0]
for _, point := range points {
if point.RectArea > biggest.RectArea {
biggest = point
}
}
fmt.Println(biggest.RectArea)
}