my calendar iii 这个 不明白
leetcode吧
全部回复
仅看楼主
level 1
wqedggc 楼主
MyCalendarThree();
MyCalendarThree.book(10, 20); // returns 1
MyCalendarThree.book(50, 60); // returns 1
MyCalendarThree.book(10, 40); // returns 2
MyCalendarThree.book(5, 15); // returns 3
MyCalendarThree.book(5, 10); // returns 3
MyCalendarThree.book(25, 55); // returns 3
Explanation: The first two events can be booked and are disjoint, so the maximum K-booking is a 1-booking.The third event [10, 40) intersects the first event, and the maximum K-booking is a 2-booking.The remaining events cause the maximum K-booking to be only a 3-booking.Note that the last event locally causes a 2-booking, but the answer is still 3 becauseeg. [10, 20), [10, 40), and [5, 15) are still triple booked.
袋数第二个输出为什么是3啊啊啊啊?????怎么算都不超过两个啊
2018年02月04日 12点02分 1
level 13
第二个输出哪里写了是3?
2018年02月06日 22点02分 2
1