I understand as Set size of vector of vectors at run time
describes, one can declare vector of vector as
vector<vector<int> > ref;
The size of the
vector<int> struct that is stored in
ref is constant. Common implementations has this at around 12 bytes.
ref manages roughly ref.capacity() * 12 bytes of continuous storage.
vector<int> in ref manages its own integers independent of the elements
ref manages. In the artistic rendering below
ref.size() == ref.capacity() for the sake of simplicity.
only affects the top row. Your
only affects the i-th column.