You are viewing a single comment's thread. Return to all comments →
My solution:
using namespace std;
int main(){ ios::sync_with_stdio(0); cin.tie(0);
int n, q; cin >> n >> q; vector<vector<int>> no(n); for(int i = 0; i<n; i++){ int k; cin >> k; no[i].resize(k); for(int j = 0; j<k; j++){ cin >> no[i][j]; } } while(q-->0){ int x, y; cin >> x >> y; cout << no[x][y] << '\n'; } return 0;
}
I am not that familiar with pointers actually, so I used vectors instead.
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 →
My solution:
include
using namespace std;
int main(){ ios::sync_with_stdio(0); cin.tie(0);
}
I am not that familiar with pointers actually, so I used vectors instead.
}