#include using namespace std; const int N=1010; bool inq[N][N]; //bool d[N][N]; struct node{ int x,y; node(int _x,int _y){ x=_x; y=_y; } }; vector vis; void dfs(int x,int y,int &num,int n,vector v){ if(x==n&&y==n){ num++; int len=v.size(); for(int i=0;i