oioioi.mp.score

Module Contents

Classes

FloatScore

Base class of all classes that represent a score. Subclass

class oioioi.mp.score.FloatScore(value)[source]

Bases: oioioi.contests.scores.ScoreValue

Base class of all classes that represent a score. Subclass ScoreValue to implement a custom score.

symbol = float[source]
__rmul__[source]
__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.

__mul__(other)[source]
__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.

__str__()[source]

Return str(self).

__unicode__()[source]

Returns string representing score, suitable to display to the user.

Must be overridden in all subclasses.

__repr__()[source]

Return repr(self).

classmethod _from_repr(value)[source]

Creates an instance based on data from _to_repr().

Must be overridden in all subclasses.

_to_repr()[source]

Returns score data serialized to string, without the class’s symbol.

Must be overridden in all subclasses.

Lexicographical order of serialized data has to correspond to the given by __eq__() and __lt__(), it will be used for sorting at db level.

to_int()[source]