title: Merging/flattening sub-vectors into a single vector c++ (converting 2d to 1d)
body: <p>I have <code>vector&lt;vector&lt;int&gt; &gt; Y</code>. I want to merge the sub-vectors (call it y) inside Y into one <code>vector&lt;int&gt;</code>. But I don't want to sort them,i.e, merge them in the order of their occurence. How would I do this efficiently, perhaps by using STL algorithms? The <code>std::merge</code> method merges by sorting which I don't want.</p>
  
  <p>Edits:
  What I want is: given {{1,6,5},{5,3-1,77},{0},...} return {1,6,5,5,3,-1,77,0,...}</p>