#include <iostream> using namespace std; //利用边界条件之间的关系进行条件判断,赋值,分两步进行 //1.将方阵分为外层,内层 //2.对外层进行赋值,完成后,内层变为外层 ,重复 int main() { int n, up, down, right, left, count = 1; scanf("%d",&n); int map[n][n]; up = 0, right = n - 1, left = 0, down = n - 1; while (up < d...