Weights Division (hard version)

Problem Name:
Weights Division (hard version)
Site:CodeForces
Links:
Tags: