E was such a pain, I recognised LIS — knew had to handle consecutive same elements somehow.
I only tried with sorting in increasing a and then increasing b.
Editorial shows answer breaking ties by decreasing b?
E was such a pain, I recognised LIS — knew had to handle consecutive same elements somehow.
I only tried with sorting in increasing a and then increasing b.
Editorial shows answer breaking ties by decreasing b?