Advertisement
Guest User

Untitled

a guest
Dec 9th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. #include <omp.h>
  4. #define ceild(n,d) ceil(((double)(n))/((double)(d)))
  5. #define floord(n,d) floor(((double)(n))/((double)(d)))
  6. #define max(x,y) ((x) > (y) ? (x) : (y))
  7. #define min(x,y) ((x) < (y) ? (x) : (y))
  8.  
  9. #define i c2 // zgodnie z pierwszym elementem pseudoinstrtukcji (c2,c3);
  10. #define j c3 // zgodnie z drugim elementem pseudoinstrtukcji (c2,c3);
  11.  
  12.  
  13. int main() {
  14. const int n = 100;
  15. int c0,c1,c2,c3;
  16. int a[n][n];
  17. for (c0 = 0; c0 <= floord(3 * n - 6, 32); c0 += 1)
  18. for (c1 = max(0, floord(-n + 32 * c0 + 1, 64) + 1); c1 <= min((n - 2) / 32, c0 / 2); c1 += 1)
  19. for (c2 = 32 * c0 - 64 * c1 + 2; c2 <= min(n, 32 * c0 - 64 * c1 + 32); c2 += 1)
  20. for (c3 = 32 * c1 + 2; c3 <= min(n, 32 * c1 + 32); c3 += 1)
  21. a[i][j] = a[i-2][j-2];
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement