1auto M = 4; // num of rows
2auto N = 3; // num of cols in each row
3auto default_value = 1; // default value of all int elements
4std::vector<std::vector<int>> matrix(M, std::vector<int>(N, default_value));
1// Initializing 2D vector "vect" with
2// values
3vector<vector<int> > vect{ { 1, 2, 3 },
4 { 4, 5, 6 },
5 { 7, 8, 9 } };
1std::vector<vector<int>> d;
2//std::vector<int> d;
3cout<<"Enter the N number of ship and port:"<<endl;
4cin>>in;
5cout<<"\Enter preference etc..:\n";
6for(i=0; i<in; i++){
7cout<<"ship"<<i+1<<":"<<' ';
8 for(j=0; j<in; j++){
9 cin>>temp;
10 d.push_back(temp);// I don't know how to push_back here!!
11 }
12}