[20250826] BOJ / G1 / 놀이 공원 / 김수연 #745
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/1561
🧭 풀이 시간
90분
👀 체감 난이도
✏️ 문제 설명
N명의 아이들이 M종류의 놀이기구를 탈 때,
놀이기구가 모두 비어 있는 상태에서 첫 번째 아이가 놀이기구에 탑승한다고 할 때, 줄의 마지막 아이가 타게 되는 놀이기구의 번호 구하기
🔍 풀이 방법
이분탐색 사용
걸릴 시간을 놀이기구 타는데 걸리는 시간으로 나누고, 해당 값이 N보다 작은지 여부 확인해서 N명이 타는데 걸리는 시간 구하고,
해당 시간 % time[i] == 0인 아이 구함
⏳ 회고
진짜 ㅋㅋ 너무 어려움 ㅋㅋㅋ 하..