Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cmath>
- #include <cstdio>
- #include <vector>
- #include <iostream>
- #include <algorithm>
- using namespace std;
- int main() {
- int n, t;
- int temp, temp2;
- cin >> n >> t;
- vector<vector<int> > mat(n);
- for (int i = 0; i < n; i++) {
- cin >> temp;
- mat.push_back(vector<int>(temp));
- for (int j = 0; j < temp; j++) {
- cin >> temp2;
- mat[i].push_back(temp2);
- }
- }
- for (int i = 0; i < t; i++) {
- cin >> temp >> temp2;
- cout << mat[temp][temp2] << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement