回答編集履歴
1
コードの修正
test
CHANGED
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
a[n/2][n/2] = 1;
|
32
32
|
|
33
|
-
for (int v = n * n, i = 0, j = n - 1; n >
|
33
|
+
for (int v = n * n, i = 0, j = n - 1; n > 1; n -= 2, i++, j--) {
|
34
34
|
|
35
35
|
for (int k = n; --k > 0; ) a[i][j--] = v--;
|
36
36
|
|