[20260109] BOJ / G4 / 두 로봇 / 한종욱 #1780
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/15971
🧭 풀이 시간
30분
👀 체감 난이도
✏️ 문제 설명
두 로봇의 현재 위치가 입력으로 주어질 때, 서로 통신하기 위해 이동해야 하는 거리의 합의 최솟값을 구하시오.
🔍 풀이 방법
BFS로 도착하는 경로를 구하고 해당 경로의 최대 가중치를 함께 전달한 다음 도착했을 때, 누적 가중치 합에서 최대 가중치를 뺀다.
⏳ 회고
색다르게 표현한 문제라 재밌었다.