Implement time complexity-based scoring with cascading closure#7
Draft
Copilot wants to merge 6 commits intocopilot/improve-leaderboard-scoring-systemfrom
Draft
Implement time complexity-based scoring with cascading closure#7Copilot wants to merge 6 commits intocopilot/improve-leaderboard-scoring-systemfrom
Copilot wants to merge 6 commits intocopilot/improve-leaderboard-scoring-systemfrom
Conversation
Co-authored-by: kushb007 <26575576+kushb007@users.noreply.github.com>
Co-authored-by: kushb007 <26575576+kushb007@users.noreply.github.com>
Co-authored-by: kushb007 <26575576+kushb007@users.noreply.github.com>
Co-authored-by: kushb007 <26575576+kushb007@users.noreply.github.com>
Co-authored-by: kushb007 <26575576+kushb007@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix scoring system to apply only on first submission of open complexities
Implement time complexity-based scoring with cascading closure
Dec 31, 2025
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.
Scoring now awards points only for the first submission at each time complexity level. When a complexity is solved, that level and all easier complexities are closed from future scoring.
Changes
Database Schema
ProblemComplexitySolvetable with unique constraint on(problem_id, complexity)to track first solver per complexity levelexecution_timesanddetected_complexitytoSubmissionmodeloptimal_complexitytoProblemmodelComplexity Management (
bemo/complexity.py)is_complexity_open_for_scoring()checks if complexity already solved or closed by easier solutionrecord_complexity_solve()atomically records first solver via database constraintcalculate_complexity_bonus()awards scaled points (O(1)=8×, O(n)=6×, O(n²)=4×)Scoring Logic (
bemo/routes.py)record_complexity_solve()succeeds (handles races)UI
Example
Migration
Adds new fields and tables. Idempotent, backward compatible.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.