Day 6 part 1.
This commit is contained in:
parent
6185736ef6
commit
0c96d7dded
2 changed files with 134 additions and 0 deletions
23
2018/day06-1.go
Normal file
23
2018/day06-1.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"internal/coords"
|
||||
"internal/util"
|
||||
)
|
||||
|
||||
func main() {
|
||||
data := util.ReadInput()
|
||||
points := coords.ParsePoints(data)
|
||||
|
||||
coords.ComputeRectilinearAreas(points)
|
||||
|
||||
biggest := points[0]
|
||||
for _, point := range points {
|
||||
if point.RectArea > biggest.RectArea {
|
||||
biggest = point
|
||||
}
|
||||
}
|
||||
fmt.Println(biggest.RectArea)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue