Skip to content

Commit fc711df

Browse files
committed
update 17836
1 parent 657a8d3 commit fc711df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

week16/bsw/17836_공주님을 구해라.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
continue
2828

2929
# 칼
30+
# 칼을 들고 도착지에 도달하는데 걸리는 시간 =
31+
# 지금까지 걸린시간 + 다음칸 이동시간 1 + 칼 위치부터 종료지점까지 가는데 걸리는시간
3032
if graph[nr][nc] == 2:
3133
answer2 = times[r][c] + 1 + ((N-1)-nr) + ((M-1)-nc)
3234

@@ -37,6 +39,7 @@
3739
# print(graph)
3840
# print(times)
3941

42+
# 칼을 만난 경우와 안 만난 경우의 시간 비교
4043
times[N-1][M-1] = min(times[N-1][M-1], answer2)
4144

4245
if times[N-1][M-1] > T:

0 commit comments

Comments
 (0)