you give 0indexed array positive integer candiescount candiesCounti represent number candy ith type you give 2D array query queriesi favoriteTypei favoriteDayi dailycapiyou play game follow rulesyou start eat candy day 0you eat candy type eat candy type 1you eat candy day eat candiesconstruct boolean array answer answerlength querieslength answeri true eat candy type favoriteTypei day favoritedayi eat dailycapi candy day false note eat different type candy day provide follow rule 2return construct array answer Example 1input candiesCount 74538 query 0224242131000000000output truefalsetrueexplanation1 if eat 2 candy type 0 day 0 2 candy type 0 day 1 eat candy type 0 day 22 you eat 4 candy day if eat 4 candy day eat 4 candy type 0 day 0 4 candy type 0 type 1 day 1 on day 2 eat 4 candy type 1 type 2 eat candy type 4 day 23 if eat 1 candy day eat candy type 2 day 13example 2input candiesCount 52641 query 3124103310100410030131output falsetruetruefalsefalse Constraints1 candiescountlength 1051 candiesCounti 1051 querieslength 105queriesilength 30 favoriteTypei candiescountlength0 favoritedayi 1091 dailycapi 109