1.调用的方法不加&,没有使用引用导致每次函数调用重复创建形参,从而对于大数据的运行时间超时。
2.如果对二维vector先按一维排序再按二维排序,修改的方法中不要用<=或者>=
sort(intervals.begin(), intervals.end(), [](const auto&e1, const auto&e2){
return e1[0]<e2[0]||(e1[0]==e2[0]&&e1[1]<e2[1]);
}
3.根据计算优先级d&ret应该加括号
while((d&ret)==0){
d=d<<1;
}