백준 2583번 C++
#include #include #include #include using namespace std; int M, N, K;int arr[100][100];int visited[100][100];int ans[100];int counts; typedef struct {int x;int y;}Move;Move m[4] = { {1,0},{-1,0},{0,1},{0,-1} }; void dfs(int a, int b) {visited[a][b] = 1;counts += 1; for (int i = 0; i = 0 && ma = 0 && mb < N) {if (arr[ma][mb] =..
2019. 1. 8.