Given a positive integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.
n*n
执行用时 :8 ms, 在所有 C++ 提交中击败了68.59%的用户 内存消耗 :9 MB, 在所有 C++ 提交中击败了42.07%的用户