Skip to content

Conversation

@suyeun84
Copy link
Contributor

🧷 문제 링크

https://school.programmers.co.kr/learn/courses/30/lessons/72413

🧭 풀이 시간

20분

👀 체감 난이도

✏️ 문제 설명

두사람이 출발지 S에서 도착지 A, B를 가려고 할 때, 택시를 합승함으로써 예상 최저 택시 가격 구하기

🔍 풀이 방법

플로이드워셜 이용
각 지점에 가는데 걸리는 비용 저장해두고, 임의의 지나는 지점 k를 두고, 3중 for문 돌림
그리고 1. s->a + s->b 2. s->a->b 3. s->b->a 이 3개의 경우 중에서 가장 적게 걸리는 가격 return

⏳ 회고

보자마자 플로이드워셜이 보였다

@suyeun84 suyeun84 self-assigned this Sep 24, 2025
@suyeun84 suyeun84 added the success 👍 해설을 보지 않고 풀었을 때 label Sep 24, 2025
@suyeun84 suyeun84 merged commit 2985df6 into main Sep 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants