Fixed the formatting of the limits in the contest tab#599
Merged
Conversation
…longer sometimes randomly appear in scientific format. The memory limits are now displayed in mebibytes rather than megabytes since this seems more consistent with what package authors put in statement descriptions.
Member
Author
Closes #600 as well now.
|
|
jtkolinski
pushed a commit
that referenced
this pull request
Feb 25, 2026
First of all, time was displayed in scientific notation by accident (fixed by writing a custom formatter for time limits). Second, KiBs an KBs were unintuitively mixed in memory limits (they are now displayed as KiBs and it is stated explicitly). Also, previously, when the show_problems_limits option was enabled, the limits were displayed in tables inside a table because theoretically, multiple limits for different languages for the same problem are supported. This caused misalignment of limits, especially unnecessary when the contest does not support language-specific limits. Most of the contests only set a single limit for the problems, so this was a common issue. Now there are two modes, it is automatically detected whether or not there are multi-limits in any of the problems and the nested-table version is only used when such limits are detected, otherwise we use a much nicer, "regular" table.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




The time limits are now elegantly formatted to avoid relying on floating point numbers. Memory limits are now displayed in mebibytes rather than megabytes (which seems to be what many problemsetters call megabytes).

Closes #560.
The alignment is off, but this is a largely unrelated problem (that had been present before) which stems from much deeper problems with how limits are handled, I am opening a separate issue for it.