Advertisement
Guest User

Untitled

a guest
Jan 20th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void dfs(int v){
  5. if (color[v] != 0) {
  6. return;
  7. }
  8. color[v]=1
  9. for (int i=0;i<n;i++){
  10. if (a[v][i]&&color[v]==0){
  11. dist[i] = dist[v]+1; dfs(i);
  12. }
  13. }
  14. color[v]=z;
  15. }
  16.  
  17. int main(){
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement