Bouquet (Hard Version)

Problem Name:
Bouquet (Hard Version)
Site:CodeForces
Links:
Tags:
Problem setters: