1 int pa[maxn];
2 for(int i = 0; i < maxn; i++) pa[i] = i;
3 int findpa(int x) {return pa[x] != x ? findpa(pa[x]) : x;}

 

相关文章:

  • 2021-11-13
  • 2021-06-04
猜你喜欢
  • 2022-12-23
  • 2021-11-01
  • 2021-10-10
  • 2022-02-12
  • 2022-01-02
  • 2022-01-06
相关资源
相似解决方案