若你大量使用二分求解,请特别注意+1 -1等边界问题,别向我这个若只一样因为一个-1调个半天。
+1
-1
(就是下图这个-1导致浪费了 1h1h1h 多)
ed=lower_bound(rDep[dep[u]].begin(),rDep[dep[u]].end(),(koishi){bro[at],dfn[bro[at]]})-rDep[dep[u]].begin()/*-1*/;