这里
```
int getfather(int x){
if(f[x]==x)return x;
return (f[x]=getfather(x));
}
```
明显写错了吧……
递归调用的应该是``getfather(f[x])``而不是``getfather(x)``
你这样写就会无限调用``getfather(x)``然后爆栈
by x义x @ 2019-01-11 18:46:09
@[x义x](/space/show?uid=58567)
改完之后。。WA的飞起+T的飞起。。
by 御坂13558号 @ 2019-01-11 18:48:03
@[璀璨天狼](/space/show?uid=144520)
题目看了一下貌似不是并查集啊
目测是Tarjan
by x义x @ 2019-01-11 18:51:16
@[璀璨天狼](/space/show?uid=144520) 还真是Tarjan
by x义x @ 2019-01-11 18:51:33