You are viewing a single comment's thread. Return to all comments →
`int main(){
int n,q,k,i,j,b,pb; cin>>n>>q; vector<vector<int>> num(n); for(b = 0;b<n;b++) { cin>>k; num[b].resize(k); for(int a = 0; a<k;a++){ cin>>num[b][a]; } } for(int c = 0;c<q;c++){ cin>>i>>j;`` int TO = (i<n && j< num[i].size())?num[i][j]:0; cout<<TO<<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 →
`int main(){
}