You are viewing a single comment's thread. Return to all comments →
int main() { int n, q; int k_length, k_member; vector<vector<int>> a; vector<int> k; int x,y; cin >> n >> q; for(int i = 0; i < n; i++) { cin >> k_length; for(int j = 0; j < k_length; j++) { cin >> k_member; k.push_back(k_member); } a.emplace_back(k); k.clear(); } for(int i = 0; i < q; i++) { cin >> x >> y; cout << a.at(x).at(y) << 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 →