Created
July 12, 2020 04:50
-
-
Save Abhayparashar31/575edc8835cded327ab34b47f407a9e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() { | |
int n,q; | |
cin >> n >> q; | |
vector< vector<int> > a(n); | |
for (int i=0;i<n;i++) { | |
int k; | |
cin >> k; | |
for (int j=0;j<k;j++) { | |
int data; | |
cin >> data; | |
a[i].push_back(data); | |
} | |
} | |
for (int i=0;i<q;i++) { | |
int x,y; | |
cin >> x >> y; | |
cout << a[x][y] << endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment