oioioi.pa.score
¶
Module Contents¶
Classes¶
PA style score. |
- class oioioi.pa.score.PAScore(points=None, distribution=None)[source]¶
Bases:
oioioi.contests.scores.ScoreValue
PA style score.
It consists of a number of points scored, together with their distribution. When two users get the same number of points, then the number of tasks for which they got 10pts (maximal score) is taken into consideration. If this still does not break the tie, number of 9 point scores is considered, then 8 point scores etc.
- __add__(other)[source]¶
Implementation of operator
+
.Used for example when creating user result for round based on scores from all problems of the round.
Must be overridden in all subclasses.
- __eq__(other)[source]¶
Implementation of operator
==
. Used to produce ranking, being greater means better result.Must be overridden in all subclasses.
- __lt__(other)[source]¶
Implementation of operator
<
. Used to produce ranking, being greater means better result.Must be overridden in all subclasses.
- __unicode__()[source]¶
Returns string representing score, suitable to display to the user.
Must be overridden in all subclasses.
- classmethod _from_repr(value)[source]¶
Creates an instance based on data from
_to_repr()
.Must be overridden in all subclasses.