백준 1986 체스
#define _CRT_SECURE_NO_WARNINGS #include #include #include #include using namespace std; int N, M; int map[1002][1002]; int chess; int x, y; int cnt; int dy[8] = { 1, 0, -1, 0, 1, -1,1,-1 }; int dx[8] = { 0, 1, 0, -1 ,1 ,-1, -1,1 }; queue q; vector queen; vector knight; void goknight(int x, int y) { for (int i = 0; i < 4; i++) { int cx = x + dx[i] * 2; int cy = y + dy[i] * 2; i..
2020. 2. 11.