[프로그래머스] 게임 맵 최단거리
문제설명 https://school.programmers.co.kr/learn/courses/30/lessons/1844 코드 #include #include #include using namespace std; int visited[101][101]={}; int dx[4]= {-1,1,0,0}; int dy[4]= {0,0,-1,1}; int solution(vector maps) { int answer = 0; queue q; q.push({0,0}); visited[0][0] = 1; while(!q.empty()){ int x = q.front().first; int y = q.front().second; q.pop(); for(int i=0; i< 4; i++){ int nx = x + dx[..