백준 / 1717번 / 집합의 표현 / python 파이썬![](https://tistory1.daumcdn.net/tistory_admin/blogs/image/category/new_ico_5.gif)
![](https://tistory1.daumcdn.net/tistory_admin/blogs/image/category/new_ico_5.gif)
·
개발 | 프로젝트/Python
문제 : https://www.acmicpc.net/problem/1717 예제 입력 1 7 80 1 31 1 70 7 61 7 10 3 70 4 20 1 11 1 1예제 출력 1 NONOYES나의 풀이n, m = map(int, input().split())parent = [i for i in range(n+1)]def find(a): if parent[a] == a: return a parent[a] = find(parent[a]) return parent[a]def union(a,b): a, b = find(a), find(b) if a == b: return parent[a] = bdef check(a,b): if parent[a] == pare..