You are viewing a single comment's thread. Return to all comments →
int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n, q , k , l , pl , pt; cin >> n >> q ; vector> num(n);
for (int i = 0 ; i <= n - 1 ; i++ ){ cin >> k ; num[i].resize(k); for (int j = 0 ; j < k ; j++ ) { cin >> num[i][j] ; } } for (int i = 0 ; i < q ; i++){ cin >> pl >> pt ; cout << num[pl][pt] << "\n"; } 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() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */
int n, q , k , l , pl , pt; cin >> n >> q ; vector> num(n);
}