V
Size: a a a
V
V
R
V
R
R
V
V
V
V
V
V
for (int i = 0; i < rows; i++)вот так в итоге выглядит сам алгоритм проверки
{
counter = 0;
max = 0;
for (int j = 0; j < columns; j++)
{
if (arr[j][i] == x)
{
counter++;
}
if (counter >= k)
{
max = counter;
}
if (arr[j][i] != x)
{
counter = 0;
}
}
if (max >= k)
{
cout << "Column found. Its column with index " << i << endl;
}
}
x
V
x
V
x
V
x