Advertisement
Guest User

whip whip nae nae

a guest
Jan 19th, 2018
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2. #include<fstream>
  3.  
  4. using namespace std;
  5.  
  6. ifstream f ("adiacenta.in");
  7. ofstream g ("adiacenta.out");
  8. int n,m,a[100][100],i,j,elem;
  9. int main()
  10. { f>>n>>m;
  11. while(f>>i>>j){
  12.  
  13.  
  14.  
  15. a[i][j]=a[j][i]=1;
  16. }
  17. for(i=1;i<=n;i++)
  18. {
  19. for(j=1;j<=n;j++)
  20. g<< a[i][j]<<" ";
  21. g<<endl;
  22. }
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement