Advertisement
EWTD

Untitled

Mar 14th, 2020
423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. // Example program
  2. #include <iostream>
  3. #include <vector>
  4. using namespace std;
  5.  
  6. int main(){
  7. int n, m;
  8. cin >> n >> m;
  9. vector<vector<int>> vec(n);
  10. for(int i = 0;i < m; ++i){
  11. int a,b;
  12. cin >> a >> b;
  13. a--;b--;
  14. vec[a].push_back(b);
  15. vec[b].push_back(a);
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement