Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool checkSimpleWay(int source, int dest) {
- for (int i = 1; i < v[source].size(); i++) {
- for (int j = 1; j < v[i].size(); j++) {
- if (i == j) continue;
- if (v[i] == dest) {
- return true;
- }
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement