Created
March 11, 2019 11:47
-
-
Save Pranavpaharia/1df652a087d0a9fb9d362ca8156c0b8f to your computer and use it in GitHub Desktop.
This file contains 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
vector<vector <long int>> ArrayList; | |
long int Nelements, nQueries; | |
long int q1, q2, p1, p2; | |
cin >> Nelements >> nQueries; | |
vector<long int> cList; | |
long int a1, a2; | |
//for(vector <vector<long int>>::iterator it = ArrayList.begin();it != ArrayList.end();++it) | |
for (long int i = 0; i < Nelements; i++) | |
{ | |
cList.clear(); | |
int parameter; | |
cin >> parameter; | |
for (long int j = 0; j < parameter; j++) | |
{ | |
long int data; | |
cin >> data; | |
cList.push_back(data); | |
} | |
ArrayList.push_back(cList); | |
} | |
cin >> q1 >> q2; | |
cin >> p1 >> p2; | |
cList = ArrayList.at(q1); | |
a1 = cList.at(q2); | |
cList.clear(); | |
cList = ArrayList.at(p1); | |
a2 = cList.at(p2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment