We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63981ee commit b0f926eCopy full SHA for b0f926e
13/3.py
@@ -1,9 +1,9 @@
1
from collections import deque
2
+
3
n, k = map(int, input().split())
4
-# N x N 크기의 보드 전체를 0으로 초기화
5
-board = []
6
-data = []
+board = [] # 전체 보드 정보를 담는 리스트
+data = [] # 바이러스에 대한 정보를 담는 리스트
7
8
for i in range(n):
9
# 보드 정보를 한 줄 단위로 입력
@@ -35,7 +35,7 @@
35
ny = y + dy[i]
36
# 해당 위치로 이동할 수 있는 경우
37
if 0 <= nx and nx < n and 0 <= ny and ny < n:
38
- # 방문한 적 없다면, 그 위치에 바이러스 넣기
+ # 아직 방문하지 않은 위치라면, 그 위치에 바이러스 넣기
39
if board[nx][ny] == 0:
40
board[nx][ny] = virus
41
q.append((virus, s + 1, nx, ny))
0 commit comments