Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

[2023-09-18] sumin #236 #248

Merged
merged 1 commit into from
Sep 19, 2023
Merged

[2023-09-18] sumin #236 #248

merged 1 commit into from
Sep 19, 2023

Conversation

ksumini
Copy link
Contributor

@ksumini ksumini commented Sep 18, 2023

PR Summary

풀이 시간: 5분

<input>
maps: n x m크기의 게임 맵의 상태가 들어있는 2차원 배열

  • n과 m은 1이상 100이하의 자연수
  • n과 m은 서로 같을 수도, 다를 수도 있지만, n과 m이 모두 1인 경우는 입력으로 주어지지 않는다.
  • maps는 0(벽)과 1(벽이 없는 자리)로만 이루어져 있다.
  • 처음 캐릭터는 좌상단 (1, 1) 위치에 있으며, 상대방 진영은 게임 맵의 우측 하단(n, m) 위치에 있다.

<solution>
BFS를 통해 시작점(1, 1)에서 도착점(n, m)까지의 최단 거리를 구할 수 있다.

<시간복잡도>
O(NM): 최악의 경우 모든 칸을 방문해야 한다.

Copy link
Contributor

@limstonestone limstonestone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

결과값 반환하는 부분이 저랑 비슷하네요!!! ㅋㅋㅋ
풀이시간 5분은 충격입니다 저도 체화될때까지 열심히 정진하겠슴다...ㅎ
고생하셨습니다!!

Copy link
Contributor

@zsmalla zsmalla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

단순한 그래프 탐색 따위.. 아픈 수민님께는 5분 컷이군요;; 그럼에도 코드 상으로 피드백 드릴게 없습니다. 저 같은 경우 33번 라인에서 탐색 성공 여부를 반환했는데 이러면 불필요한 탐색을 아주 조금 줄일 수 있을 것 같다는 생각이었습니다. 고생하셨습니다 수민님!

Copy link
Member

@Woo-Yeol Woo-Yeol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

풀이 내용이 정말 똑같아서 너무 놀랐습니다! 거리를 기억하는 방법까지 같은 방법을 생각해냈다는 것이 제가 효율적인 방법을 잘 찾았다는 반증이었던 것 같아 좋았습니다 ㅎㅎ

@@ -0,0 +1,78 @@
"""
풀이 시간: 5분
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5분?!?!?! 혹시 수민님 타자가 몇타라고 하셨죠....?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

한 5~600타 나오는거같은데용..?! BFS는 워낙 외워서..

@ksumini ksumini linked an issue Sep 18, 2023 that may be closed by this pull request
@ksumini
Copy link
Contributor Author

ksumini commented Sep 18, 2023

단순한 그래프 탐색 따위.. 아픈 수민님께는 5분 컷이군요;; 그럼에도 코드 상으로 피드백 드릴게 없습니다. 저 같은 경우 33번 라인에서 탐색 성공 여부를 반환했는데 이러면 불필요한 탐색을 아주 조금 줄일 수 있을 것 같다는 생각이었습니다. 고생하셨습니다 수민님!

오 그러네요 지수님! 정신이 없으니까 의식의 흐름대로 코드짜기..ㅎㅎ

@ksumini ksumini merged commit 1cac552 into main Sep 19, 2023
@ksumini ksumini deleted the sumin-#236 branch September 19, 2023 10:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Programmers] 게임 맵 최단거리
4 participants