Notes to self:
If P is a tourney player let:
* NAME(P) be his name
* HAND(P) be the hand serial number at the end of which he stands
* START(P) be his stack at the beginning of this hand
* END(P) be his stack at the end of this hand
* POS(P) be the position of his seat clockwise from button (position 10=button)
* SITOUT(P) be True or False whether P is eliminated for sitting-out too many hands
* BUST(P) be True or False whether P stands because he busted
Two remarks on BUST(P) and SITOUT(P):
1) There's no way to determine SITOUT(P) other than looking at the hand log message
"NAME(P)eliminated for sitting out too many hands ."
One could think that if a player stands while not busted, then SITOUT(P) is True,
but this is forgetting that the tourney winner stands with non-stack too.
2) BUST(P) cannot be tested by END(P) == 0.
Indeed, juliafairy was seen busted while still having 0.01$ in chips.
So BUST(P) should be tested by END(P) <= EPSILON, for some (unknown yet) small EPSILON.
I would not be surprised that some players manage to stand with a slightly negative stack too.
Also:
3) It is possible that a sitout player busts just on his folding count limit by paying a blind.
We suppose in case that he's eliminated on busting instead of sitting-out.
4) The order of standing at the end of a same hand is undefined
and in particular unrelated to ranking.
So we cannot rely on the order of standing to build the ranking.
In order to sort a list a tourney players who all stood,
we need to be able compare two players X and Y, (X < Y meaning X is out before Y).
My guess for the ranking used by the system is currently
the following tests made in this order:

if HAND(X) < HAND(Y) then we have X < Y, otherwise...
if HAND(Y) < HAND(X) then we have Y < X, otherwise...
(latest hand wins, the easy case)
(now hands are the same, the head-ache begins...)
if BUST(X) AND NOT BUST(Y) then we have X < Y, otherwise...
if BUST(Y) AND NOT BUST(X) then we have Y < X, otherwise...
(non-busted player wins, regardeless of sitout status)
if NOT BUST(X) AND NOT BUST(Y) then...
*** if SITOUT(X) AND NOT SITOUT(Y) then we have X < Y, otherwise...
*** if SITOUT(Y) AND NOT SITOUT(X) then we have Y < X, otherwise...
(non-sitout player wins)
(we then swith to the normal comparison: starting stack and position...)
if START(X) < START(Y) then we have X < Y, otherwise...
if START(Y) < START(X) then we have Y < X, otherwise...
(largest starting stack wins)
if POS(X) > POS(Y) then we have X < Y, otherwise...
POS(Y) > POS(X) necessarily, and we have have Y < X
(eariest position wins)

This is equivalent to the following:
* P is O-qualified if NOT SITOUT(P) AND NOT BUST(P)
* P is B-qualified if NOT SITOUT(P) AND BUST(P)
* P is S-qualified if SITOUT(P) AND NOT BUST(P)
* P is A-qualified if SITOUT(P) AND BUST(P)
The matrix below gives the winner between X and Y
if X and Y stand in same hand, according to their qualifiers:
A S B O X/Y
[Y Y Y U] O
[N X N X] B
[Y N Y X] S
[N X N X] A
where:
* U is undefined, since two O-qualified players mean both are winners.
* N is the normal comparison, first comparing starting stack, and then position)
that is, if (QxQy) is the couple of qualifier corresponding to (XY), we have:
(OO)= U
(BB)=(SS)=(AA)=(BA)=(AB)= N
(BO)=(BS)=(AO)=(AS)= Y
(OB)=(SB)= (OA)= (SA)= X