2 for (int c1
= -4; c1
<= 3 * M
+ N
; c1
+= 1) {
3 if (3 * M
+ N
>= c1
+ 1 && c1
>= 3 * M
) {
5 } else if (3 * M
>= c1
+ 4 && (c1
- 2) % 3 == 0)
7 for (int c3
= max(-3 * M
+ c1
+ 3, (c1
+ 6) % 3); c3
<= min(N
- 1, c1
); c3
+= 3) {
9 S1(((c1
- c3
) / 3) + 1, c3
+ 1);
11 if (c1
>= N
&& (N
- c1
) % 3 == 0) {
13 } else if (N
>= c1
+ 4 && c1
>= -3)
15 for (int c3
= max(-3 * M
+ c1
, (c1
+ 6) % 3); c3
<= min(N
, c1
); c3
+= 3)
16 S3((c1
- c3
) / 3, c3
);