Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool f = false;
- for (int i = 0; i< v.size(); i++) {
- if (v[i][0] == a) {
- v[a].push_back(b);
- f = true;
- }
- }
- if (!f) {
- v.push_back(vector<int>());
- v[a].push_back(b);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement