[Baekjoon][17837] 새로운 게임 2
출처 - 백준사이트 17837번: 새로운 게임 2 나의 풀이 이 문제는 어렵지는 않으나 구현할때 어떤 형태로 구현할지 생각하는게 중요한 문제인 것 같다. 나는 Map을 만들때, 맵의 색깔과 맵에 쌓여있는 말들을 list 자료구조로 만들어서 구현하였다. #include #include #include #define MAX_SIZE 12 using namespace std; const int dy[] = {0, 0, -1, 1}; const int dx[] = {1, -1, 0, 0}; typedef struct _hores { _hores(int x, int y, int dir) : x(x), y(y), dir(dir) {} ~_hores() {} int x; int y; int dir; } Horse; ..
2022. 2. 23.