We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
intmain(){/* Enter your code here. Read input from STDIN. Print output to STDOUT */intn,q,size,value,which,index;cin>>n>>q;vector<vector<int>>nvec;for(inti=0;i<n;++i){cin>>size;vector<int>ivec;for(intj=0;j<size;++j){cin>>value;ivec.push_back(value);}nvec.push_back(ivec);}for(intk=0;k<q;++k){cin>>which>>index;cout<<nvec[which][index]<<endl;}return0;}
Variable Sized Arrays
You are viewing a single comment's thread. Return to all comments →