[PCCP 기출문제] 2번 > 석유 시추 - Python, bfs, 누적합
https://school.programmers.co.kr/learn/courses/30/lessons/250136 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr 코드 & 풀이 from collections import dequedef solution(land): n, m = len(land), len(land[0]) visited = [[False] * m for _ in range(n)] def find_oil(i, j): direct = [(-1, 0), (1, 0), (0, -1), (0, 1)] q = deque([(i, j)])..
2025. 2. 27.