#include <iostream> using namespace std; #include <bits/stdc++.h> const vector<pair<int,int>>dirs = {{1,0},{0,1},{-1,0},{0,-1}};//顺时针右下左上 pair<int,int> fa[15][15]; void dfs(int x,int y){ if(x==0&&y==0)return; auto t = fa[x][y]; dfs(t.first,t.second);...