自己脑洞的并查集,求解#2 #9 #10RE

P3367 【模板】并查集

为什么要用map呢……数组不是蛮好的
by D10s @ 2017-11-29 19:59:06


@[D10s](/space/show?uid=33426) 我在想能不能用一种骚操作避免掉最开始的 fa[i]=i;······
by Dog_Two @ 2017-12-01 22:05:45


``` class node{ public: node*father; node() { father=this; } node*find(); node*link(node*); } ```
by 密期望 @ 2018-02-11 21:30:06


完了,差了个分号
by 密期望 @ 2018-02-11 21:30:36


|