Advertisement
MickyOr

Untitled

Dec 20th, 2016
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. int Q[4] = {1,-1,0,0};
  2. int W[4] = {0,0,1,-1};
  3.  
  4. void dfs(int x, int y)
  5. {
  6.     //.....
  7.     for (int i = 0; i < 4; i++)
  8.     {
  9.         int a = x + Q[i], b = y + W[i];
  10.         //(a,b) es vecino de (x,y)
  11.         /*
  12.         .
  13.         .
  14.         .
  15.         */
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement