Could you do the insert operation in one line along with allocating memory for internal vector?
vector <vector<int>> myvector;
int a[] = {0, 1, 2, 3, 4};
for (int index = 0; index < 2; index++)
{
myvector.push_back(vector<int>()); //allocate memory for internal vector
myvector[index].insert(myvector[index].begin(), a, &a[5]); //insert
}