Skip to content

Fixed the formatting of the limits in the contest tab#599

Merged
malevitzch merged 7 commits into
sio2project:masterfrom
malevitzch:limits-fix
Feb 10, 2026
Merged

Fixed the formatting of the limits in the contest tab#599
malevitzch merged 7 commits into
sio2project:masterfrom
malevitzch:limits-fix

Conversation

@malevitzch
Copy link
Copy Markdown
Member

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).
image
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.

malevitzch and others added 3 commits November 26, 2025 18:10
…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.
@malevitzch
Copy link
Copy Markdown
Member Author

image Closes #600 as well now.

@malevitzch malevitzch assigned malevitzch and unassigned malevitzch Jan 6, 2026
@malevitzch malevitzch self-assigned this Jan 14, 2026
Copy link
Copy Markdown
Contributor

@twalen twalen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@malevitzch malevitzch closed this Feb 8, 2026
@malevitzch malevitzch deleted the limits-fix branch February 8, 2026 13:07
@malevitzch malevitzch restored the limits-fix branch February 10, 2026 09:23
@malevitzch malevitzch reopened this Feb 10, 2026
@sonarqubecloud
Copy link
Copy Markdown

@malevitzch malevitzch merged commit ddd7e99 into sio2project:master Feb 10, 2026
3 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frontend problems with different time/memory limits for different languages Limits improperly displayed

2 participants