[20250926] BOJ / G4 / 교도소 / 권혁준 #985
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/34472
🧭 풀이 시간
10분
👀 체감 난이도
✏️ 문제 설명
교도소에 N개의 방이 원형으로 배치되어 있고, 한 방향으로만 이동 가능하다.
각 방에는 A[i]명의 수감자가 있을 때, 모든 방에 있는 수감자 수를 동일하게 만드는 이동 횟수의 최솟값을 구해보자.
🔍 풀이 방법
두 바퀴 돌면서 목표 인원 수보다 많으면 옆으로 토스해줬다.
⏳ 회고
이게 왜 골드지?