Standard Ranklist (srk)
website·Indexed 32 days ago
https://srk.algoux.orgA static data format designed to describe ICPC, OI, and other contest rankings in a unified way. The srk ecosystem includes a specification for ranklists, participants, and problems, as well as a toolchain featuring a CLI tool, a renderer component, a utils library, and format conversion tools.
What's inside Standard Ranklist
- The Standard Ranklist Renderer Component is a set of web rendering components designed to transform SRK data into interactive ranking tables. It provides framework-specific implementations for React, Vue, Angular, Solid, and Svelte, supported by shared core logic and styles.
Overview of Standard Ranklist (srk) data format
Standard Ranklist (srk) is a static, extensible data format used to standardize the description of competitive programming ranklist data. It is designed to act as a universal interchange standard, allowing developers to mirror contest ranklists, migrate data between systems (e.g., DOMjudge, Codeforces), perform unified analysis, and archive contest results without writing custom scrapers for every platform. It is compatible with ICPC, OI, and extended contest formats.Overview of the srk ecosystem toolchain
The srk ecosystem provides a suite of tools for managing the data format specification, covering the entire workflow from data production to display and distribution. The core projects include:
- Standard Ranklist: Spec definition, types, and Schema (@algoux/standard-ranklist).
- Renderer Component: Web rendering components for displaying ranklists.
- CLI: Command-line tools for operating on srk files (@algoux/standard-ranklist-cli).
- Utils: Utility libraries for JavaScript/TypeScript, Python, and Go.
- Convert-to: A tool for converting srk data into other formats (@algoux/standard-ranklist-convert-to).
Render srk ranklists using the Renderer Component
Thestandard-ranklist-renderer-componentprovides web rendering components for displaying srk ranklists. It supports multiple frontend frameworks: React, Vue, Angular, Solid, and Svelte.Understand the srk static ranklist data format
srk is a static ranklist data format designed to describe a ranklist snapshot at a specific point in time. Unlike traditional systems that store individual submissions and compute rankings dynamically, srk stores the final state. This makes it highly compatible with data converted from HTML archives, PDFs, or screenshots, and allows it to handle incomplete data (e.g., scores without detailed submission records).Define independent ranking dimensions with RankSeries
RankSeries allows a ranklist to have multiple independent ranking dimensions. Each series computes rankings separately and can have its own title, segment definitions, and computation rules. Common examples include an 'Official Rank' with medal segments, an 'Overall Rank' for all participants, and a 'School Rank' that deduplicates by organization.{ "series": [ { "title": "Official Rank", "segments": [], "rule": { "preset": "ICPC" } }, { "title": "Overall Rank", "rule": { "preset": "Normal" } }, { "title": "School Rank", "rule": { "preset": "UniqByUserField" } } ] }Process ranklist data with the Utils library
Thestandard-ranklist-utilslibrary provides data processing functions for JavaScript/TypeScript, Python, and Go. It supports data validation, sorting, computation, and bidirectional conversion between static ranklists and submission record lists.Distribute and debug ranklists via RankLand
RankLand (https://rl.algoux.cn/) is a data distribution platform built on srk. It allows users to:
- Browse community and official contest ranklist data.
- Debug srk data online using the Playground.
- Connect managed contests for live external ranklist distribution and archiving.
- Use the Kessoku Series suite for live broadcast directing.
Use cases for Standard Ranklist Utils
Standard Ranklist Utils is designed for the following developer tasks:
- Converting raw submission data into srk format for ecosystem integration.
- Batch processing and analyzing srk data.
- Bidirectionally converting between srk and time-series submission records to build high-performance, incrementally-updated ranklist models.
Configure participant data and ranking in srk
To add ranking data, populate the
rowsarray with participant details and theseriesarray with ranking rules.Critical Constraint: Each row's
statusesarray must have the exact same length as theproblemsarray, as they correspond by index. Unsubmitted problems should be represented asnullin thestatusesarray.{ "type": "general", "version": "0.3.13", "contest": { "title": "My First Contest", "startAt": "2019-01-01T09:00:00+08:00", "duration": [5, "h"] }, "problems": [ { "alias": "A", "title": "Easy Problem" }, { "alias": "B", "title": "Hard Problem" }, { "alias": "C", "title": "Preventing AK Problem" } ], "series": [ { "title": "Rank", "segments": [ { "title": "Gold", "style": "gold" }, { "title": "Silver", "style": "silver" }, { "title": "Bronze", "style": "bronze" } ], "rule": { "preset": "ICPC", "options": { "count": { "value": [1, 1, 1] } } } } ], "rows": [ { "user": { "id": "team-alpha", "name": "Team Alpha" }, "score": { "value": 2, "time": [238, "min"] }, "statuses": [ { "result": "AC", "time": [128, "min"], "tries": 1 }, { "result": "FB", "time": [90, "min"], "tries": 2 }, { "result": "RJ", "tries": 3 } ] }, { "user": { "id": "team-beta", "name": "Team Beta" }, "score": { "value": 1, "time": [160, "min"] }, "statuses": [ { "result": "FB", "time": [120, "min"], "tries": 3 }, { "result": "RJ", "tries": 5 }, { "result": null } ] } ], "sorter": { "algorithm": "ICPC", "config": {} } }Use srk TypeScript type definitions
For TypeScript projects producing or consuming srk data, use the@algoux/standard-ranklistpackage to get full type hints and validation for theRanklistobject.npm install -D @algoux/standard-ranklistimport type * as srk from '@algoux/standard-ranklist' const ranklist: srk.Ranklist = { type: 'general', version: '0.3.13', contest: { title: 'My Contest', startAt: '2019-01-01T09:00:00+08:00', duration: [5, 'h'], }, problems: [{ alias: 'A' }], series: [], rows: [], }Install Standard Ranklist Utils for JavaScript, Python, or Go
The Standard Ranklist Utils library provides common srk data processing functions, including sorting computation, data transformation, and utility helpers (e.g., time conversion and result evaluation). It is available across multiple languages via the following packages:# JavaScript / TypeScript (npm) npm install @algoux/standard-ranklist-utils # Python (PyPI) pip install algoux-standard-ranklist-utils # Go (Go modules) go get github.com/algoux/standard-ranklist-utils/go