思路: 二分。 实现: 1 class MyCalendar { 2 public: 3 set<pair<int,int>>st; 4 MyCalendar() { 5 6 7 } 8 9 bool book(int start, int end) { 10 auto it=st.lower_bound({end,0}); 11 if(it==st.begin()){
专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]
Copyright (C)ICode9.com, All Rights Reserved.
ICode9版权所有