프로그래머스 키패드누르기 [c++] 2020 카카오 인턴십


프로그래머스 키패드누르기 [c++] 2020 카카오 인턴십

#include #include #include #include #include using namespace std; int map[4][3]; //키패드 배열 bool visited[4][3]; //방문확인 배열 int ax[4] = { 1,-1,0,0 }; //상하좌우 int ay[4] = { 0,0,1,-1 }; typedef struct { int x; int y; int cnt; }node; int bfs(int start, int target) //start는 현재 왼손 또는 오른손 엄지의 위치, target은 눌러야할 키패드 { queueq; int a, b; for (int i = 0; i < 4; i++) //현재 키패드의 좌표구하는 반복문 { for (int j = 0; j < 3; j..


원문링크 : 프로그래머스 키패드누르기 [c++] 2020 카카오 인턴십