#include<bits/stdc++.h> using namespace std; const int Max=30; int p,q; int derection[8][2]= {{-1,-2},{1,-2},{-2,-1},{2,-1},{-2,1},{2,1},{-1,2},{1,2}}; bool visit[Max][Max]; bool DFS(int x,int y,int step,string str) { if(step==p*q) { cout<<str<<endl<<endl; ...