#include <vector>
#include <iostream>

using namespace std;

int main ()
{
  vector<vector<int> > vec2D;

  cout << "i-capacity before reserve: " << vec2D.capacity() << endl;
  vec2D.reserve(5);
  cout << "i-capacity after reserve: " << vec2D.capacity() << endl << endl;

  for (int i=0; i<5; i++) {
      cout << "i = " << i << endl;
      cout << "j-capacity before reserve: " << vec2D[i].capacity() << endl;
      vec2D[i].reserve(3);
      cout << "j-capacity after reserve: " << vec2D[i].capacity() << endl;
      for (int j=0; j<3; j++) {
          vec2D[i][j] = i*5 + j;
      }
  }

  return 0;
}