Each flower blooms over an inclusive time interval. flowers[i] = [start, end] means that flower is blooming at every time from start through end, including both endpoints.
people[j] is the arrival time of person j. Return an array whose entry at index j counts the flowers blooming at that person's arrival. Preserve the order of people in the answer.
Flowers may have identical intervals, and people may arrive at the same time. Each flower is counted separately.
Example 1:
Input: flowers = [[2,4],[4,6],[7,7]]
people = [1,4,6,7]
Output: [0,2,1,1]Explanation: At time 1 no flower is blooming. At time 4, both [2,4] and [4,6] count because endpoints are included. Times 6 and 7 each have one blooming flower.
Example 2:
Input: flowers = [[3,8],[3,8],[5,5]]
people = [5,3,9,5]
Output: [3,2,0,3]Explanation: The two identical [3,8] intervals count as separate flowers. At time 5 all three flowers bloom; at time 3 only the first two do; at time 9 none do. Repeated time 5 gives the same count again.
Example 3:
Input: flowers = [[10,12]]
people = [12,10,11,13]
Output: [1,1,1,0]Explanation: The flower is blooming at times 10, 11, and 12, including both endpoints. It has stopped by time 13. Answers follow the given arrival order.
Constraints:
1 <= flowers.length <= 50000flowers[i].length == 21 <= flowers[i][0] <= flowers[i][1] <= 10000000001 <= people.length <= 500001 <= people[i] <= 1000000000