Skip to content

Commit b0f926e

Browse files
authored
Update 3.py
1 parent 63981ee commit b0f926e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

13/3.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from collections import deque
2+
23
n, k = map(int, input().split())
34

4-
# N x N 크기의 보드 전체를 0으로 초기화
5-
board = []
6-
data = []
5+
board = [] # 전체 보드 정보를 담는 리스트
6+
data = [] # 바이러스에 대한 정보를 담는 리스트
77

88
for i in range(n):
99
# 보드 정보를 한 줄 단위로 입력
@@ -35,7 +35,7 @@
3535
ny = y + dy[i]
3636
# 해당 위치로 이동할 수 있는 경우
3737
if 0 <= nx and nx < n and 0 <= ny and ny < n:
38-
# 방문한 적 없다면, 그 위치에 바이러스 넣기
38+
# 아직 방문하지 않은 위치라면, 그 위치에 바이러스 넣기
3939
if board[nx][ny] == 0:
4040
board[nx][ny] = virus
4141
q.append((virus, s + 1, nx, ny))

0 commit comments

Comments
 (0)