[20260316] BOJ / G4 / 사냥꾼 / 이준희#2025
Merged
ShinHeeEul merged 1 commit intomainfrom Mar 16, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/8983
🧭 풀이 시간
50분
👀 체감 난이도
✏️ 문제 설명
xy 평면의 x축에 사대(총쏘는 곳)이 있고 평면 어딘가에 동물이 존재합니다.
사대에서 총은 어느 방향으로든 쏠 수 있으며 사정거리가 존재합니다.
지도와 총의 위치, 동물의 위치가 주어졌을 때 잡을 수 있는 동물의 수를 구하는 문제입니다.
🔍 풀이 방법
각 동물마다 가장 가까운 사대를 찾은 후, 거리를 측정하는 방식으로 진행했습니다.
동물과 사대의 갯수가 최대 각 10만개라 크기 때문에 이분탐색을 통해 찾았습니다.
⏳ 회고
처음에는 쉬운 접근 방식으로 사대마다 동물 별 거리를 측정하여 잡을 수 있는지 없는지 플래그를 통해 유지하는 방식으로 구현하였는데
전체 100점 중 60점을 맞아서 시간이 문제인 것 같아서 다른 방식을 도출해야 했습니다.