this problem actually subproblem problem G contestthere n candy candy box the type ith candy a_i 1 le a_i le nYou prepare gift candy follow restriction number candy type present gift distinct ie example gift have candy type 1 candy type 2 bad it possible multiple type candy completely absent gift it possible candy type take giftYour task find maximum possible size single gift prepare candy haveyou answer q independent queriesif Python programmer consider PyPy instead Python submit code