C++ 16948 데스나이트
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 #include #include #include #include using namespace std; int g[501][501] = {0}; bool visit[501][501] = {0}; int dx[6] = { -2,-2,0,0,2 ,2}; int dy[6] = { -1,1,-2,2 ,-1,1}; int n, m,k,r1,r2,c1,c2; int wolf = 0; int sheep = 0; int bfs(int x,int y) { queue a; a..
2023. 2. 24.