#include #include int main() { std::vector arr = {1, 3, 3, 7, 9, 9, 9, 9, 11, 11, 12, 14}; int maxLen = 1, currentLen = 1; for (size_t i = 1; i < arr.size(); i++) { if (arr[i] == arr[i - 1]) { currentLen++; } else { currentLen = 1; } maxLen = std::max(maxLen, currentLen); } std::cout << maxLen << std::endl; return 0; }