PARSIN - Editorial

PROBLEM LINKS

Practice
Contest

DIFFICULTY

HARD

EXPLANATION

You can view the editorial here.

SETTER’S SOLUTION

Can be found here.