그래프(2)
-
[BOJ 24977] Visits
https://www.acmicpc.net/problem/24977 24977번: Visits Each of Bessie’s $N$ ($2\le N\le 10^5$) bovine buddies (conveniently labeled $1\ldots N$) owns her own farm. For each $1\le i\le N$, buddy $i$ wants to visit buddy $a_i$ ($a_i\neq i$). Given a permutation $(p_1,p_2,\ldots, p_N)$ of $1\ldots N$, the visit www.acmicpc.net - 문제 요약 베시의 N명의(2
2023.02.07 -
[BOJ 26972] Barn Tree
https://www.acmicpc.net/problem/26972 26972번: Barn Tree Farmer John's farm has $N$ barns ($2 \leq N \leq 2\cdot 10^5$) numbered $1 \dots N$. There are $N-1$ roads, where each road connects two barns and it is possible to get from any barn to any other barn via some sequence of roads. Currently, the $j$th barn h www.acmicpc.net - 문제 요약 Farmer John의 농장에는 건초가 들어있는 N개의 헛간이 있습니다. N개의 헛간에는 1~N까지 번호가 붙..
2023.02.05