[20250615] BOJ / G3 / 공주님의 정원 / 김수연 #357
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/2457
🧭 풀이 시간
40분
👀 체감 난이도
✏️ 문제 설명
정원에 꽃을 심으려고 할 때,
만족할 때, 선택한 꽃들의 최소 개수 구하기
🔍 풀이 방법
꽃들을 시작 날짜의 오름차순으로 정렬하고, 같을 때는 끝 날짜의 내림차순으로 정렬
이후, 이전 꽃의 끝 날짜 이전에 피면서, 가장 오랜 시간 펴 있는 꽃을 선택함
⏳ 회고
뭔가 헷갈렸는데 하고 나면 별로 안어려운 느낌