chocolate distribution problem hackerearth solution