#include #include #include using namespace std; vectorA; int curr, curc; int dr[4] = { 0,1,0,-1 }; int dc[4] = { -1,0,1,0 }; //격자 밖으로 나간 모래의 양 int ans = 0; int N; int dx[4][10] = { {-1,1,-2,2,-1,1,-1,1,0,0},{0,0,0,0,-1,-1,1,1,2,1},{-1,1,2,-2,1,-1,1,-1,0,0},{0,0,0,0,1,1,-1,-1,-2,-1} }; int dy[4][10] = { {0,0,0,0,1,1,-1,-1,-2,-1},{-1,1,-2,2,-1,1,-1,1,0,0} ,{0,0,0,0,-1,-1,1,1,2,1} ,{1,-1,2,-2,1,-1,..