#include < iostream >
#include < vector >
using namespace std;
int longest_plateau(vector
{
int length = 1;
for(itr += 1; itr != itrEnd; ++itr)
{
if(*itr == *(itr - length))
{
number = *itr;
++length;
}
}
return length;
}
int main(void)
{
int arrayNumbers[] = {1, 2, 2, 3, 3, 3, 4, 5, 5, 6};
vector
int number = 0;
int length = longest_plateau(numbers.begin(), numbers.end(), number);
for(int i = 0; i < length; ++i)
cout << number << " ";
}
沒有留言:
張貼留言