SHARE
TWEET

Untitled

heian May 25th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. ///problema Zparcurgere
  6.  
  7. int matrice[1<<7][1<<7];
  8.  
  9. int val;
  10.  
  11. void Parcurgere(int x1, int y1, int x2, int y2)
  12. {
  13.     if(y2-y1+1==1)//latura este 1
  14.     {
  15.         matrice[x1][y1]=val;
  16.         val++;
  17.         return;
  18.     }
  19.     int mx = (x1+x2)/2;
  20.     int my = (y1+y2)/2;
  21.  
  22.     Parcurgere(x1, y1, mx, my);
  23.     Parcurgere(x1, my+1,mx,y2);
  24.     ///...
  25.     ///...
  26. }
  27.  
  28. int main()
  29. {
  30.     val = 1;
  31.     return 0;
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top