Skip to content

Conversation

@03do-new30
Copy link
Contributor

🧷 문제 링크

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

🧭 풀이 시간

20분

👀 체감 난이도

✏️ 문제 설명

  • 어떤 컴퓨터 a가 다른 컴퓨터 b에 의존한다면, b가 감염되고 일정 시간 후 a도 감염됨
  • 감염된 컴퓨터 정보가 주어질때 총 감염된 컴퓨터 수와 마지막 컴퓨터가 감염되기까지 걸리는 시간을 구한다.

🔍 풀이 방법

  • a가 b에 의존하는 경우, 바이러스가 퍼지는 방향은 b->a이므로 방향성은 b->a와 같이 표현.
  • 다익스트라 알고리즘을 이용해 각 컴퓨터가 감염되기까지 걸린 시간을 계산한다.

⏳ 회고

  • 의존성을 방향성으로 전환할 때, 관계를 역으로 설정해줘야 하는 부분이 헷갈렸다.

@03do-new30 03do-new30 added the success 👍 해설을 보지 않고 풀었을 때 label Mar 25, 2025
@ShinHeeEul ShinHeeEul merged commit a6dfa1e into main Mar 25, 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