You are viewing a single comment's thread. Return to all comments →
This is my simplest one
"It does not include any pair datatype"
int main() { int n, q; cin>>n>>q; vector<vector<int>> v; for(int i=0; i<n; ++i){ int size; cin>>size; vector<int> v1(size); for(int j=0; j<size; ++j){ cin>>v1[j]; } v.push_back(v1); } for(int i=0; i<q; ++i){ int first, second; cin>>first>>second; cout<<v[first][second]<<endl; } return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Variable Sized Arrays
You are viewing a single comment's thread. Return to all comments →
"It does not include any pair datatype"