Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: Current Version
-
Fix Version/s: None
-
Component/s: OIOIOI
-
Labels:None
Description
ex. now IntegerScore is serialized ex. as int:99 or int:100,
so string ordering does not correspond to natural one.
Then, ordering in admin could be added.
so string ordering does not correspond to natural one.
Then, ordering in admin could be added.
Issue Links
- blocks
-
SIO-1329
sorting submissions execution time / source code length for admins
-
Activity
- All
- Comments
- History
- Activity
- Transitions
- Commits
It might not always be straightforward. With normal descending sorting you only need to zero-fill the value, but in ACM-style contests we use ordering like: ORDER BY accepted_solutions DESC, total_time ASC.
Take a look at AcmScore.to_repr here: https://gerrit.sio2project.mimuw.edu.pl/#/c/1744/12/oioioi/acm/score.py
I have tried to implement such ordering there (but forgot the ASC sorting).
One solution I can think of is to digit-negate the time (00123 -> 99876), but that's ugly ugly.
Take a look at AcmScore.to_repr here: https://gerrit.sio2project.mimuw.edu.pl/#/c/1744/12/oioioi/acm/score.py
I have tried to implement such ordering there (but forgot the ASC sorting).
One solution I can think of is to digit-negate the time (00123 -> 99876), but that's ugly ugly.
Show
Maciej Matraszek
added a comment - It might not always be straightforward. With normal descending sorting you only need to zero-fill the value, but in ACM-style contests we use ordering like: ORDER BY accepted_solutions DESC, total_time ASC.
Take a look at AcmScore.to_repr here: https://gerrit.sio2project.mimuw.edu.pl/#/c/1744/12/oioioi/acm/score.py
I have tried to implement such ordering there (but forgot the ASC sorting).
One solution I can think of is to digit-negate the time (00123 -> 99876), but that's ugly ugly.
https://gerrit.sio2project.mimuw.edu.pl/1857
SIO-1345Serialized scores lexical ordering shall match __cmp__ orderingChange-Id: I5bc7d5a69480f4b69043e0003c97d7363322e5b4