[20250712] BOJ / P5 / 정다각형 선분 / 권혁준 #448
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/13436
🧭 풀이 시간
60분
👀 체감 난이도
✏️ 문제 설명
정N각형의 어느 한 점에서 시작해서 다른 모든 꼭짓점을 한 번씩 찍고 시작점으로 돌아오려 한다.
이 때 그려지는 각 선분은 반드시 이전에 지나온 선분 중 하나와 교차해야 한다.
시작점으로부터 M-1개의 선분이 이미 그려져있을 때, 남은 경로를 정하는 방법의 수를 구해보자.
🔍 풀이 방법
문제 생긴 게 외판원 순회 문제처럼 생겨서 그대로 풀었다.
⏳ 회고
이미 그려진 선분과 교차해야한다는 조건 떄문에 dp전이 조건 세우기가 까다로웠다.
문제가 너무 TSP라고 대놓고 써있는 게 좀 아쉬움