#include #include using namespace std; typedef long long LL; int X,Y; bool Check(vector> &myVec,int x,int y) { myVec.push_back(make_pair(x-2,y-1)); myVec.push_back(make_pair(x-2,y+1)); myVec.push_back(make_pair(x-1,y-2)); myVec.push_back(make_pair(x-1,y+2)); myVec.push_back(make_pair(x+1,y-2)); myVec.push_back(make_pair(x+1,y+2)); myVec.push_back(make_pair(x+2,y-1)); myVec.push_back(make_pair(x+2,y+1)); int i; for (i=0;i> myVec1; bool canGo=Check(myVec1,x,y); if (canGo){ return true; } vector> myVec2; int i; for (i=0;i> myVec3; for (i=0;i>X>>Y; canGoTo(0,0); return 0; }