Advertisement
xDefo

Aracnide

May 9th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <vector>
  4. #include <queue>
  5.  
  6. using namespace std;
  7.  
  8. vector < vector<int> > adj; //Lista di adiacenza
  9. int N,M; //N numero nodi, M numero archi
  10.  
  11. void crea_Lista_Adiacenza ()
  12. {
  13. for(int i=0;i<M;i++)
  14. {
  15. int temp;
  16. int temp1;
  17. cin>>temp;
  18. cin>>temp1;
  19. adj[temp].push_back(temp1);
  20. adj[temp1].push_back(temp);
  21. }
  22. }
  23.  
  24. BFS(int ricercato)
  25. {
  26.  
  27. }
  28.  
  29.  
  30.  
  31. int main()
  32. {
  33. //Aperture File .txt
  34. freopen("input.txt","r",stdin);
  35. freopen("output.txt","w",stdout);
  36. cin>>N;
  37. cin>>M;
  38. crea_Lista_Adiacenza();
  39. return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement