You are viewing a single comment's thread. Return to all comments →
int n; cin>>n; int q; cin>>q; vector<vector<int>> arr(n); for(int i=0;i<n;i++) { int size; cin>>size; for(int j=0;j<size;j++) { int num; cin>>num; arr[i].push_back(num); } } for(int i=0;i<q;i++) { int a,b; cin>>a>>b; cout<<arr[a][b]<<endl; }
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Variable Sized Arrays
You are viewing a single comment's thread. Return to all comments →