feat(contests): generic partial credit + new HireUp OA questions - #127
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Every contest now scores with one rule instead of a HireUp-only rubric: each problem is worth 100 points and a submission earns round(100 * passedCount / totalCount) from its best attempt per problem. - Drop per-test 'points' weighting and the derived earnedPoints / possiblePoints columns; score is computed from pass counts alone. - Rename StandingRow.lastAcAt to lastScoredAt, since the tiebreaker now tracks the best scoring attempt rather than an accepted one. - Add the migration that drops the now-unused weighting columns so the schema and migration history stay in sync.
The chain stress test at N=200,000 made the expected answer 2.4 MB, above the judge's 2 MB OUTPUT_LIMIT (lib/judge/piston.ts). Piston truncates at that limit, so even a correct submission would have been marked wrong, and the CI reference validator failed 2/8 tests on it. - Cap Best Dispatch Hub at N <= 5*10^4 in both the constraints and the stress tests, which drops the largest answer to ~0.5 MB. An O(N^2) solution still times out at that size. Driver Rebalancing keeps N = 200,000 since it prints a single number. - Give the validator an 8 MB spawnSync buffer. Node's 1 MB default silently truncated large answers and reported them as mismatches instead of surfacing the real problem.
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.
Summary
Replaces the HireUp OA question set, extends its window to 90 minutes, and introduces partial credit that applies uniformly to every contest — not just HireUp.
Scoring (generic for all contests)
Every problem is worth 100 points. A submission scores:
Judge change
The judge previously stopped at the first failing test. It now runs the full test suite so partial credit reflects everything that actually passes. Compile errors still short-circuit, since no test can run.
HireUp OA
N = 2 * 10^5.Database
Two migrations, both applied to the configured database with no drift:
20260801090000_add_contest_partial_credit— addsContestParticipant.score, backfilling existing rows fromsolvedCount * 100so finalized contests keep their ordering.20260801120000_simplify_contest_partial_credit— drops the per-test weighting columns once scoring became uniform.ContestParticipant.scoreis retained so finalized standings keep their historical score.Validation
tsc --noEmit, production build, and Prettier all pass.prisma migrate diffreports no difference between the live database and the schema.Reviewer note
StandingRow.lastAcAtis renamed tolastScoredAt: the tiebreaker now tracks the best scoring attempt, which may not be an accepted one.