• + 0 comments
    vector<vector<long>> l;
    
    for(int i = 0; i < n; i++)
    l.push_back( *(new vector<long>()) );
    

    You can also do this to initiate the 2D vector