chumeng's blog

By chumeng, history, 5 months ago, In English

Introduction

XCPC Statement Generator is an open-source, browser-based application designed specifically for creating XCPC-style contest statements. Built with React, TypeScript, and powered by Typst (a modern typesetting system), this tool allows contest organizers to edit problem statements from various formats(Markdown, LaTeX and Typst) and export them as formatted PDFs that closely mirror the style of major competitive programming competitions in China (or competitions that use olymp.sty to create contest statements).

screenshot

You can try XCPC Statement Generator on This Website, or get the source code on GitHub

Features

  • Pure Browser-Based Operation: It runs entirely in your browser, simply open the web application.
  • Support Polygon Packages: The tool supports importing Polygon contest packages. Contest organizers who use the Polygon system for problem management can directly import their exported ZIP files, automatically parsing problem statements, examples, and metadata.
  • Multi-Format Support: XCPC Statement Generator supports three popular problem statement formats: Markdown, LaTeX and Typst.
  • Real-Time Preview: Thanks to Typst, as you write or edit problem statements, you can instantly see how they will appear in the final PDF, ensuring what you see is what you get.

Updates

[0.2.2] — 2026-02-19

Added

  • Cloud Sync – Support for syncing contest data to the cloud (Alibaba Cloud OSS, Tencent Cloud COS, AWS S3).
  • GitHub Directory Support – Option to select specific GitHub repository directories during cloud sync.
  • Tab/Shift+Tab Support – Keyboard navigation for the CodeMirror editor.
  • Custom Template Editor – Edit custom Typst templates directly within the settings.
  • Preview Zoom – Canvas-rendered previews now support zooming.

Fixed

  • Error prompt when saving a version without selecting a branch.

[0.2.1] — 2026-02-18

Added

  • PDF Export for Single Problems – Available via the sidebar context menu and editor toolbar.
  • Responsive Mobile Layout – Includes a new bottom tab navigation for mobile devices.
  • Version Control System – Support for viewing and rolling back contest edit history.

Fixed

  • Removed main container margins and improved bottom navigation bar styling.
  • Fixed an issue where non-input content was selectable.

[0.2.0] — 2026-02-18

Added

  • Sidebar and problem management functionality.
  • Context menu (right-click) for problem items.
  • Drag-and-drop sorting support.
  • Problem reordering options in settings.
  • Independent language settings for cover pages and problems.
  • Navigation/page jumping between problems.

Changed

  • Replaced Monaco Editor with CodeMirror 6 and implemented a tab-based editor.
  • Migrated UI framework from Ant Design to daisyUI + Tailwind CSS.
  • Reorganized the contest editor architecture.

Fixed

  • Editor switching leaks and single-problem preview issues.
  • Race conditions causing image loading failures on initial import or refresh.
  • Key generation issues for drag-and-drop sorting states.

[0.1.5] — 2025-12-11

Added

  • Collapsible problem cards.
  • Support for drag-and-drop reordering.

[0.1.4] — 2025-12-10

Added

  • Internationalization (i18n) support.
  • Independent language configuration for cover and content.

[0.1.3] — 2025-12-08

Added

  • Multi-language support.
  • Image upload functionality.

Fixed

  • Support for bold styling in SimSun (SimSun-Bold) fonts.

[0.1.2] — 2025-12-08

Added

  • Monaco Editor integration.
  • Enhanced formatting support.

[0.1.1] — 2025-12-04

Added

  • Polygon package import functionality.
  • GitHub Pages deployment workflow.

[0.1.0] — 2025-11-27

Added

  • Initial release.
  • Typst compiler integration.
  • Core contest editor features.
  • Vote: I like it
  • +120
  • Vote: I do not like it

»
5 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by chumeng (previous revision, new revision, compare).

»
5 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

I really need this!

»
5 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

The version at the time of the blog post had issues that made it inaccessible; it has now been fixed and is working normally

»
5 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

We’re running our school’s contest next week, and a solid set of problems would help a ton. Really appreciate it ^_^ ❤❤❤

»
5 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

We really need this, what a great creation!

»
5 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

What is XCPC? Does it mean "basically ICPC but not necessarily international"?

  • »
    »
    5 months ago, hide # ^ |
     
    Vote: I like it +13 Vote: I do not like it

    In China we have CCPC(China Collegiate Programming Contest) and ICPC, they are all referred to as XCPC. Basically, the statements of these two competitions are created using olymp.sty here(looks like my screenshot).

  • »
    »
    5 months ago, hide # ^ |
     
    Vote: I like it +8 Vote: I do not like it

    I haven't seen what other countries' ICPC regional competition statements look like, but polygon's default template is olymp.sty, so I think it's basically international enough.

  • »
    »
    5 months ago, hide # ^ |
     
    Vote: I like it +8 Vote: I do not like it

    So the XCPC here is just a colloquialism for all similar college programming competitions.

»
5 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Update: Improved multi-language support (currently supports English and Chinese)

»
4 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Another feature not mentioned in the introduction is that statements can be exported as structured JSON files, so it is convenient to use git for version management, or upload to GitHub and collaborate with other team members.

»
4 months ago, hide # |
 
Vote: I like it +11 Vote: I do not like it

Typst mentioned = instant upvote

»
4 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Update: Added support for collapsing/expanding problem details and drag-and-drop reordering of problems

»
4 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by chumeng (previous revision, new revision, compare).

»
2 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by chumeng (previous revision, new revision, compare).