摘要: 题目:https://ac.nowcoder.com/acm/contest/22904/1024 思路:这道题网络上有很多思路,可以开三个并查集,可以使用带权并查集,但是有一个大佬的思路是这样的,将总结点的数量增加到3n个,把整个节点区域分为n,2*n,3*n三个部分,我们可以物种a的一个节点对应 阅读全文
posted @ 2024-11-13 21:35 梦曦缘 阅读(51) 评论(0) 推荐(0)
摘要: 程序员的第一份代码当然是"Hello World"啦 #include<iostream> using namespace std; int main(){ cout << "hello world"; return 0; } 阅读全文
posted @ 2024-10-01 20:12 梦曦缘 阅读(34) 评论(0) 推荐(0)