[20250212] BOJ / 골드5 / Z / 설진영 #98
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/1074
🧭 풀이 시간
40분
👀 체감 난이도
✏️ 문제 설명
Z 모양으로 탐색하면서 내려간다고 했을때, 크기와 순서를 알고싶은 좌표를 말하면 몇번째인지 뱉기
🔍 풀이 방법
재귀로 풀었다. 각 사분면의 왼쪽 위 첫번째 값을 기준으로 하고, 어느 사분면으로 들어가야하는지 판단하며너 N-- 하다가 N == 1이 탈출 조건.
⏳ 회고
다른건 다 좋았는데, 사분면을 타고 들어가는 경우에 찾고자 하는 좌표값도 같이 업데이트를 해야한다는 것을 간과함 근데 예제 6개중에서 계속 5개는 다 맞아서....