You are given a (0-indexed) array of positive integers candiesCount where candiesCount[i] represents the number of candies of the ith type you have. You are also given a 2D array queries where queries[i] = [favoriteType_i, favoriteDay_i, dailyCap_i].
You play a game with the following rules:
0.i unless you have eaten all candies of type i - 1.Construct a boolean array answer such that answer.length == queries.length and answer[i] is true if you can eat a candy of type favoriteType_i on day favoriteDay_i without eating more than dailyCap_i candies on any day, and false otherwise.
Note that you can eat different types of candy on the same day, provided that you follow rule 2.
Return the constructed array answer.
1 <= candiesCount.length <= 10^51 <= candiesCount[i] <= 10^51 <= queries.length <= 10^5queries[i].length == 30 <= favoriteType_i < candiesCount.length0 <= favoriteDay_i <= 10^91 <= dailyCap_i <= 10^9candiesCount = [7,4,5,3,8], queries = [[0,2,2],[4,2,4],[2,13,1000000000]][true,false,true]candiesCount = [5,2,6,4,1], queries = [[3,1,2],[4,10,3],[3,10,100],[4,100,30],[1,3,1]][false,true,true,false,false]