I made a pair of vectors and want to initialize values to those pairs using make pair but i get this ERROR:: "'struct std::pair' has no member named 'push_back' "Here is my code.
const int maxm=100005;//10^5
vector<pair<int,int> > v(maxm);
int main(){
int n;
scanf("%d",&n);
for(int i=0;i<n;i++){
int x, y;
scanf("%d %d",&x,&y);
v[i].push_back(make_pair(x,y));
}
Aucun commentaire:
Enregistrer un commentaire