It is not necessary to quote the input vectors in your submission because this does not anything of value to it. Quite the opposite, in fact.
Therefore it would be nice if you could simply remove it.
The argument you make about the placement of the 2nd and 3rd largest values does not really hold water - you have misled yourself there. If the 2nd largest value occurs only once then the 3rd largest value cannot not occur more than two times, not three times as you stated.
What matters is that a run of equal values that starts to the left of the main diagonal must not be longer than the diagonal it starts in. It is completely irrelevant how many distinct values there are before the start of the run, and therefore what the rank of the value is (i.e. 2nd largest, 3rd largest ...).
On a more positive note, your code is a lot cleaner and clearer now than it was in your first submission. Kudos!