Skip to content

Commit 57991b1

Browse files
committed
2 parents 84269fc + 89cdfdd commit 57991b1

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

13/7.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from collections import deque
22

3-
# 땅의 크기(N), L, R 값을 입력 받기
3+
# 땅의 크기(N), L, R 값을 입력받기
44
n, l, r = map(int, input().split())
55

66
# 전체 나라의 정보(N x N)를 입력 받기
@@ -11,14 +11,12 @@
1111
dx = [-1, 0, 1, 0]
1212
dy = [0, -1, 0, 1]
1313

14-
result = 0
15-
1614
# 특정 위치에서 출발하여 모든 연합을 체크한 뒤에 데이터 갱신
1715
def process(x, y, index):
1816
# (x, y)의 위치와 연결된 나라(연합) 정보를 담는 리스트
1917
united = []
2018
united.append((x, y))
21-
# 너비 우선 탐색 (BFS)을 위한 큐 자료구조 정의
19+
# 너비 우선 탐색 (BFS)을 위한 큐 라이브러리 사용
2220
q = deque()
2321
q.append((x, y))
2422
union[x][y] = index # 현재 연합의 번호 할당
@@ -44,7 +42,6 @@ def process(x, y, index):
4442
# 연합 국가끼리 인구를 분배
4543
for i, j in united:
4644
graph[i][j] = summary // count
47-
return count
4845

4946
total_count = 0
5047

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
* [문자열 뒤집기](https://www.acmicpc.net/problem/1439) (핵심 유형): [Python 3.7 코드](/11/3.py)
165165
* 만들 수 없는 금액 (K 대회 기출): [Python 3.7 코드](/11/4.py)
166166
* 볼링공 고르기 (S 기관 입학 테스트): [Python 3.7 코드](/11/5.py)
167-
* [무지의 먹방 라이브](https://www.acmicpc.net/problem/2437) (카카오): [Python 3.7 코드](/11/6.py)
167+
* [무지의 먹방 라이브](https://programmers.co.kr/learn/courses/30/lessons/42891) (카카오): [Python 3.7 코드](/11/6.py)
168168

169169
#### 12장 구현
170170

0 commit comments

Comments
 (0)