Click here to read the complete problem statement.
Editorial needed @math_rocker @Gomuj or anyone
Yes, I also need editorial