- Матрица m*n, состоящая из блоков, размер которой заранее неизвестен.
- Каждый блок имеет цвет.
Найти наибольшую группу смежных блоков одного цвета.
- Высота и ширина матрицы, количество цветов.
- Сгенерированная матрица
- Найденная группа, в виде по которой ее можно найти в сгенеренной матрице.
Запуск программы: make или make run
Билд прогрыммы: make build
Запуск бенчей: make bench
input:
5 5 10
output:
Generated matrix:
1 1 2 2 1
1 2 2 2 2
2 1 2 1 2
2 1 1 1 2
2 2 2 1 1
Max group size: 9
Number of groups: 1
Group 1:
_ _ 2 2 _
_ 2 2 2 2
_ _ 2 _ 2
_ _ _ _ 2
_ _ _ _ _
input:
2 2 2
output:
Generated matrix:
2 1
2 1
Max group size: 2
Number of groups: 2
Group 1:
2 _
2 _
Group 2:
_ 1
_ 1