[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