그림

https://www.acmicpc.net/problem/1926   DFS  # 1926번: 그림(DFS)import syssys.setrecursionlimit(10**6)cnt = 0 # 그림의 개수max_area = 0 # 가장 넓은 그림의 넓이n, m = map(int, input().split())visited = [[False]* m for _ in range(n)]arr = []for _ in range(n): arr.append(list(map(int, input().split())))dx = [0, 0, 1, -1]dy = [1, -1, 0 , 0]def dfs(x, y): visited[x][y] = True global area for i in range(4):..
happenundo
'그림' 태그의 글 목록