I figured out how to store data in my
vector<vector<pair<int, int> > > v;
f >> x >> y; v[i][j].push_back(make_pair(x, y));
c++ - error: '__gnu_cxx::__alloc_traits > >::value_type' has no member named 'second''|
c[j] = c[j + 1] * (v[foo][j].second - v[foo][j].first + 1);
v is an array of vector of vector of pair. You need three indices:
Three indices is (almost always) too many. You need to encapsulate in some sort of structure.