#include <iostream>
#include <vector>

bool reallocation_check(const int*& data, const std::vector<int>& v)
{
    if (data != v.data())
    {
        std::cout << "Reallocation at size: " << v.size() << "\nNew capacity: " << v.capacity() << '\n';
        data = v.data();
        return true;
    }

    return false;
}

int main()
{
    const unsigned limit = 83886;

    std::vector<int> v;
    const int* data = v.data();
    unsigned reallocations = 0;


    for (unsigned i = 0; i < limit; ++i)
    {
        v.push_back(i + 100);
        if (reallocation_check(data, v))
            ++reallocations;
    }

    std::cout << "Reallocations: " << reallocations << '\n';
}