#include <iostream> using namespace std; const int N = 1e3 + 10; int arr[N][N]; // 方向向量 - 右、左下、下、右上 int dx[] = {0, 1, 1, -1}; int dy[] = {1, -1, 0, 1}; int main() { int n; cin >> n; int cnt = 1; // 从 1 开始输出 int pos = 0; // 方向向量下标 int x = 1, y = 1; // 初始位置 int flag = 0, cn = 0; // cn 统计同一...