[C++] 프로그래머스 문제풀이 LEVEL 2 리코쳇 로봇
https://school.programmers.co.kr/learn/courses/30/lessons/169199 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr #include using namespace std; std::pair move(std::vector & board, int y, int x, int dir){ const int dy[] = {-1, 1, 0, 0}; const int dx[] = {0, 0, -1, 1}; while(y >= 0 && y = 0 && x < board[y].size() &&..
[C++] 프로그래머스 문제풀이 LEVEL 2 무인도 여행
https://school.programmers.co.kr/learn/courses/30/lessons/154540 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr #include #include #include #include #include using namespace std; vector answer; bool check[101][101]; int dx[] = {0,0,-1,1}; int dy[] = {-1,1,0,0}; void bfs(vector maps, int k, int j) { queue q; q.push({k,j}); check[k][j]..