2018-12-03 21:53:58 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
2018-12-10 06:06:47 +00:00
|
|
|
"internal/day03"
|
2018-12-03 21:53:58 +00:00
|
|
|
"internal/util"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
data := util.ReadInput()
|
2018-12-10 06:06:47 +00:00
|
|
|
claims, maxX, maxY := day03.ParseClaims(data)
|
|
|
|
grid := day03.PopulateGrid(claims, maxX, maxY)
|
2018-12-03 21:53:58 +00:00
|
|
|
|
|
|
|
count := 0
|
|
|
|
for y := 0; y < len(grid); y++ {
|
|
|
|
for x := 0; x < len(grid[y]); x++ {
|
|
|
|
if grid[y][x] == -1 {
|
|
|
|
count++
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fmt.Println(count)
|
|
|
|
}
|