Skip to content

[BOJ 13244] Tree - #117

Merged
sh0723 merged 2 commits into
mainfrom
solve-boj13244
Jul 2, 2026
Merged

[BOJ 13244] Tree#117
sh0723 merged 2 commits into
mainfrom
solve-boj13244

Conversation

@sh0723

@sh0723 sh0723 commented Jul 2, 2026

Copy link
Copy Markdown
Owner

풀이 요약

  • V1은 간선 수가 N - 1인지 먼저 확인하고, 부모 정점을 제외한 DFS 방문으로 사이클 여부와 연결성을 검사했습니다.
  • V2는 간선 수 조건을 확인한 뒤 DFS로 연결 컴포넌트 개수를 세어, 하나의 컴포넌트이면 트리로 판별하도록 단순화했습니다.
  • 두 버전 모두 각 테스트 케이스마다 트리이면 tree, 아니면 graph를 출력합니다.

Link

https://velog.io/@sh0723/PS-%EB%B0%B1%EC%A4%80-13244-Tree-6rhmz1vb

문제

  • BOJ 13244
  • 제목: Tree

Closes #116

@sh0723
sh0723 merged commit 6bc55be into main Jul 2, 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 13244] Tree

1 participant