1926번: 그림
https://www.acmicpc.net/problem/1926 #include #include #include using namespace std; int n, m; vector graph; vector visited; int dx[] = { -1, 1, 0, 0 }; int dy[] = { 0, 0, -1, 1 }; int maxSize = 0; int dfs(int x, int y) { visited[x][y] = true; int area = 1; for (int i = 0; i = 0 && ny >= 0 && nx < n && ny < m && graph[nx][ny] == 1 && !v..