Advertisement
Guest User

Untitled

a guest
Jan 21st, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. for (int c0 = 0; c0 < floord(n + 1, 2); c0 += 1)
  2. for (int c1 = 0; c1 < (n + 1) / 2; c1 += 1) {
  3. if (n >= 2 * c1 + 2) {
  4. for (int c2 = 2 * c0 + 1; c2 <= min(n, 2 * c0 + 2); c2 += 1) {
  5. for (int c3 = 2 * c1 + 1; c3 <= 2 * c1 + 2; c3 += 1)
  6. (c0, c1, c2, c3);
  7. if (c0 == 0 && n >= c1 + 6 && c1 <= 1)
  8. for (int c3 = max(5, c1 + c2 + 3); c3 < n; c3 += 1)
  9. if ((c1 == 1 && (c3 % 3) + c2 >= 2 && c3 % 3 <= 1) || (c1 == 0 && (c3 + 1) % 3 == 0) || (c1 == 1 && c2 == 1 && c3 % 3 <= 1))
  10. (0, c1, c2, c3);
  11. }
  12. if (n >= 6 && c0 == 0 && c1 == 0) {
  13. for (int c2 = 3; c2 < n; c2 += 1)
  14. for (int c3 = 2; c3 < n; c3 += 1)
  15. if (2 * c3 >= c2 + 6 * floord(-c2 + 2 * c3 + 2, 6) + 2)
  16. (0, 0, c2, c3);
  17. } else if (n == 6 && c0 == 0 && c1 == 2) {
  18. (0, 2, 3, 4);
  19. }
  20. } else if (n >= 2 * c0 + 3) {
  21. for (int c2 = 2 * c0 + 1; c2 <= 2 * c0 + 2; c2 += 1)
  22. (c0, (n - 1) / 2, c2, n);
  23. }
  24. if (n <= 6 && c0 == 0 && c1 == 2) {
  25. for (int c2 = n - 2; c2 < n; c2 += 1) {
  26. if (n == 6) {
  27. (0, 2, c2, -2 * c2 + 12);
  28. if (c2 == 5)
  29. (0, 2, 5, 5);
  30. } else {
  31. (0, 2, c2, 3);
  32. }
  33. }
  34. } else if (c0 == 0 && c1 == 1) {
  35. for (int c2 = 3; c2 < n; c2 += 1) {
  36. if (n >= 6) {
  37. if (c2 == 3) {
  38. (0, 1, 3, 2);
  39. if (n >= 7)
  40. (0, 1, 3, 4);
  41. }
  42. for (int c3 = max(2, -3 * c2 + (c2 + 1) / 2 + 12); c3 < n; c3 += 1)
  43. if ((5 * c2 + 2 * c3 - 2) % 6 >= 4 || (2 * n >= ((5 * c2 + 2 * c3 - 2) % 6) + 11 && (5 * c2 + 2 * c3 - 2) % 6 >= 2))
  44. (0, 1, c2, c3);
  45. } else {
  46. (0, 1, c2, 2);
  47. }
  48. }
  49. }
  50. if (2 * c0 + 1 == n && 2 * c1 + 1 == n)
  51. ((n - 1) / 2, (n - 1) / 2, n, n);
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement