⚡ Build the skills to land top-paying quant jobs. Offer ends in 25d 09h 52m 08s25 days 9 hours 52 minutes 8 seconds.
An integer array is updated in rounds. In each round, all changes are decided simultaneously from the array as it stood at the start of the round: an interior element that is strictly smaller than both its neighbours increases by 1, an interior element that is strictly larger than both neighbours decreases by 1, and everything else (including the first and last elements) is unchanged. Rounds repeat until a round changes nothing.
Starting from , give two numbers as a comma-separated list: (1) the number of rounds that change the array before it settles (do not count the final round that makes no change), and (2) the sum of the elements of the settled array.