[20251001] ETC / 삼성 SW 평가 기출 / 가로등 설치 / 이종환#1016
Merged
ShinHeeEul merged 1 commit intomainfrom Oct 1, 2025
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.codetree.ai/ko/frequent-problems/samsung-sw/problems/street-light-installation/description
🧭 풀이 시간
120분
👀 체감 난이도
✏️ 문제 설명
문제가 굉장히 깁니다. 링크 참고 부탁드려요
🔍 풀이 방법
B형을 응시해본 사람이라면 익숙한 양식의 문제이다.
Node와, 두개의 Node로 구성된 Edge(길), 이렇게 두 개의 커스텀 클래스를 만들어서 문제에 접근하였다.
여기서의 핵심은 레이지하게 삭제를 적용한다는 것이다. PQ에 넣어놓은 것을 전부 꺼내서 지울 수 없으니, 삭제 요청이 들어오면 객체의 상태를 나타내는 isAlive만 false로 바꾸었다.
⏳ 회고
문제 제대로 안읽었다가 40분 날렸다... 집중했으면 한시간 컷 냈을수도...