Vicky Kumar Yadav's submission of For the Benefit of All (hard version) | CodeChef