{{{~cpp #include using namespace std; const int MAX = 20; int main() { int board[MAX][MAX]={0,}; int x, y ; int garo, sero; char direction[MAX]; int total=0; int count =0 ; int bang =0; cout << "판의 크기를 입력하세요(행, 열) : " ; cin >> sero >> garo ; cout << "처음 시작 위치를 입력하세요(행, 열) : " ; cin >> y >> x ; cout << "방향을 입력하세요(0은 북쪽방향, 시계 방향으로 1~7, 끝내기 999) : " ; for(int D=0;D> direction[D]; count++; if(direction[D-2]=='9' && direction[D-1]=='9' && direction[D]=='9') { count-=3 ; break; } } board[x][y]=1; for(bang = 0 ; bang