Skip to content

Conversation

@Ukj0ng
Copy link
Contributor

@Ukj0ng Ukj0ng commented Sep 16, 2025

🧷 문제 링크

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

🧭 풀이 시간

60분

👀 체감 난이도

✏️ 문제 설명

전쟁을 하는데 속국이 전쟁에 참여해서 지면 속국의 종주국까지 포함해서 상대 종주국에 귀속됨. 전쟁의 마지막에 종주국이 몇 개인지, 어떤 종주국이 있는지 알아라.

🔍 풀이 방법

분리집합을 사용하는데, union에서 승패에 따라 종주국을 잘 포함한다.

⏳ 회고

오랜만에 ai없이 내 힘으로 풀었는데, 기분이 좋다. 쉬웠던 문제

@ShinHeeEul ShinHeeEul merged commit 1241b70 into main Sep 16, 2025
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.

3 participants