#include using namespace std; int dy[6] = {-1, 1, 2, 1, -1, -2}; int dx[6] = {-2, -2, 0, 2, 2, 0}; string bfs(int n, vector path, vector>& flag, vector vx, vector vy, int i_end, int j_end){ if(path.size() == 0) return ""; vector nextx; vector nexty; vector path2; for(int i = 0; i < path.size(); i++){ int x = vx[i]; int y = vy[i]; //cout<<"Move " << path[i].size() <<" Now at ["<=0 && newy >=0 && newx < n && newy < n && !flag[newx][newy]){ flag[newx][newy] = true; nextx.push_back(newx); nexty.push_back(newy); path2.push_back(p); //cout<<" ->["< path; vector > flag(n, vector(n, false)); vector vx; vector vy; vx.push_back(i_start); vy.push_back(j_start); path.push_back(""); flag[i_start][j_start] = true; string p = bfs(n, path, flag, vx, vy, i_end, j_end); //cout<<"p=" << p << endl; if(p=="") cout<<"Impossible"<> n; int i_start; int j_start; int i_end; int j_end; cin >> i_start >> j_start >> i_end >> j_end; printShortestPath(n, i_start, j_start, i_end, j_end); return 0; }