Dinesh Goyal's submission of Weighted Necklace | CodeChef