Problem 3616 · Easy
Keep the best rank seen so far and count each strict improvement that replaces it.
Open the interactive visualisation