题目链接:https://www.luogu.com.cn/problem/P2024参考博客:https://www.luogu.com.
一种并没有ac,而是ac了4个点,TLE了4个点的答案: 1:为什么要讲,因为总结了几点自己原来会用但是并不能区分两种递归之间区别的并查集找根函数 先看这段代码int find(int x)//查根{ if(x!=fa[x])...
题目链接:https://www.luogu.com.cn/problem/P1197参考博客:https://
题目链接:https://www.luogu.com.cn/problem/P1525参考博客:https://www.luogu.com.cn/blog/chtholly20094/solution-p
题目链接:https://www.luogu.com.cn/problem/P1330参考博客:https://www.luogu.com.cn/blog/D-fzy/feng-suo-yang-guang-tai-xue这道题目自己写了三篇题解,分别是不同的思路,这个题解参考上边博客的代码,但是它讲的并不清楚,于是我解释如下,也是大致理解算法:并查集代码解释:1:..
题目链接:https://www.luogu.com.cn/problem/P1892参考博客:https://www.luogu.com.cn/blog/user52892/so
题目链接:https://www.luogu.com.cn/problem/P2307参考博客:https://www.luogu.com
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号