我知道STL有set_difference,但我需要知道2 sets是否是不相交的.我已经分析了我的代码,这使我的应用程序放慢了很多.有没有一种简单的方法可以看出2套是不相交的,还是我只需要自己编写代码?
set_difference
set
编辑:我也试过,set_intersection但它花了相同的时间......
set_intersection
c++ algorithm stl disjoint-sets
algorithm ×1
c++ ×1
disjoint-sets ×1
stl ×1