Skip to content

Conversation

@lkhyun
Copy link
Contributor

@lkhyun lkhyun commented Sep 29, 2025

🧷 문제 링크

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

🧭 풀이 시간

30분

👀 체감 난이도

✏️ 문제 설명

1부터 N까지의 여행지를 여행계획이 주어질 때 갈 수 있는지 여부 판단.
예를 들어 1,2,3을 가야할때, 1->3->1->2도 갈 수 있다고 가정.

🔍 풀이 방법

BFS
그냥 시작지점에서 BFS 돌려서 방문하는 곳 다 Set에 넣어서 여행계획이 그 Set 안에 있는지 판단하는 것으로 구현함. 분리집합도 생각해볼 수 있을 것 같음.

⏳ 회고

여행계획을 M으로 받아야하는데 N으로 받아놓고 왜 안되지 이러고 있었음.
문제를 풀면 늘어야하는데 왜 점점 퇴화하는 건지 모르겠다

@lkhyun lkhyun self-assigned this Sep 29, 2025
@lkhyun lkhyun added the success 👍 해설을 보지 않고 풀었을 때 label Sep 29, 2025
@ShinHeeEul ShinHeeEul merged commit b51025b into main Sep 29, 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