You are viewing a single comment's thread. Return to all comments →
int main() { int n, q; cin >> n >> q; vector<vector<int>> arrays(n); for (int i = 0; i < n; i++) { int k; cin >> k; vector<int> inner(k); for (int j = 0; j < k; j++) { cin >> inner[j]; } arrays[i] = inner; } while(q--) { int i, j; cin >> i >> j; cout << arrays[i][j] << 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 →