ZM3NEHJYEERJUFKSHPJ2SJ6SUJGWDA5V7H7VEFOX3YGPJFVWVKQAC
}
func solveSecond(bingo Bingo) int {
var winners = map[int]struct{}{}
for mark, elem := range bingo.marks {
if mark < gridSize {
continue
}
marks := bingo.findMark(elem)
for _, m := range marks {
if bingo.checkRow(m.grid, m.row, mark) || bingo.checkCol(m.grid, m.col, mark) {
winners[m.grid] = struct{}{}
if len(winners) == len(bingo.grids) {
log.Println(bingo.gridValue(m.grid, mark), bingo.marks[mark])
return bingo.gridValue(m.grid, mark) * bingo.marks[mark]
}
}
}
}
return 0