SWEA 1954 달팽이 숫자 #include #include using namespace std; #define endl "\n" #define MAX 11 bool check[MAX][MAX]; int map[MAX][MAX]; int tc; int n, k; const int dy[] = {0, 1, 0, -1}; const int dx[] = {1, 0, -1, 0}; void rotate(int y, int x, int dir, int num){ check[y][x] = true; map[y][x] = num; int ny = y + dy[dir]; int nx = x + dx[dir]; if(nx = n || nx >= n || check[ny][nx] == 1){ dir ..