백준4963)섬의 개수-python
https://www.acmicpc.net/problem/4963 import sys read = sys.stdin.readline sys.setrecursionlimit(10000) def dfs(x,y,visit,arr): visit[x][y] = True dx = [0,0,1,-1,-1,-1,1,1] dy = [1,-1,0,0,-1,1,-1,1] for i in range(len(dx)): nx = dx[i] + x ny = dy[i] + y if (0