#24567: lower_bound c++


wallacechu0409@gmail.com (Wallace Chu)


先用struct 來sort ,再用lower bound 找出要插入vector的index,用vector.insert 插入切割點的座標在剛剛取的index於vector裡,之後用long long sum=sum+v[index+1]-v[index-1],最後輸出sum 即可。