Skip to content

Conversation

@lkhyun
Copy link
Contributor

@lkhyun lkhyun commented Aug 6, 2025

🧷 문제 링크

https://www.acmicpc.net/problem/16234

🧭 풀이 시간

20분

👀 체감 난이도

✏️ 문제 설명

NxN 나라에서 인접한 두 국가의 인구수 차이가 L 이상 R 이하인 경우 국경을 열어서
인구 이동을 진행한다. 이때 서로 나라간 이동이 가능한 경우 그 나라들을 연합이라고 한다.
연합에서의 인구이동은 연합내 모든 나라의 인구 수 합을 연합에 속한 나라의 수로 나누는 것이다.(소수점은 버린다)
인구이동이 일어나는 횟수를 출력하라.

🔍 풀이 방법

BFS
그냥 BFS하고 이동 여부 파악하고 q에 들어갔던 애들끼리만 인구수 조정하고 했음.

⏳ 회고

그냥 구현 하면 됐다. 함정없는 BFS 문제

@lkhyun lkhyun added the success 👍 해설을 보지 않고 풀었을 때 label Aug 6, 2025
@ShinHeeEul ShinHeeEul merged commit bf5c2f2 into main Aug 6, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants