일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- 프로그래머스
- 715. Range Module
- Convert Sorted List to Binary Search Tree
- data science
- LeetCode
- Substring with Concatenation of All Words
- 315. Count of Smaller Numbers After Self
- 운영체제
- attribute
- 109. Convert Sorted List to Binary Search Tree
- Generator
- concurrency
- shiba
- Python Code
- iterator
- 컴퓨터의 구조
- 43. Multiply Strings
- kaggle
- 파이썬
- Protocol
- t1
- 30. Substring with Concatenation of All Words
- DWG
- 시바견
- Class
- Python
- Python Implementation
- Regular Expression
- 밴픽
- Decorator
Archives
- Today
- Total
목록서로소 집합 (1)
Scribbling
서로소 집합 알고리즘
v, e = map(int, input().split()) edges = [] for _ in range(e): edges.append(list(map(int, input().split()))) parent = [0] * (v+1) for i in range(v+1): parent[i] = i def find_parent(parent, a): if parent[a] == a: return a else: parent[a] = find_parent(parent, parent[a]) return parent[a] def union(parent, a, b): a = find_parent(parent, a) b = find_parent(parent, b) if a < b: parent[b] = a else: pa..
Computer Science/Algorithms & Data Structures
2021. 8. 12. 14:38