Open
Conversation
Penalty value, default set submit cd time to 1 secs. Show IOI Score Type in IOI Mode.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces ICPC (ACM) contest mode to the platform, implementing the ICPC ranking algorithm alongside the existing IOI mode. It also makes the IOI 2013 ranking algorithm selectable, which previously existed but was not user-accessible.
Changes:
- Implemented ICPC scoring algorithm with penalty-based ranking (first AC time + penalties for wrong submissions)
- Added contest mode selector and penalty value configuration in contest management UI
- Added score type selector for problems in IOI mode (IOI2017 vs IOI2013)
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/static/templ/contests/scoreboard.html | Adds ICPC-style scoreboard rendering with AC count, penalty time display, and sorting logic for ICPC mode |
| src/static/templ/contests/proset.html | Conditionally hides score column in ICPC mode where only AC/not-AC matters |
| src/static/templ/contests/manage/pro.html | Adds UI for selecting problem score type (IOI2013/IOI2017) when managing contest problems |
| src/static/templ/contests/manage/general.html | Adds penalty value configuration field and dynamic UI updates based on contest mode |
| src/services/contests.py | Implements get_icpc_scores method with SQL query calculating ICPC scores and filtering invalid submissions |
| src/handlers/contests/scoreboard.py | Routes score calculation to ICPC or IOI algorithms based on contest mode |
| src/handlers/contests/manage/pro.py | Adds score type parameter handling and update action, fixes cache invalidation to use hdel instead of full cache deletion |
| src/handlers/contests/manage/general.py | Adds penalty_value parameter handling with validation and mode-specific defaults |
| migration/20251215000000_add_contest_penalty_value.py | Adds penalty_value column to contest table with default value of 20 minutes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8f3e13e to
0417eee
Compare
If two teams have the same number of problem solved and penalty, then the winner goes to the team of the less ID of their last accepted challenge.
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.
This PR introduces a new contest mode, ICPC, with the primary change being the implementation of the ICPC ranking algorithm.
Additionally, it makes the IOI 2013 ranking algorithm optional.
Although this algorithm already existed in the codebase, it was not previously selectable