1 | if (M >= 2 && N >= 3) |
2 | for (int c0 = 2; c0 < O; c0 += 1) { |
3 | for (int c2 = 2; c2 <= M; c2 += 1) |
4 | S1(c0, 2, c2); |
5 | for (int c1 = 3; c1 < N; c1 += 1) { |
6 | for (int c2 = 2; c2 <= M; c2 += 1) |
7 | S2(c0, c1 - 1, c2); |
8 | if (M >= 3) |
9 | S4(c0, c1 - 1, 2); |
10 | for (int c2 = 2; c2 < M - 1; c2 += 1) { |
11 | S3(c0, c1 - 1, c2); |
12 | S5(c0, c1 - 1, c2); |
13 | S4(c0, c1 - 1, c2 + 1); |
14 | } |
15 | if (M >= 3) { |
16 | S3(c0, c1 - 1, M - 1); |
17 | S5(c0, c1 - 1, M - 1); |
18 | } |
19 | for (int c2 = 2; c2 <= M; c2 += 1) |
20 | S1(c0, c1, c2); |
21 | } |
22 | for (int c2 = 2; c2 <= M; c2 += 1) |
23 | S2(c0, N - 1, c2); |
24 | if (M >= 3) |
25 | S4(c0, N - 1, 2); |
26 | for (int c2 = 2; c2 < M - 1; c2 += 1) { |
27 | S3(c0, N - 1, c2); |
28 | S5(c0, N - 1, c2); |
29 | S4(c0, N - 1, c2 + 1); |
30 | } |
31 | if (M >= 3) { |
32 | S3(c0, N - 1, M - 1); |
33 | S5(c0, N - 1, M - 1); |
34 | } |
35 | } |
36 | |