Regarding question MAXEP of december long challenge

Plz explain first sub task

alt text

The first sub-task just reduces the constraint on N from 1 to 1000 from 1 to 150000. All other constraints remain the same.

//