Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. const int n = 3, graph[3][3] = {{0, 1, 1},
  4.                                 {0, 0, 1},
  5.                                 {1, 0, 0}};
  6.  
  7. int main() {
  8.         for(int i = 0; i < n; ++i)
  9.                 for(int j = 0; j < n; ++j)
  10.                         if(graph[i][j]) {
  11.                                 // i is connected with j
  12.                         }
  13.         return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement