Mirror RCPC 2023 Day 1 | J. Triple Reverse Sort

This was the problem page during the contest. Access the current page here.