Skip to content

[BOJ 17471] 게리맨더링 - #99

Merged
sh0723 merged 1 commit into
mainfrom
solve-boj17471
Jun 30, 2026
Merged

[BOJ 17471] 게리맨더링#99
sh0723 merged 1 commit into
mainfrom
solve-boj17471

Conversation

@sh0723

@sh0723 sh0723 commented Jun 30, 2026

Copy link
Copy Markdown
Owner

풀이 요약

  • 모든 구역 분할을 비트마스크로 순회했습니다.
  • 선택된 그룹과 선택되지 않은 그룹을 각각 DFS로 탐색해 연결 여부를 확인했습니다.
  • 두 그룹 중 하나라도 비어 있거나 연결되어 있지 않으면 후보에서 제외했습니다.
  • 유효한 분할에 대해 두 선거구의 인구 합 차이를 계산하고 최솟값을 갱신했습니다.

Link

https://velog.io/@sh0723/PS-%EB%B0%B1%EC%A4%80-17471%EB%B2%88-%EA%B2%8C%EB%A6%AC%EB%A7%A8%EB%8D%94%EB%A7%81

문제

  • BOJ 17471
  • 제목: 게리맨더링

Closes #98

@sh0723
sh0723 merged commit 80c55be into main Jun 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOJ 17471] 게리맨더링

1 participant