You are viewing a single comment's thread. Return to all comments →
The question was tricky and a bit hard to understand it was difficult to understand the k maybe bcz i am just a beginner int N, Q; cin >> N >> Q;
int* arr[N]; for(int i = 0; i < N; i++ ){ int k; cin >> k; arr[i] = new int[k]; for(int j = 0; j < k; j++){ cin >> arr[i][j]; } } for(int i = 0; i < Q; i++){ int a, b; cin >> a >> b; cout << arr[a][b] << endl; }
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 →
The question was tricky and a bit hard to understand it was difficult to understand the k maybe bcz i am just a beginner int N, Q; cin >> N >> Q;