백준 7562번 나이트의 이동
https://www.acmicpc.net/problem/7562 아이디어:1. 방향 dx, dy를 나이트의 이동에 맞게 변경하고 거리를 기록하는 BFSint dx[8] = { 2, 1, -1, -2, -2, -1, 1, 2 }; int dy[8] = { 1, 2, 2, 1, -1, -2, -2, -1 }; #include #include using namespace std;int board[301][301];int vis[301][301];int dx[8] = { 2, 1, -1, -2, -2, -1, 1, 2 };int dy[8] = { 1, 2, 2, 1, -1, -2, -2, -1 };int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); ..