[20251003] BOJ / G5 / MooTube (Silver) / 이준희 #1028
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧷 문제 링크
https://www.acmicpc.net/problem/15591
🧭 풀이 시간
40분
👀 체감 난이도
✏️ 문제 설명
동영상들과 각 동영상들의 유사도가 주어집니다.
두 동영상의 유사도는 연결된 동영상들의 유사도 중 최솟값으로 칠 때 (말이 어려우니 문제 참고)
V 동영상을 보고 있을 때 V 동영상과 유사도가 K 이상인 동영상의 갯수를 구하는 문제입니다.
🔍 풀이 방법
BFS 를 이용해서 각 질문마다 cost 값을 정하여 그 cost 이상으로만 지나갈 수 있게 하였습니다.
⏳ 회고
처음에 그냥 모든 경로를 플로이드로 초기화 해버리려고 했는데 시간 초과가 났습니다.